[2636] | 1 | |
---|
| 2 | |
---|
[4592] | 3 | /* |
---|
[2636] | 4 | orxonox - the future of 3D-vertical-scrollers |
---|
| 5 | |
---|
| 6 | Copyright (C) 2004 orx |
---|
| 7 | |
---|
| 8 | This program is free software; you can redistribute it and/or modify |
---|
| 9 | it under the terms of the GNU General Public License as published by |
---|
| 10 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 11 | any later version. |
---|
| 12 | |
---|
| 13 | ### File Specific: |
---|
| 14 | main-programmer: Patrick Boenzli |
---|
[4592] | 15 | co-programmer: |
---|
[2636] | 16 | */ |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #include "story_entity.h" |
---|
| 20 | |
---|
[6376] | 21 | #include "load_param.h" |
---|
[2636] | 22 | |
---|
| 23 | using namespace std; |
---|
| 24 | |
---|
| 25 | |
---|
[6371] | 26 | /** |
---|
[6376] | 27 | * default constructor initializes all needed data |
---|
[6371] | 28 | */ |
---|
[4592] | 29 | StoryEntity::StoryEntity () |
---|
| 30 | { |
---|
[4597] | 31 | this->setClassID(CL_STORY_ENTITY, "StoryEntity"); |
---|
[6376] | 32 | |
---|
[6153] | 33 | this->isInit = false; |
---|
| 34 | this->readyToRun = false; |
---|
| 35 | this->isPaused = false; |
---|
| 36 | this->isSuspended = false; |
---|
[6376] | 37 | |
---|
| 38 | this->storyID = -1; |
---|
| 39 | this->nextStoryID = WORLD_ID_GAMEEND; |
---|
[4592] | 40 | } |
---|
[6153] | 41 | |
---|
[6371] | 42 | |
---|
[6376] | 43 | /** |
---|
| 44 | * deconstructor |
---|
[6371] | 45 | */ |
---|
[6376] | 46 | StoryEntity::~StoryEntity () |
---|
| 47 | {} |
---|
[2636] | 48 | |
---|
| 49 | |
---|
[6376] | 50 | /** |
---|
| 51 | * loads the Parameters of a Campaign |
---|
| 52 | * @param root: The XML-element to load from |
---|
| 53 | */ |
---|
| 54 | void 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 | } |
---|