int WINAPI WinMain (HINSTANCE, HINSTANCE, LPSTR, int)	
{
	//+++++++++++++++++++++++++++++ VARIABLE DECLARATIONS+++++++++++++++++++++++++++++++++++++++++++++++++++
	
	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    //++++++++++++++++++++++++++++++++++++++ CODE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	//Leak detections
	//Static detections FROM: http://cgempire.com/forum/tutorials-101/easy-memory-leak-detection-c-c-546.html
	FINDMEMLEAK(-1);

	//Game (edit mode false)!!!
	GameApp MyGame(false);

	//Nested in try-catch, when exception... well, show it to user and finish
	try
	{
		//Store app working path to generate relative paths from there
		g_ConfigOptions.SetupWorkingPath();
		MyGame.Load();  //Init
		MyGame.Run();   //Game loop
	}
	catch(std::exception &e)
	{
		//Show exception message
		::MessageBoxA( NULL, e.what(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
	}

	return 0;
	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
Beispiel #2
0
int main(int argc, char* argv[])
{
    return MyGame(argc, argv).run();
}