Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9705 in orxonox.OLD


Ignore:
Timestamp:
Aug 25, 2006, 9:44:53 PM (18 years ago)
Author:
bensch
Message:

adapted many more classes

Location:
branches/new_class_id/src
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/Makefile.am

    r9700 r9705  
    1616                data/data_tank.h
    1717
    18 SUBDIRS = \
    19         . \
     18SUBDIRS =
     19#       . \
    2020        math \
    2121        lang \
  • branches/new_class_id/src/lib/lang/base_object.h

    r9691 r9705  
    4848  inline const std::string& getClassName() const { return _classes.front()._objectList->name(); }
    4949
     50  inline const NewClassID& getClassID() const { return *_leafClassID; }
    5051  /** @returns the ID of the Topmost object of the ClassStack */
    5152  inline const int& getLeafClassID() const { return _leafClassID->id(); }
  • branches/new_class_id/src/lib/lang/new_object_list.cc

    r9701 r9705  
    104104
    105105/**
     106 * @brief searches for a NewClassID in the list of all NewObjectLists, and returns its Identity
     107 * @param id: The Id to search for
     108 * @returns the ClassID if found and NullClass' identity if not.
     109 */
     110const NewClassID& NewObejctListBase::retrieveIdentity(int id)
     111{
     112  const NewObjectListBase* const base = NewObjectListBase::getObjectList(id);
     113
     114  if (base != NULL)
     115    return base->_identity;
     116  else
     117    return NullClass::classID();
     118}
     119
     120/**
     121 * @brief searches for a NewClassID in the list of all NewObjectLists, and returns its Identity
     122 * @param name: The Name to search for
     123 * @returns the ClassID if found and NullClass' identity if not.
     124 */
     125const NewClassID& NewObjectListBase::retrieveIdentity(const std::string& name)
     126{
     127  const NewObjectListBase* const base = NewObjectListBase::getObjectList(name);
     128
     129  if (base != NULL)
     130    return base->_identity;
     131  else
     132    return NullObject::classID();
     133}
     134
     135
     136/**
    106137 * @brief Checks if a Class with name already exists.
    107138 * @param name The Name of the Class to check.
  • branches/new_class_id/src/lib/lang/new_object_list.h

    r9702 r9705  
    4444  //! A fast iterator Base-Class, for iterator-casting and storing.
    4545  /**
    46    * @note This Iterator is explicitely used only for storage purposes
     46   * @note This Iterator is explicitely used only for storage purposes in the BaseObject
    4747   */
    4848  class IteratorBase { };
    4949
     50  typedef std::list<BaseObject*>            base_list;
     51  typedef base_list::iterator               base_iterator;
     52
    5053public:
     54  /** @returns The Identity of the Class stored within. */
    5155  inline const NewClassID& identity() const { return _identity; }
     56  /** @returns the ID of the Identity of the ObjectList */
    5257  inline int id() const { return _id; };
     58  /** @returns The Name of the Class stored in this ObjectList */
    5359  inline const std::string& name() const { return _name; };
    54   bool operator==(int id) const { return _id == id; };
    55   bool operator==(const NewClassID& id) const { return id == _id; };
    56   bool operator==(const std::string& name) const { return _name == name; };
    57 
    58   void acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
    59 
    60   virtual void debug() const = 0;
     60  /** @param id The id to compare @returns true on match, false otherwise */
     61  inline bool operator==(int id) const { return _id == id; };
     62  /** @param id The id to compare @returns true on match, false otherwise */
     63  inline bool operator==(const NewClassID& id) const { return id == _id; };
     64  /** @param name The name to compare @returns true on match, false otherwise */
     65  inline bool operator==(const std::string& name) const { return _name == name; };
     66  /** @param id The id to check @returns true on match, false otherwise */
     67  inline void acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
     68  /** @brief fills a list of Objects into a BaseObject*-List. @param list the list to fill */
     69  virtual void getBaseObjectList(base_list* list) const = 0;
     70
     71  static const NewClassID& retrieveIdentity(int id);
     72  static const NewClassID& retrieveIdentity(const std::string& name);
     73
     74  static const NewObjectListBase* const getObjectList(int classID);
     75  static const NewObjectListBase* const getObjectList(const std::string& className);
     76  static const NewObjectListBase* const getObjectList(const NewClassID& classID);
     77
     78  static BaseObject* getBaseObject(int classID, const std::string& objectName);
     79  static BaseObject* getBaseObject(const std::string& className, const std::string& objectName);
     80  static BaseObject* getBaseObject(const NewClassID& classID, const std::string& objectName);
     81
     82  /** @returns an Object with Name name out of this List @param name the name of the Object. */
     83  virtual BaseObject* getBaseObject(const std::string& name) const = 0;
     84
     85  static const std::list<std::string>&  getClassNames();
    6186
    6287  static unsigned int                   classCount();
     
    6489  static int                            StringToID(const std::string& className);
    6590
    66   static const std::list<std::string>&  getClassNames();
    67 
     91  virtual void debug() const = 0;
     92
     93  //! Only uset to unsubscribe a BaseObject.
    6894  virtual void unregisterObject(IteratorBase* _iterators) = 0;
    69 
    70 public:
    71   typedef std::list<BaseObject*>            base_list;
    72   typedef std::list<BaseObject*>::iterator  base_iterator;
    73 
    74   virtual void getBaseObjectList(base_list* list) const = 0;
    75 
    76   static const NewObjectListBase* const getObjectList(int classID);
    77   static const NewObjectListBase* const getObjectList(const std::string& className);
    78   static const NewObjectListBase* const getObjectList(const NewClassID& classID);
    79 
    80   static BaseObject* getBaseObject(int classID, const std::string& objectName);
    81   static BaseObject* getBaseObject(const std::string& className, const std::string& objectName);
    82   static BaseObject* getBaseObject(const NewClassID& classID, const std::string& objectName);
    83 
    84   virtual BaseObject* getBaseObject(const std::string& name) const = 0;
    8595
    8696protected:
     
    99109  typedef std::map<std::string, NewObjectListBase*> classNameMap; //!< The Generic Map.
    100110
     111private:
    101112  int                           _id;
    102113  const std::string             _name;              //!< The Name of the Class.
     
    146157  T*                      getObject(const std::string& name) const;
    147158  inline const list&      objects() const { return _objects; };
     159  bool exists(const T* const object) const;
    148160
    149161  inline iterator begin() { return _objects.begin(); };
     
    157169  inline T* back() const { return _objects.back(); };
    158170
     171
    159172  NewObjectListBase::IteratorBase* registerObject(T* object);
    160   void unregisterObject(IteratorBase* iterator);
     173  virtual void unregisterObject(IteratorBase* iterator);
    161174
    162175  virtual void debug() const;
     
    233246
    234247/**
     248 * @brief checks if Object object exists in this ClassList.
     249 * @param object the Object to check for
     250 * @returns True if the object is found within the List, false otherwise
     251 */
     252template <class T>
     253    bool NewObjectList<T>::exists(const T* const object) const
     254{
     255  return (std::find(_objects.begin(), _objects.end(), object) != _objects.end());
     256}
     257
     258
     259/**
    235260 * @brief retrieves a List of BaseObjects
    236261 * @param list the list to push the ObjectList into.
  • branches/new_class_id/src/util/animation/animation.cc

    r5777 r9705  
    2020#include "animation_player.h"
    2121
     22NewObjectListDefinition(Animation);
    2223/**
    2324 *  creates a new Animation
     
    2728Animation::Animation()
    2829{
    29   this->setClassID(CL_ANIMATION, "Animation");
     30  this->registerObject(this, Animation::_objectList);
    3031
    3132  // initialize a beginning KeyFrame, that will be deleted afterwards
  • branches/new_class_id/src/util/animation/animation.h

    r6222 r9705  
    7373class Animation : public BaseObject
    7474{
    75  public:
     75  NewObjectListDeclaration(Animation);
     76public:
    7677  virtual ~Animation();
    7778
     
    9596  inline bool ifDelete() { return bDelete; };
    9697
    97  protected:
     98protected:
    9899  Animation();
    99100
    100101  void handleInfinity();
    101102
    102  protected:
     103protected:
    103104  // variables
    104105  float                 localTime;              //!< The Time passed since the beginning of the currentKeyFrame.
     
    119120class aTest
    120121{
    121  public:
     122public:
    122123  inline aTest() { last = 0.0;}
    123124  /** a little debug information to show the results of this class @param f new value */
    124125  inline void littleDebug(float f) {  diff = f - last; printf("f=%f, diff=%f\n", f,diff); last = f;}
    125  private:
     126private:
    126127  float     diff;           //!< difference from the last value
    127128  float     last;           //!< the last calculated value
  • branches/new_class_id/src/util/animation/animation_player.cc

    r9406 r9705  
    2222
    2323
    24 
     24NewObjectListDefinition(AnimationPlayer);
    2525/**
    2626 *  standard constructor
     
    2828AnimationPlayer::AnimationPlayer ()
    2929{
    30   this->setClassID(CL_ANIMATION_PLAYER, "AnimationPlayer");
     30  this->registerObject(this, AnimationPlayer::_objectList);
    3131  this->setName("AnimationPlayer");
    3232
  • branches/new_class_id/src/util/animation/animation_player.h

    r5777 r9705  
    2828   eveything else will be done by the AnimationPlayer itself.\n
    2929*/
    30 class AnimationPlayer : public BaseObject {
     30class AnimationPlayer : public BaseObject
     31{
     32  NewObjectListDeclaration(AnimationPlayer);
    3133
    32  public:
     34public:
    3335  /** @returns a Pointer to the only object of this Class */
    3436  inline static AnimationPlayer* getInstance() { if (!singletonRef) singletonRef = new AnimationPlayer();  return singletonRef; };
     
    5052  void debug();
    5153
    52  private:
     54private:
    5355  /* singleton */
    5456  AnimationPlayer();
  • branches/new_class_id/src/util/kill_target.cc

    r9406 r9705  
    2222
    2323
    24 
     24#include "class_id.h"
    2525CREATE_FACTORY(KillTarget, CL_KILL_TARGET);
     26NewObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
    2627
    2728
     
    3233KillTarget::KillTarget (const TiXmlElement* root)
    3334        : MissionGoal(root) {
    34     this->setClassID(CL_KILL_TARGET, "KillTarget");
     35  this->registerObject(this, KillTarget::_objectList);
    3536
    3637    if( root != NULL)
  • branches/new_class_id/src/util/kill_target.h

    r7464 r9705  
    1717class KillTarget : public MissionGoal
    1818{
     19  NewObjectListDeclaration(KillTarget);
    1920
    2021  public:
  • branches/new_class_id/src/util/mission_goal.cc

    r9406 r9705  
    2424
    2525
    26 
     26NewObjectListDefinition(MissionGoal);
    2727/**
    2828 * standard constructor
     
    3131MissionGoal::MissionGoal (const TiXmlElement* root)
    3232{
    33    this->setClassID(CL_MISSION_GOAL, "MissionGoal");
     33  this->registerObject(this, MissionGoal::_objectList);
    3434
    3535   this->missionState = MS_PASSIVE;
  • branches/new_class_id/src/util/mission_goal.h

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

    r9704 r9705  
    5656 */
    5757MultiplayerTeamDeathmatch::MultiplayerTeamDeathmatch(const TiXmlElement* root)
    58   : NetworkGameRules(root)
     58    : NetworkGameRules(root)
    5959{
    6060  this->registerObject(this, MultiplayerTeamDeathmatch::_objectList);
     
    111111
    112112  LoadParam(root, "death-penalty-timeout", this, MultiplayerTeamDeathmatch, setDeathPenaltyTimeout)
    113       .describe("sets the time in seconds a player has to wait for respawn");
     113  .describe("sets the time in seconds a player has to wait for respawn");
    114114
    115115  LoadParam(root, "max-kills", this, MultiplayerTeamDeathmatch, setMaxKills)
    116       .describe("sets the maximal kills for winning condition");
     116  .describe("sets the maximal kills for winning condition");
    117117
    118118  LoadParam(root, "num-teams", this, MultiplayerTeamDeathmatch, setNumTeams)
    119       .describe("sets number of teams");
     119  .describe("sets number of teams");
    120120
    121121}
     
    189189  }
    190190
    191 //   if( PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() ) )
    192 //   {
    193 //     PRINTF(0)("prefered team id: %i, noteam: %i\n", PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )->getPreferedTeamId(), TEAM_NOTEAM);
    194 //   }
     191  //   if( PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() ) )
     192  //   {
     193  //     PRINTF(0)("prefered team id: %i, noteam: %i\n", PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )->getPreferedTeamId(), TEAM_NOTEAM);
     194  //   }
    195195
    196196  // check if the menu should be removed and the game state should be entered
     
    270270  if( unlikely( this->bLocalPlayerDead))
    271271  {
    272 
    273272  }
    274273}
     
    305304{
    306305  if ( team == TEAM_NOTEAM || team == TEAM_SPECTATOR )
    307     return CL_SPECTATOR;
     306    return NewObjectListBase::retrieveIdentity("Spectator");
    308307
    309308  if ( team == 0 || team == 1 )
    310     return CL_TURBINE_HOVER;
     309    return NewObjectListBase::retrieveIdentity("TurbineHover");
    311310
    312311  assert( false );
     
    314313
    315314
    316 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, ClassID classId )
     315std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const NewClassID& classId )
    317316{
    318317  if (classId == CL_TURBINE_HOVER)
    319    return "models/ships/hoverglider_mainbody.obj";
     318    return "models/ships/hoverglider_mainbody.obj";
    320319  if ( team == 0 )
    321320    return "models/creatures/doom_guy.md2";
     
    326325}
    327326
    328 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, ClassID classId )
     327std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId )
    329328{
    330329  if ( classId == CL_FPS_PLAYER )
     
    339338}
    340339
    341 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, ClassID classId )
    342 {
    343   if ( classId == CL_FPS_PLAYER )
     340float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const NewClassID& classId )
     341{
     342  if ( classId == NewObjectListBase::retrieveIdentity(CL_FPS_PLAYER))
    344343  {
    345344    return 10.0f;
     
    359358    teamScore[i] = 0;
    360359
    361 
    362   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
    363 
    364   if ( !list )
    365     return;
    366 
    367   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
    368   {
    369     PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
     360  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
     361       it != PlayerStats::objectList().end();
     362       ++it)
     363  {
     364    PlayerStats & stats = *(*it);
    370365
    371366    if ( stats.getTeamId() >= 0 )
     
    387382    playersInTeam[i] = 0;
    388383
    389   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
    390 
    391   if ( !list )
    392     return 0;
    393 
    394   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
    395   {
    396     PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
     384  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
     385       it != PlayerStats::objectList().end();
     386       ++it)
     387  {
     388    PlayerStats & stats = *(*it);
    397389
    398390    if ( stats.getTeamId() >= 0 )
     
    450442void MultiplayerTeamDeathmatch::handleTeamChanges( )
    451443{
    452   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
    453 
    454   if ( !list )
    455     return;
    456 
    457   //first server players with choices
    458   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
    459   {
    460     PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
     444  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
     445       it != PlayerStats::objectList().end();
     446       ++it)
     447  {
     448    PlayerStats & stats = *(*it);
    461449
    462450    if ( stats.getTeamId() != stats.getPreferedTeamId() )
     
    470458
    471459  //now serve player who want join a random team
    472   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
    473   {
    474     PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
     460  for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
     461       it != PlayerStats::objectList().end();
     462       ++it)
     463  {
     464    PlayerStats & stats = *(*it);
    475465
    476466    if ( stats.getTeamId() != stats.getPreferedTeamId() )
     
    501491
    502492
    503   ClassID       playableClassId  = getPlayableClassId( userId, stats.getPreferedTeamId() );
     493  NewClassID       playableClassId  = getPlayableClassId( userId, stats.getPreferedTeamId() );
    504494  std::string   playableModel    = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId );
    505495  std::string   playableTexture  = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId );
     
    584574    if ( event.bPressed )
    585575      this->bShowTeamChange = true;
    586   } else if ( event.type == SDLK_F1 )
     576  }
     577  else if ( event.type == SDLK_F1 )
    587578  {
    588579    if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed )
     
    680671void MultiplayerTeamDeathmatch::hideStats( )
    681672{
    682     if ( statsBox )
    683     {
    684       delete statsBox;
    685       statsBox = NULL;
    686     }
     673  if ( statsBox )
     674  {
     675    delete statsBox;
     676    statsBox = NULL;
     677  }
    687678}
    688679
     
    819810void MultiplayerTeamDeathmatch::respawnPlayable( Playable * playable, int teamId, float delay )
    820811{
    821   const std::list<BaseObject*> * list = ClassList::getList( CL_SPAWNING_POINT );
    822 
    823   assert( list );
    824812
    825813  std::vector<SpawningPoint*> spList;
    826814
    827   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
    828   {
    829     SpawningPoint * sp = dynamic_cast<SpawningPoint*>(*it);
     815  for (NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
     816       it != SpawningPoint::objectList().end();
     817       ++it)
     818  {
     819    SpawningPoint * sp = (*it);
    830820
    831821    if ( sp->getTeamId() == teamId )
     
    835825  if ( spList.size() == 0 )
    836826  {
    837     for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
    838     {
    839       SpawningPoint * sp = dynamic_cast<SpawningPoint*>(*it);
     827    for (NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();
     828         it != SpawningPoint::objectList().end();
     829         ++it)
     830    {
     831      SpawningPoint * sp = (*it);
    840832
    841833      if ( sp->getTeamId() < 0 )
  • branches/new_class_id/src/util/singleplayer_shootemup.cc

    r9406 r9705  
    2525
    2626
    27 
     27#include "class_id.h"
    2828CREATE_FACTORY(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
    29 
    30 
     29NewObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
    3130
    3231/**
     
    3635  : GameRules(root)
    3736{
    38   this->setClassID(CL_SINGLEPLAYER_SHOOTEMUP, "SingleplayerShootemup");
     37  this->registerObject(this, SingleplayerShootemup::_objectList);
    3938
    4039  if( root != NULL)
  • branches/new_class_id/src/util/singleplayer_shootemup.h

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

    r7868 r9705  
    2424
    2525
     26NewObjectListDefinition(PilotNode);
    2627/**
    2728 *  standard constructor
     
    2930PilotNode::PilotNode ()
    3031{
    31    this->setClassID(CL_PILOT_PARENT, "PilotNode");
     32  this->registerObject(this, PilotNode::_objectList);
    3233   this->setName("PilotNode");
    3334
  • branches/new_class_id/src/util/track/pilot_node.h

    r5039 r9705  
    1515//! The PilotNode is a node that enables the is driven by the Mouse
    1616class PilotNode : public WorldEntity, public EventListener {
     17  NewObjectListDeclaration(PilotNode);
    1718
    1819 public:
  • branches/new_class_id/src/world_entities/camera.cc

    r9406 r9705  
    1919#include "glincl.h"
    2020
     21NewObjectListDefinition(Camera);
     22
    2123/**
    2224 *  creates a Camera
     
    2426Camera::Camera()
    2527{
    26   this->setClassID(CL_CAMERA, "Camera");
     28  this->registerObject(this, Camera::_objectList);
    2729  this->setName("camera");
    2830  this->target = new CameraTarget();
     
    221223///////////////////
    222224
    223 
     225NewObjectListDefinition(CameraTarget);
    224226CameraTarget::CameraTarget()
    225227{
    226   this->setClassID(CL_CAMERA_TARGET, "CameraTarget");
     228  this->registerObject(this, CameraTarget::_objectList);
    227229  //  this->setParentMode(PNODE_MOVEMENT);
    228230}
  • branches/new_class_id/src/world_entities/camera.h

    r7347 r9705  
    2222class Camera : public PNode, public EventListener
    2323{
     24  NewObjectListDeclaration(Camera);
    2425public:
    2526  //! an enumerator for different types of view
     
    8485{
    8586  friend class Camera;             //! The CameraTarget is a friend of Camera. noone else needs a CameraTarget, so noone else can create it.
     87  NewObjectListDeclaration(CameraTarget);
    8688
    8789private:
  • branches/new_class_id/src/world_entities/npcs/npc.cc

    r9235 r9705  
    2020#include "npc.h"
    2121
     22NewObjectListDefinition(NPC);
    2223
    2324NPC::NPC(const TiXmlElement* root)
    2425{
    25   this->setClassID(CL_NPC, "NPC");
     26  this->registerObject(this, NPC::_objectList);
    2627
    2728  this->toList(OM_GROUP_00);
  • branches/new_class_id/src/world_entities/npcs/npc.h

    r8724 r9705  
    88
    99class NPC : public WorldEntity {
    10 
     10  NewObjectListDeclaration(NPC);
    1111 public:
    1212   NPC (const TiXmlElement* root);
  • branches/new_class_id/src/world_entities/npcs/npc_test1.cc

    r9235 r9705  
    2525#include "power_ups/laser_power_up.h"
    2626
     27NewObjectListDefinition(NPCTest1);
    2728
    2829NPCTest1::NPCTest1()
    2930  : NPC(NULL)
    3031{
    31   this->setClassID(CL_NPC_TEST1, "NPCTest1");
     32  this->registerObject(this, NPCTest1::_objectList);
    3233
    3334  if ((float)rand()/RAND_MAX > .5f)
  • branches/new_class_id/src/world_entities/npcs/npc_test1.h

    r6981 r9705  
    88
    99class NPCTest1 : public NPC {
    10 
     10  NewObjectListDeclaration(NPCTest1);
    1111 public:
    1212  NPCTest1 ();
  • branches/new_class_id/src/world_entities/playable.cc

    r9691 r9705  
    4141SHELL_COMMAND_STATIC(orxoWeapon, Playable, Playable::addSomeWeapons_CHEAT)
    4242  ->setAlias("orxoWeapon");
    43 NewObjectListDefinition(Playable)
     43NewObjectListDefinition(Playable);
    4444
    4545Playable::Playable()
     
    4848    playmode(Playable::Full3D)
    4949{
    50   this->registerObject(this, Playable::_classID);
     50  this->registerObject(this, Playable::_objectList);
    5151  PRINTF(4)("PLAYABLE INIT\n");
    5252
     
    109109bool Playable::pickup(PowerUp* powerUp)
    110110{
    111   if(powerUp->isA(CL_WEAPON_POWER_UP))
    112   {
    113     return dynamic_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
    114   }
    115   else if(powerUp->isA(CL_PARAM_POWER_UP))
    116   {
    117     ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp);
     111  /// FIXME TOTALLY
     112  if(powerUp->isA(WeaponPowerUp::classID()))
     113  {
     114    return static_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
     115  }
     116  else if(powerUp->isA(ParamPowerUp::classID()))
     117  {
     118    ParamPowerUp* ppu = static_cast<ParamPowerUp*>(powerUp);
    118119    switch(ppu->getType())
    119120    {
     
    213214    {
    214215      PRINTF(2)("ADDING WEAPONS - you cheater\n");
    215       playable->addWeapon(Weapon::createWeapon(CL_HYPERBLASTER));
    216       playable->addWeapon(Weapon::createWeapon(CL_TURRET));
    217       playable->addWeapon(Weapon::createWeapon(CL_AIMING_TURRET));
    218       playable->addWeapon(Weapon::createWeapon(CL_CANNON));
    219       playable->addWeapon(Weapon::createWeapon(CL_TARGETING_TURRET));
     216      playable->addWeapon(Weapon::createWeapon("Hyperblaster"));
     217      playable->addWeapon(Weapon::createWeapon("Turret"));
     218      playable->addWeapon(Weapon::createWeapon("AimingTurret"));
     219      playable->addWeapon(Weapon::createWeapon("Cannon"));
     220      playable->addWeapon(Weapon::createWeapon("TargetingTurret"));
    220221      PRINTF(2)("ADDING WEAPONS FINISHED\n");
    221222    }
  • branches/new_class_id/src/world_entities/player.cc

    r9062 r9705  
    1919#include "event_handler.h"
    2020
    21 
    22 #include "class_list.h"
    2321#include "state.h"
    2422#include "util/hud.h"
     
    2624#include "debug.h"
    2725
    28 
     26NewObjectListDefinition(Player);
    2927/**
    3028 * creates a new Player
     
    3331{
    3432  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    35   this->setClassID(CL_PLAYER, "Player");
     33  this->registerObject(this, Player::_objectList);
    3634
    3735  PRINTF(4)("PLAYER INIT\n");
     
    9492
    9593
    96  void Player::weaponConfigChanged()
    97  {
    98    this->_hud.updateWeaponManager();
    99  }
     94void Player::weaponConfigChanged()
     95{
     96  this->_hud.updateWeaponManager();
     97}
    10098
    10199
     
    103101{
    104102  /// FIXME this should be in the ObjectManager
    105   const std::list<BaseObject*>* objectList = ClassList::getList(CL_PLAYABLE);
    106   if (objectList != NULL)
     103  for (NewObjectList<Playable>::const_iterator node = Playable::objectList().begin();
     104       node != Playable::objectList().end();
     105       ++node)
    107106  {
    108     std::list<BaseObject*>::const_iterator node;
    109     for (node = objectList->begin(); node != objectList->end(); node++)
    110       if (this->playable != (*node) &&
    111           (dynamic_cast<PNode*>(*node)->getAbsCoor() - this->playable->getAbsCoor()).len() < (dynamic_cast<Playable*>(*node)->getEnterRadius()))
    112       {
     107    if (this->playable != (*node) &&
     108        ((*node)->getAbsCoor() - this->playable->getAbsCoor()).len() < ((*node)->getEnterRadius()))
     109    {
    113110
    114         this->setPlayable(dynamic_cast<Playable*>(*node));
     111      this->setPlayable(*(node));
    115112
    116         break;
    117       }
     113      break;
     114    }
    118115  }
    119116}
  • branches/new_class_id/src/world_entities/player.h

    r9061 r9705  
    2323class Player : public EventListener
    2424{
     25  NewObjectListDeclaration(Player);
    2526
    2627  public:
     
    3132    bool              eject();
    3233    inline Playable*  getPlayable() const  { return this->playable; };
    33    
     34
    3435
    3536     inline Hud& hud() { return this->_hud; };
  • branches/new_class_id/src/world_entities/power_ups/param_power_up.cc

    r9656 r9705  
    2727
    2828
    29 
     29#include "class_id.h"
    3030CREATE_FACTORY(ParamPowerUp, CL_PARAM_POWER_UP);
     31NewObjectListDefinitionID(ParamPowerUp, CL_PARAM_POWER_UP);
    3132
    3233const char* ParamPowerUp::paramTypes[] = {
     
    5859void ParamPowerUp::init()
    5960{
    60   this->setClassID(CL_PARAM_POWER_UP, "ParamPowerUp");
     61  this->registerObject(this, ParamPowerUp::_objectList);
    6162  this->value = 0;
    6263  this->max_value = 0;
  • branches/new_class_id/src/world_entities/power_ups/param_power_up.h

    r7954 r9705  
    2020
    2121class ParamPowerUp : public PowerUp {
     22  NewObjectListDeclaration(ParamPowerUp);
    2223
    2324public:
  • branches/new_class_id/src/world_entities/power_ups/power_up.cc

    r9406 r9705  
    2525
    2626
     27NewObjectListDefinition(PowerUp);
    2728
    2829PowerUp::PowerUp(float r, float g, float b)
    2930{
    30   this->setClassID(CL_POWER_UP, "PowerUp");
     31  this->registerObject(this, PowerUp::_objectList);
    3132
    3233  this->respawnType = RESPAWN_TIME;
     
    120121void PowerUp::collidesWith (WorldEntity* entity, const Vector& location)
    121122{
    122   if(this->collider != entity && entity->isA(CL_EXTENDABLE))
     123  if(this->collider != entity && entity->isA(Extendable::classID()))
    123124  {
    124125    this->collider = entity;
  • branches/new_class_id/src/world_entities/power_ups/power_up.h

    r7954 r9705  
    2121
    2222class PowerUp : public WorldEntity {
     23  NewObjectListDeclaration(PowerUp);
    2324
    2425public:
  • branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc

    r9406 r9705  
    2727
    2828
    29 
     29#include "class_id.h"
    3030CREATE_FACTORY(WeaponPowerUp, CL_WEAPON_POWER_UP);
     31NewObjectListDefinitionID(WeaponPowerUp, CL_WEAPON_POWER_UP);
    3132
    3233WeaponPowerUp::WeaponPowerUp(const TiXmlElement* root) : PowerUp(1.0, 1.0, 0.0)
     
    4546void WeaponPowerUp::init()
    4647{
    47   this->setClassID(CL_WEAPON_POWER_UP, "WeaponPowerUp");
     48  this->registerObject(this, WeaponPowerUp::_objectList);
    4849  this->loadPickupSound("sound/powerups/whats this2.wav");
    4950
  • branches/new_class_id/src/world_entities/power_ups/weapon_power_up.h

    r7954 r9705  
    1414
    1515class WeaponPowerUp : public PowerUp {
    16 
     16NewObjectListDeclaration(WeaponPowerUp);
    1717public:
    1818  WeaponPowerUp(const TiXmlElement* root = NULL);
  • branches/new_class_id/src/world_entities/projectiles/projectile.cc

    r9656 r9705  
    2626#include "debug.h"
    2727
     28NewObjectListDefinition(Projectile);
    2829
    2930/**
     
    3233Projectile::Projectile () : WorldEntity()
    3334{
    34   this->setClassID(CL_PROJECTILE, "Projectile");
     35  this->registerObject(this, Projectile::_objectList);
    3536
    3637  this->lifeCycle = 0.0;
  • branches/new_class_id/src/world_entities/projectiles/projectile.h

    r9235 r9705  
    1818class Projectile : public WorldEntity
    1919{
     20  NewObjectListDeclaration(Projectile);
    2021  public:
    2122    Projectile ();
  • branches/new_class_id/src/world_entities/spawning_point.cc

    r9656 r9705  
    2121
    2222#include "world_entity.h"
    23 
    24 #include "class_list.h"
    2523
    2624#include "compiler.h"
  • branches/new_class_id/src/world_entities/spawning_point.h

    r9656 r9705  
    4242 */
    4343class SpawningPoint : public WorldEntity {
    44 
     44  NewObjectListDeclaration(SpawningPoint);
    4545  public:
    4646    SpawningPoint(const TiXmlElement* root = NULL);
  • branches/new_class_id/src/world_entities/weapons/ammo_container.cc

    r9406 r9705  
    2323
    2424
    25 
     25NewObjectListDefinition(AmmoContainer);
    2626/**
    2727 * standard constructor
    2828 * @todo this constructor is not jet implemented - do it
    2929*/
    30 AmmoContainer::AmmoContainer (ClassID projectileType, float maxEnergy)
     30AmmoContainer::AmmoContainer (const NewClassID& projectileType, float maxEnergy)
    3131{
    32    this->setClassID(CL_AMMO_CONTAINER, "AmmoContainer");
     32  this->registerObject(this, AmmoContainer::_objectList);
    3333
    34    this->projectileType = projectileType;
    35    this->maxEnergy = maxEnergy;
     34  this->projectileType = projectileType;
     35  this->maxEnergy = maxEnergy;
    3636
    37    this->energy = 0.0;
     37  this->energy = 0.0;
    3838}
    3939
  • branches/new_class_id/src/world_entities/weapons/ammo_container.h

    r9685 r9705  
    1717//! A class for Storing energy of Projectiles.
    1818class AmmoContainer : public BaseObject {
     19  NewObjectListDeclaration(AmmoContainer);
    1920
    2021 public:
    21   AmmoContainer(NewClassID id, float maxEnergy = DEFAULT_MAX_ENERGY);
     22  AmmoContainer(const NewClassID& id, float maxEnergy = DEFAULT_MAX_ENERGY);
    2223  virtual ~AmmoContainer();
    2324
  • branches/new_class_id/src/world_entities/weapons/crosshair.cc

    r9406 r9705  
    2626
    2727
    28 
     28NewObjectListDefinition(Crosshair);
    2929/**
    3030 * standart constructor
     
    5454void Crosshair::init()
    5555{
    56   this->setClassID(CL_CROSSHAIR, "Crosshair");
     56  this->registerObject(this, Crosshair::_objectList);
    5757  this->setName("Crosshair");
    5858
  • branches/new_class_id/src/world_entities/weapons/crosshair.h

    r7221 r9705  
    2222//! A class that enables the
    2323class Crosshair : public PNode, public Element2D, public EventListener {
    24 
     24  NewObjectListDeclaration(Crosshair);
    2525 public:
    2626  Crosshair(const TiXmlElement* root = NULL);
  • branches/new_class_id/src/world_entities/weapons/weapon.cc

    r9406 r9705  
    2525
    2626#include "util/loading/resource_manager.h"
    27 #include "class_list.h"
    2827#include "util/loading/factory.h"
    2928#include "util/loading/load_param.h"
     
    3635#include "elements/glgui_energywidget.h"
    3736
    38 
     37NewObjectListDefinition(Weapon);
    3938
    4039////////////////////
     
    5857{
    5958  for (int i = 0; i < WS_STATE_COUNT; i++)
    60     if (this->animation[i] && ClassList::exists(animation[i], CL_ANIMATION))  //!< @todo this should check animation3D
     59    if (this->animation[i] && Animation::objectList().exists(animation[i]))  //!< @todo this should check animation3D
    6160      delete this->animation[i];
    6261  for (int i = 0; i < WA_ACTION_COUNT; i++)
    63     if (this->soundBuffers[i] != NULL && ClassList::exists(this->soundBuffers[i], CL_SOUND_BUFFER))
     62    if (this->soundBuffers[i] != NULL && OrxSound::SoundBuffer::objectList().exists(this->soundBuffers[i]))
    6463      ResourceManager::getInstance()->unload(this->soundBuffers[i]);
    6564
    66   if (ClassList::exists(this->soundSource, CL_SOUND_SOURCE))
     65  if (OrxSound::SoundSource::objectList().exists(this->soundSource))
    6766    delete this->soundSource;
    6867}
     
    7372 * @returns the newly created Weapon.
    7473 */
    75 Weapon* Weapon::createWeapon(ClassID weaponID)
     74Weapon* Weapon::createWeapon(const NewClassID& weaponID)
    7675{
    7776  BaseObject* createdObject = Factory::fabricate(weaponID);
    7877  if (createdObject != NULL)
    7978  {
    80     if (createdObject->isA(CL_WEAPON))
     79    if (createdObject->isA(Weapon::classID()))
    8180      return dynamic_cast<Weapon*>(createdObject);
    8281    else
     
    8988}
    9089
     90Weapon* Weapon::createWeapon(const std::string& weaponName)
     91{
     92  BaseObject* createdObject = Factory::fabricate(weaponName);
     93  if (createdObject != NULL)
     94  {
     95    if (createdObject->isA(Weapon::classID()))
     96      return dynamic_cast<Weapon*>(createdObject);
     97    else
     98    {
     99      delete createdObject;
     100      return NULL;
     101    }
     102  }
     103  return NULL;
     104}
     105
     106
    91107/**
    92108 * initializes the Weapon with ALL default values
     
    96112void Weapon::init()
    97113{
    98   this->setClassID(CL_WEAPON, "Weapon");
     114  this->registerObject(this, Weapon::_objectList);
    99115  this->currentState     = WS_INACTIVE;            //< Normaly the Weapon is Inactive
    100116  this->requestedAction  = WA_NONE;                //< No action is requested by default
     
    115131  this->defaultTarget = NULL;                      //< Nothing is Targeted by default.
    116132
    117   this->projectile = CL_NULL;                      //< No Projectile Class is Connected to this weapon
     133  this->projectile = NullClass::classID();         //< No Projectile Class is Connected to this weapon
    118134  this->projectileFactory = NULL;                  //< No Factory generating Projectiles is selected.
    119135
     
    163179 * What it does, is telling the Weapon what Projectiles it can Emit.
    164180 */
    165 void Weapon::setProjectileType(ClassID projectile)
    166 {
    167   if (projectile == CL_NULL)
    168     return;
     181void Weapon::setProjectileType(const NewClassID& projectile)
     182{
    169183  this->projectile = projectile;
    170184  this->projectileFactory = FastFactory::searchFastFactory(projectile);
  • branches/new_class_id/src/world_entities/weapons/weapon.h

    r9685 r9705  
    8383class Weapon : public WorldEntity
    8484{
     85  NewObjectListDeclaration(Weapon);
     86
    8587  public:
    8688    // INITIALISATION //
    8789    Weapon ();
    8890    virtual ~Weapon ();
    89     static Weapon* createWeapon(NewClassID weaponID);
     91    static Weapon* createWeapon(const NewClassID& weaponID);
     92    static Weapon* createWeapon(const std::string& weaponName);
    9093
    9194    void init();
     
    110113    /** @returns the Capabilities of this Weapon */
    111114    inline long getCapability() const { return this->capability; };
    112     void setProjectileType(NewClassID projectile);
     115    void setProjectileType(const NewClassID& projectile);
    113116    void setProjectileTypeC(const std::string& projectile);
    114117    /** @returns The projectile's classID */
  • branches/new_class_id/src/world_entities/weapons/weapon_manager.cc

    r9406 r9705  
    2222#include "weapon.h"
    2323#include "crosshair.h"
    24 #include "class_list.h"
    2524
    2625#include "playable.h"
     
    3231
    3332
     33NewObjectListDefinition(WeaponManager);
    3434/**
    3535 * @brief this initializes the weaponManager for a given nnumber of weapon slots
     
    5757  // crosshair being a PNode it must not be deleted (this is because PNodes delete themselves.)
    5858  // rennerc: crosshair seems not to delete itselve
    59   if (ClassList::exists(this->crosshair, CL_CROSSHAIR))
     59  if (Crosshair::objectList().exists(this->crosshair))
    6060    delete this->crosshair;
    6161}
     
    6666void WeaponManager::init()
    6767{
    68   this->setClassID(CL_WEAPON_MANAGER, "WeaponManager");
     68  this->registerObject(this, WeaponManager::_objectList);
    6969
    7070  this->parentNode = NULL;
     
    298298  {
    299299    this->parentNode->addChild(weapon);
    300     if (this->parentEntity->isA(CL_PLAYABLE))
     300    if (this->parentEntity->isA(Playable::classID()))
    301301      dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
    302302    weapon->setDefaultTarget(this->crosshair);
     
    311311 * @param ammo the ammo to increase
    312312 */
    313 float WeaponManager::increaseAmmunition(ClassID projectileType, float ammo)
     313float WeaponManager::increaseAmmunition(const NewClassID& projectileType, float ammo)
    314314{
    315315  return this->getAmmoContainer(projectileType)->increaseEnergy(ammo);
     
    324324{
    325325  assert (weapon != NULL);
    326   return this->increaseAmmunition(weapon->getLeafClassID(), ammo);
     326  return this->increaseAmmunition(weapon->getClassID(), ammo);
    327327
    328328}
     
    468468      else
    469469        this->currentSlotConfig[i].position.deactivateNode();
    470       if (this->parentEntity != NULL && this->parentEntity->isA(CL_PLAYABLE))
     470      if (this->parentEntity != NULL && this->parentEntity->isA(Playable::classID()))
    471471        dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
    472472    }
     
    523523}
    524524
    525 CountPointer<AmmoContainer>& WeaponManager::getAmmoContainer(ClassID projectileType)
     525CountPointer<AmmoContainer>& WeaponManager::getAmmoContainer(const NewClassID& projectileType)
    526526{
    527527  for (unsigned int i = 0; i < this->ammo.size(); i++)
     
    537537{
    538538  assert (weapon != NULL);
    539   return (this->getAmmoContainer(weapon->getLeafClassID()));
     539  return (this->getAmmoContainer(weapon->getClassID()));
    540540}
    541541
  • branches/new_class_id/src/world_entities/weapons/weapon_manager.h

    r9685 r9705  
    3939 */
    4040class WeaponManager : public BaseObject {
     41  NewObjectListDeclaration(WeaponManager);
    4142
    4243  //! an enumerator defining a Slot, where a Weapon can be stored inside.
     
    8990    void changeWeaponConfig(int weaponConfig);
    9091
    91     float increaseAmmunition(NewClassID projectileType, float ammo);
     92    float increaseAmmunition(const NewClassID& projectileType, float ammo);
    9293    float inclreaseAmmunition(const Weapon* weapon, float ammo);
    9394
     
    106107 // private:
    107108    int getNextFreeSlot(int configID, long capability = WTYPE_ALL);
    108     CountPointer<AmmoContainer>& getAmmoContainer(NewClassID projectileType);
     109    CountPointer<AmmoContainer>& getAmmoContainer(const NewClassID& projectileType);
    109110    CountPointer<AmmoContainer>& getAmmoContainer(const Weapon* weapon);
    110111
  • branches/new_class_id/src/world_entities/world_entity.cc

    r9656 r9705  
    4747SHELL_COMMAND(debugEntity, WorldEntity, debugWE);
    4848
     49
     50NewObjectListDefinition(WorldEntity);
    4951/**
    5052 *  Loads the WordEntity-specific Part of any derived Class
     
    5658    : Synchronizeable()
    5759{
    58   this->setClassID(CL_WORLD_ENTITY, "WorldEntity");
     60  this->registerObject(this, WorldEntity::_objectList);
    5961
    6062  this->obbTree = NULL;
     
    8183
    8284  // registering default reactions:
    83   this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /*CL_WORLD_ENTITY*/ CL_PROJECTILE);
     85/// FIXME  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /*CL_WORLD_ENTITY*/ CL_PROJECTILE);
    8486
    8587  this->toList(OM_NULL);
     
    197199        PRINTF(1)("OBJ-File %s not found.\n", fileName.c_str());
    198200
    199       if( modelNumber == 0 && !this->isA(CL_WEAPON))
     201      if( modelNumber == 0 /* FIXME && !this->isA(CL_WEAPON) */)
    200202        this->buildObbTree(obbTreeDepth);
    201203    }
     
    300302 *  @param target1 a filter target (classID)
    301303 */
    302 void WorldEntity::subscribeReaction(CREngine::CRType type, long target1)
     304void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1)
    303305{
    304306  this->subscribeReaction(type);
     
    314316 *  @param target1 a filter target (classID)
    315317 */
    316 void WorldEntity::subscribeReaction(CREngine::CRType type, long target1, long target2)
     318void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2)
    317319{
    318320  this->subscribeReaction(type);
     
    329331 *  @param target1 a filter target (classID)
    330332 */
    331 void WorldEntity::subscribeReaction(CREngine::CRType type, long target1, long target2, long target3)
     333void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3)
    332334{
    333335  this->subscribeReaction(type);
     
    345347 *  @param target1 a filter target (classID)
    346348 */
    347 void WorldEntity::subscribeReaction(CREngine::CRType type, long target1, long target2, long target3, long target4)
     349void WorldEntity::subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3, const NewClassID& target4)
    348350{
    349351  this->subscribeReaction(type);
  • branches/new_class_id/src/world_entities/world_entity.h

    r9656 r9705  
    3737
    3838
     39
    3940//! Basis-class all interactive stuff in the world is derived from
    4041class WorldEntity : public PNode
    4142{
     43  NewObjectListDeclaration(WorldEntity);
    4244public:
    4345  WorldEntity();
     
    4951  void loadModel2(const std::string& fileN, float scal = 1.0f){this->loadModel(fileN,scal,0,4);}
    5052  void setModel(Model* model, unsigned int modelNumber = 0);
    51   Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
     53Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
    5254
    5355  inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
     
    7375
    7476
    75 /** @returns a reference to the obb tree of this worldentity */
     77  /** @returns a reference to the obb tree of this worldentity */
    7678  inline BVTree* getOBBTree() const { return this->obbTree; };
    7779  inline void setOBBTree(OBBTree* tree) { /*if( this->obbTree != NULL) delete this->obbTree;*/ this->obbTree = (BVTree*)tree; }
     
    8183  /* --- Collision Reaction Block --- */
    8284  void subscribeReaction(CREngine::CRType type);
    83   void subscribeReaction(CREngine::CRType type, long target1);
    84   void subscribeReaction(CREngine::CRType type, long target1, long target2);
    85   void subscribeReaction(CREngine::CRType type, long target1, long target2, long target3);
    86   void subscribeReaction(CREngine::CRType type, long target1, long target2, long target3, long target4);
     85  void subscribeReaction(CREngine::CRType type, const NewClassID& target1);
     86  void subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2);
     87  void subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3);
     88  void subscribeReaction(CREngine::CRType type, const NewClassID& target1, const NewClassID& target2, const NewClassID& target3, const NewClassID& target4);
    8789
    8890  void unsubscribeReaction(CREngine::CRType type);
     
    126128
    127129  void hide() { if( this->objectListNumber != OM_DEAD) this->lastObjectListNumber = this->objectListNumber; this->toList(OM_DEAD); }
    128   void unhide() { if( this->objectListNumber != this->lastObjectListNumber) this->toList(this->lastObjectListNumber); }
     130void unhide() { if( this->objectListNumber != this->lastObjectListNumber) this->toList(this->lastObjectListNumber); }
    129131
    130132
    131133  /* --- Character Attribute Block --- */
    132134  /** @returns the scaling of the model */
    133   float getScaling(){return this->scaling;}
     135float getScaling(){return this->scaling;}
    134136  /** @returns the damage dealt by this world entity */
    135137  float getDamage() const { return this->damage; }
     
    216218  bool                    bOnGround;                       //!< true if this entity is standing on the ground
    217219
    218   protected:
     220protected:
    219221  Vector                  velocity;                        //!< speed of the entity
    220222
Note: See TracChangeset for help on using the changeset viewer.