Changeset 4488 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jun 3, 2005, 1:00:10 AM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/Makefile.am
r4484 r4488 33 33 util/object_manager.cc \ 34 34 util/garbage_collector.cc \ 35 util/common/list.cc \36 35 util/resource_manager.cc \ 37 36 util/loading/factory.cc \ … … 137 136 lib/lang/base_object.h \ 138 137 util/common/list.h \ 139 util/common/list_template.h \140 138 util/resource_manager.h \ 141 139 util/loading/factory.h \ -
orxonox/trunk/src/Makefile.in
r4484 r4488 57 57 pilot_node.$(OBJEXT) animation.$(OBJEXT) animation3d.$(OBJEXT) \ 58 58 animation_player.$(OBJEXT) object_manager.$(OBJEXT) \ 59 garbage_collector.$(OBJEXT) list.$(OBJEXT) \ 60 resource_manager.$(OBJEXT) factory.$(OBJEXT) \ 61 load_param.$(OBJEXT) state.$(OBJEXT) story_entity.$(OBJEXT) \ 62 campaign.$(OBJEXT) world.$(OBJEXT) world_entity.$(OBJEXT) \ 63 camera.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \ 64 skysphere.$(OBJEXT) skybox.$(OBJEXT) terrain.$(OBJEXT) \ 65 weapon.$(OBJEXT) projectile.$(OBJEXT) satellite.$(OBJEXT) \ 66 character_attributes.$(OBJEXT) test_gun.$(OBJEXT) \ 67 test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \ 68 null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \ 59 garbage_collector.$(OBJEXT) resource_manager.$(OBJEXT) \ 60 factory.$(OBJEXT) load_param.$(OBJEXT) state.$(OBJEXT) \ 61 story_entity.$(OBJEXT) campaign.$(OBJEXT) world.$(OBJEXT) \ 62 world_entity.$(OBJEXT) camera.$(OBJEXT) player.$(OBJEXT) \ 63 environment.$(OBJEXT) skysphere.$(OBJEXT) skybox.$(OBJEXT) \ 64 terrain.$(OBJEXT) weapon.$(OBJEXT) projectile.$(OBJEXT) \ 65 satellite.$(OBJEXT) character_attributes.$(OBJEXT) \ 66 test_gun.$(OBJEXT) test_bullet.$(OBJEXT) test_entity.$(OBJEXT) \ 67 p_node.$(OBJEXT) null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \ 69 68 graphics_engine.$(OBJEXT) light.$(OBJEXT) \ 70 69 text_engine.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \ … … 93 92 @AMDEP_TRUE@ ./$(DEPDIR)/helper_parent.Po \ 94 93 @AMDEP_TRUE@ ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/light.Po \ 95 @AMDEP_TRUE@ ./$(DEPDIR)/list.Po ./$(DEPDIR)/load_param.Po \ 96 @AMDEP_TRUE@ ./$(DEPDIR)/material.Po ./$(DEPDIR)/md2Model.Po \ 97 @AMDEP_TRUE@ ./$(DEPDIR)/model.Po ./$(DEPDIR)/null_parent.Po \ 98 @AMDEP_TRUE@ ./$(DEPDIR)/objModel.Po \ 94 @AMDEP_TRUE@ ./$(DEPDIR)/load_param.Po ./$(DEPDIR)/material.Po \ 95 @AMDEP_TRUE@ ./$(DEPDIR)/md2Model.Po ./$(DEPDIR)/model.Po \ 96 @AMDEP_TRUE@ ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \ 99 97 @AMDEP_TRUE@ ./$(DEPDIR)/object_manager.Po \ 100 98 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \ … … 264 262 util/object_manager.cc \ 265 263 util/garbage_collector.cc \ 266 util/common/list.cc \267 264 util/resource_manager.cc \ 268 265 util/loading/factory.cc \ … … 368 365 lib/lang/base_object.h \ 369 366 util/common/list.h \ 370 util/common/list_template.h \371 367 util/resource_manager.h \ 372 368 util/loading/factory.h \ … … 478 474 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@ 479 475 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Po@am__quote@ 480 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@481 476 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_param.Po@am__quote@ 482 477 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@ … … 671 666 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 672 667 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o garbage_collector.obj `if test -f 'util/garbage_collector.cc'; then $(CYGPATH_W) 'util/garbage_collector.cc'; else $(CYGPATH_W) '$(srcdir)/util/garbage_collector.cc'; fi` 673 674 list.o: util/common/list.cc675 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT list.o -MD -MP -MF "$(DEPDIR)/list.Tpo" -c -o list.o `test -f 'util/common/list.cc' || echo '$(srcdir)/'`util/common/list.cc; \676 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/list.Tpo" "$(DEPDIR)/list.Po"; else rm -f "$(DEPDIR)/list.Tpo"; exit 1; fi677 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/common/list.cc' object='list.o' libtool=no @AMDEPBACKSLASH@678 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/list.Po' tmpdepfile='$(DEPDIR)/list.TPo' @AMDEPBACKSLASH@679 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@680 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o list.o `test -f 'util/common/list.cc' || echo '$(srcdir)/'`util/common/list.cc681 682 list.obj: util/common/list.cc683 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT list.obj -MD -MP -MF "$(DEPDIR)/list.Tpo" -c -o list.obj `if test -f 'util/common/list.cc'; then $(CYGPATH_W) 'util/common/list.cc'; else $(CYGPATH_W) '$(srcdir)/util/common/list.cc'; fi`; \684 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/list.Tpo" "$(DEPDIR)/list.Po"; else rm -f "$(DEPDIR)/list.Tpo"; exit 1; fi685 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/common/list.cc' object='list.obj' libtool=no @AMDEPBACKSLASH@686 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/list.Po' tmpdepfile='$(DEPDIR)/list.TPo' @AMDEPBACKSLASH@687 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@688 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o list.obj `if test -f 'util/common/list.cc'; then $(CYGPATH_W) 'util/common/list.cc'; else $(CYGPATH_W) '$(srcdir)/util/common/list.cc'; fi`689 668 690 669 resource_manager.o: util/resource_manager.cc -
orxonox/trunk/src/lib/graphics/importer/md2Model.cc
r4462 r4488 266 266 PRINT(0)("= Number of Frames: \t%i\n", this->data->header->numFrames); 267 267 PRINT(0)("= Height, Width:\t%i, %i\n", this->data->header->skinHeight, this->data->header->skinWidth); 268 PRINT(0)("= Pointer to the data object: %p\n", this->data); 268 269 PRINT(0)("===================================================\n\n"); 269 270 } -
orxonox/trunk/src/lib/graphics/importer/md2Model.h
r4461 r4488 67 67 68 68 //! animation names enumeration 69 typedef enum 69 typedef enum animType 70 70 { 71 71 STAND, … … 92 92 93 93 MAX_ANIMATIONS 94 } animType;94 }; 95 95 96 96 -
orxonox/trunk/src/story_entities/world.cc
r4444 r4488 50 50 #include "fields.h" 51 51 52 #include "md2Model.h" 53 52 54 #include "glmenu_imagescreen.h" 53 55 #include "list.h" … … 501 503 TestEntity* testEntity = new TestEntity(); 502 504 testEntity->setRelCoor(Vector(570, 10, -15)); 503 //testEntity->setRelCoor(Vector(25, -10, -20));504 505 testEntity->setRelDir(Quaternion(M_PI, Vector(0, 1, 0))); 505 506 this->spawn(testEntity); 506 // this->localPlayer->addChild(testEntity); 507 508 TestEntity* testEntity2 = new TestEntity(); 509 testEntity2->setAnim(RUN); 510 testEntity2->setRelCoor(Vector(570, 30, 15)); 511 testEntity2->setRelDir(Quaternion(M_PI, Vector(0, 1, 0))); 512 this->spawn(testEntity2); 513 507 514 508 515 new PhysicsConnection(testEntity, gravity); -
orxonox/trunk/src/util/common/list.h
r4486 r4488 12 12 #endif 13 13 14 //! An enum to list all the modes available when adding an object to a List 15 //enum ADDMODE {LIST_ADD_FIRST, LIST_ADD_LAST}; 16 //! An enum to list the two searching directions available when removing an object from a List 17 //enum FINDMODE {LIST_FIND_BW, LIST_FIND_FW}; 18 19 20 21 class WorldEntity; 22 23 class List { 24 25 public: 26 List (); 27 ~List (); 28 29 void add(WorldEntity* entity); 30 void remove(WorldEntity* entity); 31 void destroy(); 32 WorldEntity* firstElement(); 33 bool isEmpty(); 34 int getSize(); 35 WorldEntity* enumerate(); 36 WorldEntity* nextElement(); 37 WorldEntity* toArray(); 38 void debug(); 39 40 private: 41 struct listElement 42 { 43 listElement* prev; 44 WorldEntity* curr; 45 listElement* next; 46 }; 47 unsigned int size; 48 listElement* first; 49 listElement* last; 50 listElement* currentEl; 51 52 14 15 16 //! a list element of the tList, 17 template<class T> struct listElement 18 { 19 listElement* prev; //!< pointer to the previous listElement in the list 20 T* curr; //!< pointer to the list payload/container 21 listElement* next; //!< pointer to the next listElement 53 22 }; 54 23 55 56 57 template<class T> struct listElement 58 { 59 listElement* prev; 60 T* curr; 61 listElement* next; 62 }; 63 24 /** 25 \brief an iterator class 26 27 this enables the user to iterate through a list very easely 28 */ 64 29 template<class T> class tIterator 65 30 { … … 71 36 72 37 private: 73 listElement<T>* currentEl;74 listElement<T>* tmpEl;38 listElement<T>* currentEl; //!< pointer to the current list element in the iterator 39 listElement<T>* tmpEl; //!< temp listElemnt pointer 75 40 }; 76 41 77 42 43 /** 44 \brief iterator constructor 45 \param startElement: the first list element from the tList 46 47 normaly you will use it like this: 48 49 tIterator<char>* nameIterator = nameList->getIterator(); 50 char name* = nameIterator->nextElement(); 51 while( name != NULL) 52 { 53 PRINTF(3)("found name: %s in list\n", name); 54 name = nameIterator->nextElement(); 55 } 56 delete nameIterator; 57 */ 78 58 template<class T> 79 59 inline tIterator<T>::tIterator (listElement<T>* startElement) … … 84 64 85 65 66 /** 67 \brief the destructor 68 */ 86 69 template<class T> 87 70 inline tIterator<T>::~tIterator () … … 91 74 92 75 76 /** 77 \brief use it to iterate through the list 78 \returns next list element 79 */ 93 80 template<class T> 94 81 inline T* tIterator<T>::nextElement () -
orxonox/trunk/src/world_entities/test_entity.cc
r4462 r4488 41 41 42 42 43 void TestEntity::setAnim(int animationIndex) 44 { 45 this->md2Model->setAnim(animationIndex); 46 } 47 48 43 49 void TestEntity::tick (float time) 44 50 { -
orxonox/trunk/src/world_entities/test_entity.h
r4397 r4488 19 19 virtual ~TestEntity (); 20 20 21 21 void setAnim(int animationIndex); 22 22 23 virtual void tick (float time); 23 24 virtual void hit (WorldEntity* weapon, Vector* loc);
Note: See TracChangeset
for help on using the changeset viewer.