#ifndef _OPENJKDF2_TYPES_ENUMS_H
#define _OPENJKDF2_TYPES_ENUMS_H

#include "engine_config.h"
#include <stdint.h>

// Constants
typedef int32_t rdGeoMode_t;
typedef enum erdGeometryMode
{
    RD_GEOMETRY_NONE = 0,
    RD_GEOMETRY_VERTEX = 1,
    RD_GEOMETRY_WIREFRAME = 2,
    RD_GEOMETRY_SOLID = 3,
    RD_GEOMETRY_FULL = 4,
    RD_GEOMODE_5_UNK = 5
} rdGeometryMode;

typedef int32_t rdLightMode_t;
typedef enum erdLightMode
{
    RD_LIGHTMODE_FULLYLIT = 0,
    RD_LIGHTMODE_NOTLIT = 1,
    RD_LIGHTMODE_DIFFUSE = 2,
    RD_LIGHTMODE_GOURAUD = 3,
    RD_LIGHTMODE_4_UNK = 4,
    RD_LIGHTMODE_5_UNK = 5,
    RD_LIGHTMODE_6_UNK = 6
} rdLightMode;

typedef int32_t rdTexMode_t;
enum RD_TEXTUREMODE
{
    RD_TEXTUREMODE_AFFINE = 0,
    RD_TEXTUREMODE_PERSPECTIVE = 1,
    RD_TEXTUREMODE_2_UNK = 2,
    RD_TEXTUREMODE_3_UNK = 3,
    RD_TEXTUREMODE_4_UNK = 4
};

typedef int32_t rdZBufferMethod_t;
enum RD_ZBUFFERMETHOD
{
    RD_ZBUFFER_NOREAD_NOWRITE = 0,
    RD_ZBUFFER_NOREAD_WRITE = 1,
    RD_ZBUFFER_READ_WRITE = 2,
    RD_ZBUFFER_READ_NOWRITE = 3,
};

typedef uint32_t sithCogFlags_t;
typedef enum eSithCogFlag
{
    SITH_COG_DEBUG = 0x1,
    SITH_COG_DISABLED = 0x2,
    SITH_COG_PULSE_SET = 0x4,
    SITH_COG_TIMER_SET = 0x8,
    SITH_COG_PAUSED = 0x10,
    SITH_COG_CLASS = 0x20,
    SITH_COG_LOCAL = 0x40,
    SITH_COG_SERVER = 0x80,
    SITH_COG_GLOBAL = 0x100,
    SITHCOG_NOSYNC = 0x200,
} SithCogFlag;

enum OpenJKDF2RestartMode
{
    OPENJKDF2_RESTART_NONE = 0,
    OPENJKDF2_RESTART_DF2 = 1,
    OPENJKDF2_RESTART_MOTS = 2,
    OPENJKDF2_RESTART_PATH = 3,
};

#define SITH_MESSAGE_MAX (Main_bMotsCompat ? 47 : 41)

typedef int SITH_MESSAGE;
typedef enum eSithCogMsgType
{
    SITH_MESSAGE_0 = 0,
    SITH_MESSAGE_ACTIVATE = 1,
    SITH_MESSAGE_REMOVED = 2,
    SITH_MESSAGE_STARTUP = 3,
    SITH_MESSAGE_TIMER = 4,
    SITH_MESSAGE_BLOCKED = 5,
    SITH_MESSAGE_ENTERED = 6,
    SITH_MESSAGE_EXITED = 7,
    SITH_MESSAGE_CROSSED = 8,
    SITH_MESSAGE_SIGHTED = 9,
    SITH_MESSAGE_DAMAGED = 10,
    SITH_MESSAGE_ARRIVED = 11,
    SITH_MESSAGE_KILLED = 12,
    SITH_MESSAGE_PULSE = 13,
    SITH_MESSAGE_TOUCHED = 14,
    SITH_MESSAGE_CREATED = 15,
    SITH_MESSAGE_LOADING = 16,
    SITH_MESSAGE_SELECTED = 17,
    SITH_MESSAGE_DESELECTED = 18,
    SITH_MESSAGE_AUTOSELECT = 19,
    SITH_MESSAGE_CHANGED = 20,
    SITH_MESSAGE_DEACTIVATED = 21,
    SITH_MESSAGE_SHUTDOWN = 22,
    SITH_MESSAGE_RESPAWN = 23,
    SITH_MESSAGE_AIEVENT = 24,
    SITH_MESSAGE_SKILL = 25,
    SITH_MESSAGE_TAKEN = 26,
    SITH_MESSAGE_USER0 = 27,
    SITH_MESSAGE_USER1 = 28,
    SITH_MESSAGE_USER2 = 29,
    SITH_MESSAGE_USER3 = 30,
    SITH_MESSAGE_USER4 = 31,
    SITH_MESSAGE_USER5 = 32,
    SITH_MESSAGE_USER6 = 33,
    SITH_MESSAGE_USER7 = 34,
    SITH_MESSAGE_NEWPLAYER = 35,
    SITH_MESSAGE_FIRE = 36,
    SITH_MESSAGE_JOIN = 37,
    SITH_MESSAGE_LEAVE = 38,
    SITH_MESSAGE_SPLASH = 39,
    SITH_MESSAGE_TRIGGER = 40,

    // MOTS
    SITH_MESSAGE_PREBLOCK = 41,
    SITH_MESSAGE_ESCAPED = 42,
    SITH_MESSAGE_ATTACHKILLED = 43,
    SITH_MESSAGE_PLAYERACTION = 44,

    // MOTS ext
    SITH_MESSAGE_ENTERBUBBLE = 45,
    SITH_MESSAGE_EXITBUBBLE = 46,
} SithCogMsgType;

typedef uint32_t sithWeaponFlags_t;
typedef enum eSithWeaponFlag
{
    SITH_WF_NOSHOOTERDAMAGE = 0x1,
    SITH_WF_2 = 0x2,
    SITH_WF_FACEHITEXPLODE = 0x4,
    SITH_WF_THINGHITEXPLODE = 0x8,
    SITH_WF_10 = 0x10,
    SITH_WF_20 = 0x20,
    SITH_WF_40 = 0x40,
    SITH_WF_ATTACHFACE = 0x80,
    SITH_WF_EXPLODE = 0x100,
    SITH_WF_DAMAGEDESTROY = 0x200,
    SITH_WF_IMPACTSOUND = 0x400,
    SITH_WF_ATTACHTHING = 0x800,
    SITH_WF_PROXIMITY = 0x1000, // "Weapon will explode when something touches its sphere."
    SITH_WF_INSTANT_IMPACT = 0x2000,
    SITH_WF_DAMAGE_DECAY = 0x4000,
    SITH_WF_OBJECT_TRAIL = 0x8000,
    SITH_WF_10000 = 0x10000, // short throw? unsure
    SITH_WF_20000 = 0x20000,
    SITH_WF_DECAYEMITSOUNDAWARENESSEVENT = 0x40000,
    SITH_WF_SURFACERICOCHET = 0x80000,
    SITH_WF_100000 = 0x100000,
    SITH_WF_EMITAITARGETEDEVENT = 0x200000,
    SITH_WF_ACTORKILLDESTROY = 0x400000,
    SITH_WF_MOPHIABOMB = 0x800000, // Jones specific
} SithWeaponFlag;

typedef int32_t sithGamesaveState_t;
enum SITH_GS_E
{
    SITH_GS_NONE = 0,
    SITH_GS_LOAD = 1,
    SITH_GS_SAVE = 2,
    SITH_GS_LOAD_DEBUG_NEXTCHECKPOINT = 3,
};

typedef uint32_t sithItemFlags_t;
typedef enum eSithItemFlag // could be jones specific
{
    SITH_ITEM_RESPAWN_MP = 0x1,
    SITH_ITEM_RESPAWN_SP = 0x2,
    SITH_ITEM_BACKPACK = 0x4,
    SITH_ITEM_8 = 0x8,
    SITH_ITEM_10 = 0x10
} SithItemFlag;

enum jkEpisodeLoadType
{
    JK_EPISODE_SINGLEPLAYER = 1,
    JK_EPISODE_DEATHMATCH = 2,
    JK_EPISODE_4_UNK = 4,
    JK_EPISODE_SPECIAL_CTF = 8,
    JK_EPISODE_ALL = 0xFFFF
};

typedef enum
{
    CVARTYPE_INVALID = 0,
    CVARTYPE_BOOL = 1,
    CVARTYPE_INT = 2,
    CVARTYPE_FLEX = 3,
    CVARTYPE_STR = 4
} tCvarType;

#define CVARFLAG_LOCAL (0)
typedef enum
{
    CVARFLAG_GLOBAL = 1,
    CVARFLAG_READONLY = 2,
    CVARFLAG_RESETHUD = 4,
    CVARFLAG_UPDATABLE_DEFAULT = 8, // Don't safe default values so that new defaults can be applied later, ie updater URLs
} tCvarFlags;

#define JK_JOYSTICK_AXIS_STRIDE (6)
#define JK_NUM_JOYSTICKS        (2)
#define JK_NUM_MOUSE_AXES       (3)
#define JK_NUM_AXES             ((JK_JOYSTICK_AXIS_STRIDE * JK_NUM_JOYSTICKS) + JK_NUM_MOUSE_AXES)

