Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7391 in orxonox.OLD for trunk


Ignore:
Timestamp:
Apr 27, 2006, 12:52:35 AM (19 years ago)
Author:
patrick
Message:

orxonox: working on mission goals and mission manager

Location:
trunk/src
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/defs/class_id.h

    r7256 r7391  
    144144  CL_GAME_RULES                 =    0x00000110,          ///HACK: this is no story entity, bensch: to rebuild
    145145  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
    146148
    147149  /// SUPER-PNodes
  • trunk/src/story_entities/game_world.cc

    r7374 r7391  
    8383
    8484  this->dataXML = NULL;
     85  this->gameRules = NULL;
    8586}
    8687
     
    274275    /* update the state */
    275276    this->update ();
     277    /* check the game rules */
     278    this->checkGameRules();
    276279    /* draw everything */
    277280    this->display ();
     
    417420}
    418421
     422
     423/**
     424 *  check the game rules: winning conditions, etc.
     425 *
     426 */
     427void GameWorld::checkGameRules()
     428{
     429  if( this->gameRules)
     430    this->gameRules->tick(this->dtS);
     431}
     432
     433
    419434/**
    420435 *  render the current frame
     
    474489  engine->draw();
    475490
    476 
    477491  // draw the game ruls
    478492  if( likely(this->dataTank->gameRule != NULL))
  • trunk/src/story_entities/game_world.h

    r7374 r7391  
    1414class OrxShell::Shell;
    1515class WorldEntity;
     16class GameRules;
    1617
    1718/** How many frames time values to keep
     
    6667    virtual void tick();
    6768    virtual void update();
     69    virtual void checkGameRules();
    6870    virtual void collide();
    6971
     
    9395    Uint32              frameTimes[TICK_SMOOTH_VALUE];//!< The time used for the last TICK_SMOOTH_VALUE's frames.
    9496
     97    GameRules*          gameRules;                    //!< Pointer to the data structure containig the game rules
     98
    9599
    96100  private:
  • trunk/src/story_entities/game_world_data.cc

    r7370 r7391  
    379379  while( element != NULL)
    380380  {
     381    PRINTF(4)("============ GameRules ==");
    381382    PRINTF(4)("creating %s\n", element->Value());
    382383    BaseObject* created = Factory::fabricate(element);
  • trunk/src/util/Makefile.am

    r7221 r7391  
    99                        hud.cc \
    1010                        game_rules.cc \
     11                        mission_goal.cc\
    1112                        multiplayer_team_deathmatch.cc \
     13                        singleplayer_shootemup.cc \
    1214                        \
    1315                        animation/animation3d.cc \
     
    2527                        hud.h \
    2628                        game_rules.h \
     29                        mission_goal.h \
    2730                        multiplayer_team_deathmatch.h \
     31                        singleplayer_shootemup.h \
    2832                        \
    2933                        animation/animation3d.h \
Note: See TracChangeset for help on using the changeset viewer.