Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9715 in orxonox.OLD for branches/new_class_id/src/util


Ignore:
Timestamp:
Sep 1, 2006, 8:06:39 PM (18 years ago)
Author:
bensch
Message:

renamed newclassid to classid and newobjectlist to objectlist

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  
    2020#include "animation_player.h"
    2121
    22 NewObjectListDefinition(Animation);
     22ObjectListDefinition(Animation);
    2323/**
    2424 *  creates a new Animation
  • branches/new_class_id/src/util/animation/animation.h

    r9705 r9715  
    7373class Animation : public BaseObject
    7474{
    75   NewObjectListDeclaration(Animation);
     75  ObjectListDeclaration(Animation);
    7676public:
    7777  virtual ~Animation();
  • branches/new_class_id/src/util/animation/animation_player.cc

    r9705 r9715  
    2222
    2323
    24 NewObjectListDefinition(AnimationPlayer);
     24ObjectListDefinition(AnimationPlayer);
    2525/**
    2626 *  standard constructor
  • branches/new_class_id/src/util/animation/animation_player.h

    r9705 r9715  
    3030class AnimationPlayer : public BaseObject
    3131{
    32   NewObjectListDeclaration(AnimationPlayer);
     32  ObjectListDeclaration(AnimationPlayer);
    3333
    3434public:
  • branches/new_class_id/src/util/game_rules.cc

    r9704 r9715  
    2828
    2929
    30 NewObjectListDefinition(GameRules);
     30ObjectListDefinition(GameRules);
    3131
    3232/**
  • branches/new_class_id/src/util/game_rules.h

    r9704 r9715  
    2323class GameRules : virtual public BaseObject
    2424{
    25   NewObjectListDeclaration(GameRules);
     25  ObjectListDeclaration(GameRules);
    2626
    2727  public:
  • branches/new_class_id/src/util/hud.cc

    r9703 r9715  
    3434#include "playable.h"
    3535
    36 NewObjectListDefinition(Hud);
     36ObjectListDefinition(Hud);
    3737/**
    3838 * standard constructor
  • branches/new_class_id/src/util/hud.h

    r9703 r9715  
    2323class Hud : public Element2D, public EventListener
    2424{
    25   NewObjectListDeclaration(Hud);
     25  ObjectListDeclaration(Hud);
    2626
    2727public:
  • branches/new_class_id/src/util/kill_target.cc

    r9709 r9715  
    2323
    2424#include "class_id.h"
    25 NewObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
     25ObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
    2626CREATE_FACTORY(KillTarget);
    2727
  • branches/new_class_id/src/util/kill_target.h

    r9705 r9715  
    1717class KillTarget : public MissionGoal
    1818{
    19   NewObjectListDeclaration(KillTarget);
     19  ObjectListDeclaration(KillTarget);
    2020
    2121  public:
  • branches/new_class_id/src/util/mission_goal.cc

    r9705 r9715  
    2424
    2525
    26 NewObjectListDefinition(MissionGoal);
     26ObjectListDefinition(MissionGoal);
    2727/**
    2828 * standard constructor
  • branches/new_class_id/src/util/mission_goal.h

    r9705 r9715  
    2626//! A class representing a mission goal
    2727class MissionGoal : public BaseObject {
    28   NewObjectListDeclaration(MissionGoal);
     28  ObjectListDeclaration(MissionGoal);
    2929
    3030 public:
  • branches/new_class_id/src/util/multiplayer_team_deathmatch.cc

    r9709 r9715  
    5050#include "class_id.h"
    5151
    52 NewObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
     52ObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
    5353CREATE_FACTORY(MultiplayerTeamDeathmatch);
    5454/**
     
    301301}
    302302
    303 NewClassID MultiplayerTeamDeathmatch::getPlayableClassId( int userId, int team )
     303ClassID MultiplayerTeamDeathmatch::getPlayableClassId( int userId, int team )
    304304{
    305305  if ( team == TEAM_NOTEAM || team == TEAM_SPECTATOR )
    306     return NewObjectListBase::retrieveIdentity("Spectator");
     306    return ObjectListBase::retrieveIdentity("Spectator");
    307307
    308308  if ( team == 0 || team == 1 )
    309     return NewObjectListBase::retrieveIdentity("TurbineHover");
     309    return ObjectListBase::retrieveIdentity("TurbineHover");
    310310
    311311  assert( false );
     
    313313
    314314
    315 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const NewClassID& classId )
     315std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const ClassID& classId )
    316316{
    317317  if (classId == CL_TURBINE_HOVER)
     
    325325}
    326326
    327 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId )
     327std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId )
    328328{
    329329  if ( classId == CL_FPS_PLAYER )
     
    338338}
    339339
    340 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const NewClassID& classId )
    341 {
    342   if ( classId == NewObjectListBase::retrieveIdentity(CL_FPS_PLAYER))
     340float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const ClassID& classId )
     341{
     342  if ( classId == ObjectListBase::retrieveIdentity(CL_FPS_PLAYER))
    343343  {
    344344    return 10.0f;
     
    358358    teamScore[i] = 0;
    359359
    360   for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
     360  for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
    361361       it != PlayerStats::objectList().end();
    362362       ++it)
     
    382382    playersInTeam[i] = 0;
    383383
    384   for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
     384  for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
    385385       it != PlayerStats::objectList().end();
    386386       ++it)
     
    442442void MultiplayerTeamDeathmatch::handleTeamChanges( )
    443443{
    444   for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
     444  for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
    445445       it != PlayerStats::objectList().end();
    446446       ++it)
     
    458458
    459459  //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();
    461461       it != PlayerStats::objectList().end();
    462462       ++it)
     
    491491
    492492
    493   NewClassID       playableClassId  = getPlayableClassId( userId, stats.getPreferedTeamId() );
     493  ClassID       playableClassId  = getPlayableClassId( userId, stats.getPreferedTeamId() );
    494494  std::string   playableModel    = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId );
    495495  std::string   playableTexture  = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId );
     
    813813  std::vector<SpawningPoint*> spList;
    814814
    815   for (NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
     815  for (ObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
    816816       it != SpawningPoint::objectList().end();
    817817       ++it)
     
    825825  if ( spList.size() == 0 )
    826826  {
    827     for (NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
     827    for (ObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
    828828         it != SpawningPoint::objectList().end();
    829829         ++it)
  • branches/new_class_id/src/util/multiplayer_team_deathmatch.h

    r9704 r9715  
    3030class MultiplayerTeamDeathmatch : public NetworkGameRules, public EventListener
    3131{
    32   NewObjectListDeclaration(MultiplayerTeamDeathmatch);
     32  ObjectListDeclaration(MultiplayerTeamDeathmatch);
    3333
    3434  public:
     
    3939
    4040    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 );
    4545
    4646    virtual void registerSpawn( WorldEntity * we );
  • branches/new_class_id/src/util/network_game_rules.cc

    r9704 r9715  
    2222
    2323
    24 NewObjectListDefinition(NetworkGameRules);
     24ObjectListDefinition(NetworkGameRules);
    2525
    2626/**
     
    4141
    4242
    43 std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId )
     43std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId )
    4444{
    4545  return "";
    4646}
    4747
    48 std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, const NewClassID& classId )
     48std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, const ClassID& classId )
    4949{
    5050  return "models/ships/reap_#.obj";
    5151}
    5252
    53 NewClassID NetworkGameRules::getPlayableClassId( int userId, int team )
     53ClassID NetworkGameRules::getPlayableClassId( int userId, int team )
    5454{
    55   const NewObjectListBase* objList = NewObjectListBase::getObjectList("SpaceShip");
     55  const ObjectListBase* objList = ObjectListBase::getObjectList("SpaceShip");
    5656  if (objList != NULL)
    5757    return objList->identity();
    5858  else
    59     return NewClassID();
     59    return ClassID();
    6060}
    6161
     
    7272
    7373
    74 float NetworkGameRules::getPlayableScale( int userId, int team, const NewClassID& classId )
     74float NetworkGameRules::getPlayableScale( int userId, int team, const ClassID& classId )
    7575{
    7676  return 1.0f;
  • branches/new_class_id/src/util/network_game_rules.h

    r9704 r9715  
    1515class NetworkGameRules : public GameRules
    1616{
    17   NewObjectListDeclaration(NetworkGameRules);
     17  ObjectListDeclaration(NetworkGameRules);
    1818
    1919  public:
     
    2222
    2323    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 );
    2828
    2929    virtual PlayerStats * getNewPlayerStats( int userId ){ return new PlayerStats( userId ); }
  • branches/new_class_id/src/util/object_manager.cc

    r9703 r9715  
    2929    ->defaultValues("", 0);
    3030
    31 NewObjectListDefinition(ObjectManager);
     31ObjectListDefinition(ObjectManager);
    3232/**
    3333 * @brief standard constructor
     
    112112 */
    113113  /*
    114 void ObjectManager::distanceFromObject(EntityList& entities, const PNode& center, float radius, const NewClassID& classID)
     114void ObjectManager::distanceFromObject(EntityList& entities, const PNode& center, float radius, const ClassID& classID)
    115115{
    116116  TODO FIXME
  • branches/new_class_id/src/util/object_manager.h

    r9703 r9715  
    7373class ObjectManager : public BaseObject
    7474{
    75   NewObjectListDeclaration(ObjectManager);
     75  ObjectListDeclaration(ObjectManager);
    7676public:
    7777  typedef std::list<WorldEntity*> EntityList;      //!< A type definition to make it easy to use EntityLists.
     
    9191  const EntityList& getEntityList(OM_LIST listNumber) const { return this->entityLists[listNumber]; }
    9292
    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);
    9494
    9595  void debug(OM_LIST omList, unsigned int level = 0) const;
  • branches/new_class_id/src/util/singleplayer_shootemup.cc

    r9709 r9715  
    2626
    2727#include "class_id.h"
    28 NewObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
     28ObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
    2929CREATE_FACTORY(SingleplayerShootemup);
    3030
  • branches/new_class_id/src/util/singleplayer_shootemup.h

    r9705 r9715  
    1818class SingleplayerShootemup : public GameRules
    1919{
    20   NewObjectListDeclaration(SingleplayerShootemup);
     20  ObjectListDeclaration(SingleplayerShootemup);
    2121  public:
    2222    SingleplayerShootemup(const TiXmlElement* root = NULL);
  • branches/new_class_id/src/util/track/pilot_node.cc

    r9705 r9715  
    2424
    2525
    26 NewObjectListDefinition(PilotNode);
     26ObjectListDefinition(PilotNode);
    2727/**
    2828 *  standard constructor
  • branches/new_class_id/src/util/track/pilot_node.h

    r9705 r9715  
    1515//! The PilotNode is a node that enables the is driven by the Mouse
    1616class PilotNode : public WorldEntity, public EventListener {
    17   NewObjectListDeclaration(PilotNode);
     17  ObjectListDeclaration(PilotNode);
    1818
    1919 public:
Note: See TracChangeset for help on using the changeset viewer.