Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 30, 2005, 9:02:23 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/textEngine: merged trunk here.
merged with command:
svn merge ../trunk textEngine -r 3467:HEAD
no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/textEngine/src/command_node.cc

    r3236 r3681  
    1414*/
    1515
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COMMAND_NODE
    1617
    1718#include "command_node.h"
     
    2122#include "game_loader.h"
    2223#include "world.h"
     24#include "list.h"
     25#include "orxonox.h"
    2326
    2427#include <stdio.h>
     
    112115  FILE* stream;
    113116 
    114   printf("Loading key bindings from %s\n", filename);
     117  PRINTF(4)("Loading key bindings from %s\n", filename);
    115118 
    116119  if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;
     
    127130  if( parser.getSection ("Bindings") == -1)
    128131    {
    129       printf("Could not find key bindings in %s\n", filename);
     132      PRINTF(1)("Could not find key bindings in %s\n", filename);
    130133      return;
    131134    }
     
    145148        {
    146149        case 0:
    147           printf("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf);
     150          PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf);
    148151          strcpy (aliases->keys[index[1]], valuebuf);
    149152          break;
    150153        case 1:
    151           printf("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf);
     154          PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf);
    152155          strcpy (aliases->buttons[index[1]], valuebuf);
    153156          break;
     
    214217  while( SDL_PollEvent (&event))
    215218    {
     219      PRINTF(3)("CommandNode::processLocal() =========================got Event\n");
    216220      memset (cmd.cmd, 0, CMD_LENGHT);
    217221      switch( event.type)
     
    267271void CommandNode::relay (Command* cmd)
    268272{
    269 
    270273  Orxonox *orx = Orxonox::getInstance();
    271274  if( orx->systemCommand (cmd)) return;
     
    278281  if( this->world->command(cmd)) return;
    279282
    280   WorldEntity* entity = bound->enumerate();
     283  tIterator<WorldEntity>* iterator = bound->getIterator();
     284  WorldEntity* entity = iterator->nextElement();
    281285  while( entity != NULL)
    282286    {
    283       entity->command (cmd);
    284       entity = bound->nextElement();
    285     }
     287      entity->command (cmd); /*no absorbtion of command! strange*/
     288      entity = iterator->nextElement();
     289    }
     290  delete iterator;
    286291}
    287292
Note: See TracChangeset for help on using the changeset viewer.