Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4389 in orxonox.OLD


Ignore:
Timestamp:
May 30, 2005, 12:12:03 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: working on keymapping, there are some problems in genericaly map unknown keys to well undefined functions… which is not very surprising :)

Location:
orxonox/trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/defs/debug.h

    r4381 r4389  
    6666#define DEBUG_MODULE_TRACK_MANAGER      0
    6767#define DEBUG_MODULE_GARBAGE_COLLECTOR  0
    68 #define DEBUG_MODULE_OBJECT_MANAGER     3
     68#define DEBUG_MODULE_OBJECT_MANAGER     0
    6969#define DEBUG_MODULE_LIGHT              0
    7070#define DEBUG_MODULE_PLAYER             1
  • orxonox/trunk/src/util/event/event_handler.cc

    r4388 r4389  
    198198  PRINT(0)("\n==========================| EventHandler::test () |===\n"); 
    199199  PRINT(0)("Eventhandler init successfuly\n");
    200   KeyMapper km();
     200  KeyMapper km;
    201201  PRINT(0)("KeyMapper loaded\n");
     202  //km.loadKeyBindings();
     203  km.debug();
    202204
    203205  PRINT(0)("=======================================================\n");     
  • orxonox/trunk/src/util/event/key_mapper.cc

    r4388 r4389  
    115115        {
    116116        case 0:
    117           PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
     117          PRINTF(0)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
    118118          strcpy (this->keyAliases->keys[index[1]], namebuf);
    119119          break;
    120120        case 1:
    121           PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
     121          PRINTF(0)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
    122122          strcpy (this->keyAliases->buttons[index[1]], namebuf);
    123123          break;
     
    144144        {
    145145        case 0:
    146           PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
     146          PRINTF(0)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
    147147          strcpy (keyAliases->keys[index[1]], namebuf);
    148148          break;
    149149        case 1:
    150           PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
     150          PRINTF(0)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
    151151          strcpy (keyAliases->buttons[index[1]], namebuf);
    152152          break;
     
    178178  return coord;
    179179}
     180
     181
     182void KeyMapper::debug()
     183{
     184  //PRINT(0)("\n==========================| KeyMapper::debug() |===\n"); 
     185  PRINT(0)("Command 'up' got SDL key-ref nr %i \n", (this->nameToIndex("UP"))[0]);
     186  PRINT(0)("Command 'down' got SDL key-ref nr %i \n", (this->nameToIndex("DOWN"))[0]);
     187  PRINT(0)("Command 'right' got SDL key-ref nr %i \n", (this->nameToIndex("RIGHT"))[0]);
     188  PRINT(0)("Command 'left' got SDL key-ref nr %i \n", (this->nameToIndex("LEFT"))[0]);
     189
     190  //PRINT(0)("=======================================================\n");       
     191}
  • orxonox/trunk/src/util/event/key_mapper.h

    r4387 r4389  
    3333  virtual ~KeyMapper();
    3434
    35   void loadKeyBindings(const char* fileName);
     35  void loadKeyBindings(const char* fileName = "~/.orxonox/orxonox.conf");
     36
     37  void debug();
    3638
    3739 private:
  • orxonox/trunk/src/util/garbage_collector.cc

    r4322 r4389  
    147147  PRINTF(3)("=============================\n");
    148148
    149   ObjectManager::getInstance()->debug();
     149  //ObjectManager::getInstance()->debug();
    150150
    151151  /* reset time to count again up to this->delay */
  • orxonox/trunk/src/world_entities/player.cc

    r4289 r4389  
    2828#include "stdincl.h"
    2929
    30 #include "object_manager.h"
     30
    3131#include "projectile.h"
    3232
  • orxonox/trunk/src/world_entities/test_gun.cc

    r4382 r4389  
    9292  Projectile* p = new TestBullet(this);
    9393  ObjectManager::getInstance()->cache(CL_TEST_BULLET, 100, p);
    94   ObjectManager::getInstance()->debug();
     94  //ObjectManager::getInstance()->debug();
    9595}
    9696
Note: See TracChangeset for help on using the changeset viewer.