Changeset 2101 in orxonox.OLD for orxonox/branches/chris/src/orxonox.cc
- Timestamp:
- Jul 10, 2004, 2:00:04 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/orxonox.cc
r2096 r2101 24 24 */ 25 25 26 #ifdef __WIN32__ 27 #include <windows.h> 28 #endif 29 30 #include <iostream> 31 #include <cstdio> 32 #include <GL/glut.h> 33 #include <SDL/SDL.h> 34 35 #include "environment.h" 26 #include "orxonox.h" 36 27 #include "world.h" 37 #include " input_output.h"28 #include "camera.h" 38 29 #include "data_tank.h" 39 #include "stdincl.h" 40 #include "player.h" 41 #include "npc.h" 42 #include "shoot_laser.h" 43 44 #include "orxonox.h" 30 #include "command_node.h" 45 31 46 32 using namespace std; 47 48 33 49 34 Orxonox::Orxonox () … … 59 44 if( world != NULL) delete world; 60 45 if( localinput != NULL) delete world; 61 if( localcamera != NULL) delete camera;46 if( localcamera != NULL) delete localcamera; 62 47 if( resources != NULL) delete resources; 63 48 } … … 79 64 void Orxonox::get_config_file (int argc, char** argv) 80 65 { 81 char* path;66 /* char* path; 82 67 #ifdef __WIN32__ 83 68 path = getenv(""); … … 88 73 if( path != NULL) strcpy (configfilename, path); 89 74 else strcpy (configfilename, "./"); 90 strcat (configfilename, "/.orxonox.conf"); 75 strcat (configfilename, "/.orxonox.conf");*/ 76 77 strcpy (configfilename, "./orxonox.conf"); 91 78 } 92 79 … … 207 194 void Orxonox::mainLoop() 208 195 { 196 lastframe = SDL_GetTicks(); 197 209 198 // This is where everything is run 210 199 while( !bQuitOrxonox) … … 237 226 { 238 227 // localinput 239 localinput .process();228 localinput->process(); 240 229 // remoteinput 241 230 } … … 261 250 { 262 251 // clear buffer 263 glClear( GL_COLOR_BUFFER_BIT ,GL_DEPTH_BUFFER_BIT);252 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 264 253 // set camera 265 254 localcamera->apply (); … … 276 265 } 277 266 278 C amera* Orxonox::get_localinput ()267 CommandNode* Orxonox::get_localinput () 279 268 { 280 269 return localinput; 281 270 } 282 271 283 Camera* Orxonox::get_world ()272 World* Orxonox::get_world () 284 273 { 285 274 return world; … … 295 284 return -1; 296 285 } 297 298 lastframe = SDL_GetTicks();299 286 300 287 (*orx).mainLoop();
Note: See TracChangeset
for help on using the changeset viewer.