Changeset 4442 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 1, 2005, 10:07:53 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/Makefile.am
r4429 r4442 22 22 23 23 orxonox_SOURCES= orxonox.cc \ 24 command_node.cc \25 24 util/loading/game_loader.cc \ 26 25 util/track/track_manager.cc \ … … 82 81 noinst_HEADERS = orxonox.h \ 83 82 ability.h \ 84 command_node.h \85 83 action_listener.h \ 86 84 defs/message_structures.h \ -
orxonox/trunk/src/Makefile.in
r4438 r4442 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) 55 am_orxonox_OBJECTS = orxonox.$(OBJEXT) command_node.$(OBJEXT) \56 game_loader.$(OBJEXT) track_manager.$(OBJEXT) \57 track_node.$(OBJEXT)animation.$(OBJEXT) animation3d.$(OBJEXT) \55 am_orxonox_OBJECTS = orxonox.$(OBJEXT) game_loader.$(OBJEXT) \ 56 track_manager.$(OBJEXT) track_node.$(OBJEXT) \ 57 animation.$(OBJEXT) animation3d.$(OBJEXT) \ 58 58 animation_player.$(OBJEXT) event.$(OBJEXT) \ 59 59 event_handler.$(OBJEXT) event_listener.$(OBJEXT) \ … … 88 88 @AMDEP_TRUE@ ./$(DEPDIR)/campaign.Po \ 89 89 @AMDEP_TRUE@ ./$(DEPDIR)/character_attributes.Po \ 90 @AMDEP_TRUE@ ./$(DEPDIR)/command_node.Po ./$(DEPDIR)/curve.Po \ 91 @AMDEP_TRUE@ ./$(DEPDIR)/environment.Po ./$(DEPDIR)/event.Po \ 92 @AMDEP_TRUE@ ./$(DEPDIR)/event_handler.Po \ 90 @AMDEP_TRUE@ ./$(DEPDIR)/curve.Po ./$(DEPDIR)/environment.Po \ 91 @AMDEP_TRUE@ ./$(DEPDIR)/event.Po ./$(DEPDIR)/event_handler.Po \ 93 92 @AMDEP_TRUE@ ./$(DEPDIR)/event_listener.Po \ 94 93 @AMDEP_TRUE@ ./$(DEPDIR)/factory.Po ./$(DEPDIR)/game_loader.Po \ … … 259 258 260 259 orxonox_SOURCES = orxonox.cc \ 261 command_node.cc \262 260 util/loading/game_loader.cc \ 263 261 util/track/track_manager.cc \ … … 319 317 noinst_HEADERS = orxonox.h \ 320 318 ability.h \ 321 command_node.h \322 319 action_listener.h \ 323 320 defs/message_structures.h \ … … 488 485 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/campaign.Po@am__quote@ 489 486 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/character_attributes.Po@am__quote@ 490 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_node.Po@am__quote@491 487 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Po@am__quote@ 492 488 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@ -
orxonox/trunk/src/orxonox.cc
r4408 r4442 30 30 31 31 #include "world.h" 32 #include "command_node.h"33 32 #include "ini_parser.h" 34 33 #include "game_loader.h" … … 58 57 59 58 this->world = NULL; 60 this->localinput = NULL;61 59 this->resourceManager = NULL; 62 60 this->objectManager = NULL; 61 this->eventHandler = NULL; 63 62 64 63 this->argc = 0; … … 74 73 Orxonox::singletonRef = NULL; 75 74 if( world != NULL) delete world; 76 if( localinput != NULL) delete localinput;77 75 delete GraphicsEngine::getInstance(); // deleting the Graphics 78 76 delete ResourceManager::getInstance(); // deletes the Resource Manager … … 164 162 int Orxonox::initInput() 165 163 { 166 // create localinput167 localinput = new CommandNode(configfilename);168 169 164 this->eventHandler = EventHandler::getInstance(); 170 165 this->eventHandler->init(); … … 301 296 302 297 303 /**304 \brief handle keyboard commands that are not meant for WorldEntities305 \param cmd: the command to handle306 \return true if the command was handled by the system or false if it may be passed to the WorldEntities307 */308 bool Orxonox::systemCommand(Command* cmd)309 {310 /*311 if( !strcmp( cmd->cmd, "quit"))312 {313 if( !cmd->bUp) this->gameLoader->stop();314 return true;315 }316 return false;317 */318 return false;319 }320 321 298 322 299 void Orxonox::process(const Event &event) 323 300 {} 324 301 325 /**326 \brief retrieve a pointer to the local CommandNode327 \return a pointer to localinput328 */329 CommandNode* Orxonox::getLocalInput()330 {331 return localinput;332 }333 302 334 303 -
orxonox/trunk/src/orxonox.h
r4408 r4442 12 12 13 13 14 class CommandNode;15 14 class WorldEntity; 16 15 class World; … … 33 32 char configfilename[256]; //!< Filename of the configuration-file. 34 33 World* world; //!< Reference to the current running world. 35 CommandNode* localinput; //!< Command Handler36 34 SDL_Surface* screen; //!< The current Screen 37 35 GameLoader* gameLoader; //!< The gameLoader … … 65 63 66 64 void graphicsHandler (SDL_Event* event); 67 bool systemCommand (Command* cmd);68 65 void process(const Event &event); 69 66 70 67 int init (int argc, char** argv); 71 68 72 CommandNode* getLocalInput(); 69 73 70 World* getWorld(); 74 71 SDL_Surface* getScreen (); -
orxonox/trunk/src/story_entities/world.cc
r4438 r4442 50 50 #include "fields.h" 51 51 52 #include "command_node.h"53 52 #include "glmenu_imagescreen.h" 54 53 #include "list.h" … … 418 417 419 418 // bind input 420 Orxonox *orx = Orxonox::getInstance ();421 orx->getLocalInput()->bind (localPlayer);422 423 419 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_UP); 424 420 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_DOWN); … … 696 692 this->bPause = false; 697 693 this->pilotNode = NULL; 698 CommandNode* cn = Orxonox::getInstance()->getLocalInput();699 cn->addToWorld(this);700 cn->enable(true);701 694 } 702 695
Note: See TracChangeset
for help on using the changeset viewer.