#if defined(SDL2_RENDER) || defined(TARGET_RETRO_HOMEBREW)
#define JK_NUM_MOUSE_BUTTONS     (4)
#define JK_NUM_EXT_MOUSE_BUTTONS (1)
#define JK_NUM_JOY_BUTTONS       (8)
#define JK_NUM_EXT_JOY_BUTTONS   (24)
#define JK_NUM_HAT_BUTTONS       (4)
#else
#define JK_NUM_MOUSE_BUTTONS     (4)
#define JK_NUM_EXT_MOUSE_BUTTONS (0)
#define JK_NUM_JOY_BUTTONS       (8)
#define JK_NUM_EXT_JOY_BUTTONS   (0)
#define JK_NUM_HAT_BUTTONS       (4)
#endif

#define JK_JOYSTICK_BUTTON_STRIDE       (JK_NUM_JOY_BUTTONS + JK_NUM_HAT_BUTTONS)
#define JK_JOYSTICK_EXT_BUTTON_STRIDE   (JK_NUM_EXT_JOY_BUTTONS)
#define JK_NUM_EXTENDED_KEYS ((JK_JOYSTICK_BUTTON_STRIDE * JK_NUM_JOYSTICKS) + JK_NUM_MOUSE_BUTTONS + JK_NUM_EXT_MOUSE_BUTTONS + (JK_JOYSTICK_EXT_BUTTON_STRIDE * JK_NUM_JOYSTICKS))

#if defined(SDL2_RENDER) || defined(TARGET_RETRO_HOMEBREW)
    #define JK_TOTAL_NUM_KEYS (120+JK_NUM_EXTENDED_KEYS)
#else
    #define JK_TOTAL_NUM_KEYS (148)
#endif

#define JK_NUM_KEYS_ORIG        (0x100 + JK_NUM_EXTENDED_KEYS) // original game had an off-by-one?
#define JK_NUM_KEYS             (0x100 + JK_NUM_EXTENDED_KEYS)

// JK specific keys
#define JK_EXTENDED_KEY_START   (0x100)
#define KEY_JOY1_B1             (JK_EXTENDED_KEY_START + 0)
#define KEY_JOY1_B2             (JK_EXTENDED_KEY_START + 1)
#define KEY_JOY1_B3             (JK_EXTENDED_KEY_START + 2)
#define KEY_JOY1_B4             (JK_EXTENDED_KEY_START + 3)
#define KEY_JOY1_B5             (JK_EXTENDED_KEY_START + 4)
#define KEY_JOY1_B6             (JK_EXTENDED_KEY_START + 5)
#define KEY_JOY1_B7             (JK_EXTENDED_KEY_START + 6)
#define KEY_JOY1_B8             (JK_EXTENDED_KEY_START + 7)
#define KEY_JOY1_HLEFT          (JK_EXTENDED_KEY_START + JK_NUM_JOY_BUTTONS + 0)
#define KEY_JOY1_HUP            (JK_EXTENDED_KEY_START + JK_NUM_JOY_BUTTONS + 1)
#define KEY_JOY1_HRIGHT         (JK_EXTENDED_KEY_START + JK_NUM_JOY_BUTTONS + 2)
#define KEY_JOY1_HDOWN          (JK_EXTENDED_KEY_START + JK_NUM_JOY_BUTTONS + 3)

#define KEY_JOY2_STARTIDX       (JK_EXTENDED_KEY_START + JK_JOYSTICK_BUTTON_STRIDE)
#define KEY_JOY2_B1             (KEY_JOY2_STARTIDX + 0)
#define KEY_JOY2_B2             (KEY_JOY2_STARTIDX + 1)
#define KEY_JOY2_B3             (KEY_JOY2_STARTIDX + 2)
#define KEY_JOY2_B4             (KEY_JOY2_STARTIDX + 3)
#define KEY_JOY2_B5             (KEY_JOY2_STARTIDX + 4)
#define KEY_JOY2_B6             (KEY_JOY2_STARTIDX + 5)
#define KEY_JOY2_B7             (KEY_JOY2_STARTIDX + 6)
#define KEY_JOY2_B8             (KEY_JOY2_STARTIDX + 7)
#define KEY_JOY2_HLEFT          (KEY_JOY2_STARTIDX + JK_NUM_JOY_BUTTONS + 0)
#define KEY_JOY2_HUP            (KEY_JOY2_STARTIDX + JK_NUM_JOY_BUTTONS + 1)
#define KEY_JOY2_HRIGHT         (KEY_JOY2_STARTIDX + JK_NUM_JOY_BUTTONS + 2)
#define KEY_JOY2_HDOWN          (KEY_JOY2_STARTIDX + JK_NUM_JOY_BUTTONS + 3)

#define KEY_MOUSE_STARTIDX      (JK_EXTENDED_KEY_START + (JK_JOYSTICK_BUTTON_STRIDE * 2))
#define KEY_MOUSE_B1            (KEY_MOUSE_STARTIDX + 0)
#define KEY_MOUSE_B2            (KEY_MOUSE_STARTIDX + 1)
#define KEY_MOUSE_B3            (KEY_MOUSE_STARTIDX + 2)
#define KEY_MOUSE_B4            (KEY_MOUSE_STARTIDX + 3)
#define JK_ORIG_EXT_END         (KEY_MOUSE_B4 + 1)

#define KEY_MOUSE_B5            (JK_ORIG_EXT_END + 0)
#define KEY_MOUSE_B6            (JK_ORIG_EXT_END + 1)
#define KEY_MOUSE_B7            (JK_ORIG_EXT_END + 2)
#define KEY_MOUSE_B8            (JK_ORIG_EXT_END + 3)

#define JK_EXT_MOUSE_END        (KEY_MOUSE_B5 + JK_NUM_EXT_MOUSE_BUTTONS)

#define KEY_IS_MOUSE(x) ((x >= KEY_MOUSE_B1 && x <= KEY_MOUSE_B4) || (x >= KEY_MOUSE_B5 && x < JK_EXT_MOUSE_END))
#define KEY_IS_JOY_BUTTON(x) ((x >= KEY_JOY1_B1 && x < KEY_MOUSE_STARTIDX) || (x >= KEY_JOY1_B9 && x < KEY_JOY2_EXT_ENDIDX))
#define KEY_IS_BUTTON(x) (KEY_IS_JOY_BUTTON(x) || x < JK_EXTENDED_KEY_START)

// QOL added:
#define KEY_JOY1_EXT_STARTIDX   (JK_EXT_MOUSE_END)
#define KEY_JOY1_B9             (KEY_JOY1_EXT_STARTIDX + 0)
#define KEY_JOY1_B10            (KEY_JOY1_EXT_STARTIDX + 1)
#define KEY_JOY1_B11            (KEY_JOY1_EXT_STARTIDX + 2)
#define KEY_JOY1_B12            (KEY_JOY1_EXT_STARTIDX + 3)
#define KEY_JOY1_B13            (KEY_JOY1_EXT_STARTIDX + 4)
#define KEY_JOY1_B14            (KEY_JOY1_EXT_STARTIDX + 5)
#define KEY_JOY1_B15            (KEY_JOY1_EXT_STARTIDX + 6)
#define KEY_JOY1_B16            (KEY_JOY1_EXT_STARTIDX + 7)
#define KEY_JOY1_B17            (KEY_JOY1_EXT_STARTIDX + 8)
#define KEY_JOY1_B18            (KEY_JOY1_EXT_STARTIDX + 9)
#define KEY_JOY1_B19            (KEY_JOY1_EXT_STARTIDX + 10)
#define KEY_JOY1_B20            (KEY_JOY1_EXT_STARTIDX + 11)
#define KEY_JOY1_B21            (KEY_JOY1_EXT_STARTIDX + 12)
#define KEY_JOY1_B22            (KEY_JOY1_EXT_STARTIDX + 13)
#define KEY_JOY1_B23            (KEY_JOY1_EXT_STARTIDX + 14)
#define KEY_JOY1_B24            (KEY_JOY1_EXT_STARTIDX + 15)
#define KEY_JOY1_B25            (KEY_JOY1_EXT_STARTIDX + 16)
#define KEY_JOY1_B26            (KEY_JOY1_EXT_STARTIDX + 17)
#define KEY_JOY1_B27            (KEY_JOY1_EXT_STARTIDX + 18)
#define KEY_JOY1_B28            (KEY_JOY1_EXT_STARTIDX + 19)
#define KEY_JOY1_B29            (KEY_JOY1_EXT_STARTIDX + 20)
#define KEY_JOY1_B30            (KEY_JOY1_EXT_STARTIDX + 21)
#define KEY_JOY1_B31            (KEY_JOY1_EXT_STARTIDX + 22)
#define KEY_JOY1_B32            (KEY_JOY1_EXT_STARTIDX + 23)

