| 1 | /* | 
|---|
| 2 | *   ORXONOX - the hottest 3D action shooter ever to exist | 
|---|
| 3 | * | 
|---|
| 4 | * | 
|---|
| 5 | *   License notice: | 
|---|
| 6 | * | 
|---|
| 7 | *   This program is free software: you can redistribute it and/or modify | 
|---|
| 8 | *   it under the terms of the GNU General Public License as published by | 
|---|
| 9 | *   the Free Software Foundation, either version 3 of the License, or | 
|---|
| 10 | *   (at your option) any later version. | 
|---|
| 11 | * | 
|---|
| 12 | *   This program is distributed in the hope that it will be useful, | 
|---|
| 13 | *   but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 14 | *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 15 | *   GNU General Public License for more details. | 
|---|
| 16 | * | 
|---|
| 17 | *   You should have received a copy of the GNU General Public License | 
|---|
| 18 | *   along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
|---|
| 19 | * | 
|---|
| 20 | * | 
|---|
| 21 | *   Author: | 
|---|
| 22 | *      Reto Grieder | 
|---|
| 23 | *   Co-authors: | 
|---|
| 24 | *      ... | 
|---|
| 25 | * | 
|---|
| 26 | */ | 
|---|
| 27 |  | 
|---|
| 28 | #include "OgrePlatform.h" | 
|---|
| 29 | #include "OgreException.h" | 
|---|
| 30 |  | 
|---|
| 31 | #include "orxonox.h" | 
|---|
| 32 |  | 
|---|
| 33 | #ifdef __cplusplus | 
|---|
| 34 | extern "C" { | 
|---|
| 35 | #endif | 
|---|
| 36 |  | 
|---|
| 37 | #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 | 
|---|
| 38 | #define WIN32_LEAN_AND_MEAN | 
|---|
| 39 | #include "windows.h" | 
|---|
| 40 | INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) | 
|---|
| 41 | #else | 
|---|
| 42 | int main(int argc, char **argv) | 
|---|
| 43 | #endif | 
|---|
| 44 | { | 
|---|
| 45 | try { | 
|---|
| 46 | // create an orxonox application and run it | 
|---|
| 47 | orxonox::Orxonox myApp; | 
|---|
| 48 |  | 
|---|
| 49 | myApp.go(); | 
|---|
| 50 | } | 
|---|
| 51 | catch (Ogre::Exception& e) { | 
|---|
| 52 | #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 | 
|---|
| 53 | MessageBoxA(NULL, e.getFullDescription().c_str(), | 
|---|
| 54 | "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); | 
|---|
| 55 | #else | 
|---|
| 56 | std::cerr << "Exception:\n"; | 
|---|
| 57 | std::cerr << e.getFullDescription().c_str() << "\n"; | 
|---|
| 58 | #endif | 
|---|
| 59 | return 1; | 
|---|
| 60 | } | 
|---|
| 61 |  | 
|---|
| 62 | return 0; | 
|---|
| 63 | } | 
|---|
| 64 |  | 
|---|
| 65 | #ifdef __cplusplus | 
|---|
| 66 | } | 
|---|
| 67 | #endif | 
|---|