Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4759 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Jul 1, 2005, 11:51:28 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: version finaly changed to 0.3.0… how could i forget ….

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/event/key_mapper.cc

    r4582 r4759  
    5656
    5757//! this is the mapping array from names to ids: enter all orxonox.conf keys here
    58 orxKeyMapping map[] = { {&KeyMapper::PEV_UP, "Up"},
    59                         {&KeyMapper::PEV_DOWN, "Down"},
    60                         {&KeyMapper::PEV_LEFT, "Left"},
    61                         {&KeyMapper::PEV_RIGHT, "Right"},
    62                         {&KeyMapper::PEV_STRAFE_LEFT, "StrafeLeft"},
    63                         {&KeyMapper::PEV_STRAFE_RIGHT, "StrafeRight"},
    64 
    65                         {&KeyMapper::PEV_FIRE1, "Fire"},
    66                         {&KeyMapper::PEV_FIRE1, "Fire1"},
    67                         {&KeyMapper::PEV_FIRE2, "Fire2"},
    68                         {&KeyMapper::PEV_NEXT_WEAPON, "Next"},
    69                         {&KeyMapper::PEV_PREVIOUS_WEAPON, "Prev"},
    70 
    71 
    72                         {&KeyMapper::PEV_VIEW0, "view0"},
    73                         {&KeyMapper::PEV_VIEW1, "view1"},
    74                         {&KeyMapper::PEV_VIEW2, "view2"},
    75                         {&KeyMapper::PEV_VIEW3, "view3"},
    76                         {&KeyMapper::PEV_VIEW4, "view4"},
    77                         {&KeyMapper::PEV_VIEW5, "view5"},
    78 
    79                         {&KeyMapper::PEV_NEXT_WORLD, "Next-World"},
    80                         {&KeyMapper::PEV_PREVIOUS_WORLD, "Prev-World"},
    81 
    82                         {&KeyMapper::PEV_PAUSE, "Pause"},
    83                         {&KeyMapper::PEV_QUIT, "Quit"},
     58orxKeyMapping map[] = { {&KeyMapper::PEV_UP,                   "Up"},
     59                        {&KeyMapper::PEV_DOWN,                 "Down"},
     60                        {&KeyMapper::PEV_LEFT,                 "Left"},
     61                        {&KeyMapper::PEV_RIGHT,                "Right"},
     62                        {&KeyMapper::PEV_STRAFE_LEFT,          "StrafeLeft"},
     63                        {&KeyMapper::PEV_STRAFE_RIGHT,         "StrafeRight"},
     64
     65                        {&KeyMapper::PEV_FIRE1,                "Fire"},
     66                        {&KeyMapper::PEV_FIRE1,                "Fire1"},
     67                        {&KeyMapper::PEV_FIRE2,                "Fire2"},
     68                        {&KeyMapper::PEV_NEXT_WEAPON,          "Next"},
     69                        {&KeyMapper::PEV_PREVIOUS_WEAPON,      "Prev"},
     70
     71
     72                        {&KeyMapper::PEV_VIEW0,                "view0"},
     73                        {&KeyMapper::PEV_VIEW1,                "view1"},
     74                        {&KeyMapper::PEV_VIEW2,                "view2"},
     75                        {&KeyMapper::PEV_VIEW3,                "view3"},
     76                        {&KeyMapper::PEV_VIEW4,                "view4"},
     77                        {&KeyMapper::PEV_VIEW5,                "view5"},
     78
     79                        {&KeyMapper::PEV_NEXT_WORLD,           "Next-World"},
     80                        {&KeyMapper::PEV_PREVIOUS_WORLD,       "Prev-World"},
     81
     82                        {&KeyMapper::PEV_PAUSE,                "Pause"},
     83                        {&KeyMapper::PEV_QUIT,                 "Quit"},
    8484                        {NULL, NULL}};
    8585
  • orxonox/trunk/src/world_entities/weapons/weapon.h

    r4758 r4759  
    3737#define W_MAX_CONFIGS 4
    3838
     39
     40// FORWARD DECLARATION
    3941class Projectile;
    4042class Weapon;
    4143class Animation3D;
     44class TiXmlElement;
    4245
    4346typedef enum {
    44   SHOOT,
    45   EMPTY,
    46   RELOAD,
    47   SPECIAL1,
    48   SPECIAL2,
    49   SPECIAL3
    50 } weaponSoundType;
     47  W_SHOOT,
     48  W_EMPTY,
     49  W_RELOAD,
     50  W_SPECIAL1,
     51  W_SPECIAL2,
     52  W_SPECIAL3
     53} WeaponSoundType;
    5154
    5255
    5356//! this is an identifier for the slot. there are up to 8 weapon slots -> this means there can't be more than 8 weapons at the same time
    54 #define W_SLOT0 0
    55 #define W_SLOT1 1
    56 #define W_SLOT2 2
    57 #define W_SLOT3 3
    58 #define W_SLOT4 4
    59 #define W_SLOT5 5
    60 #define W_SLOT6 6
    61 #define W_SLOT7 7
    62 #define W_FREE_SLOT 99
     57#define    W_SLOT0      0
     58#define    W_SLOT1      1
     59#define    W_SLOT2      2
     60#define    W_SLOT3      3
     61#define    W_SLOT4      4
     62#define    W_SLOT5      5
     63#define    W_SLOT6      6
     64#define    W_SLOT7      7
     65#define    W_FREE_SLOT  99
    6366
    6467
    6568//! this is an identifier for the weapon config
    66 #define W_CONFIG0 0
    67 #define W_CONFIG1 1
    68 #define W_CONFIG2 2
    69 #define W_CONFIG3 3
     69#define    W_CONFIG0    0
     70#define    W_CONFIG1    1
     71#define    W_CONFIG2    2
     72#define    W_CONFIG3    3
    7073
    7174//! a weapon can be left or right sided
    72 #define W_LEFT 0
    73 #define W_RIGHT 1
     75#define    W_LEFT        0
     76#define    W_RIGHT      1
    7477
    7578//! this is a weapon Configuration: it has up to 8 slots
    7679typedef struct weaponConfig {
    77   bool bUsed;                       //<! is set to true, if this configuration is
    78   Weapon* slots[8];
     80  bool           bUsed;                       //<! is set to true, if this configuration is
     81  Weapon*        slots[8];
    7982};
    8083
     
    8386 public:
    8487  WeaponManager(int nrOfSlots = 2);
     88  WeaponManager(const TiXmlElement* root);
    8589  ~WeaponManager();
     90
     91  void init();
     92  void loadParams(const TiXmlElement* root);
    8693
    8794  void addWeapon(Weapon* weapon, int configID = W_CONFIG0, int slotID = W_FREE_SLOT);
     
    94101
    95102 private:
    96   int nrOfSlots;                        //<! number of weapon slots a ship has
    97   int currConfID;                       //<! the currently selected config
    98   weaponConfig configs[4];              //<! a list of four configurations
     103  int                   nrOfSlots;               //<! number of weapon slots a ship has
     104  int                   currConfID;              //<! the currently selected config
     105  weaponConfig          configs[4];              //<! a list of four configurations
    99106
    100107  int getNextFreeSlot(int configID);
     
    107114 public:
    108115  Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction);
     116  Weapon(const TiXmlElement* root);
    109117  virtual ~Weapon ();
     118
     119  void init();
     120  void loadParams(const TiXmlElement* root);
    110121
    111122  void enable();
     
    122133
    123134  /**
    124      \brief sets a weapon idle time
     135     \brief sets a weapons idle time
    125136     \param idle time in ms
    126137
     
    132143     \brief gets the weapon idle time
    133144     \returns idle time in ms
    134 
    135      a weapon idle time is the time spend after a shoot until the weapon can
    136      shoot again
    137   */
     145   */
    138146  inline float getWeaponIdleTime() const { return this->idleTime;}
    139147  /**
Note: See TracChangeset for help on using the changeset viewer.