Changeset 4759 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jul 1, 2005, 11:51:28 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/event/key_mapper.cc
r4582 r4759 56 56 57 57 //! 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"},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"}, 84 84 {NULL, NULL}}; 85 85 -
orxonox/trunk/src/world_entities/weapons/weapon.h
r4758 r4759 37 37 #define W_MAX_CONFIGS 4 38 38 39 40 // FORWARD DECLARATION 39 41 class Projectile; 40 42 class Weapon; 41 43 class Animation3D; 44 class TiXmlElement; 42 45 43 46 typedef enum { 44 SHOOT,45 EMPTY,46 RELOAD,47 SPECIAL1,48 SPECIAL2,49 SPECIAL350 } weaponSoundType;47 W_SHOOT, 48 W_EMPTY, 49 W_RELOAD, 50 W_SPECIAL1, 51 W_SPECIAL2, 52 W_SPECIAL3 53 } WeaponSoundType; 51 54 52 55 53 56 //! 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_SLOT0055 #define W_SLOT1156 #define W_SLOT2257 #define W_SLOT3358 #define W_SLOT4459 #define W_SLOT5560 #define W_SLOT6661 #define W_SLOT7762 #define W_FREE_SLOT9957 #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 63 66 64 67 65 68 //! this is an identifier for the weapon config 66 #define W_CONFIG0067 #define W_CONFIG1168 #define W_CONFIG2269 #define W_CONFIG3369 #define W_CONFIG0 0 70 #define W_CONFIG1 1 71 #define W_CONFIG2 2 72 #define W_CONFIG3 3 70 73 71 74 //! a weapon can be left or right sided 72 #define W_LEFT073 #define W_RIGHT175 #define W_LEFT 0 76 #define W_RIGHT 1 74 77 75 78 //! this is a weapon Configuration: it has up to 8 slots 76 79 typedef struct weaponConfig { 77 bool bUsed; //<! is set to true, if this configuration is78 Weapon* slots[8];80 bool bUsed; //<! is set to true, if this configuration is 81 Weapon* slots[8]; 79 82 }; 80 83 … … 83 86 public: 84 87 WeaponManager(int nrOfSlots = 2); 88 WeaponManager(const TiXmlElement* root); 85 89 ~WeaponManager(); 90 91 void init(); 92 void loadParams(const TiXmlElement* root); 86 93 87 94 void addWeapon(Weapon* weapon, int configID = W_CONFIG0, int slotID = W_FREE_SLOT); … … 94 101 95 102 private: 96 int nrOfSlots;//<! number of weapon slots a ship has97 int currConfID;//<! the currently selected config98 weaponConfig configs[4]; //<! a list of four configurations103 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 99 106 100 107 int getNextFreeSlot(int configID); … … 107 114 public: 108 115 Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction); 116 Weapon(const TiXmlElement* root); 109 117 virtual ~Weapon (); 118 119 void init(); 120 void loadParams(const TiXmlElement* root); 110 121 111 122 void enable(); … … 122 133 123 134 /** 124 \brief sets a weapon idle time135 \brief sets a weapons idle time 125 136 \param idle time in ms 126 137 … … 132 143 \brief gets the weapon idle time 133 144 \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 */ 138 146 inline float getWeaponIdleTime() const { return this->idleTime;} 139 147 /**
Note: See TracChangeset
for help on using the changeset viewer.