Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/main_reto/src/main.cpp @ 141

Last change on this file since 141 was 141, checked in by rgrieder, 16 years ago

RunManager.cpp completely commented in Doxygen style.
One or two comments are yet inappropriate since a few changes to the code have to be made anyway. coming soon.

File size: 1.6 KB
Line 
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
29
30#include "Orxonox.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
37#define WIN32_LEAN_AND_MEAN
38#include "windows.h"
39  INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
40#else
41  int main(int argc, char **argv) 
42#endif
43  {
44    try {
45      // create an orxonox aplication and run it
46      Orxonox myApp;
47
48      myApp.go();
49    }
50    catch (Ogre::Exception& e) {
51#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
52      MessageBoxA(NULL, e.getFullDescription().c_str(),
53            "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
54#else
55      std::cerr << "Exception:\n";
56      std::cerr << e.getFullDescription().c_str() << "\n";
57#endif
58      return 1;
59    }
60
61    return 0;
62  }
63
64#ifdef __cplusplus
65}
66#endif
Note: See TracBrowser for help on using the repository browser.