- Timestamp:
- May 1, 2006, 1:47:53 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r7450 r7461 133 133 CL_GAME_WORLD_DATA = 0x00102000, 134 134 CL_GAME_RULES = 0x00104000, 135 CL_MISSION_GOAL = 0x00105000, 135 136 136 137 CL_CAMPAIGN = 0x00000101, … … 144 145 CL_MOVIE_LOADER = 0x00000109, 145 146 146 CL_MULTIPLAYER_TEAM_DEATHMATCH= 0x00000111, 147 CL_SINGLEPLAYER_SHOOTEMUP = 0x00000112, 148 149 CL_MISSION_GOAL = 0x00000113, 147 CL_MULTIPLAYER_TEAM_DEATHMATCH= 0x00104001, 148 CL_SINGLEPLAYER_SHOOTEMUP = 0x00104002, 149 150 CL_KILL_TARGET = 0x00105001, 151 152 150 153 151 154 /// SUPER-PNodes -
trunk/src/story_entities/game_world_data.cc
r7460 r7461 379 379 while( element != NULL) 380 380 { 381 PRINTF( 4)("============ GameRules ==");382 PRINTF( 4)("creating %s\n", element->Value());381 PRINTF(2)("============ GameRules ==\n"); 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 // if there is a valid game rule loaded, break because it is not thought to load multiple game rules 389 break; 388 390 } 389 391 else -
trunk/src/util/Makefile.am
r7440 r7461 8 8 state.cc \ 9 9 hud.cc \ 10 \ 10 11 game_rules.cc \ 11 mission_goal.cc\12 12 multiplayer_team_deathmatch.cc \ 13 13 singleplayer_shootemup.cc \ 14 \ 15 mission_goal.cc\ 16 kill_target.cc\ 17 \ 14 18 signal_handler.cc \ 15 19 \ … … 27 31 state.h \ 28 32 hud.h \ 33 \ 29 34 game_rules.h \ 30 mission_goal.h \31 35 multiplayer_team_deathmatch.h \ 32 36 singleplayer_shootemup.h \ 37 \ 38 mission_goal.cc\ 39 kill_target.h\ 33 40 signal_handler.h \ 34 41 \ -
trunk/src/util/game_rules.cc
r7193 r7461 18 18 19 19 #include "util/loading/load_param.h" 20 #include "util/loading/factory.h" 21 22 #include "util/mission_goal.h" 23 20 24 21 25 … … 42 46 { 43 47 BaseObject::loadParams(root); 48 49 LoadParamXML(root, "MissionGoal", this, GameRules, loadMissionGoal) 50 .describe("an XML-Element to load the missions from"); 44 51 } 45 52 53 54 55 void GameRules::loadMissionGoal(const TiXmlElement* root) 56 { 57 const TiXmlElement* element = root->FirstChildElement(); 58 while( element != NULL) 59 { 60 PRINTF(2)("============ MissionGoal\n"); 61 PRINTF(2)("Adding Mission Goal:%s\n", element->Value()); 62 BaseObject* created = Factory::fabricate(element); 63 if (created != NULL && created->isA(CL_GAME_RULES)) 64 { 65 MissionGoal* mg = dynamic_cast<MissionGoal*>(created); 66 this->addMissionGoal(mg); 67 // if there is a valid game rule loaded, break because it is not thought to load multiple game rules 68 break; 69 } 70 else 71 { 72 PRINTF(1)("Could not create a %s\n", element->Value()); 73 delete created; 74 } 75 element = element->NextSiblingElement(); 76 } 77 } 78 -
trunk/src/util/game_rules.h
r7400 r7461 26 26 27 27 virtual void loadParams(const TiXmlElement* root = NULL); 28 void loadMissionGoal(const TiXmlElement* root = NULL); 28 29 29 30 -
trunk/src/util/mission_goal.cc
r7391 r7461 25 25 * @todo this constructor is not jet implemented - do it 26 26 */ 27 MissionGoal::MissionGoal ( )27 MissionGoal::MissionGoal (const TiXmlElement* root) 28 28 { 29 29 this->setClassID(CL_MISSION_GOAL, "MissionGoal"); 30 31 if( root != NULL) 32 this->loadParams(root); 30 33 } 31 34 … … 38 41 39 42 } 43 44 45 void MissionGoal::loadParams(const TiXmlElement* root) 46 { 47 BaseObject::loadParams(root); 48 } -
trunk/src/util/mission_goal.h
r7400 r7461 27 27 28 28 public: 29 MissionGoal( );29 MissionGoal(const TiXmlElement* root); 30 30 virtual ~MissionGoal(); 31 31 -
trunk/src/util/signal_handler.cc
r7440 r7461 15 15 16 16 #include "signal_handler.h" 17 #include <assert.h> 17 18 18 19 #ifndef __WIN32__ … … 28 29 this->type = type; 29 30 this->appName = appName; 30 31 31 32 catchSignal( SIGSEGV ); 32 33 catchSignal( SIGABRT ); … … 75 76 76 77 assert( pipe(fd) != -1 ); 77 78 78 79 int pid = fork(); 79 80 … … 86 87 sleep(2); 87 88 88 89 89 90 return; 90 91 } … … 98 99 exit(0); 99 100 } 100 101 101 102 char command[256]; 102 103 if ( getInstance()->type == GDB_RUN_WRITE_TO_FILE ) -
trunk/src/util/singleplayer_shootemup.cc
r7391 r7461 49 49 this->setClassID(CL_SINGLEPLAYER_SHOOTEMUP, "SingleplayerShootemup"); 50 50 51 PRINTF(0)("Created a SinglePlayer Shootemup game\n"); 51 52 52 53 if( root != NULL)
Note: See TracChangeset
for help on using the changeset viewer.