Changeset 3236 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Dec 20, 2004, 1:39:51 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/Makefile.am
r3203 r3236 10 10 world.cc \ 11 11 player.cc \ 12 collision.cc \ 12 13 data_tank.cc \ 13 14 world_entity.cc \ 14 15 vector.cc \ 15 16 camera.cc \ 16 collision.cc \17 17 command_node.cc \ 18 18 ini_parser.cc \ … … 31 31 noinst_HEADERS = ability.h \ 32 32 data_tank.h \ 33 collision.h \ 33 34 npc.h \ 34 35 stdincl.h \ … … 45 46 power_up.h \ 46 47 vector.h \ 47 collision.h \48 48 keynames.h \ 49 49 proto_class.h \ -
orxonox/trunk/src/Makefile.in
r3219 r3236 54 54 PROGRAMS = $(bin_PROGRAMS) 55 55 am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) \ 56 player.$(OBJEXT) data_tank.$(OBJEXT) world_entity.$(OBJEXT) \57 vector.$(OBJEXT) camera.$(OBJEXT) collision.$(OBJEXT) \56 player.$(OBJEXT) collision.$(OBJEXT) data_tank.$(OBJEXT) \ 57 world_entity.$(OBJEXT) vector.$(OBJEXT) camera.$(OBJEXT) \ 58 58 command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \ 59 59 track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \ … … 117 117 DEFS = @DEFS@ 118 118 DEPDIR = @DEPDIR@ 119 DOXYGEN = @DOXYGEN@120 DOXYGEN_FALSE = @DOXYGEN_FALSE@121 DOXYGEN_TRUE = @DOXYGEN_TRUE@122 119 ECHO_C = @ECHO_C@ 123 120 ECHO_N = @ECHO_N@ … … 199 196 world.cc \ 200 197 player.cc \ 198 collision.cc \ 201 199 data_tank.cc \ 202 200 world_entity.cc \ 203 201 vector.cc \ 204 202 camera.cc \ 205 collision.cc \206 203 command_node.cc \ 207 204 ini_parser.cc \ … … 220 217 noinst_HEADERS = ability.h \ 221 218 data_tank.h \ 219 collision.h \ 222 220 npc.h \ 223 221 stdincl.h \ … … 234 232 power_up.h \ 235 233 vector.h \ 236 collision.h \237 234 keynames.h \ 238 235 proto_class.h \ -
orxonox/trunk/src/camera.cc
r3228 r3236 42 42 this->t = 0.0; 43 43 44 this->actual _place.r.x = 0.0;45 this->actual _place.r.y = 10.0;46 this->actual _place.r.z = -5.0;44 this->actualPlace.r.x = 0.0; 45 this->actualPlace.r.y = 10.0; 46 this->actualPlace.r.z = -5.0; 47 47 } 48 48 … … 66 66 {this->t += deltaT;} 67 67 //printf("time is: t=%f\n", t ); 68 update _desired_place();68 updateDesiredPlace(); 69 69 jump(NULL); 70 70 } … … 89 89 if( bound != NULL) 90 90 { 91 bound->get _lookat (&lookat);91 bound->getLookat (&lookat); 92 92 orx->getWorld()->calcCameraPos (&lookat, &plFocus); 93 93 Quaternion *fr; … … 169 169 if(bound != null) 170 170 { 171 Placement *plBound = bound->get _placement();171 Placement *plBound = bound->getPlacement(); 172 172 Vector vDirection(0.0, 0.0, 1.0); 173 173 Vector eclipticOffset(0.0, 0.0, 5.0); … … 237 237 // rotation 238 238 float matrix[4][4]; 239 actual _place.w.conjugate().matrix (matrix);239 actualPlace.w.conjugate().matrix (matrix); 240 240 /* orientation and */ 241 241 glMultMatrixf ((float*)matrix); 242 242 /* translation */ 243 glTranslatef (-actual _place.r.x, -actual_place.r.y,- actual_place.r.z);243 glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z); 244 244 //Placement *plBound = bound->get_placement(); 245 245 -
orxonox/trunk/src/camera.h
r3228 r3236 26 26 private: 27 27 WorldEntity* bound; //!< the WorldEntity the Camera is bound to 28 Placement actual _place; //!< the Camera's current position28 Placement actualPlace; //!< the Camera's current position 29 29 Placement desiredPlace; //!< where the Camera should be according to calculations 30 30 World* world; -
orxonox/trunk/src/command_node.cc
r3225 r3236 54 54 this->bEnabled = true; 55 55 this->world = NULL; 56 this->load _bindings (filename);56 this->loadBindings (filename); 57 57 } 58 58 … … 139 139 int* index; 140 140 141 while( parser.next _var (namebuf, valuebuf) != -1)142 { 143 index = name _to_index (namebuf);141 while( parser.nextVar (namebuf, valuebuf) != -1) 142 { 143 index = nameToIndex (namebuf); 144 144 switch( index[0]) 145 145 { … … 208 208 } 209 209 210 void CommandNode::process _local ()210 void CommandNode::processLocal () 211 211 { 212 212 SDL_Event event; -
orxonox/trunk/src/command_node.h
r3225 r3236 61 61 void reset (); 62 62 void enable (bool bEnabled); 63 void load _bindings (char* filename);63 void loadBindings (char* filename); 64 64 void bind (WorldEntity* entity); 65 65 void unbind (WorldEntity* entity); -
orxonox/trunk/src/environment.cc
r3194 r3236 71 71 float matrix[4][4]; 72 72 73 glTranslatef(get _placement()->r.x,get_placement()->r.y,get_placement()->r.z);74 get _placement()->w.matrix (matrix);73 glTranslatef(getPlacement()->r.x,getPlacement()->r.y,getPlacement()->r.z); 74 getPlacement()->w.matrix (matrix); 75 75 glMultMatrixf ((float*)matrix); 76 76 -
orxonox/trunk/src/player.h
r3227 r3236 19 19 ~Player(); 20 20 21 virtual void post _spawn();21 virtual void postSpawn(); 22 22 virtual void tick(float time); 23 23 virtual void hit(WorldEntity* weapon, Vector loc); -
orxonox/trunk/src/world.h
r3226 r3236 85 85 }; 86 86 87 /**88 \brief spawn a new WorldEntity at a Location89 \param loc: the Location where the Entity should be spawned90 \param owner: a pointer to the parent of the Entity91 \return a pointer to the new WorldEntity or NULL if there was an error92 93 You can use this function to spawn any derivation of WorldEntity you want, just specify the desired94 class within the template specification brackets. Do not attempt to spawn any classes that have NOT been95 derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()96 works with both free and bound WorldEntities.97 */98 template<typename T> T* World::spawn(Location* loc = NULL, WorldEntity* owner = NULL)99 {100 Location zeroloc;101 T* entity = new T();102 entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);103 if( loc == NULL)104 {105 zeroloc.dist = 0;106 zeroloc.part = 0;107 zeroloc.pos = Vector();108 zeroloc.rot = Quaternion();109 loc = &zeroloc;110 }111 entity->init (loc, owner);112 if (entity->bFree)113 {114 track[loc->part].map_coords( loc, entity->get_placement());115 }116 entity->post_spawn ();117 return entity;118 }119 120 /**121 \brief spawn a new WorldEntity at a Placement122 \param lplc: the placement where the Entity should be spawned123 \param owner: a pointer to the parent of the Entity124 \return a pointer to the new WorldEntity or NULL if there was an error125 126 You can use this function to spawn any FREE derivation of WorldEntity you want, just specify the desired127 class within the template specification brackets. Do not attempt to spawn any classes that have NOT been128 derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()129 works with free WorldEntities only, you will provoke an error message if you try to spawn a bound Entity with130 a Placement.131 */132 template<typename T> T* World::spawn(Placement* plc, WorldEntity* owner = NULL)133 {134 T* entity = new T();135 entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);136 entity->init (plc, owner);137 if (!entity->bFree)138 {139 printf("Can't spawn unfree entity with placement\n");140 entities->remove( (WorldEntity*)entity, LIST_FIND_FW);141 return NULL;142 }143 entity->post_spawn ();144 return entity;145 }146 147 87 #endif /* _WORLD_H */
Note: See TracChangeset
for help on using the changeset viewer.