root/week1oplossing/GameWinMain.cpp

User picture

Author: machiel.sleeuwaert

Revision: 13 («Previous)

(Oct 08 15:33 2008 UTC) Over 3 years ago


  

 
Show/hide line numbers
//-----------------------------------------------------------------
// Game Engine WinMain Function
// C++ Source - GameWinMain.cpp - version 2008 v3_02
// Copyright Kevin Hoefman - kevin.hoefman@howest.be
// http://www.digitalartsandentertainment.be/
//-----------------------------------------------------------------

//-----------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------
#include "GameWinMain.h"
#include "GameEngine.h"

#include "Week1Oplossing.h"	

//-----------------------------------------------------------------
// Defines
//-----------------------------------------------------------------

#define GAME_ENGINE (GameEngine::GetSingleton())

//-----------------------------------------------------------------
// Windows Functions
//-----------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
	if (GAME_ENGINE == NULL) return FALSE; // create the game engine and exit if it fails
	
	GAME_ENGINE->SetGame(new Week1Oplossing());	// any class that implements AbstractGame
	
	return GAME_ENGINE->Run(hInstance, iCmdShow); // run the game engine and return the result
}