Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6376 in orxonox.OLD


Ignore:
Timestamp:
Dec 31, 2005, 4:11:34 PM (18 years ago)
Author:
patrick
Message:

network: load param is now processed correctly

Location:
branches/network/src/story_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/campaign.cc

    r6374 r6376  
    6565void Campaign::loadParams(const TiXmlElement* root)
    6666{
    67   static_cast<BaseObject*>(this)->loadParams(root);
    68 
    69   LoadParam(root, "identifier", this, Campaign, setStoryID)
    70   .describe("A Unique Identifier for this Campaign");
     67  static_cast<StoryEntity*>(this)->loadParams(root);
    7168
    7269  LoadParamXML(root, "WorldList", this, Campaign, loadWorldListParams)
    7370  .describe("A List of Worlds to be loaded in this Campaign");
     71
     72  PRINTF(4)("Loaded Campaign specific stuff\n");
    7473}
    7574
  • branches/network/src/story_entities/game_world.cc

    r6374 r6376  
    149149void GameWorld::loadParams(const TiXmlElement* root)
    150150{
    151   PRINTF(4)("Creating a GameWorld\n");
    152 
    153   LoadParam(root, "identifier", this, GameWorld, setStoryID)
    154     .describe("Sets the StoryID of this world");
    155 
    156   LoadParam(root, "nextid", this, GameWorld, setNextStoryID)
    157     .describe("Sets the ID of the next world");
     151  static_cast<StoryEntity*>(this)->loadParams(root);
    158152
    159153  LoadParam(root, "path", this, GameWorld, setPath)
    160154    .describe("The Filename of this GameWorld (relative from the data-dir)");
     155
     156  PRINTF(4)("Loaded GameWorld specific stuff\n");
    161157}
    162158
  • branches/network/src/story_entities/single_player_world.cc

    r6374 r6376  
    6565  static_cast<GameWorld*>(this)->loadParams(root);
    6666
    67   PRINTF(4)("Creating a SinglePlayerWorld\n");
     67  PRINTF(4)("Loaded SinglePlayerWorld specific stuff\n");
    6868}
    6969
  • branches/network/src/story_entities/story_entity.cc

    r6371 r6376  
    1919#include "story_entity.h"
    2020
     21#include "load_param.h"
    2122
    2223using namespace std;
     
    2425
    2526/**
    26  * default constructor initializes all needed data
     27 *  default constructor initializes all needed data
    2728 */
    2829StoryEntity::StoryEntity ()
    2930{
    3031  this->setClassID(CL_STORY_ENTITY, "StoryEntity");
     32
    3133  this->isInit = false;
    3234  this->readyToRun = false;
    3335  this->isPaused = false;
    3436  this->isSuspended = false;
     37
     38  this->storyID = -1;
     39  this->nextStoryID = WORLD_ID_GAMEEND;
    3540}
    3641
    3742
    38 /** deconstructor
     43/**
     44 *  deconstructor
    3945 */
    40 StoryEntity::~StoryEntity () {}
     46StoryEntity::~StoryEntity ()
     47{}
    4148
    4249
     50/**
     51 *  loads the Parameters of a Campaign
     52 * @param root: The XML-element to load from
     53 */
     54void StoryEntity::loadParams(const TiXmlElement* root)
     55{
     56  static_cast<BaseObject*>(this)->loadParams(root);
     57
     58  LoadParam(root, "identifier", this, StoryEntity, setStoryID)
     59      .describe("A Unique Identifier for this StoryEntity");
     60
     61  LoadParam(root, "nextid", this, StoryEntity, setNextStoryID)
     62      .describe("Sets the ID of the next StoryEntity");
     63
     64  PRINTF(4)("Loaded StoryEntity specific stuff\n");
     65}
Note: See TracChangeset for help on using the changeset viewer.