<commit_before>#include <SDL2/SDL.h>
#include <unistd.h>
#include "SDL2_framework/Game.h"
#include "SDL2_framework/GameObjectFactory.h"
#include "SDL2_framework/MenuButton.h"
#include "Player.h"
#include "Enemy.h"
#include "MainMenuState.h"
#include <libgen.h>

const int FPS = 60;
const int DELAY_TIME = 1000 / FPS;

void parseArguments(int argc, char* args[], bool *fullScreen);
void initResources(Game* game);
void initObjectTypes();

void parseArguments(int argc, char* args[], bool *fullScreen) {
	int c;
	while ((c = getopt (argc, args, "f")) != -1) {
		switch (c) {
			case 'f':
				*fullScreen = true;
				break;
			default:
				abort();
		}
	}
}

int main(int argc, char* args[]) {
	Game* g;
	bool fullScreen;
	Uint32 frameStart, frameTime;

	parseArguments(argc, args, &fullScreen);

	g = Game::Instance();
	initResources(g);
	initObjectTypes();
	g->setBinaryPath(dirname(args[0]));
	if (!g->init("My first window", 100, 100, 640, 480, fullScreen)) {<commit_msg>binary path provided as absolute path<commit_after>#include <SDL2/SDL.h>
#include <unistd.h>
#include <stdlib.h>
#include "SDL2_framework/Game.h"
#include "SDL2_framework/GameObjectFactory.h"
#include "SDL2_framework/MenuButton.h"
#include "Player.h"
#include "Enemy.h"
#include "MainMenuState.h"
#include <libgen.h>

const int FPS = 60;
const int DELAY_TIME = 1000 / FPS;

void parseArguments(int argc, char* args[], bool *fullScreen);
void initResources(Game* game);
void initObjectTypes();

void parseArguments(int argc, char* args[], bool *fullScreen) {
	int c;
	while ((c = getopt (argc, args, "f")) != -1) {
		switch (c) {
			case 'f':
				*fullScreen = true;
				break;
			default:
				abort();
		}
	}
}

int main(int argc, char* args[]) {
	Game* g;
	bool fullScreen;
	char buffer[1024];
	std::string binaryPath;
	Uint32 frameStart, frameTime;

	parseArguments(argc, args, &fullScreen);

	realpath(dirname(args[0]), buffer);
	binaryPath = buffer;
	g = Game::Instance();
	initResources(g);
	initObjectTypes();
	g->setBinaryPath(binaryPath);
	if (!g->init("My first window", 100, 100, 640, 480, fullScreen)) {
{'fraction_non_alphanumeric': 0.1610738255033557, 'fraction_numerical': 0.026845637583892617, 'mean_word_length': 4.962857142857143, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 14, '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': '1153711', 'n_tokens_mistral': 842, 'n_tokens_neox': 763, 'n_words': 201}