#define KEY_JOY2_EXT_STARTIDX   (JK_EXT_MOUSE_END + JK_JOYSTICK_EXT_BUTTON_STRIDE)
#define KEY_JOY2_B9             (KEY_JOY2_EXT_STARTIDX + 0)
#define KEY_JOY2_B10            (KEY_JOY2_EXT_STARTIDX + 1)
#define KEY_JOY2_B11            (KEY_JOY2_EXT_STARTIDX + 2)
#define KEY_JOY2_B12            (KEY_JOY2_EXT_STARTIDX + 3)
#define KEY_JOY2_B13            (KEY_JOY2_EXT_STARTIDX + 4)
#define KEY_JOY2_B14            (KEY_JOY2_EXT_STARTIDX + 5)
#define KEY_JOY2_B15            (KEY_JOY2_EXT_STARTIDX + 6)
#define KEY_JOY2_B16            (KEY_JOY2_EXT_STARTIDX + 7)
#define KEY_JOY2_B17            (KEY_JOY2_EXT_STARTIDX + 8)
#define KEY_JOY2_B18            (KEY_JOY2_EXT_STARTIDX + 9)
#define KEY_JOY2_B19            (KEY_JOY2_EXT_STARTIDX + 10)
#define KEY_JOY2_B20            (KEY_JOY2_EXT_STARTIDX + 11)
#define KEY_JOY2_B21            (KEY_JOY2_EXT_STARTIDX + 12)
#define KEY_JOY2_B22            (KEY_JOY2_EXT_STARTIDX + 13)
#define KEY_JOY2_B23            (KEY_JOY2_EXT_STARTIDX + 14)
#define KEY_JOY2_B24            (KEY_JOY2_EXT_STARTIDX + 15)
#define KEY_JOY2_B25            (KEY_JOY2_EXT_STARTIDX + 16)
#define KEY_JOY2_B26            (KEY_JOY2_EXT_STARTIDX + 17)
#define KEY_JOY2_B27            (KEY_JOY2_EXT_STARTIDX + 18)
#define KEY_JOY2_B28            (KEY_JOY2_EXT_STARTIDX + 19)
#define KEY_JOY2_B29            (KEY_JOY2_EXT_STARTIDX + 20)
#define KEY_JOY2_B30            (KEY_JOY2_EXT_STARTIDX + 21)
#define KEY_JOY2_B31            (KEY_JOY2_EXT_STARTIDX + 22)
#define KEY_JOY2_B32            (KEY_JOY2_EXT_STARTIDX + 23)
#define KEY_JOY2_EXT_ENDIDX     (KEY_JOY2_EXT_STARTIDX + JK_JOYSTICK_EXT_BUTTON_STRIDE)

// Axis idxs
#define AXIS_JOY1_X          (0)
#define AXIS_JOY1_Y          (1)
#define AXIS_JOY1_Z          (2)
#define AXIS_JOY1_R          (3)
#define AXIS_JOY1_U          (4)
#define AXIS_JOY1_V          (5)

#define AXIS_JOY2_X          (JK_JOYSTICK_AXIS_STRIDE + 0) // 6
#define AXIS_JOY2_Y          (JK_JOYSTICK_AXIS_STRIDE + 1) // 7
#define AXIS_JOY2_Z          (JK_JOYSTICK_AXIS_STRIDE + 2) // 8
#define AXIS_JOY2_R          (JK_JOYSTICK_AXIS_STRIDE + 3) // 9
#define AXIS_JOY2_U          (JK_JOYSTICK_AXIS_STRIDE + 4) // a 10
#define AXIS_JOY2_V          (JK_JOYSTICK_AXIS_STRIDE + 5) // b 11

#define AXIS_MOUSE_X         ((JK_JOYSTICK_AXIS_STRIDE * 2) + 0) // c 12
#define AXIS_MOUSE_Y         ((JK_JOYSTICK_AXIS_STRIDE * 2) + 1) // d 13
#define AXIS_MOUSE_Z         ((JK_JOYSTICK_AXIS_STRIDE * 2) + 2) // e 14

#define INPUT_MAPPING_FLAG_AXIS             (1)
#define INPUT_MAPPING_FLAG_DXKEY            (2)
#define INPUT_MAPPING_FLAG_AXIS_REVERSED    (4)
#define INPUT_MAPPING_FLAG_RAW_AXIS         (8)

// g_debugmodeFlags defines
#define DEBUGFLAG_NO_AIEVENTS          (0x1)
#define DEBUGFLAG_NO_PUPPETS           (0x2)
#define DEBUGFLAG_4                    (0x4)
#define DEBUGFLAG_8                    (0x8)
#define DEBUGFLAG_10                   (0x10)
#define DEBUGFLAG_20                   (0x20)
#define DEBUGFLAG_PRINT_HITS           (0x40)
#define DEBUGFLAG_NO_AI                (0x80)
#define DEBUGFLAG_IN_EDITOR            (0x100)
#define DEBUGFLAG_NO_AILOOK_FOR_TARGET (0x200)
#define DEBUGFLAG_SLOWMO               (0x400)
#define DEBUGFLAG_800                  (0x800)
#define DEBUGFLAG_1000                 (0x1000)
#define DEBUGFLAG_2000                 (0x2000)
#define DEBUGFLAG_4000                 (0x4000)
#define DEBUGFLAG_8000                 (0x8000)
#define DEBUGFLAG_10000                (0x10000)
#define DEBUGFLAG_20000                (0x20000)
#define DEBUGFLAG_40000                (0x40000)
#define DEBUGFLAG_80000                (0x80000)
#define DEBUGFLAG_NOCLIP               (0x40000000)

// type
typedef enum eSithCollisionType
{
    SITHCOLLISION_NONE = 0x0,
    SITHCOLLISION_THING = 0x1,
    SITHCOLLISION_WORLD = 0x2,
    SITHCOLLISION_THINGADJOINCROSS = 0x4,
    SITHCOLLISION_THINGCROSS = 0x8,
    SITHCOLLISION_THINGTOUCH = 0x10,

    SITHCOLLISION_ADJOINCROSS = 0x20,
    SITHCOLLISION_ADJOINTOUCH = 0x40,
} SithCollisionType;

typedef enum eSithCollideType
{
    SITH_COLLIDE_NONE = 0x0,
    SITH_COLLIDE_SPHERE = 0x1,
    SITH_COLLIDE_SPHERE_TREE = 0x2,
    SITH_COLLIDE_FACE = 0x3,
} SithCollideType;

enum SithRaycastType
{
    RAYCAST_1 = 0x1,
    RAYCAST_2 = 0x2,  // actor?
    RAYCAST_4 = 0x4,  // path thing?
    RAYCAST_8 = 0x8,
    RAYCAST_10 = 0x10, // wall?
    RAYCAST_20 = 0x20,
    RAYCAST_40 = 0x40,
    RAYCAST_80 = 0x80,
    RAYCAST_100 = 0x100,
    RAYCAST_200 = 0x200, // player?
    RAYCAST_400 = 0x400, // something with radius?
    RAYCAST_800 = 0x800, // adjoins?
    RAYCAST_1000 = 0x1000,
    RAYCAST_2000 = 0x2000,
    RAYCAST_4000 = 0x4000,
    RAYCAST_8000 = 0x8000,
};

typedef enum eSithParticleFlag
{
    SITHPARTICLE_FLAG_OUTWARD_EXPANDING = 0x1,
    SITHPARTICLE_FLAG_ANIMATE_CEL = 0x2,
    SITHPARTICLE_FLAG_RANDOM_START_CEL = 0x4,
    SITHPARTICLE_FLAG_FADE_OUT_OVER_TIME = 0x8,
    SITHPARTICLE_FLAG_EMIT_LIGHT = 0x10,
    SITHPARTICLE_FLAG_RANDOM_CEL_CHANGE = 0x20,
    SITHPARTICLE_FLAG_TIMEOUT_RATE = 0x40,
} SithParticleFlag;

typedef enum erdKeyframeFlags
{
    RDKEYFRAME_PUPPET_CONTROLLED = 0x1,
    RDKEYFRAME_NOLOOP = 0x2,
    RDKEYFRAME_PAUSE_ON_LAST_FRAME = 0x4,
    RDKEYFRAME_RESTART_ACTIVE = 0x8,
    RDKEYFRAME_DISABLE_FADEIN = 0x10,
    RDKEYFRAME_FADEOUT_NOLOOP = 0x20,
    RDKEYFRAME_FORCEMOVE = 0x40,
} rdKeyframeFlags;

#define rdCameraProjectType_Ortho (0)
#define rdCameraProjectType_Perspective       (1)
#define rdCameraProjectType_PerspMVP (2)

typedef enum erdClipOutcode
{
    RDCLIP_OUTCODE_LEFT = 0x1,
    RDCLIP_OUTCODE_RIGHT = 0x10,
    RDCLIP_OUTCODE_BOTTOM = 0x100,
    RDCLIP_OUTCODE_TOP = 0x1000
} rdClipOutcode;

enum RdClipFaceStatus {
    CLIPSTAT_NEAR = 0x01,
    CLIPSTAT_FAR = 0x02,
    CLIPSTAT_TOP = 0x04,
    CLIPSTAT_BOTTOM = 0x08,
    CLIPSTAT_LEFT = 0x10,
    CLIPSTAT_RIGHT = 0x20,
    CLIPSTAT_NONE_VISIBLE = 0x40,
    CLIPSTAT_80 = 0x80
};

enum RdSphereClipStatus {
    SPHERE_FULLY_INSIDE = 0,
    SPHERE_CLIPPING_EDGE = 1,
    SPHERE_FULLY_OUTSIDE = 2,
};

typedef enum erdThingType
{
    RD_THING_NONE   = 0,
    RD_THING_MODEL3  = 1,
    RD_THINGTYPE_CAMERA  = 2,
    RD_THINGTYPE_LIGHT  = 3,
    RD_THING_SPRITE3  = 4,
    RD_THING_PARTICLE  = 5,
    RD_THING_POLYLINE  = 6
} rdThingType;

