<commit_before>#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>

#include "GameEngine.h"
#include "GameData.h"
#include "EntityContainer.h"
#include "RenderData.h"
#include "Timer.h"
#include "DeltatimeMonitor.h"
#include "VirtualGameStateController.h"

namespace flat2d
{
	void GameEngine::init(int screenWidth, int screenHeight, int fps)
	{
		this->screenWidth = screenWidth;
		this->screenHeight = screenHeight;
		this->screenFps = fps;
		this->screenTicksPerFrame = 1000 / fps;
	}

	void GameEngine::run(VirtualGameStateController *gameStateController) const
	{
		SDL_Renderer *renderer = gameData->getRenderData()->getRenderer();
		EntityContainer *entityContainer = gameData->getEntityContainer();

		Timer fpsTimer;
		Timer drawFpsTimer;

		fpsTimer.start();
		drawFpsTimer.start();

		// Loop stuff
		flat2d::Timer fpsCapTimer;;
		SDL_Event e;
		bool quit = false;

		// Main loop
		gameData->getDeltatimeMonitor()->updateDeltaTime();
		while (!quit) {
			fpsCapTimer.start();
			gameData->getDeltatimeMonitor()->updateDeltaTime();

			if (gameStateController) {
				quit = gameStateController->quit();
				if (gameStateController->gameStateCheck(gameData)) {
					continue;<commit_msg>Removes minor typo in GameEngine.cpp<commit_after>#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>

#include "GameEngine.h"
#include "GameData.h"
#include "EntityContainer.h"
#include "RenderData.h"
#include "Timer.h"
#include "DeltatimeMonitor.h"
#include "VirtualGameStateController.h"

namespace flat2d
{
	void GameEngine::init(int screenWidth, int screenHeight, int fps)
	{
		this->screenWidth = screenWidth;
		this->screenHeight = screenHeight;
		this->screenFps = fps;
		this->screenTicksPerFrame = 1000 / fps;
	}

	void GameEngine::run(VirtualGameStateController *gameStateController) const
	{
		SDL_Renderer *renderer = gameData->getRenderData()->getRenderer();
		EntityContainer *entityContainer = gameData->getEntityContainer();

		Timer fpsTimer;
		Timer drawFpsTimer;

		fpsTimer.start();
		drawFpsTimer.start();

		// Loop stuff
		flat2d::Timer fpsCapTimer;
		SDL_Event e;
		bool quit = false;

		// Main loop
		gameData->getDeltatimeMonitor()->updateDeltaTime();
		while (!quit) {
			fpsCapTimer.start();
			gameData->getDeltatimeMonitor()->updateDeltaTime();

			if (gameStateController) {
				quit = gameStateController->quit();
				if (gameStateController->gameStateCheck(gameData)) {
					continue;
{'fraction_non_alphanumeric': 0.1287375415282392, 'fraction_numerical': 0.006644518272425249, 'mean_word_length': 5.145408163265306, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2180045', 'n_tokens_mistral': 894, 'n_tokens_neox': 788, 'n_words': 153}