Changeset 141 for code/branches/main_reto/src/main.cpp
- Timestamp:
- Nov 1, 2007, 7:48:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/main_reto/src/main.cpp
r123 r141 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 1 30 #include "Orxonox.h" 2 31 … … 8 37 #define WIN32_LEAN_AND_MEAN 9 38 #include "windows.h" 10 INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) 39 INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) 11 40 #else 12 41 int main(int argc, char **argv) 13 42 #endif 14 { 15 try { 16 Orxonox myApp; 43 { 44 try { 45 // create an orxonox aplication and run it 46 Orxonox myApp; 17 47 18 // ExampleApplication provides a go method, which starts the rendering. 19 myApp.go(); 20 } 21 catch (Ogre::Exception& e) { 48 myApp.go(); 49 } 50 catch (Ogre::Exception& e) { 22 51 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 23 MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); 52 MessageBoxA(NULL, e.getFullDescription().c_str(), 53 "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); 24 54 #else 25 26 55 std::cerr << "Exception:\n"; 56 std::cerr << e.getFullDescription().c_str() << "\n"; 27 57 #endif 28 29 58 return 1; 59 } 30 60 31 32 61 return 0; 62 } 33 63 34 64 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.