enum SITH_ANIM
{
    SITH_ANIM_0      = 0,
    SITH_ANIM_STAND  = 1,
    SITH_ANIM_WALK   = 2,
    SITH_ANIM_RUN    = 3,
    SITH_ANIM_WALKBACK  = 4,
    SITH_ANIM_STRAFELEFT  = 5,
    SITH_ANIM_STRAFERIGHT  = 6,
    SITH_ANIM_DEATH  = 7,
    SITH_ANIM_FIRE   = 8,
    SITH_ANIM_FIRE3  = 9,
    SITH_ANIM_FIRE4  = 10,
    SITH_ANIM_DEATH2  = 11,
    SITH_ANIM_HIT    = 12,
    SITH_ANIM_HIT2   = 13,
    SITH_ANIM_RISING  = 14,
    SITH_ANIM_TOSS   = 15,
    SITH_ANIM_PLACE  = 16,
    SITH_ANIM_DROP   = 17,
    SITH_ANIM_FIRE2  = 18,
    SITH_ANIM_FALL   = 19,
    SITH_ANIM_LAND   = 20,
    SITH_ANIM_CROUCHFORWARD  = 21,
    SITH_ANIM_CROUCHBACK  = 22,
    SITH_ANIM_ACTIVATE  = 23,
    SITH_ANIM_MAGIC  = 24,
    SITH_ANIM_CHOKE  = 25,
    SITH_ANIM_LEAP   = 26,
    SITH_ANIM_JUMP   = 27,
    SITH_ANIM_RESERVED  = 28,
    SITH_ANIM_BLOCK  = 29,
    SITH_ANIM_BLOCK2  = 30,
    SITH_ANIM_TURNLEFT  = 31,
    SITH_ANIM_TURNRIGHT  = 32,
    SITH_ANIM_FIDGET  = 33,
    SITH_ANIM_FIDGET2  = 34,
    SITH_ANIM_MAGIC2  = 35,
    SITH_ANIM_MAGIC3  = 36,
    SITH_ANIM_VICTORY  = 37,
    SITH_ANIM_WINDUP  = 38,
    SITH_ANIM_HOLSTER  = 39,
    SITH_ANIM_DRAWFISTS  = 40,
    SITH_ANIM_DRAWGUN  = 41,
    SITH_ANIM_DRAWSABER  = 42,

    // MOTS
    SITH_ANIM_CHARGE = 43,
    SITH_ANIM_BUTTPUNCH = 44
};

#define SITHPUPPET_NUMANIMS (Main_bMotsCompat ? 45 : 43)

enum JOINTTYPE
{
    JOINTTYPE_HEAD   = 0,
    JOINTTYPE_NECK   = 1,
    JOINTTYPE_TORSO  = 2,
    JOINTTYPE_PRIMARYWEAP  = 3,
    JOINTTYPE_SECONDARYWEAP  = 4,
    JOINTTYPE_PRIMARYWEAPJOINT  = 5,
    JOINTTYPE_SECONDARYWEAPJOINT  = 6,
    JOINTTYPE_TURRETPITCH  = 7,
    JOINTTYPE_TURRETYAW  = 8,
};

enum DSS_ID
{
    DSS_THINGPOS  = 1,
    DSS_CHAT      = 2,
    DSS_SECTORFLAGS  = 3,
    DSS_FIREPROJECTILE  = 4,
    DSS_DEATH     = 5,
    DSS_DAMAGE    = 6,
    DSS_SETTHINGMODEL  = 7,
    DSS_SENDTRIGGER  = 8,
    DSS_PLAYKEY   = 9,
    DSS_PLAYSOUND  = 10,
    DSS_SYNCTHING  = 11,
    DSS_THINGFULLDESC  = 12,
    DSS_SYNCCOG   = 13,
    DSS_SURFACESTATUS  = 14,
    DSS_AISTATUS    = 15,
    DSS_INVENTORY  = 16,
    DSS_SURFACE  = 17,
    DSS_SECTORSTATUS  = 18,
    DSS_PLAYKEYMODE  = 19,
    DSS_PATHMOVE  = 20,
    DSS_SYNCPUPPET  = 21,
    DSS_SYNCTHINGATTACHMENT  = 22,
    DSS_SYNCEVENTS  = 23,
    DSS_SYNCCAMERAS  = 24,
    DSS_TAKEITEM1  = 25,
    DSS_TAKEITEM2  = 26,
    DSS_STOPKEY   = 27,
    DSS_STOPSOUND  = 28,
    DSS_CREATETHING  = 29,
    DSS_SYNCPALEFFECTS  = 30,
    DSS_ID_1F     = 31,
    DSS_LEAVEJOIN  = 32,
    DSS_WELCOME  = 33,
    DSS_JOINREQUEST  = 34,
    DSS_DESTROYTHING  = 35,
    DSS_JOINING   = 36,
    DSS_PLAYSOUNDMODE  = 37,
    DSS_PING      = 38,
    DSS_PINGREPLY  = 39,
    DSS_RESET     = 40,
    DSS_ENUMPLAYERS  = 41,
    DSS_QUIT      = 42,
    DSS_ID_2B     = 43,
    DSS_MOTS_NEW_1     = 44,
    DSS_MOTS_NEW_2     = 45,
    DSS_ID_2E     = 46,
    DSS_ID_2F     = 47,
    DSS_JKENABLESABER  = 48,
    DSS_SABERINFO3  = 49,
    DSS_ID_32     = 50,
    DSS_ID_33     = 51,
    DSS_ID_34     = 52,
    DSS_HUDTARGET  = 53,
    DSS_ID_36     = 54,
    DSS_JKPRINTUNISTRING  = 55,
    DSS_ENDLEVEL  = 56,
    DSS_SABERINFO1  = 57,
    DSS_SABERINFO2  = 58,
    DSS_JKSETWEAPONMESH  = 59,
    DSS_SETTEAM   = 60,
    DSS_61        = 61,
    DSS_62        = 62,
    DSS_63        = 63,
    DSS_64        = 64,
    DSS_MAX        = 66
};

const char* sithDSS_IdToStr(int id);

enum sithMultiModeFlags
{
    MULTIMODEFLAG_TEAMS = 0x1,
    MULTIMODEFLAG_2 = 0x2,
    MULTIMODEFLAG_4 = 0x4,
    MULTIMODEFLAG_TIMELIMIT = 0x8,
    MULTIMODEFLAG_SCORELIMIT = 0x10,
    MULTIMODEFLAG_20 = 0x20,
    MULTIMODEFLAG_40 = 0x40,
    MULTIMODEFLAG_SINGLE_LEVEL = 0x80,
    MULTIMODEFLAG_100 = 0x100,
    MULTIMODEFLAG_200 = 0x200,
    MULTIMODEFLAG_400 = 0x400,
    MULTIMODEFLAG_800 = 0x800,
    MULTIMODEFLAG_1000 = 0x1000, // MOTS uses
    MULTIMODEFLAG_2000 = 0x2000,
    MULTIMODEFLAG_4000 = 0x4000,
    MULTIMODEFLAG_8000 = 0x8000,
    MULTIMODEFLAG_COOP = 0x10000
};

enum sithMultiSessionFlags
{
    SESSIONFLAG_1 = 0x1,
    SESSIONFLAG_2 = 0x2,
    SESSIONFLAG_4 = 0x4,
    SESSIONFLAG_8 = 0x8,
    SESSIONFLAG_10 = 0x10,
    SESSIONFLAG_20 = 0x20,
    SESSIONFLAG_40 = 0x40,
    SESSIONFLAG_80 = 0x80,
    SESSIONFLAG_100 = 0x100,
    SESSIONFLAG_200 = 0x200,
    SESSIONFLAG_PASSWORD = 0x400,
    SESSIONFLAG_800 = 0x800,
    SESSIONFLAG_1000 = 0x1000,
    SESSIONFLAG_2000 = 0x2000,
    SESSIONFLAG_4000 = 0x4000,
    SESSIONFLAG_ISDEDICATED = 0x8000,
};

enum INPUT_FUNC
{
    INPUT_FUNC_FORWARD = 0,
    INPUT_FUNC_TURN = 1,
    INPUT_FUNC_SLIDE = 2,
    INPUT_FUNC_SLIDETOGGLE = 3,
    INPUT_FUNC_JUMP = 4,
    INPUT_FUNC_DUCK = 5,
    INPUT_FUNC_FAST = 6,
    INPUT_FUNC_SLOW = 7,
    INPUT_FUNC_PITCH = 8,
    INPUT_FUNC_CENTER = 9,
    INPUT_FUNC_FIRE1 = 10,
    INPUT_FUNC_FIRE2 = 11,
    INPUT_FUNC_ACTIVATE = 12,
    INPUT_FUNC_SELECT1 = 13,
    INPUT_FUNC_SELECT2 = 14,
    INPUT_FUNC_SELECT3 = 15,
    INPUT_FUNC_SELECT4 = 16,
    INPUT_FUNC_SELECT5 = 17,
    INPUT_FUNC_SELECT6 = 18,
    INPUT_FUNC_SELECT7 = 19,
    INPUT_FUNC_SELECT8 = 20,
    INPUT_FUNC_SELECT9 = 21,
    INPUT_FUNC_SELECT0 = 22,
    INPUT_FUNC_GAMESAVE = 23,
    INPUT_FUNC_DEBUG = 24,
    INPUT_FUNC_NEXTINV = 25,
    INPUT_FUNC_PREVINV = 26,
    INPUT_FUNC_USEINV = 27,
    INPUT_FUNC_NEXTWEAPON = 28,
    INPUT_FUNC_PREVWEAPON = 29,
    INPUT_FUNC_NEXTSKILL = 30,
    INPUT_FUNC_PREVSKILL = 31,
    INPUT_FUNC_USESKILL = 32,
    INPUT_FUNC_MAP = 33,
    INPUT_FUNC_INCREASE = 34,
    INPUT_FUNC_DECREASE = 35,
    INPUT_FUNC_MLOOK = 36,
    INPUT_FUNC_CAMERAMODE = 37,
    INPUT_FUNC_TALK = 38,
    INPUT_FUNC_GAMMA = 39,
    INPUT_FUNC_SCREENSHOT = 40,
    INPUT_FUNC_TALLY = 41,
    INPUT_FUNC_ACTIVATE0 = 42,
    INPUT_FUNC_ACTIVATE1 = 43,
    INPUT_FUNC_ACTIVATE2 = 44,
    INPUT_FUNC_ACTIVATE3 = 45,
    INPUT_FUNC_ACTIVATE4 = 46,
    INPUT_FUNC_ACTIVATE5 = 47,
    INPUT_FUNC_ACTIVATE6 = 48,
    INPUT_FUNC_ACTIVATE7 = 49,
    INPUT_FUNC_ACTIVATE8 = 50,
    INPUT_FUNC_ACTIVATE9 = 51,
    INPUT_FUNC_ACTIVATE10 = 52,
    INPUT_FUNC_ACTIVATE11 = 53,
    INPUT_FUNC_ACTIVATE12 = 54,
    INPUT_FUNC_ACTIVATE13 = 55,
    INPUT_FUNC_ACTIVATE14 = 56,
    INPUT_FUNC_ACTIVATE15 = 57,
    INPUT_FUNC_ACTIVATE16 = 58,
    INPUT_FUNC_ACTIVATE17 = 59,
    INPUT_FUNC_ACTIVATE18 = 60,
    INPUT_FUNC_ACTIVATE19 = 61,
    INPUT_FUNC_ACTIVATE20 = 62,
    INPUT_FUNC_ACTIVATE21 = 63,
    INPUT_FUNC_ACTIVATE22 = 64,
    INPUT_FUNC_ACTIVATE23 = 65,
    INPUT_FUNC_ACTIVATE24 = 66,
    INPUT_FUNC_ACTIVATE25 = 67,
    INPUT_FUNC_ACTIVATE26 = 68,
    INPUT_FUNC_ACTIVATE27 = 69,
    INPUT_FUNC_ACTIVATE28 = 70,
    INPUT_FUNC_ACTIVATE29 = 71,
    INPUT_FUNC_ACTIVATE30 = 72,
    INPUT_FUNC_ACTIVATE31 = 73,

#ifdef QOL_IMPROVEMENTS
    INPUT_FUNC_USELASTSELECTED = 74,
    INPUT_FUNC_MAX = 75,
#else
    INPUT_FUNC_MAX = 74,
#endif

};

