- Timestamp:
- May 25, 2005, 11:59:21 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/orxonox.cc
r4262 r4286 35 35 #include "graphics_engine.h" 36 36 #include "resource_manager.h" 37 #include "object_manager.h" 37 38 #include "text_engine.h" 38 39 #include "factory.h" … … 56 57 this->world = NULL; 57 58 this->localinput = NULL; 59 this->resourceManager = NULL; 60 this->objectManager = NULL; 58 61 59 62 this->argc = 0; … … 72 75 delete GraphicsEngine::getInstance(); // deleting the Graphics 73 76 delete ResourceManager::getInstance(); // deletes the Resource Manager 77 delete ObjectManager::getInstance(); 74 78 delete TextEngine::getInstance(); 75 79 } … … 225 229 TextEngine::getInstance(); 226 230 231 PRINT(3)("initializing ObjectManager\n"); 232 this->objectManager = ObjectManager::getInstance(); 233 227 234 return 0; 228 235 } -
orxonox/trunk/src/orxonox.h
r4262 r4286 16 16 class GameLoader; 17 17 class ResourceManager; 18 class ObjectManager; 18 19 19 20 //! Orxonox core singleton class … … 32 33 GameLoader* gameLoader; //!< The gameLoader 33 34 ResourceManager* resourceManager; //!< The ResourceManager 35 ObjectManager* objectManager; //!< the object manager of the game 34 36 35 37 bool bQuitOrxonox; //!< If Orxonox should Quit -
orxonox/trunk/src/util/object_manager.cc
r4285 r4286 17 17 18 18 #include "object_manager.h" 19 #include "list.h" 20 #include "world_entity.h" 19 21 20 22 using namespace std; … … 26 28 ObjectManager::ObjectManager () 27 29 { 28 this->setClassName ("ObjectManager"); 29 30 this->managedObjectList = new BaseObject*[CL_NUMBER]; 30 this->setClassName ("ObjectManager"); 31 32 //this->managedObjectList = new BaseObject*[CL_NUMBER]; 33 this->managedObjectList = new tList<BaseObject>*[CL_NUMBER]; 31 34 } 32 35 … … 57 60 58 61 59 void ObjectManager::cache(classList index, int number )62 void ObjectManager::cache(classList index, int number, const BaseObject ©Object) 60 63 { 61 this->managedObjectList[index] = new BaseObject(); 64 //this->managedObjectList[index] = new BaseObject[number]; 65 this->managedObjectList[index] = new tList<BaseObject>(); 66 for(int i = 0; i < number; ++i) 67 { 68 this->managedObjectList[index]->add(new BaseObject(copyObject)); 69 } 62 70 } 63 71 -
orxonox/trunk/src/util/object_manager.h
r4285 r4286 40 40 virtual ~ObjectManager(void); 41 41 42 void cache(classList index, int number );42 void cache(classList index, int number, const BaseObject ©Object); 43 43 void addToDeadList(const char* className, BaseObject* object); 44 44 BaseObject* getFromDeadList(const char* className, int number = 1); … … 48 48 static ObjectManager* singletonRef; 49 49 50 BaseObject** managedObjectList; 50 //BaseObject** managedObjectList; 51 tList<BaseObject>** managedObjectList; 51 52 }; 52 53
Note: See TracChangeset
for help on using the changeset viewer.