- Timestamp:
- May 27, 2005, 3:06:16 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/Makefile.am
r4315 r4326 75 75 lib/coord/null_parent.cc \ 76 76 lib/coord/helper_parent.cc \ 77 lib/coord/pilot_node.cc \ 77 78 lib/graphics/graphics_engine.cc \ 78 79 lib/graphics/light.cc \ … … 100 101 defs/keynames.h \ 101 102 command_node.h \ 103 action_listener.h \ 102 104 defs/message_structures.h \ 103 105 util/loading/game_loader.h \ … … 143 145 lib/coord/null_parent.h \ 144 146 lib/coord/helper_parent.h \ 147 lib/coord/pilot_node.h \ 145 148 lib/graphics/graphics_engine.h \ 146 149 lib/graphics/light.h \ -
orxonox/trunk/src/Makefile.in
r4315 r4326 68 68 test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \ 69 69 null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \ 70 graphics_engine.$(OBJEXT) light.$(OBJEXT) \70 pilot_node.$(OBJEXT) graphics_engine.$(OBJEXT) light.$(OBJEXT) \ 71 71 text_engine.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \ 72 72 md2Model.$(OBJEXT) primitive_model.$(OBJEXT) model.$(OBJEXT) \ … … 105 105 @AMDEP_TRUE@ ./$(DEPDIR)/particle_engine.Po \ 106 106 @AMDEP_TRUE@ ./$(DEPDIR)/particle_system.Po \ 107 @AMDEP_TRUE@ ./$(DEPDIR)/p layer.Po \107 @AMDEP_TRUE@ ./$(DEPDIR)/pilot_node.Po ./$(DEPDIR)/player.Po \ 108 108 @AMDEP_TRUE@ ./$(DEPDIR)/primitive_model.Po \ 109 109 @AMDEP_TRUE@ ./$(DEPDIR)/projectile.Po \ … … 290 290 lib/coord/null_parent.cc \ 291 291 lib/coord/helper_parent.cc \ 292 lib/coord/pilot_node.cc \ 292 293 lib/graphics/graphics_engine.cc \ 293 294 lib/graphics/light.cc \ … … 315 316 defs/keynames.h \ 316 317 command_node.h \ 318 action_listener.h \ 317 319 defs/message_structures.h \ 318 320 util/loading/game_loader.h \ … … 358 360 lib/coord/null_parent.h \ 359 361 lib/coord/helper_parent.h \ 362 lib/coord/pilot_node.h \ 360 363 lib/graphics/graphics_engine.h \ 361 364 lib/graphics/light.h \ … … 498 501 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_engine.Po@am__quote@ 499 502 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_system.Po@am__quote@ 503 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pilot_node.Po@am__quote@ 500 504 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@ 501 505 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@ … … 1063 1067 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1064 1068 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o helper_parent.obj `if test -f 'lib/coord/helper_parent.cc'; then $(CYGPATH_W) 'lib/coord/helper_parent.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/helper_parent.cc'; fi` 1069 1070 pilot_node.o: lib/coord/pilot_node.cc 1071 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pilot_node.o -MD -MP -MF "$(DEPDIR)/pilot_node.Tpo" -c -o pilot_node.o `test -f 'lib/coord/pilot_node.cc' || echo '$(srcdir)/'`lib/coord/pilot_node.cc; \ 1072 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/pilot_node.Tpo" "$(DEPDIR)/pilot_node.Po"; else rm -f "$(DEPDIR)/pilot_node.Tpo"; exit 1; fi 1073 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/coord/pilot_node.cc' object='pilot_node.o' libtool=no @AMDEPBACKSLASH@ 1074 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/pilot_node.Po' tmpdepfile='$(DEPDIR)/pilot_node.TPo' @AMDEPBACKSLASH@ 1075 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1076 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pilot_node.o `test -f 'lib/coord/pilot_node.cc' || echo '$(srcdir)/'`lib/coord/pilot_node.cc 1077 1078 pilot_node.obj: lib/coord/pilot_node.cc 1079 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pilot_node.obj -MD -MP -MF "$(DEPDIR)/pilot_node.Tpo" -c -o pilot_node.obj `if test -f 'lib/coord/pilot_node.cc'; then $(CYGPATH_W) 'lib/coord/pilot_node.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/pilot_node.cc'; fi`; \ 1080 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/pilot_node.Tpo" "$(DEPDIR)/pilot_node.Po"; else rm -f "$(DEPDIR)/pilot_node.Tpo"; exit 1; fi 1081 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/coord/pilot_node.cc' object='pilot_node.obj' libtool=no @AMDEPBACKSLASH@ 1082 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/pilot_node.Po' tmpdepfile='$(DEPDIR)/pilot_node.TPo' @AMDEPBACKSLASH@ 1083 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1084 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pilot_node.obj `if test -f 'lib/coord/pilot_node.cc'; then $(CYGPATH_W) 'lib/coord/pilot_node.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/pilot_node.cc'; fi` 1065 1085 1066 1086 graphics_engine.o: lib/graphics/graphics_engine.cc -
orxonox/trunk/src/class_list.h
r4318 r4326 18 18 CL_CAMERA, 19 19 CL_CAMERA_TARGET, 20 CL_PILOT_PARENT, 20 21 21 22 CL_WORLD_ENTITY, -
orxonox/trunk/src/command_node.cc
r4091 r4326 24 24 #include "list.h" 25 25 #include "orxonox.h" 26 #include "p_node.h" 26 27 27 28 #include <stdio.h> … … 37 38 CommandNode::CommandNode (int ID) 38 39 { 39 this->bound = new tList< WorldEntity>();40 this->bound = new tList<PNode>(); 40 41 this->aliases = NULL; 41 42 this->netID = ID; … … 54 55 this->bLocalInput = true; 55 56 this->netID = 0; 56 this->bound = new tList< WorldEntity>();57 this->bound = new tList<PNode>(); 57 58 this->bEnabled = true; 58 59 this->world = NULL; … … 194 195 \param entity: Pointer to the entity to bind 195 196 */ 196 void CommandNode::bind ( WorldEntity* entity)197 void CommandNode::bind (PNode* entity) 197 198 { 198 199 bound->add (entity); … … 203 204 \param entity: Pointer to the entity to relese 204 205 */ 205 void CommandNode::unbind ( WorldEntity* entity)206 void CommandNode::unbind (PNode* entity) 206 207 { 207 208 bound->remove (entity); … … 264 265 cmd.xrel = event.motion.xrel; 265 266 cmd.yrel = event.motion.yrel; 267 if( strlen (cmd.cmd) > 0) relay(&cmd); 266 268 break; 267 269 case SDL_MOUSEBUTTONUP: … … 308 310 if( this->world->command(cmd)) return; 309 311 310 tIterator< WorldEntity>* iterator = bound->getIterator();311 WorldEntity* entity = iterator->nextElement();312 tIterator<PNode>* iterator = bound->getIterator(); 313 PNode* entity = iterator->nextElement(); 312 314 while( entity != NULL) 313 315 { 314 entity->command (cmd); /*no absorbtion of command! strange*/316 ((WorldEntity*)entity)->command (cmd); /*no absorbtion of command! strange*/ 315 317 entity = iterator->nextElement(); 316 318 } -
orxonox/trunk/src/command_node.h
r4084 r4326 15 15 class WorldEntity; 16 16 class World; 17 class PNode; 17 18 18 19 #define N_STD_KEYS SDLK_LAST … … 45 46 int netID; //!< Unique identifier that is used to determine between remote CommandNodes 46 47 KeyBindings* aliases; 47 tList< WorldEntity>* bound; //!< List of WorldEntites that recieve commands from this CommandNode48 tList<PNode>* bound; //!< List of WorldEntites that recieve commands from this CommandNode 48 49 Sint32 coord[2]; 49 50 World* world; … … 64 65 void enable (bool bEnabled); 65 66 void loadBindings (char* filename); 66 void bind ( WorldEntity* entity);67 void unbind ( WorldEntity* entity);67 void bind (PNode* entity); 68 void unbind (PNode* entity); 68 69 void addToWorld (World* world); 69 70 void process (); -
orxonox/trunk/src/lib/coord/p_node.h
r4145 r4326 91 91 const char* getName (); 92 92 93 94 93 void debug (); 95 94 -
orxonox/trunk/src/story_entities/world.cc
r4324 r4326 25 25 #include "null_parent.h" 26 26 #include "helper_parent.h" 27 #include "pilot_node.h" 27 28 #include "track_node.h" 28 29 #include "world_entity.h" … … 473 474 474 475 476 /** 477 \brief loads the debug world: only for experimental stuff 478 */ 475 479 void World::loadDebugWorld(int worldID) 476 480 { … … 555 559 556 560 557 // create a player558 561 this->localPlayer = new Player (); 559 562 this->localPlayer->setName ("player"); 560 563 this->spawn (this->localPlayer); 561 564 /*monitor progress*/ 562 //this->glmis->step();563 565 this->glmis->step(); 564 566 565 // bind input566 Orxonox *orx = Orxonox::getInstance ();567 orx->getLocalInput()->bind (this->localPlayer);568 569 567 // bind camera 570 568 this->localCamera = new Camera(); 571 569 this->localCamera->setName ("camera"); 572 573 570 /*monitor progress*/ 574 571 this->glmis->step(); … … 591 588 this->glmis->step(); 592 589 590 this->pilotNode = new PilotNode(); 591 this->pilotNode->addChild(this->localPlayer); 592 this->pilotNode->addChild(this->localCamera); 593 // bind input 594 Orxonox *orx = Orxonox::getInstance (); 595 //orx->getLocalInput()->bind (this->pilotNode); 596 597 /* 593 598 PNode* tn = trackManager->getTrackNode(); 594 599 tn->addChild(this->localPlayer); 595 600 this->localCamera->lookAt(tn); 596 597 601 598 602 tn->addChild(this->localCamera); 599 603 this->localPlayer->setMode(PNODE_ALL); 600 604 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 605 */ 601 606 this->glmis->step(); 602 607 break; … … 628 633 { 629 634 this->bPause = false; 635 this->pilotNode = NULL; 630 636 CommandNode* cn = Orxonox::getInstance()->getLocalInput(); 631 637 cn->addToWorld(this); … … 1099 1105 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW4)) this->localCamera->setViewMode(VIEW_RIGHT); 1100 1106 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW5)) this->localCamera->setViewMode(VIEW_TOP); 1101 1107 else if(this->pilotNode != NULL) if( !strcmp( cmd->cmd, "cursor")) this->pilotNode->command(cmd); 1102 1108 return false; 1103 1109 } -
orxonox/trunk/src/story_entities/world.h
r4261 r4326 24 24 class Text; 25 25 class TiXmlElement; 26 class PilotNode; 26 27 27 28 //! The game world Interface … … 120 121 tList<WorldEntity>* entities; //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them. 121 122 WorldEntity* localPlayer; //!< The Player, you fly through the level. 123 PilotNode* pilotNode; //!< THe pilot node to fly with the mouse 122 124 123 125 GarbageCollector* garbageCollector; //!< reference to the garbage collector
Note: See TracChangeset
for help on using the changeset viewer.