Browse Source

Added `plr_class` enum, moving the define `NUM_CLASSES` into it.

pull/4/head
Dennis Duda 8 years ago
parent
commit
e7065a0b02
  1. 1
      defs.h
  2. 8
      enums.h
  3. 7
      structs.h

1
defs.h

@ -28,7 +28,6 @@
#define MDMAXY 40
// todo: enums
#define NUM_CLASSES 3
#define NUM_INVLOC 7
#define NUM_SFX 858
#define NUMLEVELS 17

8
enums.h

@ -2393,6 +2393,14 @@ enum _unique_items
UITEM_INVALID = 0x5A,
};
enum plr_class
{
PC_WARRIOR = 0x0,
PC_ROGUE = 0x1,
PC_SORCERER = 0x2,
NUM_CLASSES
};
enum _ui_classes
{
UI_WARRIOR = 0x0,

7
structs.h

@ -839,6 +839,13 @@ struct PlayerStruct
char _pLightRad;
unsigned char _pLvlChanging;
char _pName[32];
// plr_class enum value.
// TODO: this could very well be `enum plr_class _pClass`
// since there are 3 bytes of alingment after this field.
// it could just be that the compiler optimized away all accesses to
// the higher bytes by using byte instructions, since all possible values
// of plr_class fit into one byte.
char _pClass;
int _pStrength;
int _pBaseStr;

Loading…
Cancel
Save