Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 544 for code


Ignore:
Timestamp:
Dec 16, 2007, 6:00:13 PM (17 years ago)
Author:
rgrieder
Message:
  • added WinMain (no argument parser yet)
  • made a few more adjustments, so that it compiles now under VC8 (actually it doesn't, I need to comment the with getMouseState or else I get a very strange linker error) (but I haven't committed this of course, since it compiles on tardis boxes)
Location:
code/branches/FICN/src/orxonox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/main.cc

    r534 r544  
    6767#endif
    6868
    69 int main(int argc, char **argv)
     69#ifdef __cplusplus
     70extern "C" {
     71#endif
     72
     73#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
     74#define WIN32_LEAN_AND_MEAN
     75#include "windows.h"
     76  INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
     77  {
     78    char *argv[2];
     79    argv[0] = "asdfprogramName";
     80    argv[1] =  strCmdLine;
     81    int argc = 2;
     82#else
     83  int main(int argc, char **argv)
     84  {
     85#endif
     86    try {
     87      SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
     88      Orxonox* orx = Orxonox::getSingleton();
     89#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
     90      orx->init(argc, argv, macBundlePath());
     91      orx->start();
     92#else
     93      orx->init(argc, argv, "");
     94      orx->start();
     95#endif
     96    }
     97    catch (Ogre::Exception& e) {
     98#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
     99      MessageBoxA(NULL, e.getFullDescription().c_str(),
     100            "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
     101#else
     102      std::cerr << "Exception:\n";
     103      std::cerr << e.getFullDescription().c_str() << "\n";
     104#endif
     105      return 1;
     106    }
     107    return 0;
     108  }
     109
     110#ifdef __cplusplus
     111}
     112#endif
     113
     114
     115/*int main(int argc, char **argv)
    70116{
    71117  try
     
    92138}
    93139
     140*/
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.cc

    r535 r544  
    2828#include "ParticleInterface.h"
    2929#include <Ogre.h>
    30 #include <OIS/OIS.h>
     30//#include <OIS/OIS.h>
    3131// #include <CEGUI/CEGUI.h>
    3232// #include <CEGUIRenderer.h>
Note: See TracChangeset for help on using the changeset viewer.