Changeset 9715 in orxonox.OLD for branches/new_class_id/src/util
- Timestamp:
- Sep 1, 2006, 8:06:39 PM (18 years ago)
- Location:
- branches/new_class_id/src/util
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/util/animation/animation.cc
r9705 r9715 20 20 #include "animation_player.h" 21 21 22 NewObjectListDefinition(Animation);22 ObjectListDefinition(Animation); 23 23 /** 24 24 * creates a new Animation -
branches/new_class_id/src/util/animation/animation.h
r9705 r9715 73 73 class Animation : public BaseObject 74 74 { 75 NewObjectListDeclaration(Animation);75 ObjectListDeclaration(Animation); 76 76 public: 77 77 virtual ~Animation(); -
branches/new_class_id/src/util/animation/animation_player.cc
r9705 r9715 22 22 23 23 24 NewObjectListDefinition(AnimationPlayer);24 ObjectListDefinition(AnimationPlayer); 25 25 /** 26 26 * standard constructor -
branches/new_class_id/src/util/animation/animation_player.h
r9705 r9715 30 30 class AnimationPlayer : public BaseObject 31 31 { 32 NewObjectListDeclaration(AnimationPlayer);32 ObjectListDeclaration(AnimationPlayer); 33 33 34 34 public: -
branches/new_class_id/src/util/game_rules.cc
r9704 r9715 28 28 29 29 30 NewObjectListDefinition(GameRules);30 ObjectListDefinition(GameRules); 31 31 32 32 /** -
branches/new_class_id/src/util/game_rules.h
r9704 r9715 23 23 class GameRules : virtual public BaseObject 24 24 { 25 NewObjectListDeclaration(GameRules);25 ObjectListDeclaration(GameRules); 26 26 27 27 public: -
branches/new_class_id/src/util/hud.cc
r9703 r9715 34 34 #include "playable.h" 35 35 36 NewObjectListDefinition(Hud);36 ObjectListDefinition(Hud); 37 37 /** 38 38 * standard constructor -
branches/new_class_id/src/util/hud.h
r9703 r9715 23 23 class Hud : public Element2D, public EventListener 24 24 { 25 NewObjectListDeclaration(Hud);25 ObjectListDeclaration(Hud); 26 26 27 27 public: -
branches/new_class_id/src/util/kill_target.cc
r9709 r9715 23 23 24 24 #include "class_id.h" 25 NewObjectListDefinitionID(KillTarget, CL_KILL_TARGET);25 ObjectListDefinitionID(KillTarget, CL_KILL_TARGET); 26 26 CREATE_FACTORY(KillTarget); 27 27 -
branches/new_class_id/src/util/kill_target.h
r9705 r9715 17 17 class KillTarget : public MissionGoal 18 18 { 19 NewObjectListDeclaration(KillTarget);19 ObjectListDeclaration(KillTarget); 20 20 21 21 public: -
branches/new_class_id/src/util/mission_goal.cc
r9705 r9715 24 24 25 25 26 NewObjectListDefinition(MissionGoal);26 ObjectListDefinition(MissionGoal); 27 27 /** 28 28 * standard constructor -
branches/new_class_id/src/util/mission_goal.h
r9705 r9715 26 26 //! A class representing a mission goal 27 27 class MissionGoal : public BaseObject { 28 NewObjectListDeclaration(MissionGoal);28 ObjectListDeclaration(MissionGoal); 29 29 30 30 public: -
branches/new_class_id/src/util/multiplayer_team_deathmatch.cc
r9709 r9715 50 50 #include "class_id.h" 51 51 52 NewObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);52 ObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH); 53 53 CREATE_FACTORY(MultiplayerTeamDeathmatch); 54 54 /** … … 301 301 } 302 302 303 NewClassID MultiplayerTeamDeathmatch::getPlayableClassId( int userId, int team )303 ClassID MultiplayerTeamDeathmatch::getPlayableClassId( int userId, int team ) 304 304 { 305 305 if ( team == TEAM_NOTEAM || team == TEAM_SPECTATOR ) 306 return NewObjectListBase::retrieveIdentity("Spectator");306 return ObjectListBase::retrieveIdentity("Spectator"); 307 307 308 308 if ( team == 0 || team == 1 ) 309 return NewObjectListBase::retrieveIdentity("TurbineHover");309 return ObjectListBase::retrieveIdentity("TurbineHover"); 310 310 311 311 assert( false ); … … 313 313 314 314 315 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const NewClassID& classId )315 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const ClassID& classId ) 316 316 { 317 317 if (classId == CL_TURBINE_HOVER) … … 325 325 } 326 326 327 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId )327 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ) 328 328 { 329 329 if ( classId == CL_FPS_PLAYER ) … … 338 338 } 339 339 340 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const NewClassID& classId )341 { 342 if ( classId == NewObjectListBase::retrieveIdentity(CL_FPS_PLAYER))340 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const ClassID& classId ) 341 { 342 if ( classId == ObjectListBase::retrieveIdentity(CL_FPS_PLAYER)) 343 343 { 344 344 return 10.0f; … … 358 358 teamScore[i] = 0; 359 359 360 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();360 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 361 361 it != PlayerStats::objectList().end(); 362 362 ++it) … … 382 382 playersInTeam[i] = 0; 383 383 384 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();384 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 385 385 it != PlayerStats::objectList().end(); 386 386 ++it) … … 442 442 void MultiplayerTeamDeathmatch::handleTeamChanges( ) 443 443 { 444 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();444 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 445 445 it != PlayerStats::objectList().end(); 446 446 ++it) … … 458 458 459 459 //now serve player who want join a random team 460 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();460 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 461 461 it != PlayerStats::objectList().end(); 462 462 ++it) … … 491 491 492 492 493 NewClassID playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() );493 ClassID playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() ); 494 494 std::string playableModel = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId ); 495 495 std::string playableTexture = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId ); … … 813 813 std::vector<SpawningPoint*> spList; 814 814 815 for ( NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();815 for (ObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin(); 816 816 it != SpawningPoint::objectList().end(); 817 817 ++it) … … 825 825 if ( spList.size() == 0 ) 826 826 { 827 for ( NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();827 for (ObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin(); 828 828 it != SpawningPoint::objectList().end(); 829 829 ++it) -
branches/new_class_id/src/util/multiplayer_team_deathmatch.h
r9704 r9715 30 30 class MultiplayerTeamDeathmatch : public NetworkGameRules, public EventListener 31 31 { 32 NewObjectListDeclaration(MultiplayerTeamDeathmatch);32 ObjectListDeclaration(MultiplayerTeamDeathmatch); 33 33 34 34 public: … … 39 39 40 40 virtual int getTeamForNewUser(); 41 virtual NewClassID getPlayableClassId( int userId, int team );42 virtual std::string getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId );43 virtual std::string getPlayableModelFileName( int userId, int team, const NewClassID& classId );44 virtual float getPlayableScale( int userId, int team, const NewClassID& classId );41 virtual ClassID getPlayableClassId( int userId, int team ); 42 virtual std::string getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ); 43 virtual std::string getPlayableModelFileName( int userId, int team, const ClassID& classId ); 44 virtual float getPlayableScale( int userId, int team, const ClassID& classId ); 45 45 46 46 virtual void registerSpawn( WorldEntity * we ); -
branches/new_class_id/src/util/network_game_rules.cc
r9704 r9715 22 22 23 23 24 NewObjectListDefinition(NetworkGameRules);24 ObjectListDefinition(NetworkGameRules); 25 25 26 26 /** … … 41 41 42 42 43 std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId )43 std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ) 44 44 { 45 45 return ""; 46 46 } 47 47 48 std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, const NewClassID& classId )48 std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, const ClassID& classId ) 49 49 { 50 50 return "models/ships/reap_#.obj"; 51 51 } 52 52 53 NewClassID NetworkGameRules::getPlayableClassId( int userId, int team )53 ClassID NetworkGameRules::getPlayableClassId( int userId, int team ) 54 54 { 55 const NewObjectListBase* objList = NewObjectListBase::getObjectList("SpaceShip");55 const ObjectListBase* objList = ObjectListBase::getObjectList("SpaceShip"); 56 56 if (objList != NULL) 57 57 return objList->identity(); 58 58 else 59 return NewClassID();59 return ClassID(); 60 60 } 61 61 … … 72 72 73 73 74 float NetworkGameRules::getPlayableScale( int userId, int team, const NewClassID& classId )74 float NetworkGameRules::getPlayableScale( int userId, int team, const ClassID& classId ) 75 75 { 76 76 return 1.0f; -
branches/new_class_id/src/util/network_game_rules.h
r9704 r9715 15 15 class NetworkGameRules : public GameRules 16 16 { 17 NewObjectListDeclaration(NetworkGameRules);17 ObjectListDeclaration(NetworkGameRules); 18 18 19 19 public: … … 22 22 23 23 virtual int getTeamForNewUser(); 24 virtual NewClassID getPlayableClassId( int userId, int team );25 virtual std::string getPlayableModelFileName( int userId, int team, const NewClassID& classId );26 virtual std::string getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId );27 virtual float getPlayableScale( int userId, int team, const NewClassID& classId );24 virtual ClassID getPlayableClassId( int userId, int team ); 25 virtual std::string getPlayableModelFileName( int userId, int team, const ClassID& classId ); 26 virtual std::string getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ); 27 virtual float getPlayableScale( int userId, int team, const ClassID& classId ); 28 28 29 29 virtual PlayerStats * getNewPlayerStats( int userId ){ return new PlayerStats( userId ); } -
branches/new_class_id/src/util/object_manager.cc
r9703 r9715 29 29 ->defaultValues("", 0); 30 30 31 NewObjectListDefinition(ObjectManager);31 ObjectListDefinition(ObjectManager); 32 32 /** 33 33 * @brief standard constructor … … 112 112 */ 113 113 /* 114 void ObjectManager::distanceFromObject(EntityList& entities, const PNode& center, float radius, const NewClassID& classID)114 void ObjectManager::distanceFromObject(EntityList& entities, const PNode& center, float radius, const ClassID& classID) 115 115 { 116 116 TODO FIXME -
branches/new_class_id/src/util/object_manager.h
r9703 r9715 73 73 class ObjectManager : public BaseObject 74 74 { 75 NewObjectListDeclaration(ObjectManager);75 ObjectListDeclaration(ObjectManager); 76 76 public: 77 77 typedef std::list<WorldEntity*> EntityList; //!< A type definition to make it easy to use EntityLists. … … 91 91 const EntityList& getEntityList(OM_LIST listNumber) const { return this->entityLists[listNumber]; } 92 92 93 template <class T> static void distanceFromObject(EntityList& entities, const PNode& center, float radius, NewObjectList<T>& list);93 template <class T> static void distanceFromObject(EntityList& entities, const PNode& center, float radius, ObjectList<T>& list); 94 94 95 95 void debug(OM_LIST omList, unsigned int level = 0) const; -
branches/new_class_id/src/util/singleplayer_shootemup.cc
r9709 r9715 26 26 27 27 #include "class_id.h" 28 NewObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);28 ObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP); 29 29 CREATE_FACTORY(SingleplayerShootemup); 30 30 -
branches/new_class_id/src/util/singleplayer_shootemup.h
r9705 r9715 18 18 class SingleplayerShootemup : public GameRules 19 19 { 20 NewObjectListDeclaration(SingleplayerShootemup);20 ObjectListDeclaration(SingleplayerShootemup); 21 21 public: 22 22 SingleplayerShootemup(const TiXmlElement* root = NULL); -
branches/new_class_id/src/util/track/pilot_node.cc
r9705 r9715 24 24 25 25 26 NewObjectListDefinition(PilotNode);26 ObjectListDefinition(PilotNode); 27 27 /** 28 28 * standard constructor -
branches/new_class_id/src/util/track/pilot_node.h
r9705 r9715 15 15 //! The PilotNode is a node that enables the is driven by the Mouse 16 16 class PilotNode : public WorldEntity, public EventListener { 17 NewObjectListDeclaration(PilotNode);17 ObjectListDeclaration(PilotNode); 18 18 19 19 public:
Note: See TracChangeset
for help on using the changeset viewer.