<commit_before>#include "LinuxContainer.h"

void LinuxContainer::mainContainer(int argc, char** argv)
{
	Singleton<ObserverDirector>::get().init();
	WindowGL*	glWindow	= new WindowGL(argc, argv);
	RendererGL*	glRenderer	= new RendererGL();
	InputGL*	input		= new InputGL();
	CameraGL*	camGL		= new CameraGL(
		(float)F_O_V,
		(float)SCREEN_WIDTH / (float)SCREEN_HEIGHT, 
		(float)Z_NEAR, 
		(float)Z_FAR);

	initLinux(
		glWindow, 
		glRenderer, 
		input, 
		camGL);

	GameEntity* pacman = initPacman();

	Game* game = new Game(
		camGL, 
		glWindow, 
		glRenderer,
		pacman);
	game->run();

	//Clean up
	delete game;
}

void LinuxContainer::initLinux(
	WindowGL*	windowGL, 
	RendererGL*	rendererGL,
	InputGL*	inputGL,
	CameraGL*	cameraGL)
{
	windowGL->init();
	rendererGL->init();
	cameraGL->init();
	inputGL->init();
}
GameEntity* LinuxContainer::initPacman()
{
	GameEntity* gameEntity = new GameEntity(VecF3(0.0f, 0.0f, 0.0f), VecF3(0.0f, 0.0f, 0.0f), VecF3(1.0f, 1.0f, 1.0f));
	vector<PosNormTex>* vertices = new vector<PosNormTex>;
	vertices->push_back(PosNormTex(VecF3(-1.0f, 1.0f, 1.0f),	VecF3(0.0f, 0.0f, 1.0f),	VecF2(0.0f, 0.0f)));   
	vertices->push_back(PosNormTex(VecF3(1.0f, 1.0f, 1.0f),		VecF3(0.0f, 0.0f, 1.0f),	VecF2(1.0f, 0.0f)));
	vertices->push_back(PosNormTex(VecF3(-1.0f, -1.0f, 1.0f),	VecF3(0.0f, 0.0f, 1.0f),	VecF2(0.0f, 1.0f)));
	vertices->push_back(PosNormTex(VecF3(1.0f, -1.0f, 1.0f),	VecF3(0.0f, 0.0f, 1.0f),	VecF2(1.0f, 1.0f)));																				 

	std::vector<unsigned int>* indices = new std::vector<unsigned int>();
	indices->push_back(0);
	indices->push_back(1);
	indices->push_back(2);
	indices->push_back(2);
	indices->push_back(1);
	indices->push_back(3);

	GraphicsContainer* graphicsContainer = new GraphicsContainerGL( 
		VERTEX_SHADER_DEFAULT, 
		PIXEL_SHADER_DEFAULT, <commit_msg>Fixed minor mem-leak<commit_after>#include "LinuxContainer.h"

void LinuxContainer::mainContainer(int argc, char** argv)
{
	Singleton<ObserverDirector>::get().init();
	WindowGL*	glWindow	= new WindowGL(argc, argv);
	RendererGL*	glRenderer	= new RendererGL();
	InputGL*	input		= new InputGL();
	CameraGL*	camGL		= new CameraGL(
		(float)F_O_V,
		(float)SCREEN_WIDTH / (float)SCREEN_HEIGHT, 
		(float)Z_NEAR, 
		(float)Z_FAR);

	initLinux(
		glWindow, 
		glRenderer, 
		input, 
		camGL);

	GameEntity* pacman = initPacman();

	Game* game = new Game(
		camGL, 
		glWindow, 
		glRenderer,
		pacman);
	game->run();

	DELETE_NULL(input); //handled via callbacks outside of game
	DELETE_NULL(game);
}

void LinuxContainer::initLinux(
	WindowGL*	windowGL, 
	RendererGL*	rendererGL,
	InputGL*	inputGL,
	CameraGL*	cameraGL)
{
	windowGL->init();
	rendererGL->init();
	cameraGL->init();
	inputGL->init();
}
GameEntity* LinuxContainer::initPacman()
{
	GameEntity* gameEntity = new GameEntity(VecF3(0.0f, 0.0f, 0.0f), VecF3(0.0f, 0.0f, 0.0f), VecF3(1.0f, 1.0f, 1.0f));
	vector<PosNormTex>* vertices = new vector<PosNormTex>;
	vertices->push_back(PosNormTex(VecF3(-1.0f, 1.0f, 1.0f),	VecF3(0.0f, 0.0f, 1.0f),	VecF2(0.0f, 0.0f)));   
	vertices->push_back(PosNormTex(VecF3(1.0f, 1.0f, 1.0f),		VecF3(0.0f, 0.0f, 1.0f),	VecF2(1.0f, 0.0f)));
	vertices->push_back(PosNormTex(VecF3(-1.0f, -1.0f, 1.0f),	VecF3(0.0f, 0.0f, 1.0f),	VecF2(0.0f, 1.0f)));
	vertices->push_back(PosNormTex(VecF3(1.0f, -1.0f, 1.0f),	VecF3(0.0f, 0.0f, 1.0f),	VecF2(1.0f, 1.0f)));																				 

	std::vector<unsigned int>* indices = new std::vector<unsigned int>();
	indices->push_back(0);
	indices->push_back(1);
	indices->push_back(2);
	indices->push_back(2);
	indices->push_back(1);
	indices->push_back(3);

	GraphicsContainer* graphicsContainer = new GraphicsContainerGL( 
		VERTEX_SHADER_DEFAULT, 
		PIXEL_SHADER_DEFAULT, 
		TEXTURE_PACMAN,
{'fraction_non_alphanumeric': 0.17686527106816963, 'fraction_numerical': 0.05528717122920022, 'mean_word_length': 4.725038402457757, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 43, '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': '6692296', 'n_tokens_mistral': 1768, 'n_tokens_neox': 1652, 'n_words': 273}