YourPaste - For your paste! Archive - Tools - Login

Posted by unknown on Mon 22 Feb 2010 0:50 199 views - Syntax: C++ - Expires: never - Report - IMG - Download -

  1. #include "goldy.h"
  2.  
  3. INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) {
  4.         try {
  5.                 Engine* engine = new Engine();
  6.                
  7.                 engine->AddFolderResource("../../data");
  8.                 engine->loadArchive("../../data/loading.pak", "loading");
  9.  
  10.                 if (!engine->loadConfig()) {
  11.                         if (engine->showConfigDialog()) {
  12.                                 engine->saveConfig();
  13.                         }
  14.                         else {
  15.                                 MessageBox(NULL, "Can't load or create config! Loading aborted.", "Goldy 0.0.1", MB_OK | MB_ICONERROR | MB_TASKMODAL);
  16.                         }
  17.                 }
  18.  
  19.                 engine->startRender();
  20.  
  21.                 BspWorld* world = new BspWorld(engine);
  22.  
  23.                 PlayerCamera* playerCamera = engine->createPlayerCamera();
  24.                 engine->createViewport(playerCamera);
  25.  
  26.                 //engine->createConsole();
  27.  
  28.                 world->loadMap("demo");
  29.                 world->resetCamera(playerCamera);
  30.  
  31.         } catch(Ogre::Exception& e) {
  32.                 MessageBox(NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
  33.         }
  34.  
  35.         return 0;
  36. }

Comments


Name:
Comment:

© 2010 YourPaste.net - Disclaimer