enum SithLastSelected_e {
    LAST_SELECTED_SKILL = 0,
    LAST_SELECTED_ITEM = 1,
    LAST_SELECTED_MAX = 2,
};

enum SITHSOUNDFLAG
{
    SITHSOUNDFLAG_LOOP = 0x1,
    SITHSOUNDFLAG_FADING = 0x2,
    SITHSOUNDFLAG_AMBIENT_NOPAN = 0x4,
    SITHSOUNDFLAG_DOPPLER = 0x8,
    SITHSOUNDFLAG_FADE_IN = 0x10,
    SITHSOUNDFLAG_FADE_OUT = 0x20,
    SITHSOUNDFLAG_ABSOLUTE = 0x40,
    SITHSOUNDFLAG_FOLLOWSTHING = 0x80,
    SITHSOUNDFLAG_HIGHPRIO = 0x100,
    SITHSOUNDFLAG_HIGHEST_PRIO = 0x200,
    SITHSOUNDFLAG_MUTUALLY_EXCLUSIVE_PLAYBACK_ABOLUTE = 0x400,
    SITHSOUNDFLAG_MUTUALLY_EXCLUSIVE_PLAYBACK_THING = 0x800,
    SITHSOUNDFLAG_PER_VEL_PITCH_BEND = 0x1000,
    SITHSOUNDFLAG_UNDERWATER = 0x2000,
    SITHSOUNDFLAG_PRECACHED = 0x4000,
    SITHSOUNDFLAG_USE_DUP_BUF = 0x8000,
    SITHSOUNDFLAG_VOICE = 0x10000,
    SITHSOUNDFLAG_PLAYING = 0x20000,
    SITHSOUNDFLAG_PAUSED = 0x40000,
    SITHSOUNDFLAG_NO_3D = 0x80000,
};


enum SENDERTYPE
{
    SENDERTYPE_0     = 0,
    SENDERTYPE_SYSTEM  = 1,
    SENDERTYPE_2     = 2,
    SENDERTYPE_THING  = 3,
    SENDERTYPE_4     = 4,
    SENDERTYPE_SECTOR  = 5,
    SENDERTYPE_SURFACE  = 6,
    SENDERTYPE_7     = 7,
    SENDERTYPE_8     = 8,
    SENDERTYPE_COG   = 9
};

typedef enum eSithCogSymbolRefType
{
    COG_TYPE_VERB    = 0,
    COG_TYPE_1       = 1,
    SITHCOG_SYM_REF_FLEX  = 2,
    COG_TYPE_INT  = 3,
    SITHCOG_SYM_REF_TEMPLATE = 4,
    SITHCOG_SYM_REF_KEYFRAME = 7,
    SITHCOG_SYM_REF_SOUND = 8,
    SITHCOG_SYM_REF_MATERIAL = 10,
    SITHCOG_SYM_REF_VECTOR = 11,
    SITHCOG_SYM_REF_MODEL = 12,
    SITHCOG_SYM_REF_AICLASS = 13,
} SithCogSymbolRefType;

typedef enum eSithCogValueType
{
    SITHCOG_VALUE_POINTER  = 0,
    SITHCOG_VALUE_SYMBOLID  = 1,
    SITHCOG_VALUE_FLOAT  = 2,
    SITHCOG_VALUE_INT  = 3,
    SITHCOG_VALUE_STRING  = 4,
    SITHCOG_VALUE_VECTOR  = 5
} SithCogValueType;

enum COG_OPCODE
{
    COG_OPCODE_NOP   = 0,
    COG_OPCODE_PUSHINT  = 1,
    COG_OPCODE_PUSHFLOAT  = 2,
    COG_OPCODE_PUSHSYMBOL  = 3,
    COG_OPCODE_ARRAYINDEX  = 4,
    COG_OPCODE_CALLFUNC  = 5,
    COG_OPCODE_ASSIGN  = 6,
    COG_OPCODE_PUSHVECTOR  = 7,
    COG_OPCODE_ADD   = 8,
    COG_OPCODE_SUB   = 9,
    COG_OPCODE_MUL   = 10,
    COG_OPCODE_DIV   = 11,
    COG_OPCODE_MOD   = 12,
    COG_OPCODE_CMPFALSE  = 13,
    COG_OPCODE_NEG   = 14,
    COG_OPCODE_CMPGT  = 15,
    COG_OPCODE_CMPLS  = 16,
    COG_OPCODE_CMPEQ  = 17,
    COG_OPCODE_CMPLE  = 18,
    COG_OPCODE_CMPGE  = 19,
    COG_OPCODE_CMPAND  = 20,
    COG_OPCODE_CMPOR  = 21,
    COG_OPCODE_CMPNE  = 22,
    COG_OPCODE_ANDI  = 23,
    COG_OPCODE_ORI   = 24,
    COG_OPCODE_XORI  = 25,
    COG_OPCODE_GOFALSE  = 26,
    COG_OPCODE_GOTRUE  = 27,
    COG_OPCODE_GO    = 28,
    COG_OPCODE_RET   = 29,
    COG_OPCODE_UNK30  = 30,
    COG_OPCODE_CALL  = 31
};

typedef enum eSithAIMode
{
    SITHAI_MODE_MOVING = 0x01,
    SITHAI_MODE_ATTACKING = 0x02,
    SITHAI_MODE_SEARCHING = 0x04,
    SITHAI_MODE_TURNING = 0x08,
    SITHAI_MODE_HASDEST = 0x10,
    SITHAI_MODE_TOUGHSKIN= 0x20,
    SITHAI_MODE_NOCHECKFORCLIFF = 0x40,
    SITHAI_MODE_UNK80 = 0x80,
    SITHAI_MODE_UNK100 = 0x100,
    SITHAI_MODE_ACTIVE = 0x200,
    SITHAI_MODE_TARGETVISIBLE = 0x400,
    SITHAI_MODE_FLEEING = 0x800,
    SITHAI_MODE_SLEEPING = 0x1000,
    SITHAI_MODE_DISABLED = 0x2000,
    SITHAI_MODE_WANTALLEVENTS = 0x10000, // Jones
    SITHAI_MODE_WALLCRAWLING = 0x200000, // Jones probably
    SITHAI_MODE_NOCHASING = 0x2000000, // Jones
    SITHAI_MODE_ARMOREDSKIN = 0x8000000, // Jones
} SithAIMode;

typedef enum eSithAIEventType
{
    SITHAI_EVENT_HIT_SECTOR = 0x1,
    SITHAI_EVENT_SOUND = 0x2,
    SITHAI_EVENTTOUCHED = 0x4,
    SITHAI_EVENT_8 = 0x8,
    SITHAI_EVENT_10 = 0x10,
    SITHAI_EVENT_20 = 0x20,
    SITHAI_EVENT_MOVE_TARGET_CHANGED = 0x40,
    SITHAI_EVENT_80 = 0x80,
    SITHAI_EVENTMODECHANGED = 0x100,
    SITHAI_EVENTHITWALL = 0x200,
    SITHAI_EVENTHITCLIFF = 0x400,
    SITHAI_EVENT_GOAL_REACHED = 0x800,
    SITHAI_EVENTTARGETED = 0x1000,
    SITHAI_EVENTGOALSET = 0x2000,
    SITHAI_EVENTFIRE = 0x4000,
    SITHAI_EVENT_HIT_THING = 0x8000,
    SITHAI_EVENTPREFIRE = 0x10000,
    SITHAI_EVENTPOSTFIRE = 0x20000,
    SITHAI_EVENT_40000 = 0x40000,
    SITHAI_EVENT_GOAL_UNREACHABLE = 0x80000
} SithAIEventType;

