Atrinik Client  4.0
Data Structures | Macros | Typedefs | Enumerations
inventory.h File Reference

Go to the source code of this file.

Data Structures

struct  inventory_struct
 

Macros

#define INVENTORY_FILTER_ALL   0
 
#define INVENTORY_FILTER_APPLIED   1
 
#define INVENTORY_FILTER_CONTAINER   2
 
#define INVENTORY_FILTER_MAGICAL   4
 
#define INVENTORY_FILTER_CURSED   8
 
#define INVENTORY_FILTER_UNIDENTIFIED   16
 
#define INVENTORY_FILTER_UNAPPLIED   32
 
#define INVENTORY_FILTER_LOCKED   64
 
#define INVENTORY_FILTER_MAX   7
 
#define INVENTORY_ICON_SIZE   32
 
#define INVENTORY_COLS(_inventory)   ((_inventory)->w / INVENTORY_ICON_SIZE)
 
#define INVENTORY_ROWS(_inventory)   ((_inventory)->h / INVENTORY_ICON_SIZE)
 
#define INVENTORY_WHERE(_inventory)   ((_inventory)->display == INVENTORY_DISPLAY_MAIN ? cpl.ob : cpl.below)
 
#define INVENTORY_MOUSE_INSIDE(_widget, _mx, _my)   ((_mx) >= (_widget)->x + INVENTORY((_widget))->x && (_mx) < (_widget)->x + INVENTORY((_widget))->x + INVENTORY((_widget))->w && (_my) >= (_widget)->y + INVENTORY((_widget))->y && (_my) < (_widget)->y + INVENTORY((_widget))->y + INVENTORY((_widget))->h)
 

Typedefs

typedef enum inventory_display inventory_display_t
 
typedef struct inventory_struct inventory_struct
 

Enumerations

enum  inventory_display { INVENTORY_DISPLAY_NONE, INVENTORY_DISPLAY_MAIN, INVENTORY_DISPLAY_BELOW }
 

Detailed Description

Inventory header file.

Definition in file inventory.h.

Macro Definition Documentation

#define INVENTORY_COLS (   _inventory)    ((_inventory)->w / INVENTORY_ICON_SIZE)

Calculate number of columns in the inventory.

Definition at line 63 of file inventory.h.

#define INVENTORY_ICON_SIZE   32

Size of the image icons in inventory.

Definition at line 60 of file inventory.h.

#define INVENTORY_MOUSE_INSIDE (   _widget,
  _mx,
  _my 
)    ((_mx) >= (_widget)->x + INVENTORY((_widget))->x && (_mx) < (_widget)->x + INVENTORY((_widget))->x + INVENTORY((_widget))->w && (_my) >= (_widget)->y + INVENTORY((_widget))->y && (_my) < (_widget)->y + INVENTORY((_widget))->y + INVENTORY((_widget))->h)

Check whether the mouse is inside the inventory area.

Definition at line 72 of file inventory.h.

#define INVENTORY_ROWS (   _inventory)    ((_inventory)->h / INVENTORY_ICON_SIZE)

Calculate number of rows in the inventory.

Definition at line 65 of file inventory.h.

#define INVENTORY_WHERE (   _inventory)    ((_inventory)->display == INVENTORY_DISPLAY_MAIN ? cpl.ob : cpl.below)

Decide where to look for objects, depending on the inventory's display type.

Definition at line 69 of file inventory.h.

Typedef Documentation

Possible values for inventory_struct::display.

The inventory data.

Enumeration Type Documentation

Possible values for inventory_struct::display.

Enumerator
INVENTORY_DISPLAY_NONE 

None.

INVENTORY_DISPLAY_MAIN 

Display player's inventory.

INVENTORY_DISPLAY_BELOW 

Display below inventory.

Definition at line 77 of file inventory.h.