00001 // ///////////////////////////////////////////////////////////////////////////// 00002 // 00003 // Name: main.cpp 00004 // Author: Michael Bartsch (ZCCdark203) 00005 // 00006 // Desc : This is the main file in which we'll start the application. 00007 // 00008 // License: Copyright (C) 2009 Michael Bartsch and Contributors 00009 // 00010 // This software is provided 'as-is', without any express or 00011 // implied warranty. In no event will the authors be held 00012 // liable for any damages arising from the use of this 00013 // software. 00014 // 00015 // Permission is granted to anyone to use this software for 00016 // any purpose, including commercial applications, and to 00017 // alter it and redistribute it freely, subject to the 00018 // following restrictions: 00019 // 00020 // 1. The origin of this software must not be misrepresented; 00021 // you must not claim that you wrote the original software. If 00022 // you use this software in a product, an acknowledgment in the 00023 // product documentation would be appreciated but is not 00024 // required. 00025 // 00026 // 2. Altered source versions must be plainly marked as such, 00027 // and must not be misrepresented as being the original 00028 // software. 00029 // 00030 // 3. This notice may not be removed or altered from any source 00031 // distribution. 00032 // 00033 // ///////////////////////////////////////////////////////////////////////////// 00034 00035 // Include files 00036 #include "core/GameManager.h" 00037 00038 //Uncomment below for console in release mode 00039 #define _SIRRF_SHOWCONSOLE 00040 00041 #if(defined(WIN32)) 00042 #if((!defined(_DEBUG)) && (!defined(_SIRRF_SHOWCONSOLE))) 00043 #pragma comment(linker, "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") 00044 #elif (defined(_SIRRF_SHOWCONSOLE) || defined(_DEBUG)) 00045 #pragma comment(linker, "/SUBSYSTEM:CONSOLE") 00046 #endif 00047 #endif 00048 00049 // Main function 00051 int main() 00052 { 00053 // Initialise the game. 00054 GameManager *game = GameManager::Instance(); 00055 game->init(); 00056 00057 // Keep the game running. 00058 while(game->getIsRunning()) 00059 game->update(); 00060 00061 return 0; 00062 } 00063 00064 // End of File