enum jkGUIButtonID_t
{
    JKGUI_NEWGAME = 100,
    JKGUI_LOAD = 101,
    JKGUI_DEBUGPLAY = 102
};

enum jkGuiElementType_t
{
    ELEMENT_TEXTBUTTON = 0,
    ELEMENT_PICBUTTON = 1,
    ELEMENT_TEXT = 2,
    ELEMENT_CHECKBOX = 3,
    ELEMENT_LISTBOX = 4,
    ELEMENT_TEXTBOX = 5,
    ELEMENT_SLIDER = 6,
    ELEMENT_CUSTOM = 7,
    ELEMENT_8 = 8,
    ELEMENT_END = 9,
};

enum jkGuiEventType_t
{
    JKGUI_EVENT_INIT = 0,
    JKGUI_EVENT_MOUSEDOWN = 1,
    JKGUI_EVENT_2 = 2,
    JKGUI_EVENT_MOUSEMOVED = 3,
    JKGUI_EVENT_KEYDOWN = 4,
    JKGUI_EVENT_CHAR = 5,
};


#define SITHBIN_FP_START (Main_bMotsCompat ? SITHBIN_F_DEFENSE : SITHBIN_JEDI_RANK)
#define SITHBIN_FP_END (Main_bMotsCompat ? SITHBIN_F_CHAINLIGHT : SITHBIN_F_DEADLYSIGHT)

enum SITHBIN
{
    SITHBIN_NONE     = 0,
    SITHBIN_FISTS    = 1,
    SITHBIN_BRYARPISTOL  = 2,
    SITHBIN_STORMTROOPER_RIFLE  = 3,
    SITHBIN_THERMAL_DETONATOR  = 4,
    SITHBIN_TUSKEN_PROD  = 5,
    SITHBIN_REPEATER  = 6,
    SITHBIN_RAIL_DETONATOR  = 7,
    SITHBIN_SEQUENCER_CHARGE  = 8,
    SITHBIN_CONCUSSION_RIFLE  = 9,
    SITHBIN_LIGHTSABER  = 10,
    SITHBIN_ENERGY   = 11, // MOTS has this as the saber?
    SITHBIN_POWER    = 12,
    SITHBIN_BATTERY  = 13,
    SITHBIN_FORCEMANA  = 14,
    SITHBIN_RAILCHARGES  = 15,
    SITHBIN_NEW_STARS  = 16,
    SITHBIN_SPEND_STARS  = 17,
    SITHBIN_CHOICE   = 18,
    SITHBIN_F_DEFENSE  = 19, // JKDF2: SITHBIN_RESERVED
    SITHBIN_JEDI_RANK  = 20,
    SITHBIN_F_JUMP   = 21,
    SITHBIN_F_SPEED  = 22,
    SITHBIN_F_SEEING  = 23,
    SITHBIN_F_PULL   = 24,
    SITHBIN_F_HEALING  = 25,
    SITHBIN_F_PERSUASION  = 26,
    SITHBIN_F_BLINDING  = 27,
    SITHBIN_F_ABSORB  = 28,
    SITHBIN_F_PROTECTION  = 29,
    SITHBIN_F_THROW  = 30,
    SITHBIN_F_GRIP   = 31,
    SITHBIN_F_LIGHTNING  = 32,
    SITHBIN_F_DESTRUCTION  = 33,
    SITHBIN_F_DEADLYSIGHT  = 34,

    // MOTS
    SITHBIN_F_FARSIGHT  = 35,
    SITHBIN_F_PROJECT  = 36,
    SITHBIN_F_SABERTHROW  = 37,
    SITHBIN_F_PUSH  = 38,
    SITHBIN_F_CHAINLIGHT  = 39,

    SITHBIN_BACTATANK  = 40,
    SITHBIN_IRGOGGLES  = 41,
    SITHBIN_FIELDLIGHT  = 42,
    SITHBIN_KEYIMPERIAL  = 43,
    SITHBIN_WRENCH   = 44,
    SITHBIN_DATADISK  = 45,
    SITHBIN_KEYRED   = 46,
    SITHBIN_KEYBLUE  = 47,
    SITHBIN_KEYYELLOW  = 48,
    SITHBIN_WRCHBLUE  = 49,
    SITHBIN_WRCHYELLOW  = 50,
    SITHBIN_KEYGREEN  = 51,

    // MOTS
    SITHBIN_TSKNCLOTHES = 52,
    SITHBIN_HVYEXPLOSIVE = 53,
    SITHBIN_HLCRN = 54,
    SITHBIN_DRARM = 55,
    SITHBIN_PRYBAR = 56,
    SITHBIN_RADIO = 57,

    SITHBIN_SHIELDS  = 60,
    SITHBIN_FORCEARMOR  = 61,
    SITHBIN_SUPERSHIELDS  = 62,
    SITHBIN_POWERBOOST  = 63,
    SITHBIN_S_DARK   = 64,
    SITHBIN_S_LIGHT  = 65,
    SITHBIN_REVIVE   = 66,

    // MOTS
    SITHBIN_PLAYER_SEX = 67,
    SITHBIN_STAT_YSALIMARI = 68,
    SITHBIN_MAXMANA = 69,

    SITHBIN_SECRETS  = 70,
    SITHBIN_MAXSECRETS  = 71,
    SITHBIN_PEDS_KILLED  = 72,
    SITHBIN_PEDS_TOTAL  = 73,
    SITHBIN_FORCE_MORALITY  = 74,
    SITHBIN_ALIGNMENT  = 75,

    SITHBIN_TEAMCOLOR  = 80,
    SITHBIN_YSALIMARI  = 81, // SITHBIN_REDFLAG
    SITHBIN_GOLDFLAG  = 82,
    SITHBIN_REDKEY   = 83,
    SITHBIN_GOLDKEY  = 84,

    // MOTS ammo
    SITHBIN_CARBPELLETS = 90,
    SITHBIN_SEEKRAILS = 91,
    SITHBIN_EWEB_ROUNDS = 92,

    SITHBIN_STRINGOFFS  = 99,
    SITHBIN_GOAL00   = 100,
    SITHBIN_GOAL01   = 101,
    SITHBIN_GOAL02   = 102,
    SITHBIN_GOAL03   = 103,
    SITHBIN_GOAL04   = 104,
    SITHBIN_GOAL05   = 105,
    SITHBIN_GOAL06   = 106,
    SITHBIN_GOAL07   = 107,
    SITHBIN_GOAL08   = 108,
    SITHBIN_GOAL09   = 109,
    SITHBIN_GOAL10   = 110,
    SITHBIN_GOAL11   = 111,
    SITHBIN_GOAL12   = 112,
    SITHBIN_GOAL13   = 113,
    SITHBIN_GOAL14   = 114,
    SITHBIN_GOAL15   = 115,

    //MOTS
    SITHBIN_MOTS_NONE     = 120,

    SITHBIN_MOTS_FISTS    = 121,
    SITHBIN_MOTS_BRYARPISTOL  = 122,
    SITHBIN_MOTS_STORMTROOPER_RIFLE  = 123,
    SITHBIN_MOTS_THERMAL_DETONATOR  = 124,
    SITHBIN_MOTS_PARA_EWEB  = 125,
    SITHBIN_MOTS_REPEATER  = 126,
    SITHBIN_MOTS_RAIL_DETONATOR  = 127,
    SITHBIN_MOTS_SEQUENCER_CHARGE  = 128,
    SITHBIN_MOTS_CONCUSSION_RIFLE  = 129,
    SITHBIN_MOTS_EWEB  = 130,

    SITHBIN_MOTS_LIGHTSABER  = 131,
    SITHBIN_MOTS_BLASTECH  = 132,
    SITHBIN_MOTS_STORMTROOPER_SCOPE  = 133,
    SITHBIN_MOTS_FLASH_BOMB  = 134,
    SITHBIN_MOTS_TUSKEN_PROD  = 135,
    SITHBIN_MOTS_PARA_REPEATER  = 136,
    SITHBIN_MOTS_RAIL_SEEKER  = 137,
    SITHBIN_MOTS_MANUAL_SEQUENCER  = 138,
    SITHBIN_MOTS_PARA_CONCUSSION  = 139,
    SITHBIN_MOTS_CARBO_GUN  = 140,


    SITHBIN_HOTKEYOFFS  = 150,

    SITHBIN_MAX      = 199
};

enum GOAL_FLAGS
{
    GOAL_EXISTS = 1,
    GOAL_COMPLETE = 2,
    GOAL_SECRET = 4, // Unused, makes text show as yellow
};

typedef enum eSithInventoryTypeFlag
{
    SITHINVENTORY_TYPE_REGISTERED   = 1,
    ITEMINFO_ITEM    = 2,
    ITEMINFO_WEAPON  = 4,
    SITHINVENTORY_TYPE_AUTOAIM   = 8,
    SITHINVENTORY_TYPE_DAMAGEABLE = 0x10,
    ITEMINFO_DEFAULT = 0x20,
    SITHINVENTORY_TYPE_NOT_CARRIED_BETWEEN_LEVELS = 0x40,
    SITHINVENTORY_TYPE_BACKPACKITEM = 0x80,
    ITEMINFO_HOTKEYABLE = 0x100
} SithInventoryTypeFlag;

typedef enum eSithInventoryItemStatus
{
    SITHINVENTORY_ITEM_CHANGED  = 1,
    SITHINVENTORY_ITEM_ACTIVATED  = 2,
    SITHINVENTORY_ITEM_AVAILABLE  = 4,
    SITHINVENTORY_ITEM_FOUND = 8
} SithInventoryItemStatus;


