[7391] | 1 | /* |
---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
| 10 | |
---|
| 11 | ### File Specific: |
---|
| 12 | main-programmer: Patrick Boenzli |
---|
| 13 | co-programmer: ... |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GAME_RULES |
---|
| 17 | |
---|
| 18 | #include "mission_goal.h" |
---|
[7464] | 19 | #include "game_rules.h" |
---|
[7391] | 20 | |
---|
[7464] | 21 | #include "state.h" |
---|
[7463] | 22 | #include "util/loading/load_param.h" |
---|
| 23 | |
---|
[7391] | 24 | |
---|
| 25 | |
---|
[9357] | 26 | |
---|
[7391] | 27 | /** |
---|
| 28 | * standard constructor |
---|
| 29 | * @todo this constructor is not jet implemented - do it |
---|
| 30 | */ |
---|
[7461] | 31 | MissionGoal::MissionGoal (const TiXmlElement* root) |
---|
[7391] | 32 | { |
---|
| 33 | this->setClassID(CL_MISSION_GOAL, "MissionGoal"); |
---|
[7461] | 34 | |
---|
[7464] | 35 | this->missionState = MS_PASSIVE; |
---|
| 36 | // add the mission to the current game rule |
---|
| 37 | GameRules* gr = State::getGameRules(); |
---|
| 38 | if( gr) |
---|
| 39 | gr->addMissionGoal(this); |
---|
| 40 | |
---|
[7461] | 41 | if( root != NULL) |
---|
| 42 | this->loadParams(root); |
---|
[7391] | 43 | } |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | /** |
---|
| 47 | * standard deconstructor |
---|
| 48 | */ |
---|
| 49 | MissionGoal::~MissionGoal () |
---|
| 50 | { |
---|
| 51 | |
---|
| 52 | } |
---|
[7461] | 53 | |
---|
[7463] | 54 | /** |
---|
| 55 | * loading parameter function: more help on the wiki pages |
---|
| 56 | */ |
---|
[7461] | 57 | void MissionGoal::loadParams(const TiXmlElement* root) |
---|
| 58 | { |
---|
| 59 | BaseObject::loadParams(root); |
---|
[7463] | 60 | |
---|
| 61 | LoadParam(root, "title", this, MissionGoal, setMissionName) |
---|
| 62 | .describe("sets the title of the mission"); |
---|
| 63 | LoadParam(root, "description", this, MissionGoal, setMissionDescription) |
---|
| 64 | .describe("sets the mission description"); |
---|
| 65 | } |
---|
| 66 | |
---|