Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 24, 2005, 3:11:36 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: new Definitions in the WeaponManager-class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/weapon_manager.h

    r4930 r4949  
    3535template <class T> class tAnimation;
    3636
    37 #define    W_MAX_SLOTS       8
    38 #define    W_MAX_CONFIGS     4
     37#define    WM_MAX_SLOTS            8                   //!< How many slots the WeaponManager has at its max
     38#define    WM_MAX_CONFIGS          4                   //!< The maximum number of predefined Configurations
     39#define    WM_MAX_LOADED_WEAPONS   20                  //!< The
    3940
    4041//! this is an identifier for the weapon config
     
    6667} WM_SLOT;
    6768
     69typedef enum
     70{
     71  WM_SLOTC_DIRECTIONAL   = 1,
     72  WM_SLOTC_TURRET        = 2,
     73  WM_SLOTC_ALLKINDS      = 3,
     74
     75  WM_SLOTC_FORWARD       = 4,
     76  WM_SLOTC_BACKWARD      = 8,
     77  WM_SLOTC_LEFT          = 16,
     78  WM_SLOTC_RIGHT         = 32,
     79  WM_SLOTC_ALLDIRS       = 60,
     80
     81  WM_SLOTC_ALL           = 63,
     82} WM_SlotCapability;
     83
     84typedef struct WM_Slot
     85{
     86  int           number;
     87  bool          occupied;
     88  long          capability;
     89
     90  Weapon*       currentWeapon;
     91  Weapon*       nextWeapon;
     92};
     93
    6894//! this is a weapon Configuration: it has up to 8 slots
    6995typedef struct
    7096{
    7197  bool           bUsed;                       //!< is set to true, if this configuration is
    72   Weapon*        slots[8];
     98  Weapon*        slots[WM_MAX_SLOTS];
    7399} weaponConfig;
    74100
     
    99125  private:
    100126    Crosshair*              crosshair;               //!< an aim.
    101     tAnimation<Crosshair>*  crossHairSizeAnim;
     127    tAnimation<Crosshair>*  crossHairSizeAnim;       //!< An animation for the crosshair (scaling)
    102128
    103     int                     slotCount;               //<! number of weapon slots a ship has
    104     int                     currConfID;              //<! the currently selected config
    105     weaponConfig            configs[4];              //<! a list of four configurations
     129    int                     slotCount;               //!< number of weapon slots a ship has
     130    int                     currConfID;              //!< the currently selected config
     131    weaponConfig            configs[4];              //!< a list of four configurations
     132
     133    Weapon*                 availiableWeapons[WM_MAX_LOADED_WEAPONS];
    106134};
Note: See TracChangeset for help on using the changeset viewer.