diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-06-07 17:49:09 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-06-07 17:49:09 +0200 |
commit | c8a270e51dc22f39ed048ab1cc609e6e456df58f (patch) | |
tree | 6d6a7d2338abdbecbb1351e2c9cbf9b08b42b6bc /src/inventory.hpp | |
parent | dcb193fabc7af4776bdf0d31045f6801fa18000e (diff) |
Split types.h into separate header for each type
Diffstat (limited to 'src/inventory.hpp')
-rw-r--r-- | src/inventory.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/inventory.hpp b/src/inventory.hpp new file mode 100644 index 00000000..775f7a7e --- /dev/null +++ b/src/inventory.hpp @@ -0,0 +1,35 @@ +#pragma once + +/* + * Maximum number of "normal" pack slots, and the index of the "overflow" + * slot, which can hold an item, but only temporarily, since it causes the + * pack to "overflow", dropping the "last" item onto the ground. Since this + * value is used as an actual slot, it must be less than "INVEN_WIELD" (below). + * Note that "INVEN_PACK" is probably hard-coded by its use in savefiles, and + * by the fact that the screen can only show 23 items plus a one-line prompt. + */ +#define INVEN_PACK 23 + +/* + * Indexes used for various "equipment" slots (hard-coded by savefiles, etc). + */ +#define INVEN_WIELD 24 /* 3 weapons -- WEAPONS */ +#define INVEN_BOW 27 /* 1 bow -- WEAPON */ +#define INVEN_RING 28 /* 6 rings -- FINGER */ +#define INVEN_NECK 34 /* 2 amulets -- HEAD */ +#define INVEN_LITE 36 /* 1 lite -- TORSO */ +#define INVEN_BODY 37 /* 1 body -- TORSO */ +#define INVEN_OUTER 38 /* 1 cloak -- TORSO */ +#define INVEN_ARM 39 /* 3 arms -- ARMS */ +#define INVEN_HEAD 42 /* 2 heads -- HEAD */ +#define INVEN_HANDS 44 /* 3 hands -- ARMS */ +#define INVEN_FEET 47 /* 2 feets -- LEGS */ +#define INVEN_CARRY 49 /* 1 carried monster -- TORSO */ +#define INVEN_AMMO 50 /* 1 quiver -- TORSO */ +#define INVEN_TOOL 51 /* 1 tool -- ARMS */ + +/* + * Total number of inventory slots (hard-coded). + */ +#define INVEN_TOTAL 52 +#define INVEN_EQ (INVEN_TOTAL - INVEN_WIELD) |