typedef enum SithAttachFlag
{
  SITH_ATTACH_SURFACE = 0x1,
  SITH_ATTACH_THINGFACE = 0x2,
  SITH_ATTACH_THING = 0x4,
  SITH_ATTACH_NOMOVE = 0x8,
  SITH_ATTACH_FORCE_SERIALIZE = 0x10, // MOTS added: Jail Key
} SithAttachFlag;

typedef enum SithSectorFlag
{
  SITH_SECTOR_NOGRAVITY = 0x1,
  SITH_SECTOR_UNDERWATER = 0x2,
  SITH_SECTOR_COGLINKED = 0x4,
  SITH_SECTOR_USETHRUST = 0x8,
  SITH_SECTOR_HIDEONMAP = 0x10,
  SITH_SECTOR_NOACTORENTER = 0x20,
  SITH_SECTOR_FALLDEATH = 0x40,
  SITH_SECTOR_ADJOINSOFF = 0x80,
  SITH_SECTOR_100 = 0x100,
  SITH_SECTOR_200 = 0x200,
  SITH_SECTOR_400 = 0x400,
  SITH_SECTOR_800 = 0x800,
  SITH_SECTOR_HASCOLLIDEBOX = 0x1000,
  SITH_SECTOR_2000 = 0x2000,
  SITH_SECTOR_SEEN = 0x4000,
  SITH_SECTOR_SYNC = 0x8000,
} SithSectorFlag;


typedef enum eSithThingMoveType
{
    SITH_MT_NONE = 0x0,
    SITH_MT_PHYSICS = 0x1,
    SITH_MT_PATH = 0x2,
} SithThingMoveType;

typedef enum eSithPhysicsFlags
{
    SITH_PF_USEGRAVITY = 0x1,
    SITH_PF_USETHRUST = 0x2,
    SITH_PF_4 = 0x4,
    SITH_PF_8 = 0x8,
    SITH_PF_ALIGNSURFACE = 0x10,
    SITH_PF_SURFACEBOUNCE = 0x20,
    SITH_PF_FLOORSTICK = 0x40,
    SITH_PF_WALLSTICK = 0x80,
    SITH_PF_100 = 0x100,
    SITH_PF_USEROTATIONVELOCITY = 0x200,
    SITH_PF_BANKEDTURN = 0x400,
    SITH_PF_800 = 0x800,
    SITH_PF_USEANGULARTHRUST = 0x1000,
    SITH_PF_FLY = 0x2000,
    SITH_PF_USEBLASTFORCE = 0x4000,
    SITH_PF_8000 = 0x8000,
    SITH_PF_CROUCHING = 0x10000,
    SITH_PF_20000 = 0x20000,
    SITH_PF_PARTIALGRAVITY = 0x40000,
    SITH_PF_80000 = 0x80000,
    SITH_PF_ONWATERSURFACE = 0x100000,
    SITH_PF_200000 = 0x200000,
    SITH_PF_NOTHRUST = 0x400000,
    SITH_PF_800000 = 0x800000,
    SITH_PF_1000000 = 0x1000000,
    SITH_PF_2000000 = 0x2000000,
    SITH_PF_4000000 = 0x4000000,
    SITH_PF_8000000 = 0x8000000,
} SithPhysicsFlags;

typedef enum eSithThingArg
{
    THINGPARAM_0     = 0,
    SITHTHING_ARG_TYPE,
    THINGPARAM_COLLIDE,
#ifdef JKM_PARAMS
    THINGPARAM_TREESIZE,
#endif
    THINGPARAM_MOVE,
    THINGPARAM_SIZE,
    THINGPARAM_THINGFLAGS,
    THINGPARAM_TIMER,
    THINGPARAM_LIGHT,
    THINGPARAM_ATTACH,
    THINGPARAM_SOUNDCLASS,
    THINGPARAM_MODEL3D,
    THINGPARAM_SPRITE,
    THINGPARAM_SURFDRAG,
    THINGPARAM_AIRDRAG,
    THINGPARAM_STATICDRAG,
    THINGPARAM_MASS,
    THINGPARAM_HEIGHT,
    THINGPARAM_PHYSFLAGS,
    SITHTHING_ARG_MAXROTVEL,
    THINGPARAM_MAXVEL,
    THINGPARAM_VEL,
    THINGPARAM_ANGVEL,
    THINGPARAM_TYPEFLAGS,
    THINGPARAM_HEALTH,
    THINGPARAM_MAXTHRUST,
    THINGPARAM_MAXROTTHRUST,
    THINGPARAM_JUMPSPEED,
    THINGPARAM_WEAPON,
    THINGPARAM_WEAPON2,
    THINGPARAM_DAMAGE,
    SITHTHING_ARG_MINDAMAGE,
    THINGPARAM_DAMAGECLASS,
    THINGPARAM_EXPLODE,
    THINGPARAM_FRAME,
    THINGPARAM_NUMFRAMES,
    THINGPARAM_PUPPET,
    THINGPARAM_BLASTTIME,
    THINGPARAM_FORCE,
    THINGPARAM_MAXLIGHT,
    THINGPARAM_RANGE,
    THINGPARAM_FLASHRGB,
    THINGPARAM_AICLASS,
    THINGPARAM_COG,
    THINGPARAM_RESPAWN,
#ifdef JKM_PARAMS
    THINGPARAM_RESPAWNFACTOR,
#endif
    THINGPARAM_MATERIAL,
    THINGPARAM_RATE,
    THINGPARAM_COUNT,
    THINGPARAM_ELEMENTSIZE,
    THINGPARAM_PARTICLE,
    THINGPARAM_MAXHEALTH,
    THINGPARAM_MOVESIZE,
    THINGPARAM_ORIENTSPEED,
    THINGPARAM_BUOYANCY,
    THINGPARAM_EYEOFFSET,
    THINGPARAM_MINHEADPITCH,
    THINGPARAM_MAXHEADPITCH,
    THINGPARAM_FIREOFFSET,
    THINGPARAM_LIGHTOFFSET,
    THINGPARAM_LIGHTINTENSITY,
    THINGPARAM_POINTS,
    THINGPARAM_DEBRIS,
    THINGPARAM_CREATETHING,
    THINGPARAM_TRAILTHING,
    THINGPARAM_TRAILCYLRADIUS,
    THINGPARAM_TRAINRANDANGLE,
    THINGPARAM_MINSIZE,
    THINGPARAM_PITCHRANGE,
    THINGPARAM_YAWRANGE,
    THINGPARAM_ERROR,
    THINGPARAM_FOV,
    THINGPARAM_CHANCE,
    THINGPARAM_ORIENT,
    THINGPARAM_FLESHHIT
} SithThingArg;

typedef enum eSithThingType
{
    SITH_THING_FREE   = 0,
    SITH_THING_CAMERA  = 1,
    SITH_THING_ACTOR  = 2,
    SITH_THING_WEAPON  = 3,
    SITH_THING_DEBRIS  = 4,
    SITH_THING_ITEM   = 5,
    SITH_THING_EXPLOSION  = 6,
    SITH_THING_COG    = 7,
    SITH_THING_GHOST  = 8,
    SITH_THING_CORPSE  = 9,
    SITH_THING_PLAYER  = 10,
    SITH_THING_PARTICLE  = 11,
    SITH_THING_INVALID  = 12

    // Jones
    /*
    SITH_THING_HINT = 12,
    SITH_THING_SPRITE = 13,
    SITH_THING_POLYLINE = 14,
    SITH_THING_NUMTYPES = 15,
    */
} SithThingType;

// Control Type
typedef enum eSithControlType
{
    SITH_CT_PLOT = 0,
    SITH_CT_PLAYER = 1,
    SITH_CT_AI = 2,
    SITH_CT_3 = 3,
    SITH_CT_4 = 4,
    SITH_CT_5 = 5,
    SITH_CT_EXPLOSION = 6,
    SITH_CT_PARTICLE = 7,
    SITH_CT_8 = 8,
    SITH_CT_9 = 9,
    SITH_CT_10 = 10,
    SITH_CT_11 = 11,
    SITH_CT_12 = 12,
} SithControlType;

typedef enum eSithDamageType
{
    SITH_DAMAGE_IMPACT   = 0x01,
    SITH_DAMAGE_ENERGY   = 0x02,
    SITH_DAMAGE_FIRE     = 0x04,
    SITH_DAMAGE_FORCE    = 0x08,
    SITH_DAMAGE_SABER    = 0x10,
    SITH_DAMAGE_DROWN    = 0x20,
    SITH_DAMAGE_FALL    = 0x40,
} SithDamageType;

typedef enum eSithThingFlag
{
    SITH_TF_EMITLIGHT    = 1,
    SITH_TF_DESTROYED  = 2,
    SITH_TF_4  = 4,
    SITH_TF_LEVELGEO  = 8,
    SITH_TF_10       = 0x10,
    SITH_TF_20       = 0x20,
    SITH_TF_STANDABLE  = 0x40,
    SITH_TF_80       = 0x80,
    SITH_TF_INVULN   = 0x100,
    SITH_TF_DEAD     = 0x200,
    SITH_TF_CAPTURED = 0x400,
    SITH_TF_NOIMPACTDAMAGE  = 0x800,
    SITH_TF_NOEASY   = 0x1000,
    SITH_TF_NOMEDIUM  = 0x2000,
    SITH_TF_NOHARD   = 0x4000,
    SITH_TF_8000     = 0x8000,
    SITH_TF_10000    = 0x10000,
    SITH_TF_PULSESET    = 0x20000,
    SITH_TF_TIMERSET    = 0x40000,
    SITH_TF_DISABLED  = 0x80000,
    SITH_TF_INCAMFOV  = 0x100000,
    SITH_TF_RENDERWEAPON  = 0x200000,
    SITH_TF_METAL    = 0x400000,
    SITH_TF_EARTH    = 0x800000,
    SITH_TF_1000000  = 0x1000000,
    SITH_TF_WATER    = 0x2000000,
    SITH_TF_IGNOREGOURAUDDISTANCE  = 0x4000000,
    SITH_TF_DROWNS   = 0x8000000,
    SITH_TF_WATERCREATURE  = 0x10000000,
    SITH_TF_SPLASHES  = 0x20000000,
    SITH_TF_40000000 = 0x40000000,
    SITH_TF_80000000 = 0x80000000,
} SithThingFlag;

