Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5985 in orxonox.OLD for branches/powerups/src/lib


Ignore:
Timestamp:
Dec 8, 2005, 1:10:27 AM (19 years ago)
Author:
manuel
Message:

merge: factory has now create from class name string function (svn merge -r 5955:HEAD ../trunk/ powerups/)

Location:
branches/powerups/src/lib
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/powerups/src/lib/event/event_handler.cc

    r5786 r5985  
    4747  this->flush(ES_ALL);
    4848  this->withUNICODE(false);
     49  this->grabEvents(false);
    4950
    5051  this->state = ES_GAME;
     
    255256}
    256257
     258void EventHandler::grabEvents(bool grabEvents)
     259{
     260     this->eventsGrabbed = grabEvents;
     261     if(!grabEvents)
     262      SDL_WM_GrabInput(SDL_GRAB_OFF);
     263     else
     264      SDL_WM_GrabInput(SDL_GRAB_ON);
     265}
    257266
    258267/**
  • branches/powerups/src/lib/event/event_handler.h

    r5786 r5985  
    4343
    4444  void withUNICODE(bool enableUNICODE);
     45  void grabEvents(bool grabEvents);
    4546
    4647  void process();
     
    6263
    6364  bool                       bUNICODE;                        //!< If unicode should be enabled.
     65  bool                       eventsGrabbed;                   //!< If the events should be grabbed
    6466};
    6567
  • branches/powerups/src/lib/event/key_mapper.cc

    r5955 r5985  
    3737int KeyMapper::PEV_LEFT              = EV_UNKNOWN;
    3838int KeyMapper::PEV_RIGHT             = EV_UNKNOWN;
     39int KeyMapper::PEV_ROLL_LEFT         = EV_UNKNOWN;
     40int KeyMapper::PEV_ROLL_RIGHT        = EV_UNKNOWN;
    3941int KeyMapper::PEV_STRAFE_LEFT       = EV_UNKNOWN;
    4042int KeyMapper::PEV_STRAFE_RIGHT      = EV_UNKNOWN;
     
    6971  {&KeyMapper::PEV_LEFT,                 CONFIG_NAME_PLAYER_LEFT},
    7072  {&KeyMapper::PEV_RIGHT,                CONFIG_NAME_PLAYER_RIGHT},
     73  {&KeyMapper::PEV_ROLL_LEFT,            CONFIG_NAME_PLAYER_ROLL_RIGHT},
     74  {&KeyMapper::PEV_ROLL_RIGHT,           CONFIG_NAME_PLAYER_ROLL_LEFT},
    7175  {&KeyMapper::PEV_STRAFE_LEFT,          "StrafeLeft"},
    7276  {&KeyMapper::PEV_STRAFE_RIGHT,         "StrafeRight"},
  • branches/powerups/src/lib/event/key_mapper.h

    r5955 r5985  
    4444  static int PEV_RIGHT;             //!< right button
    4545
     46  static int PEV_ROLL_LEFT;         //!< rolls left
     47  static int PEV_ROLL_RIGHT;        //!< rolls right
     48
    4649  static int PEV_STRAFE_LEFT;       //!< strafe left button
    4750  static int PEV_STRAFE_RIGHT;      //!< strafe right button
  • branches/powerups/src/lib/graphics/light.cc

    r5955 r5985  
    274274  while (element != NULL)
    275275  {
    276     Factory::getFirst()->fabricate(element);
     276    Factory::fabricate(element);
    277277
    278278    element = element->NextSiblingElement();
  • branches/powerups/src/lib/gui/gtk_gui/gui_keys.cc

    r5955 r5985  
    115115
    116116        pKeysBox->setGroupName(player);
    117         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_UP, "UP"));
    118         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_DOWN, "DOWN"));
    119         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "LEFT"));
    120         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "RIGHT"));
     117        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_UP, "w"));
     118        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_DOWN, "s"));
     119        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "a"));
     120        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "d"));
     121        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_ROLL_LEFT, "q"));
     122        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_ROLL_RIGHT, "e"));
    121123        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_FIRE, "BUTTON_LEFT"));
    122124        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_NEXT_WEAPON, "m"));
  • branches/powerups/src/lib/math/vector.h

    r5692 r5985  
    2121*/
    2222
    23 #ifndef _VECTOR_H
    24 #define _VECTOR_H
     23#ifndef __VECTOR_H_
     24#define __VECTOR_H_
    2525
    2626#include <math.h>
     
    318318
    319319
    320 #endif /* _VECTOR_H */
    321 
     320#endif /* __VECTOR_H_ */
     321
  • branches/powerups/src/lib/physics/physics_engine.cc

    r5955 r5985  
    103103  while (element != NULL)
    104104  {
    105     Factory::getFirst()->fabricate(element);
     105    Factory::fabricate(element);
    106106
    107107    element = element->NextSiblingElement();
     
    119119  while (element != NULL)
    120120  {
    121     Factory::getFirst()->fabricate(element);
     121    Factory::fabricate(element);
    122122
    123123    element = element->NextSiblingElement();
  • branches/powerups/src/lib/sound/sound_engine.cc

    r5965 r5985  
    286286
    287287
    288   }
    289 
     288
     289  }
    290290  // INITIALIZING THE DEVICE:
    291291  ALCchar deviceName[] =
     
    300300  this->context = alcCreateContext(this->device, NULL);
    301301
    302   alcMakeContextCurrent(this->context);
    303 
     302  alcMakeContextCurrent(this->context);
    304303
    305304  if ((result = alGetError()) != AL_NO_ERROR)
Note: See TracChangeset for help on using the changeset viewer.