00001
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifdef WIN32
00015 #pragma warning (disable : 4786)
00016 #include <windows.h>
00017 #endif
00018
00019 #include "SDLCanvas.h"
00020 #include "SDLKeyboardDevice.h"
00021 #include "SDLRenderTools.h"
00022 #include "SDLSystem.h"
00023 #include <SDL/SDL_main.h>
00024
00025 #include "GPC_Init.h"
00026 #include "TerraplayDeviceInterface.h"
00027
00028
00029 extern "C" main(int argc, char *argv[])
00030 {
00031
00032
00033
00034 SDLInputDevice *inputdev = new SDLKeyboardDevice();
00035
00036
00037
00038 SCA_ISystem *sca_system = NewSDLSystem();
00039
00040 sca_system->SetKeyboardDevice(inputdev);
00041
00042 RAS_ICanvas *canvas = new SDLCanvas();
00043 RAS_IRenderTools *rendertools = new SDLRenderTools();
00044
00045 RAS_IRasterizer* rasty_rostelly = CreateRasterizer(canvas);
00046 KX_GameObject* geemobject = CreateGameObject(rasty_rostelly);
00047 SND_IScene* sndscene = CreateSoundScene();
00048
00049 PyObject* pythondict = CreatePythonBindings("glutplayer",canvas);
00050
00051 NG_NetworkDeviceInterface* terraplaydevice = new TerraplayDeviceInterface();
00052
00053 SCA_LogicManager* logicmgr = CreateSampleLogic(inputdev, geemobject,sndscene,pythondict,terraplaydevice);
00054
00055
00056
00057
00058
00059 SCA_IMainLoop* mymainloop = CreateEngine(rasty_rostelly,canvas,
00060 rendertools,
00061 sndscene,
00062 logicmgr,
00063 geemobject);
00064
00065
00066
00067 sca_system->SetMainLoop(mymainloop);
00068 sca_system->StartMainLoop();
00069
00070 DestructPythonBindings();
00071
00072
00073 return 0;
00074 }
00075
00076