- Timestamp:
- Apr 27, 2006, 12:52:35 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r7256 r7391 144 144 CL_GAME_RULES = 0x00000110, ///HACK: this is no story entity, bensch: to rebuild 145 145 CL_MULTIPLAYER_TEAM_DEATHMATCH= 0x00000111, ///HACK: this is no story entity: it is a CL_GAME_RULES, bensch: to rebuild 146 CL_SINGLEPLAYER_SHOOTEMUP = 0x00000112, ///HACK: this is no story entity: it is a CL_GAME_RULES, bensch: to rebuild 147 CL_MISSION_GOAL = 0x00000113, ///HACK: this is no story entity: it is a CL_BASE_OBJECT, bensch: to rebuild 146 148 147 149 /// SUPER-PNodes -
trunk/src/story_entities/game_world.cc
r7374 r7391 83 83 84 84 this->dataXML = NULL; 85 this->gameRules = NULL; 85 86 } 86 87 … … 274 275 /* update the state */ 275 276 this->update (); 277 /* check the game rules */ 278 this->checkGameRules(); 276 279 /* draw everything */ 277 280 this->display (); … … 417 420 } 418 421 422 423 /** 424 * check the game rules: winning conditions, etc. 425 * 426 */ 427 void GameWorld::checkGameRules() 428 { 429 if( this->gameRules) 430 this->gameRules->tick(this->dtS); 431 } 432 433 419 434 /** 420 435 * render the current frame … … 474 489 engine->draw(); 475 490 476 477 491 // draw the game ruls 478 492 if( likely(this->dataTank->gameRule != NULL)) -
trunk/src/story_entities/game_world.h
r7374 r7391 14 14 class OrxShell::Shell; 15 15 class WorldEntity; 16 class GameRules; 16 17 17 18 /** How many frames time values to keep … … 66 67 virtual void tick(); 67 68 virtual void update(); 69 virtual void checkGameRules(); 68 70 virtual void collide(); 69 71 … … 93 95 Uint32 frameTimes[TICK_SMOOTH_VALUE];//!< The time used for the last TICK_SMOOTH_VALUE's frames. 94 96 97 GameRules* gameRules; //!< Pointer to the data structure containig the game rules 98 95 99 96 100 private: -
trunk/src/story_entities/game_world_data.cc
r7370 r7391 379 379 while( element != NULL) 380 380 { 381 PRINTF(4)("============ GameRules =="); 381 382 PRINTF(4)("creating %s\n", element->Value()); 382 383 BaseObject* created = Factory::fabricate(element); -
trunk/src/util/Makefile.am
r7221 r7391 9 9 hud.cc \ 10 10 game_rules.cc \ 11 mission_goal.cc\ 11 12 multiplayer_team_deathmatch.cc \ 13 singleplayer_shootemup.cc \ 12 14 \ 13 15 animation/animation3d.cc \ … … 25 27 hud.h \ 26 28 game_rules.h \ 29 mission_goal.h \ 27 30 multiplayer_team_deathmatch.h \ 31 singleplayer_shootemup.h \ 28 32 \ 29 33 animation/animation3d.h \
Note: See TracChangeset
for help on using the changeset viewer.