enum THING_TYPEFLAGS
{
    THING_TYPEFLAGS_1  = 0x1,
    THING_TYPEFLAGS_FORCE  = 0x2,
    THING_TYPEFLAGS_DAMAGE  = 0x4,
    THING_TYPEFLAGS_8  = 0x8,
    THING_TYPEFLAGS_LIGHT  = 0x10,
    THING_TYPEFLAGS_20  = 0x20,
    THING_TYPEFLAGS_40  = 0x40,
    THING_TYPEFLAGS_80  = 0x80,
    THING_TYPEFLAGS_DROID  = 0x100,
    THING_TYPEFLAGS_BOSS  = 0x200,
    THING_TYPEFLAGS_DEAF  = 0x400,
    THING_TYPEFLAGS_BLIND  = 0x800,
    THING_TYPEFLAGS_1000  = 0x1000,
    THING_TYPEFLAGS_ISBLOCKING  = 0x2000,
    THING_TYPEFLAGS_4000  = 0x4000,
    THING_TYPEFLAGS_8000  = 0x8000,
    THING_TYPEFLAGS_SCREAMING  = 0x10000,
    THING_TYPEFLAGS_20000  = 0x20000,
    THING_TYPEFLAGS_40000  = 0x40000,
    THING_TYPEFLAGS_CANTSHOOTUNDERWATER  = 0x80000,
    THING_TYPEFLAGS_100000  = 0x100000,
    THING_TYPEFLAGS_IMMOBILE  = 0x200000,
    THING_TYPEFLAGS_400000  = 0x400000,
    THING_TYPEFLAGS_800000  = 0x800000,
    THING_TYPEFLAGS_1000000  = 0x1000000,
    THING_TYPEFLAGS_2000000  = 0x2000000,
    THING_TYPEFLAGS_4000000  = 0x4000000,
    THING_TYPEFLAGS_8000000  = 0x8000000,
    THING_TYPEFLAGS_10000000  = 0x10000000,
    THING_TYPEFLAGS_20000000  = 0x20000000,
    THING_TYPEFLAGS_40000000  = 0x40000000,
    THING_TYPEFLAGS_80000000  = 0x80000000
};

typedef enum eSithActorFlag
{
    SITH_AF_CANROTATEHEAD = 0x1,
    SITH_AF_VIEWCENTRING = 0x2,
    SITH_AF_HEADLIGHT = 0x4,
    SITH_AF_INVULNERABLE = 0x8,
    SITH_AF_VIEWCENTRED = 0x10,
    SITH_AF_EXPLODE_WHEN_KILLED = 0x20,
    SITH_AF_BREATHEUNDERWATER = 0x40,
    SITH_AF_INVISIBLE = 0x80,
    SITH_AF_DROID  = 0x100,
    SITH_AF_BOSS = 0x200,
    SITH_AF_DEAF = 0x400,
    SITH_AF_BLIND = 0x800,
    SITH_AF_1000 = 0x1000,
    SITH_AF_BLEEDS = 0x2000,
    SITH_AF_4000 = 0x4000,
    SITH_AF_SEEINVISIBLE = 0x8000,
    SITH_AF_SCREAMING = 0x10000, // Jones: SLIP_SLOPE
    SITH_AF_DELAYFIRE = 0x20000,
    SITH_AF_IMMOBILE = 0x40000,
    SITH_AF_NOUNDERWATERFIRE = 0x80000,
    SITH_AF_NOTARGET = 0x100000,
    SITH_AF_CONTROLSDISABLED = 0x200000,
    SITH_AF_FALLKILLED = 0x400000,
    SITH_AF_NOIDLECAMERA = 0x800000,
    SITH_AF_FULLDAMAGE = 0x1000000,
    SITH_AF_SEEINDARK = 0x2000000,
    SITH_AF_4000000 = 0x4000000,
    SITH_AF_FREEZE_MOVEMENT = 0x8000000,
    SITH_AF_FLYERMOVE = 0x10000000,
    SITH_AF_SCOPEHUD = 0x20000000,
    SITH_AF_ELECTRICWHIP = 0x40000000, // Jones: ELECTRICT_WHIP
    SITH_AF_ARACHNID = 0x80000000, // Jones: ARACHNID
} SithActorFlag;

#define SITH_AF_COMBO_FREEZE (Main_bMotsCompat ? (SITH_AF_IMMOBILE|SITH_AF_FREEZE_MOVEMENT) : (SITH_AF_IMMOBILE))
#define SITH_AF_COMBO_BLIND (SITH_AF_BLIND | MOTS_ONLY_FLAG(SITH_AF_FLYERMOVE))

typedef enum eSithThingSyncFlags
{
    SITHTHING_SYNC_POS = 1,
    SITHTHING_SYNC_STATE = 2,
    SITHTHING_SYNC_FULL = 4,

    // Added
    THING_SYNC_AI = 8,
    THING_SYNC_PUPPET = 0x10,

    // Helper
    THING_SYNC_ALL = 0xFF,
} SithThingSyncFlags;


enum JKGUI_BM {
    JKGUI_BM_BK_MAIN = 0, 
    JKGUI_BM_BK_SINGLE = 1, 
    JKGUI_BM_BK_MULTI = 2, 
    JKGUI_BM_BK_SETUP = 3, 
    JKGUI_BM_BK_ESC = 4, 
    JKGUI_BM_BK_LOADING = 5, 
    JKGUI_BM_BK_FIELD_LOG = 6, 
    JKGUI_BM_BK_DIALOG = 7, 
    JKGUI_BM_BK_DECISION = 8, 
    JKGUI_BM_BK_FORCE = 9, 
    JKGUI_BM_BK_TALLY = 10, 
    JKGUI_BM_BK_BUILD_MULTI = 11, 
    JKGUI_BM_BK_BUILD_LOAD = 12, 
    JKGUI_BM_UP_15 = 13, 
    JKGUI_BM_DOWN_15 = 14, 
    JKGUI_BM_CHECK = 15, 
    JKGUI_BM_OBJECTIVESCHECK = 16, 
    JKGUI_BM_SLIDER_THUMB = 17, 
    JKGUI_BM_SLIDER_BACK = 18, 
    JKGUI_BM_SLIDER_BACK_200 = 19, 
    JKGUI_BM_FL_OK = 20, 
    JKGUI_BM_FL_ROT_LEF = 21, 
    JKGUI_BM_FL_ROT_RIG = 22, 
    JKGUI_BM_FL_ROT_UP = 23, 
    JKGUI_BM_FL_ROT_DOW = 24, 
    JKGUI_BM_FL_PLUS = 25, 
    JKGUI_BM_FL_MINUS = 26, 
    JKGUI_BM_FL_TRANS_LEFT = 27, 
    JKGUI_BM_FL_TRANS_RIGHT = 28, 
    JKGUI_BM_FL_TRANS_UP = 29, 
    JKGUI_BM_FL_TRANS_DOWN = 30, 
    JKGUI_BM_FL_SPIN = 31, 
    JKGUI_BM_FL_RESET = 32, 
    JKGUI_BM_ARROW_LEFT = 33, 
    JKGUI_BM_ARROW_RIGHT = 34, 
};

typedef enum eSithMapModeFlags
{
    MAPMODE_01 = 0x01,
    SITHMAPMODE_SHOWALLSECTORS = 0x02,
    SITHMAPMODE_SHOWPLAYERS = 0x04,
    SITHMAPMODE_SHOWACTORS = 0x08,
    SITHMAPMODE_SHOWITEMS = 0x10,
    SITHMAPMODE_SHOWWEAPONS = 0x20,
    SITHMAPMODE_SHOWALLTHINGS = 0x40,
    MAPMODE_80 = 0x80,
} SithMapModeFlags;

enum AUTOPICKUP
{
    AUTOPICKUP_1 = 1,
    AUTOPICKUP_DANGEROUS = 2,
    AUTOPICKUP_4 = 4,
    AUTOPICKUP_8 = 8,
};

#ifdef STDPLATFORM_HEAP_SUGGESTIONS
enum HEAP_SUGGESTIONS {
    // Defaults to the main system RAM, via malloc
    HEAP_ANY = 0,

    // TCM, WRAM, anything that's particularly fast and good for
    // quick accesses for math operations
    HEAP_FAST = 1,

    // Memory that doesn't have to be accessed quickly, and
    // might be paged in/out
    HEAP_SLOW = 2,

    // Audio heap, depending on the platform this may require
    // specific areas of RAM for DMA, or might need faster RAM
    HEAP_AUDIO = 3,

    // Buffer is only ever accessed with 16/32-bit aligned loads/stores--
    // no byte or misaligned access, incl. memcpy/memset tails. 
    // (Dreamcast PVR VRAM, NDS slot-2 expansion RAM)
    HEAP_WORD_ADDRESSABLE = 4,
};
#endif

#endif // _OPENJKDF2_TYPES_ENUMS_H
