Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4287 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 26, 2005, 12:22:19 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: implemented the objectmanager debug functon, some small fixed in the ol code

Location:
orxonox/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/defs/debug.h

    r4094 r4287  
    5656// DEFINE MODULES
    5757#define DEBUG_MODULE_ORXONOX            0
    58 #define DEBUG_MODULE_WORLD              1
    59 #define DEBUG_MODULE_PNODE              1
     58#define DEBUG_MODULE_WORLD              0
     59#define DEBUG_MODULE_PNODE              0
    6060#define DEBUG_MODULE_WORLD_ENTITY       0
    61 #define DEBUG_MODULE_COMMAND_NODE       4
     61#define DEBUG_MODULE_COMMAND_NODE       0
    6262#define DEBUG_MODULE_GRAPHICS           0
    6363#define DEBUG_MODULE_LOAD               2
    6464
    65 #define DEBUG_MODULE_IMPORTER           3
     65#define DEBUG_MODULE_IMPORTER           0
    6666#define DEBUG_MODULE_TRACK_MANAGER      0
    6767#define DEBUG_MODULE_GARBAGE_COLLECTOR  0
     68#define DEBUG_MODULE_OBJECT_MANAGER     3
    6869#define DEBUG_MODULE_LIGHT              0
    6970#define DEBUG_MODULE_PLAYER             1
    70 #define DEBUG_MODULE_WEAPON             3
     71#define DEBUG_MODULE_WEAPON             0
    7172#define DEBUG_MODULE_MATH               0
    7273#define DEBUG_MODULE_FONT               1
    7374#define DEBUG_MODULE_ANIM               1
    74 #define DEBUG_MODULE_PARTICLE           4
     75#define DEBUG_MODULE_PARTICLE           1
    7576
    7677#define DEBUG_MODULE_NULL_PARENT        0
  • orxonox/trunk/src/story_entities/world.cc

    r4261 r4287  
    4040#include "track_manager.h"
    4141#include "garbage_collector.h"
     42#include "object_manager.h"
    4243#include "animation_player.h"
    4344#include "particle_engine.h"
     
    5455
    5556#include "factory.h"
     57
     58#include "projectile.h"
    5659
    5760using namespace std;
  • orxonox/trunk/src/util/object_manager.cc

    r4286 r4287  
    7777BaseObject* ObjectManager::getFromDeadList(const char* className, int number)
    7878{}
     79
     80
     81void ObjectManager::debug()
     82{
     83  PRINT(0)("\n==========================| ObjectManager::debug() |===\n");
     84  PRINT(0)("=  Number of registerable classes: %i\n", CL_NUMBER ); 
     85  PRINT(0)("=  Currently cached objects: \n");
     86  for(int i = 0; i < CL_NUMBER; ++i)
     87    {
     88      if(this->managedObjectList[i] != NULL)
     89        PRINT(0)("=   o Class Nr. %i has cached %i object(s)\n", i, this->managedObjectList[i]->getSize());
     90      else
     91        PRINT(0)("=   o Class Nr. %i has cached 0 object(s)\n", i);
     92    }
     93  PRINT(0)("=======================================================\n");
     94}
  • orxonox/trunk/src/util/object_manager.h

    r4286 r4287  
    4444  BaseObject* getFromDeadList(const char* className, int number = 1);
    4545
     46  void debug();
     47
    4648 private:
    4749  ObjectManager(void);
  • orxonox/trunk/src/world_entities/player.cc

    r4261 r4287  
    2727#include "list.h"
    2828#include "stdincl.h"
     29
     30#include "object_manager.h"
     31#include "projectile.h"
    2932
    3033using namespace std;
     
    5962  this->weaponMan->addWeapon(wpRight, W_CONFIG2);
    6063  this->weaponMan->addWeapon(wpLeft, W_CONFIG2);
    61 
    6264}
    6365
     
    104106  this->weaponMan->addWeapon(wpRight, W_CONFIG2);
    105107  this->weaponMan->addWeapon(wpLeft, W_CONFIG2);
     108
     109  BaseObject* p = new Projectile(wpRight);
     110  ObjectManager::getInstance()->cache(CL_PROJECTILE, 100, *p);
     111  ObjectManager::getInstance()->debug();
     112
    106113}
    107114
  • orxonox/trunk/src/world_entities/test_gun.cc

    r4006 r4287  
    3131#include "list.h"
    3232#include "animation3d.h"
     33
    3334
    3435using namespace std;
Note: See TracChangeset for help on using the changeset viewer.