main.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // This is a Demo of the Irrlicht Engine (c) 2005-2008 by N.Gebhardt.
  2. // This file is not documented.
  3. #include <irrlicht.h>
  4. #ifdef _WIN32__
  5. #include "WindowsIncludes.h" // Prevent 'fd_set' : 'struct' type redefinition
  6. #include <windows.h>
  7. #endif
  8. #include <stdio.h>
  9. #include "CMainMenu.h"
  10. #include "CDemo.h"
  11. using namespace irr;
  12. #ifdef _WIN32
  13. #pragma comment(lib, "Irrlicht.lib")
  14. INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
  15. #else
  16. int main(int argc, char* argv[])
  17. #endif
  18. {
  19. bool fullscreen = false;
  20. bool music = true;
  21. bool shadows = false;
  22. bool additive = false;
  23. bool vsync = false;
  24. bool aa = false;
  25. core::stringw playerName;
  26. #ifndef _IRR_WINDOWS_
  27. video::E_DRIVER_TYPE driverType = video::EDT_OPENGL;
  28. #else
  29. video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
  30. #endif
  31. CMainMenu menu;
  32. //#ifndef _DEBUG
  33. if (menu.run(fullscreen, music, shadows, additive, vsync, aa, driverType, playerName))
  34. //#endif
  35. {
  36. CDemo demo(fullscreen, music, shadows, additive, vsync, aa, driverType, playerName);
  37. demo.run();
  38. }
  39. return 0;
  40. }
粤ICP备19079148号