- Timestamp:
- May 1, 2006, 3:21:40 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r7428 r7462 40 40 \ 41 41 util/multiplayer_team_deathmatch.cc \ 42 util/singleplayer_shootemup.cc \ 43 \ 44 util/kill_target.cc \ 42 45 \ 43 46 subprojects/benchmark.cc -
trunk/src/lib/util/loading/factory.cc
r7221 r7462 117 117 if (factory != Factory::factoryList->end()) 118 118 { 119 PRINTF( 4)("Create a new Object of type %s\n", (*factory)->getName());119 PRINTF(2)("Create a new Object of type %s\n", (*factory)->getName()); 120 120 return (*factory)->fabricateObject(root); 121 121 } -
trunk/src/story_entities/game_world_data.cc
r7461 r7462 382 382 PRINTF(2)("creating %s\n", element->Value()); 383 383 BaseObject* created = Factory::fabricate(element); 384 if (created != NULL && created->isA(CL_GAME_RULES))384 if (created != NULL /*&& created->isA(CL_GAME_RULES)*/) 385 385 { 386 386 this->gameRule = dynamic_cast<GameRules*>(created); 387 387 State::setGameRules(this->gameRule); 388 388 // if there is a valid game rule loaded, break because it is not thought to load multiple game rules 389 break;389 return; 390 390 } 391 391 else -
trunk/src/util/game_rules.cc
r7461 r7462 47 47 BaseObject::loadParams(root); 48 48 49 PRINTF(0)("GameRules::loadParams(...) hit me\n"); 49 50 LoadParamXML(root, "MissionGoal", this, GameRules, loadMissionGoal) 50 51 .describe("an XML-Element to load the missions from"); … … 55 56 void GameRules::loadMissionGoal(const TiXmlElement* root) 56 57 { 58 PRINTF(0)("Trying to load MissionGoals\n"); 57 59 const TiXmlElement* element = root->FirstChildElement(); 58 60 while( element != NULL) … … 61 63 PRINTF(2)("Adding Mission Goal:%s\n", element->Value()); 62 64 BaseObject* created = Factory::fabricate(element); 63 if (created != NULL && created->isA(CL_GAME_RULES))65 if (created != NULL /*&& created->isA(CL_GAME_RULES)*/) 64 66 { 65 67 MissionGoal* mg = dynamic_cast<MissionGoal*>(created); -
trunk/src/util/kill_target.cc
r7461 r7462 18 18 #include "kill_target.h" 19 19 20 #include "util/loading/factory.h" 21 20 22 using namespace std; 23 24 CREATE_FACTORY(KillTarget, CL_KILL_TARGET); 21 25 22 26 … … 29 33 { 30 34 this->setClassID(CL_KILL_TARGET, "KillTarget"); 31 32 PRINTF(0)("Created a KillTarget Mission Goal <==================================\n");33 35 34 36 if( root != NULL) … … 49 51 { 50 52 MissionGoal::loadParams(root); 53 54 // LoadParam(root, "death-penalty-timeout", this, SingleplayerShootemup, setDeathPenaltyTimeout) 55 // .describe("sets the time in seconds a player has to wait for respawn"); 51 56 } 52 57 … … 54 59 MissionState KillTarget::checkMissionGoal() 55 60 {} 61 -
trunk/src/util/kill_target.h
r7461 r7462 15 15 16 16 //! A class representing a mission goal to kill a specific amount of a specific object type 17 class KillTarget : public MissionGoal { 17 class KillTarget : public MissionGoal 18 { 18 19 19 public:20 KillTarget(const TiXmlElement* root);21 virtual ~KillTarget();20 public: 21 KillTarget(const TiXmlElement* root); 22 virtual ~KillTarget(); 22 23 23 virtual void loadParams(const TiXmlElement* root); 24 25 virtual MissionState checkMissionGoal(); 24 virtual void loadParams(const TiXmlElement* root); 26 25 27 26 28 protected: 27 void setNumberOfKills( int kills) { this->numberOfKills = kills; } 28 void setTartetClassID( int classID) { this->targetClassID = classID; } 29 29 30 31 virtual MissionState checkMissionGoal(); 32 33 34 private: 35 int numberOfKills; //!< the amount of kills of this kind 36 int targetClassID; //!< id of the target class 30 37 }; 31 38 -
trunk/src/util/singleplayer_shootemup.cc
r7461 r7462 41 41 42 42 43 43 44 /** 44 45 * constructor … … 48 49 { 49 50 this->setClassID(CL_SINGLEPLAYER_SHOOTEMUP, "SingleplayerShootemup"); 50 51 PRINTF(0)("Created a SinglePlayer Shootemup game\n");52 51 53 52 if( root != NULL)
Note: See TracChangeset
for help on using the changeset viewer.