# TYPES
typedef IDirect3DDevice2 *LPDIRECT3DDEVICE2;
typedef IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
typedef IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
typedef IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
typedef DDSURFACEDESC DDSDESC, *LPDDSDESC;
typedef LPDIRECTDRAWSURFACE3 LPDDS;
typedef LPDIRECTDRAW3 LPDD;
typedef D3DTEXTUREHANDLE HWR_TEXTURE_HANDLE;

typedef int16_t PHD_ANGLE;

typedef struct __unaligned { // decompiled
    int32_t x;
    int32_t y;
    int32_t z;
} XYZ_32;

typedef struct __unaligned { // decompiled
    int16_t x;
    int16_t y;
    int16_t z;
} XYZ_16;

typedef struct __unaligned {
    int32_t _00;
    int32_t _01;
    int32_t _02;
    int32_t _03;
    int32_t _10;
    int32_t _11;
    int32_t _12;
    int32_t _13;
    int32_t _20;
    int32_t _21;
    int32_t _22;
    int32_t _23;
} MATRIX;

typedef enum {
    VGA_NO_VGA    = 0,
    VGA_256_COLOR = 1,
    VGA_MODEX     = 2,
    VGA_STANDARD  = 3,
} VGA_MODE;

typedef struct __unaligned {
    LPBITMAPINFO bmp_info;
    void *bmp_data;
    HPALETTE hPalette;
    DWORD flags;
} BITMAP_RESOURCE;

typedef struct __unaligned {
    int32_t width;
    int32_t height;
    int32_t bpp;
    VGA_MODE vga;
} DISPLAY_MODE;

typedef struct __unaligned DISPLAY_MODE_NODE {
    struct DISPLAY_MODE_NODE *next;
    struct DISPLAY_MODE_NODE *previous;
    DISPLAY_MODE body;
} DISPLAY_MODE_NODE;

typedef struct __unaligned {
    DISPLAY_MODE_NODE *head;
    DISPLAY_MODE_NODE *tail;
    DWORD count;
} DISPLAY_MODE_LIST;

typedef struct __unaligned {
    char *content;
    bool is_valid;
} STRING_FLAGGED;

typedef struct __unaligned {
    LPGUID adapter_guid_ptr;
    GUID adapter_guid;
    STRING_FLAGGED driver_desc;
    STRING_FLAGGED driver_name;
    DDCAPS_DX5 driver_caps;
    DDCAPS_DX5 hel_caps;
    GUID device_guid;
    D3DDEVICEDESC_V2 hw_device_desc;
    DISPLAY_MODE_LIST hw_disp_mode_list;
    DISPLAY_MODE_LIST sw_disp_mode_list;
    DISPLAY_MODE vga_mode1;
    DISPLAY_MODE vga_mode2;
    uint32_t screen_width;
    bool hw_render_supported;
    bool sw_windowed_supported;
    bool hw_windowed_supported;
    bool is_vga_mode1_presented;
    bool is_vga_mode2_presented;
    bool perspective_correct_supported;
    bool dither_supported;
    bool zbuffer_supported;
    bool linear_filter_supported;
    bool shade_restricted;
} DISPLAY_ADAPTER;

typedef struct __unaligned DISPLAY_ADAPTER_NODE {
    struct DISPLAY_ADAPTER_NODE *next;
    struct DISPLAY_ADAPTER_NODE *previous;
    DISPLAY_ADAPTER body;
} DISPLAY_ADAPTER_NODE;

typedef struct __unaligned {
    DISPLAY_ADAPTER_NODE *head;
    DISPLAY_ADAPTER_NODE *tail;
    DWORD count;
} DISPLAY_ADAPTER_LIST;

typedef struct __unaligned {
    GUID *adapter_guid_ptr;
    GUID adapter_guid;
    STRING_FLAGGED description;
    STRING_FLAGGED module;
} SOUND_ADAPTER;

typedef struct __unaligned SOUND_ADAPTER_NODE {
    struct SOUND_ADAPTER_NODE *next;
    struct SOUND_ADAPTER_NODE *previous;
    SOUND_ADAPTER body;
} SOUND_ADAPTER_NODE;

typedef struct __unaligned {
    SOUND_ADAPTER_NODE *head;
    SOUND_ADAPTER_NODE *tail;
    DWORD count;
} SOUND_ADAPTER_LIST;

typedef struct __unaligned {
    GUID *lpJoystickGuid;
    GUID joystickGuid;
    STRING_FLAGGED productName;
    STRING_FLAGGED instanceName;
} JOYSTICK;

typedef struct __unaligned JOYSTICK_NODE {
    struct JOYSTICK_NODE *next;
    struct JOYSTICK_NODE *previous;
    JOYSTICK body;
} JOYSTICK_NODE;

typedef struct __unaligned JOYSTICK_LIST {
    struct JOYSTICK_LIST *head;
    struct JOYSTICK_LIST *tail;
    DWORD count;
} JOYSTICK_LIST;

typedef enum {
    RM_UNKNOWN  = 0,
    RM_SOFTWARE = 1,
    RM_HARDWARE = 2,
} RENDER_MODE;

typedef enum {
    AM_4_3  = 0,
    AM_16_9 = 1,
    AM_ANY  = 2,
} ASPECT_MODE;

typedef enum {
    TAM_DISABLED      = 0,
    TAM_BILINEAR_ONLY = 1,
    TAM_ALWAYS        = 2,
} TEX_ADJUST_MODE;

typedef struct __unaligned {
    DISPLAY_ADAPTER_NODE *preferred_display_adapter;
    SOUND_ADAPTER_NODE *preferred_sound_adapter;
    JOYSTICK_NODE *preferred_joystick;
    const DISPLAY_MODE_NODE *video_mode;
    RENDER_MODE render_mode;
    int32_t window_width;
    int32_t window_height;
    ASPECT_MODE aspect_mode;
    bool perspective_correct;
    bool dither;
    bool zbuffer;
    bool bilinear_filtering;
    bool triple_buffering;
    bool fullscreen;
    bool sound_enabled;
    bool lara_mic;
    bool joystick_enabled;
    bool disable_16bit_textures;
    bool dont_sort_primitives;
    bool flip_broken;
    bool disable_fmv;
    TEX_ADJUST_MODE texel_adjust_mode;
    int32_t nearest_adjustment;
    int32_t linear_adjustment;
} APP_SETTINGS;

typedef struct __unaligned {
    LPDDS sysMemSurface;
    LPDDS vidMemSurface;
    LPDIRECTDRAWPALETTE palette;
    LPDIRECT3DTEXTURE2 texture3d;
    HWR_TEXTURE_HANDLE texHandle;
    int32_t width;
    int32_t height;
    int32_t status;
} TEXPAGE_DESC;

typedef struct __unaligned {
    uint8_t red;
    uint8_t green;
    uint8_t blue;
} RGB_888;

typedef struct __unaligned {
    uint8_t red;
    uint8_t green;
    uint8_t blue;
    uint8_t alpha;
} RGBA_8888;

typedef struct {
    struct {
        uint32_t r;
        uint32_t g;
        uint32_t b;
        uint32_t a;
    } mask, depth, offset;
} COLOR_BIT_MASKS;

typedef struct __unaligned {
    D3DCOLOR clr[4][4];
} GOURAUD_FILL;

typedef struct __unaligned {
    D3DCOLOR clr[9];
} GOURAUD_OUTLINE;

typedef struct __unaligned {
    uint8_t index[256];
} DEPTHQ_ENTRY;

typedef struct __unaligned {
    uint8_t index[32];
} GOURAUD_ENTRY;

typedef struct __unaligned {
    XYZ_32 pos;
    XYZ_16 rot;
} PHD_3DPOS;

typedef struct __unaligned {
    int32_t x;
    int32_t y;
    int32_t z;
    int32_t r;
} SPHERE;

typedef struct __unaligned {
    union {
        uint32_t all;
        struct {
            uint32_t active:     1;
            uint32_t flash:      1;
            uint32_t rotate_h:   1;
            uint32_t rotate_v:   1;
            uint32_t centre_h:   1;
            uint32_t centre_v:   1;
            uint32_t hide:       1;
            uint32_t right:      1;
            uint32_t bottom:     1;
            uint32_t background: 1;
            uint32_t outline:    1;
            uint32_t multiline:  1;
        };
    } flags;
    uint16_t text_flags;
    uint16_t bgnd_flags;
    uint16_t outl_flags;
    XYZ_16 pos;
    int16_t letter_spacing;
    int16_t word_spacing;
    struct {
        int16_t rate;
        int16_t count;
    } flash;
    int16_t bgnd_color;
    const uint16_t *bgnd_gour;
    int16_t outl_color;
    const uint16_t *outl_gour;
    struct {
        int16_t x;
        int16_t y;
    } bgnd_size;
    XYZ_16 bgnd_off;
    struct {
        int32_t h;
        int32_t v;
    } scale;
    char *text;
} TEXTSTRING;

typedef struct __unaligned {
    float xv;
    float yv;
    float zv;
    float rhw;
    float xs;
    float ys;
    int16_t clip;
    int16_t g;
    int16_t u;
    int16_t v;
} PHD_VBUF;

typedef struct __unaligned {
    uint16_t u;
    uint16_t v;
} PHD_UV;

typedef struct __unaligned {
    uint16_t draw_type;
    uint16_t tex_page;
    PHD_UV uv[4];
} PHD_TEXTURE;

typedef struct __unaligned {
    uint16_t tex_page;
    uint16_t offset;
    uint16_t width;
    uint16_t height;
    int16_t x0;
    int16_t y0;
    int16_t x1;
    int16_t y1;
} PHD_SPRITE;

typedef enum {
    SHAPE_SPRITE = 1,
    SHAPE_LINE   = 2,
    SHAPE_BOX    = 3,
    SHAPE_FBOX   = 4,
} SHAPE;

typedef enum {
    SPRF_RGB       = 0x00FFFFFF,
    SPRF_ABS       = 0x01000000,
    SPRF_SEMITRANS = 0x02000000,
    SPRF_SCALE     = 0x04000000,
    SPRF_SHADE     = 0x08000000,
    SPRF_TINT      = 0x10000000,
    SPRF_BLEND_ADD = 0x20000000,
    SPRF_BLEND_SUB = 0x40000000,
    SPRF_BLEND_QRT = SPRF_BLEND_ADD | SPRF_BLEND_SUB,
    SPRF_BLEND     = SPRF_BLEND_QRT,
    SPRF_ITEM      = 0x80000000,
} SPRITE_FLAG;

typedef struct __unaligned {
    float xv;
    float yv;
    float zv;
    float rhw;
    float xs;
    float ys;
    float u;
    float v;
    float g;
} POINT_INFO;

typedef struct __unaligned {
    float x;
    float y;
    float rhw;
    float u;
    float v;
    float g;
} VERTEX_INFO;

typedef enum { // decompiled
    INPUT_ROLE_FORWARD     = 0,
    INPUT_ROLE_BACK        = 1,
    INPUT_ROLE_LEFT        = 2,
    INPUT_ROLE_RIGHT       = 3,
    INPUT_ROLE_STEP_LEFT   = 4,
    INPUT_ROLE_STEP_RIGHT  = 5,
    INPUT_ROLE_SLOW        = 6,
    INPUT_ROLE_JUMP        = 7,
    INPUT_ROLE_ACTION      = 8,
    INPUT_ROLE_DRAW_WEAPON = 9,
    INPUT_ROLE_FLARE       = 10,
    INPUT_ROLE_LOOK        = 11,
    INPUT_ROLE_ROLL        = 12,
    INPUT_ROLE_OPTION      = 13,
} INPUT_ROLE;

typedef struct __unaligned {
    uint16_t no_selector : 1;
    uint16_t ready : 1; // not present in the OG
    uint16_t pad : 14;
    uint16_t items_count;
    uint16_t selected;
    uint16_t visible_count;
    uint16_t line_offset;
    uint16_t line_old_offset;
    uint16_t pix_width;
    uint16_t line_height;
    int16_t x_pos;
    int16_t y_pos;
    int16_t z_pos;
    uint16_t item_string_len;
    char *pitem_strings1;
    char *pitem_strings2;
    uint32_t *pitem_flags1;
    uint32_t *pitem_flags2;
    uint32_t heading_flags1;
    uint32_t heading_flags2;
    uint32_t background_flags;
    uint32_t moreup_flags;
    uint32_t moredown_flags;
    uint32_t item_flags1[24]; // MAX_REQUESTER_ITEMS
    uint32_t item_flags2[24]; // MAX_REQUESTER_ITEMS
    TEXTSTRING *heading_text1;
    TEXTSTRING *heading_text2;
    TEXTSTRING *background_text;
    TEXTSTRING *moreup_text;
    TEXTSTRING *moredown_text;
    TEXTSTRING *item_texts1[24]; // MAX_REQUESTER_ITEMS
    TEXTSTRING *item_texts2[24]; // MAX_REQUESTER_ITEMS
    char heading_string1[32];
    char heading_string2[32];
    uint32_t render_width;
    uint32_t render_height;
} REQUEST_INFO;

typedef enum {
    POLY_GTMAP        = 0,
    POLY_WGTMAP       = 1,
    POLY_GTMAP_PERSP  = 2,
    POLY_WGTMAP_PERSP = 3,
    POLY_LINE         = 4,
    POLY_FLAT         = 5,
    POLY_GOURAUD      = 6,
    POLY_TRANS        = 7,
    POLY_SPRITE       = 8,
    POLY_HWR_GTMAP    = 9,
    POLY_HWR_WGTMAP   = 10,
    POLY_HWR_GOURAUD  = 11,
    POLY_HWR_LINE     = 12,
    POLY_HWR_TRANS    = 13,
} POLY_TYPE;

typedef struct __unaligned {
    uint32_t best_time[10];
    uint32_t best_finish[10];
    uint32_t finish_count;
} ASSAULT_STATS;

typedef struct __unaligned {
    int32_t _0;
    int32_t _1;
} SORT_ITEM;

typedef enum {
    ST_AVG_Z = 0,
    ST_MAX_Z = 1,
    ST_FAR_Z = 2,
} SORT_TYPE;

typedef enum {
    DRAW_OPAQUE    = 0,
    DRAW_COLOR_KEY = 1,
} DRAW_TYPE;

typedef struct __unaligned { // decompiled
    int32_t floor;
    int32_t ceiling;
    int32_t type;
} COLL_SIDE;

typedef struct __unaligned { // decompiled
    COLL_SIDE side_mid;
    COLL_SIDE side_front;
    COLL_SIDE side_left;
    COLL_SIDE side_right;
    int32_t radius;
    int32_t bad_pos;
    int32_t bad_neg;
    int32_t bad_ceiling;
    XYZ_32 shift;
    XYZ_32 old;
    int16_t old_anim_state;
    int16_t old_anim_num;
    int16_t old_frame_num;
    int16_t facing;
    int16_t quadrant;
    int16_t coll_type;
    int16_t *trigger;
    int8_t x_tilt;
    int8_t z_tilt;
    int8_t hit_by_baddie;
    int8_t hit_static;
    uint16_t slopes_are_walls:   1; // 0x01 1
    uint16_t slopes_are_pits:    1; // 0x02 2
    uint16_t lava_is_pit:        1; // 0x04 4
    uint16_t enable_baddie_push: 1; // 0x08 8
    uint16_t enable_spaz:        1; // 0x10 16
    uint16_t hit_ceiling:        1; // 0x20 32
    uint16_t pad:                10;
} COLL_INFO;

typedef struct __unaligned { // decompiled
    int16_t min_x;
    int16_t max_x;
    int16_t min_y;
    int16_t max_y;
    int16_t min_z;
    int16_t max_z;
} BOUNDS_16;

typedef struct __unaligned {
    int16_t mesh_idx;
    uint16_t flags;
    BOUNDS_16 draw_bounds;
    BOUNDS_16 collision_bounds;
} STATIC_INFO;

typedef struct __unaligned { // decompiled
    int32_t floor;
    uint32_t touch_bits;
    uint32_t mesh_bits;
    int16_t object_id;
    int16_t current_anim_state;
    int16_t goal_anim_state;
    int16_t required_anim_state;
    int16_t anim_num;
    int16_t frame_num;
    int16_t room_num;
    int16_t next_item;
    int16_t next_active;
    int16_t speed;
    int16_t fall_speed;
    int16_t hit_points;
    int16_t box_num;
    int16_t timer;
    uint16_t flags;
    int16_t shade_1;
    int16_t shade_2;
    int16_t carried_item;
    void *data;
    union {
        struct {
            XYZ_32 pos;
            XYZ_16 rot;
        };
        PHD_3DPOS pos_full; // TODO: stick to pos and rot
    };
    uint16_t active:        1; // 0x0001
    uint16_t status:        2; // 0x0002…0x0004
    uint16_t gravity:       1; // 0x0008
    uint16_t hit_status:    1; // 0x0010
    uint16_t collidable:    1; // 0x0020
    uint16_t looked_at:     1; // 0x0040
    uint16_t dynamic_light: 1; // 0x0080
    uint16_t killed:        1; // 0x0100
    uint16_t pad:           7; // 0x0200…0x8000
} ITEM;

typedef struct __unaligned {
    uint32_t timer;
    uint32_t shots;
    uint32_t hits;
    uint32_t distance;
    uint16_t kills;
    uint8_t secrets;
    uint8_t medipacks;
} STATISTICS_INFO;

typedef struct __unaligned {
    uint16_t pistol_ammo;
    uint16_t magnum_ammo;
    uint16_t uzi_ammo;
    uint16_t shotgun_ammo;
    uint16_t m16_ammo;
    uint16_t grenade_ammo;
    uint16_t harpoon_ammo;
    uint8_t small_medipacks;
    uint8_t large_medipacks;
    uint8_t reserved1;
    uint8_t flares;
    uint8_t gun_status;
    uint8_t gun_type;
    uint16_t available:   1; // 0x01 1
    uint16_t has_pistols: 1; // 0x02 2
    uint16_t has_magnums: 1; // 0x04 4
    uint16_t has_uzis:    1; // 0x08 8
    uint16_t has_shotgun: 1; // 0x10 16
    uint16_t has_m16:     1; // 0x20 32
    uint16_t has_grenade: 1; // 0x40 64
    uint16_t has_harpoon: 1; // 0x80 128
    uint16_t pad : 8;
    uint16_t reserved2;
    STATISTICS_INFO statistics;
} START_INFO;

typedef struct __unaligned {
    START_INFO start[24];
    STATISTICS_INFO statistics;
    int16_t current_level;
    bool bonus_flag;
    uint8_t num_pickup[2];
    uint8_t num_puzzle[4];
    uint8_t num_key[4];
    uint16_t reserved;
    uint8_t buffer[6272];
} SAVEGAME_INFO;

typedef struct __unaligned { // decompiled
    uint16_t idx;
    int16_t box;
    uint8_t pit_room;
    int8_t floor;
    uint8_t sky_room;
    int8_t ceiling;
} SECTOR;

typedef struct __unaligned {
    int16_t lock_angles[4];
    int16_t left_angles[4];
    int16_t right_angles[4];
    int16_t aim_speed;
    int16_t shot_accuracy;
    int32_t gun_height;
    int32_t damage;
    int32_t target_dist;
    int16_t recoil_frame;
    int16_t flash_time;
    int16_t sample_num;
} WEAPON_INFO;

typedef struct __unaligned { // decompiled
    XYZ_32 pos;
    XYZ_16 rot;
    int16_t room_num;
    int16_t object_id;
    int16_t next_free;
    int16_t next_active;
    int16_t speed;
    int16_t fall_speed;
    int16_t frame_num;
    int16_t counter;
    int16_t shade;
} FX;

typedef struct __unaligned {
    int16_t zone_num;
    int16_t enemy_zone_num;
    int32_t distance;
    int32_t ahead;
    int32_t bite;
    int16_t angle;
    int16_t enemy_facing;
} AI_INFO;

typedef struct __unaligned { // decompiled
    int16_t exit_box;
    uint16_t search_num;
    int16_t next_expansion;
    int16_t box_num;
} BOX_NODE;

typedef struct __unaligned { // decompiled
    BOX_NODE *node;
    int16_t head;
    int16_t tail;
    uint16_t search_num;
    uint16_t block_mask;
    int16_t step;
    int16_t drop;
    int16_t fly;
    int16_t zone_count;
    int16_t target_box;
    int16_t required_box;
    XYZ_32 target;
} LOT_INFO;

typedef enum { // decompiled
    GFL_NO_LEVEL  = -1,
    GFL_TITLE     = 0,
    GFL_NORMAL    = 1,
    GFL_SAVED     = 2,
    GFL_DEMO      = 3,
    GFL_CUTSCENE  = 4,
    GFL_STORY     = 5,
    GFL_QUIET     = 6,
    GFL_MID_STORY = 7,
} GAMEFLOW_LEVEL_TYPE;

typedef struct __unaligned {
    int16_t timer;
    int16_t sprite;
} PICKUP_INFO;

typedef struct __unaligned {
    int16_t shape;
    XYZ_16 pos;
    int32_t param1;
    int32_t param2;
    void *grdptr;
    int16_t sprite_num;
} INVENTORY_SPRITE;

typedef struct __unaligned {
    char *string;
    int16_t object_id;
    int16_t frames_total;
    int16_t current_frame;
    int16_t goal_frame;
    int16_t open_frame;
    int16_t anim_direction;
    int16_t anim_speed;
    int16_t anim_count;
    int16_t x_rot_pt_sel;
    int16_t x_rot_pt;
    int16_t x_rot_sel;
    int16_t x_rot_nosel;
    int16_t x_rot;
    int16_t y_rot_sel;
    int16_t y_rot;
    int32_t y_trans_sel;
    int32_t y_trans;
    int32_t z_trans_sel;
    int32_t z_trans;
    uint32_t meshes_sel;
    uint32_t meshes_drawn;
    int16_t inv_pos;
    INVENTORY_SPRITE **sprite_list;
    int32_t reserved[4];
} INVENTORY_ITEM;

typedef enum {
    RNG_OPENING           = 0,
    RNG_OPEN              = 1,
    RNG_CLOSING           = 2,
    RNG_MAIN2OPTION       = 3,
    RNG_MAIN2KEYS         = 4,
    RNG_KEYS2MAIN         = 5,
    RNG_OPTION2MAIN       = 6,
    RNG_SELECTING         = 7,
    RNG_SELECTED          = 8,
    RNG_DESELECTING       = 9,
    RNG_DESELECT          = 10,
    RNG_CLOSING_ITEM      = 11,
    RNG_EXITING_INVENTORY = 12,
    RNG_DONE              = 13,
} RING_STATUS;

typedef struct __unaligned {
    int16_t count;
    int16_t status;
    int16_t status_target;
    int16_t radius_target;
    int16_t radius_rate;
    int16_t camera_y_target;
    int16_t camera_y_rate;
    int16_t camera_pitch_target;
    int16_t camera_pitch_rate;
    int16_t rotate_target;
    int16_t rotate_rate;
    int16_t item_pt_x_rot_target;
    int16_t item_pt_x_rot_rate;
    int16_t item_x_rot_target;
    int16_t item_x_rot_rate;
    int32_t item_y_trans_target;
    int32_t item_y_trans_rate;
    int32_t item_z_trans_target;
    int32_t item_z_trans_rate;
    int32_t misc;
} IMOTION_INFO;

typedef enum {
    PM_SPINE    = 1,
    PM_FRONT    = 2,
    PM_IN_FRONT = 4,
    PM_PAGE_2   = 8,
    PM_BACK     = 16,
    PM_IN_BACK  = 32,
    PM_PAGE_1   = 64,
    PM_COMMON   = PM_SPINE | PM_BACK | PM_FRONT,
} PASS_MESH;

typedef struct __unaligned {
    INVENTORY_ITEM **list;
    int16_t type;
    int16_t radius;
    int16_t camera_pitch;
    int16_t rotating;
    int16_t rot_count;
    int16_t current_object;
    int16_t target_object;
    int16_t number_of_objects;
    int16_t angle_adder;
    int16_t rot_adder;
    int16_t rot_adder_l;
    int16_t rot_adder_r;
    PHD_3DPOS ring_pos;
    PHD_3DPOS camera;
    XYZ_32 light;
    IMOTION_INFO *imo;
} RING_INFO;

typedef enum {
    GFE_PICTURE          = 0,
    GFE_LIST_START       = 1,
    GFE_LIST_END         = 2,
    GFE_PLAY_FMV         = 3,
    GFE_START_LEVEL      = 4,
    GFE_CUTSCENE         = 5,
    GFE_LEVEL_COMPLETE   = 6,
    GFE_DEMO_PLAY        = 7,
    GFE_JUMP_TO_SEQ      = 8,
    GFE_END_SEQ          = 9,
    GFE_SET_TRACK        = 10,
    GFE_SUNSET           = 11,
    GFE_LOADING_PIC      = 12,
    GFE_DEADLY_WATER     = 13,
    GFE_REMOVE_WEAPONS   = 14,
    GFE_GAME_COMPLETE    = 15,
    GFE_CUT_ANGLE        = 16,
    GFE_NO_FLOOR         = 17,
    GFE_ADD_TO_INV       = 18,
    GFE_START_ANIM       = 19,
    GFE_NUM_SECRETS      = 20,
    GFE_KILL_TO_COMPLETE = 21,
    GFE_REMOVE_AMMO      = 22,
} GF_EVENTS;

typedef enum { // decompiled
    MOOD_BORED  = 0,
    MOOD_ATTACK = 1,
    MOOD_ESCAPE = 2,
    MOOD_STALK  = 3,
} MOOD_TYPE;

typedef enum {
    TARGET_NONE      = 0,
    TARGET_PRIMARY   = 1,
    TARGET_SECONDARY = 2,
} TARGET_TYPE;

typedef struct __unaligned {
    XYZ_32 pos;
    int32_t mesh_num;
} BITE;

typedef struct __unaligned { // decompiled
    int16_t *frame_ptr;
    int16_t interpolation;
    int16_t current_anim_state;
    int32_t velocity;
    int32_t acceleration;
    int16_t frame_base;
    int16_t frame_end;
    int16_t jump_anim_num;
    int16_t jump_frame_num;
    int16_t num_changes;
    int16_t change_idx;
    int16_t num_commands;
    int16_t command_idx;
} ANIM;

typedef struct { // decompiled
    int16_t goal_anim_state;
    int16_t num_ranges;
    int16_t range_idx;
} ANIM_CHANGE;

typedef struct { // decompiled
    int16_t start_frame;
    int16_t end_frame;
    int16_t link_anim_num;
    int16_t link_frame_num;
} ANIM_RANGE;

typedef struct __unaligned { // decompiled
    int16_t room;
    XYZ_16 normal;
    XYZ_16 vertex[4];
} PORTAL;

typedef struct __unaligned { // decompiled
    int16_t count;
    PORTAL portal[];
} PORTALS;

typedef struct __unaligned { // decompiled
    int32_t x;
    int32_t y;
    int32_t z;
    int16_t intensity_1;
    int16_t intensity_2;
    int32_t falloff_1;
    int32_t falloff_2;
} LIGHT;

typedef struct __unaligned { // decompiled
    XYZ_16 pos;
    struct __unaligned {
        int16_t y;
    } rot;
    int16_t shade_1;
    int16_t shade_2;
    int16_t static_num;
} MESH;

typedef enum {
    RF_UNDERWATER  = 0x01,
    RF_OUTSIDE     = 0x08,
    RF_DYNAMIC_LIT = 0x10,
    RF_INSIDE      = 0x40,
} ROOM_FLAG;

typedef struct __unaligned {
    SECTOR *sector;
    SECTOR data;
    int16_t block;
} DOORPOS_DATA;

typedef struct __unaligned { // decompiled
    int16_t *data;
    PORTALS *portals;
    SECTOR *sectors;
    LIGHT *lights;
    MESH *meshes;
    XYZ_32 pos;
    int32_t min_floor;
    int32_t max_ceiling;
    struct __unaligned {
        int16_t z;
        int16_t x;
    } size;
    int16_t ambient_1;
    int16_t ambient_2;
    int16_t light_mode;
    int16_t num_lights;
    int16_t num_meshes;
    int16_t bound_left;
    int16_t bound_right;
    int16_t bound_top;
    int16_t bound_bottom;
    uint16_t bound_active;
    int16_t test_left;
    int16_t test_right;
    int16_t test_top;
    int16_t test_bottom;
    int16_t item_num;
    int16_t fx_num;
    int16_t flipped_room;
    uint16_t flags;
} ROOM;

typedef struct __unaligned { // decompiled
    int16_t head_rotation;
    int16_t neck_rotation;
    int16_t maximum_turn;
    uint16_t flags;
    int16_t item_num;
    MOOD_TYPE mood;
    LOT_INFO lot;
    XYZ_32 target;
    ITEM *enemy;
} CREATURE;

typedef enum {
    CAM_CHASE     = 0,
    CAM_FIXED     = 1,
    CAM_LOOK      = 2,
    CAM_COMBAT    = 3,
    CAM_CINEMATIC = 4,
    CAM_HEAVY     = 5,
} CAMERA_TYPE;

typedef struct __unaligned {
    union {
        XYZ_32 pos;
        struct {
            int32_t x;
            int32_t y;
            int32_t z;
        };
    };
    int16_t room_num;
    int16_t box_num;
} GAME_VECTOR;

typedef struct __unaligned {
    int32_t x;
    int32_t y;
    int32_t z;
    int16_t data;
    int16_t flags;
} OBJECT_VECTOR;

typedef struct __unaligned {
    uint8_t left;
    uint8_t right;
    uint8_t top;
    uint8_t bottom;
    int16_t height;
    int16_t overlap_index;
} BOX_INFO;

typedef enum {
    LV_GYM   = 0,
    LV_FIRST = 1,
} LEVEL_TYPE;

typedef enum {
    RT_MAIN   = 0,
    RT_OPTION = 1,
    RT_KEYS   = 2,
} RING_TYPE;

typedef enum {
    INV_COLOR_BLACK      = 0,
    INV_COLOR_GRAY       = 1,
    INV_COLOR_WHITE      = 2,
    INV_COLOR_RED        = 3,
    INV_COLOR_ORANGE     = 4,
    INV_COLOR_YELLOW     = 5,
    INV_COLOR_DARK_GREEN = 12,
    INV_COLOR_GREEN      = 13,
    INV_COLOR_CYAN       = 14,
    INV_COLOR_BLUE       = 15,
    INV_COLOR_MAGENTA    = 16,
    INV_COLOR_NUMBER_OF  = 17,
} INV_COLOR;

typedef enum {
    INV_GAME_MODE  = 0,
    INV_TITLE_MODE = 1,
    INV_KEYS_MODE  = 2,
    INV_SAVE_MODE  = 3,
    INV_LOAD_MODE  = 4,
    INV_DEATH_MODE = 5,
} INVENTORY_MODE;

typedef enum {
    GAMEMODE_NOT_IN_GAME,
    GAMEMODE_IN_GAME,
    GAMEMODE_IN_DEMO,
    GAMEMODE_IN_CUTSCENE
} GAMEMODE;

typedef enum {
    GFD_START_GAME       = 0x0000,
    GFD_START_SAVED_GAME = 0x0100,
    GFD_START_CINE       = 0x0200,
    GFD_START_FMV        = 0x0300,
    GFD_START_DEMO       = 0x0400,
    GFD_EXIT_TO_TITLE    = 0x0500,
    GFD_LEVEL_COMPLETE   = 0x0600,
    GFD_EXIT_GAME        = 0x0700,
    GFD_EXIT_TO_OPTION   = 0x0800,
    GFD_TITLE_DESELECT   = 0x0900,
    GFD_OVERRIDE         = 0x0A00,
} GAME_FLOW_DIR;

typedef struct __unaligned {
    int32_t first_option;
    int32_t title_replace;
    int32_t on_death_demo_mode;
    int32_t on_death_in_game;
    int32_t no_input_time;
    int32_t on_demo_interrupt;
    int32_t on_demo_end;
    uint16_t reserved1[18];
    uint16_t num_levels;
    uint16_t num_pictures;
    uint16_t num_titles;
    uint16_t num_fmvs;
    uint16_t num_cutscenes;
    uint16_t num_demos;
    uint16_t title_track;
    int16_t single_level;
    uint16_t reserved2[16];

    uint16_t demo_version:              1; // 0x0001
    uint16_t title_disabled:            1; // 0x0002
    uint16_t cheat_mode_check_disabled: 1; // 0x0004
    uint16_t no_input_timeout:          1; // 0x0008
    uint16_t load_save_disabled:        1; // 0x0010
    uint16_t screen_sizing_disabled:    1; // 0x0020
    uint16_t lockout_option_ring:       1; // 0x0040
    uint16_t dozy_cheat_enabled:        1; // 0x0080
    uint16_t cyphered_strings:          1; // 0x0100
    uint16_t gym_enabled:               1; // 0x0200
    uint16_t play_any_level:            1; // 0x0400
    uint16_t cheat_enable:              1; // 0x0800

    uint16_t reserved3[3];
    uint8_t cypher_code;
    uint8_t language;
    uint8_t secret_track;
    uint8_t level_complete_track;
    uint16_t reserved4[2];
} GAME_FLOW;

typedef struct __unaligned { // decompiled
    int16_t mesh_count;
    int16_t mesh_idx;
    int32_t bone_idx;
    int16_t *frame_base; // TODO: make me FRAME_INFO

    void (*initialise)(int16_t item_num);
    void (*control)(int16_t item_num);
    void (*floor)(
        const ITEM *item, int32_t x, int32_t y, int32_t z,
        int32_t *height);
    void (*ceiling)(
        const ITEM *item, int32_t x, int32_t y, int32_t z,
        int32_t *height);
    void (*draw_routine)(const ITEM *item);
    void (*collision)(int16_t
        item_num, ITEM *lara_item, COLL_INFO *coll);

    int16_t anim_idx;
    int16_t hit_points;
    int16_t pivot_length;
    int16_t radius;
    int16_t shadow_size;

    union {
        uint16_t flags;
        struct {
            uint16_t loaded:           1; // 0x01 1
            uint16_t intelligent:      1; // 0x02 2
            uint16_t save_position:    1; // 0x04 4
            uint16_t save_hitpoints:   1; // 0x08 8
            uint16_t save_flags:       1; // 0x10 16
            uint16_t save_anim:        1; // 0x20 32
            uint16_t semi_transparent: 1; // 0x40 64
            uint16_t water_creature:   1; // 0x80 128
            uint16_t pad : 8;
        };
    };
} OBJECT;

typedef struct __unaligned {
    GAME_VECTOR pos;
    GAME_VECTOR target;
    CAMERA_TYPE type;
    int32_t shift;
    uint32_t flags;
    int32_t fixed_camera;
    int32_t num_frames;
    int32_t bounce;
    int32_t underwater;
    int32_t target_distance;
    int32_t target_square;
    int16_t target_angle;
    int16_t actual_angle;
    int16_t target_elevation;
    int16_t box;
    int16_t num;
    int16_t last;
    int16_t timer;
    int16_t speed;
    ITEM *item;
    ITEM *last_item;
    OBJECT_VECTOR *fixed;
    int32_t is_lara_mic;
    XYZ_32 mic_pos;
} CAMERA_INFO;

typedef struct __unaligned { // decompiled
    int16_t *frame_base;
    int16_t frame_num;
    int16_t anim_num;
    int16_t lock;
    struct __unaligned {
        int16_t y;
        int16_t x;
        int16_t z;
    } rot; // TODO: XYZ_16
    int16_t flash_gun;
} LARA_ARM;

typedef struct __unaligned { // decompiled
    int32_t ammo;
} AMMO_INFO;

typedef enum { // decompiled
    LWS_ABOVE_WATER = 0,
    LWS_UNDERWATER = 1,
    LWS_SURFACE = 2,
    LWS_CHEAT = 3,
    LWS_WADE = 4,
} LARA_WATER_STATE;

typedef struct __unaligned { // decompiled
    int16_t item_num;
    int16_t gun_status;
    int16_t gun_type;
    int16_t request_gun_type;
    int16_t last_gun_type;
    int16_t calc_fallspeed;
    int16_t water_status;
    int16_t climb_status;
    int16_t pose_count;
    int16_t hit_frame;
    int16_t hit_direction;
    int16_t air;
    int16_t dive_count;
    int16_t death_timer;
    int16_t current_active;
    int16_t spaz_effect_count;
    int16_t flare_age;
    int16_t skidoo;
    int16_t weapon_item;
    int16_t back_gun;
    int16_t flare_frame;
    uint16_t flare_control_left:  1; // 0x01 1
    uint16_t flare_control_right: 1; // 0x02 2
    uint16_t extra_anim:          1; // 0x04 4
    uint16_t look:                1; // 0x08 8
    uint16_t burn:                1; // 0x10 16
    uint16_t pad:                 11;
    int32_t water_surface_dist;
    XYZ_32 last_pos;
    FX *spaz_effect;
    uint32_t mesh_effects;
    int16_t *mesh_ptrs[15];
    ITEM *target;
    int16_t target_angles[2];
    int16_t turn_rate;
    int16_t move_angle;
    int16_t head_y_rot;
    int16_t head_x_rot;
    int16_t head_z_rot;
    int16_t torso_y_rot;
    int16_t torso_x_rot;
    int16_t torso_z_rot;
    LARA_ARM left_arm;
    LARA_ARM right_arm;
    AMMO_INFO pistol_ammo;
    AMMO_INFO magnum_ammo;
    AMMO_INFO uzi_ammo;
    AMMO_INFO shotgun_ammo;
    AMMO_INFO harpoon_ammo;
    AMMO_INFO grenade_ammo;
    AMMO_INFO m16_ammo;
    CREATURE *creature;
} LARA_INFO;

typedef enum {
    SFX_LARA_FEET = 0,
    SFX_LARA_CLIMB2 = 1,
    SFX_LARA_NO = 2,
    SFX_LARA_SLIPPING = 3,
    SFX_LARA_LAND = 4,
    SFX_LARA_CLIMB1 = 5,
    SFX_LARA_DRAW = 6,
    SFX_LARA_HOLSTER = 7,
    SFX_LARA_FIRE = 8,
    SFX_LARA_RELOAD = 9,
    SFX_LARA_RICOCHET = 10,
    SFX_LARA_FLARE_IGNITE = 11,
    SFX_LARA_FLARE_BURN = 12,
    SFX_LARA_HARPOON_FIRE = 15,
    SFX_LARA_HARPOON_LOAD = 16,
    SFX_LARA_WET_FEET = 17,
    SFX_LARA_WADE = 18,
    SFX_LARA_TREAD = 20,
    SFX_LARA_FIRE_MAGNUMS = 21,
    SFX_LARA_HARPOON_LOAD_WATER = 22,
    SFX_LARA_HARPOON_FIRE_WATER = 23,
    SFX_MASSIVE_CRASH = 24,
    SFX_PUSH_SWITCH = 25,
    SFX_LARA_CLIMB3 = 26,
    SFX_LARA_BODYSL = 27,
    SFX_LARA_SHIMMY = 28,
    SFX_LARA_JUMP = 29,
    SFX_LARA_FALL = 30,
    SFX_LARA_INJURY = 31,
    SFX_LARA_ROLL = 32,
    SFX_LARA_SPLASH = 33,
    SFX_LARA_GETOUT = 34,
    SFX_LARA_SWIM = 35,
    SFX_LARA_BREATH = 36,
    SFX_LARA_BUBBLES = 37,
    SFX_LARA_SWITCH = 38,
    SFX_LARA_KEY = 39,
    SFX_LARA_OBJECT = 40,
    SFX_LARA_GENERAL_DEATH = 41,
    SFX_LARA_KNEES_DEATH = 42,
    SFX_LARA_UZI_FIRE = 43,
    SFX_LARA_UZI_STOP = 44,
    SFX_LARA_SHOTGUN = 45,
    SFX_LARA_BLOCK_PUSH1 = 46,
    SFX_LARA_BLOCK_PUSH2 = 47,
    SFX_CLICK = 48,
    SFX_LARA_HIT = 49,
    SFX_LARA_BULLETHIT = 50,
    SFX_LARA_BLKPULL = 51,
    SFX_LARA_FLOATING = 52,
    SFX_LARA_FALLDETH = 53,
    SFX_LARA_GRABHAND = 54,
    SFX_LARA_GRABBODY = 55,
    SFX_LARA_GRABFEET = 56,
    SFX_LARA_SWITCHUP = 57,
    SFX_GLASS_BREAK = 58,
    SFX_WATER_LOOP = 59,
    SFX_UNDERWATER = 60,
    SFX_UNDERWATER_SWITCH = 61,
    SFX_LARA_PICKUP = 62,
    SFX_BLOCK_SOUND = 63,
    SFX_DOOR = 64,
    SFX_SWING = 65,
    SFX_ROCK_FALL_CRUMBLE = 66,
    SFX_ROCK_FALL_LAND = 67,
    SFX_ROCK_FALL_SOLID = 68,
    SFX_ENEMY_FEET = 69,
    SFX_ENEMY_GRUNT = 70,
    SFX_ENEMY_HIT1 = 71,
    SFX_ENEMY_HIT2 = 72,
    SFX_ENEMY_DEATH1 = 73,
    SFX_ENEMY_JUMP = 74,
    SFX_ENEMY_CLIMBUP = 75,
    SFX_ENEMY_CLIMBDOWN = 76,
    SFX_WEAPON_CLATTER = 77,
    SFX_M16_FIRE = 78,
    SFX_WATERFALL_LOOP = 79,
    SFX_SWORD_STATUE_DROP = 80,
    SFX_SWORD_STATUE_LIFT = 81,
    SFX_PORTCULLIS_UP = 82,
    SFX_PORTCULLIS_DOWN = 83,
    SFX_DOG_FEET1 = 84,
    SFX_BODY_SLAM = 85,
    SFX_DOG_BARK1 = 86,
    SFX_DOG_FEET2 = 87,
    SFX_DOG_BARK2 = 88,
    SFX_DOG_DEATH = 89,
    SFX_DOG_PANT = 90,
    SFX_LEOPARD_FEET = 91,
    SFX_LEOPARD_ROAR = 92,
    SFX_LEOPARD_BITE = 93,
    SFX_LEOPARD_STRIKE = 94,
    SFX_LEOPARD_DEATH = 95,
    SFX_LEOPARD_GROWL = 96,
    SFX_RAT_ATTACK = 97,
    SFX_RAT_DEATH = 98,
    SFX_TIGER_ROAR = 99,
    SFX_TIGER_BITE = 100,
    SFX_TIGER_STRIKE = 101,
    SFX_TIGER_DEATH = 102,
    SFX_TIGER_GROWL = 103,
    SFX_M16_STOP = 104,
    SFX_EXPLOSION1 = 105,
    SFX_GROWL = 106,
    SFX_SPIDER_JUMP = 107,
    SFX_MENU_ROTATE = 108,
    SFX_MENU_LARA_HOME = 109,
    SFX_MENU_SPININ = 111,
    SFX_MENU_SPINOUT = 112,
    SFX_MENU_STOPWATCH = 113,
    SFX_MENU_GUNS = 114,
    SFX_MENU_PASSPORT = 115,
    SFX_MENU_MEDI = 116,
    SFX_ENEMY_HEELS = 117,
    SFX_ENEMY_FIRE_SILENCER = 118,
    SFX_ENEMY_AH_DYING = 119,
    SFX_ENEMY_OOH_DYING = 120,
    SFX_ENEMY_THUMP = 121,
    SFX_SPIDER_MOVING = 122,
    SFX_LARA_MINI_LOAD = 123,
    SFX_LARA_MINI_LOCK = 124,
    SFX_LARA_MINI_FIRE = 125,
    SFX_SPIDER_BITE = 126,
    SFX_SLAM_DOOR_SLIDE = 127,
    SFX_SLAM_DOOR_CLOSE = 128,
    SFX_EAGLE_SQUAWK = 129,
    SFX_EAGLE_WING_FLAP = 130,
    SFX_EAGLE_DEATH = 131,
    SFX_CROW_CAW = 132,
    SFX_CROW_WING_FLAP = 133,
    SFX_CROW_DEATH = 134,
    SFX_CROW_ATTACK = 135,
    SFX_ENEMY_GUN_COCKING = 136,
    SFX_ENEMY_FIRE1 = 137,
    SFX_ENEMY_FIRE_TWIRL = 138,
    SFX_ENEMY_HOLSTER = 139,
    SFX_ENEMY_BREATH1 = 140,
    SFX_ENEMY_CHUCKLE = 141,
    SFX_MONK_POY = 142,
    SFX_MONK_DEATH = 143,
    SFX_LARA_SPIKE_DEATH = 145,
    SFX_LARA_DEATH3 = 146,
    SFX_ROLLING_BALL = 147,
    SFX_SANDBAG_SNAP = 148,
    SFX_SANDBAG_HIT = 149,
    SFX_LOOP_FOR_SMALL_FIRES = 150,
    SFX_SKIDOO_START = 152,
    SFX_SKIDOO_IDLE = 153,
    SFX_SKIDOO_ACCELERATE = 154,
    SFX_SKIDOO_MOVING = 155,
    SFX_SKIDOO_STOP = 156,
    SFX_ENEMY_FIRE2 = 157,
    SFX_ENEMY_DEATH2 = 158,
    SFX_ENEMY_BREATH2 = 159,
    SFX_STICK_TAP = 160,
    SFX_TRAPDOOR_OPEN = 161,
    SFX_TRAPDOOR_CLOSE = 162,
    SFX_YETI_GROWL = 163,
    SFX_YETI_CHEST_BEAT = 164,
    SFX_YETI_THUMP = 165,
    SFX_YETI_GRUNT1 = 166,
    SFX_YETI_SCREAM = 167,
    SFX_YETI_DEATH = 168,
    SFX_YETI_GROWL1 = 169,
    SFX_YETI_GROWL2 = 170,
    SFX_YETI_GRUNT2 = 171,
    SFX_YETI_GROWL3 = 172,
    SFX_YETI_FEET = 173,
    SFX_ENEMY_HEAVY_BREATH = 174,
    SFX_ENEMY_FLAMETHROWER_FIRE = 175,
    SFX_ENEMY_FLAMETHROWER_SCRAPE = 176,
    SFX_ENEMY_FLAMETHROWER_CLICK = 177,
    SFX_ENEMY_FLAMETHROWER_DEATH = 178,
    SFX_ENEMY_FLAMETHROWER_FALL = 179,
    SFX_ENEMY_BELT_JINGLE = 180,
    SFX_ENEMY_WRENCH = 181,
    SFX_FOOTSTEP = 182,
    SFX_FOOTSTEP_HIT = 183,
    SFX_ENEMY_COCKING_SHOTGUN = 184,
    SFX_SCUBA_DIVER_FLIPPER = 186,
    SFX_SCUBA_DIVER_BREATH = 188,
    SFX_PULLEY_CRANE = 190,
    SFX_CURTAIN = 191,
    SFX_SCUBA_DIVER_DEATH = 192,
    SFX_SCUBA_DIVER_DIVING = 193,
    SFX_BOAT_START = 194,
    SFX_BOAT_IDLE = 195,
    SFX_BOAT_ACCELERATE = 196,
    SFX_BOAT_MOVING = 197,
    SFX_BOAT_STOP = 198,
    SFX_BOAT_SLOW_DOWN = 199,
    SFX_BOAT_HIT = 200,
    SFX_CLATTER_1 = 201,
    SFX_CLATTER_2 = 202,
    SFX_CLATTER_3 = 203,
    SFX_DOOR_SLIDE = 204,
    SFX_LARA_FLESH_WOUND = 205,
    SFX_SAW_REVVING = 206,
    SFX_SAW_STOP = 207,
    SFX_DOOR_CHIME = 208,
    SFX_CHAIN_CREAK_SNAP = 209,
    SFX_SWINGING = 210,
    SFX_BREAKING1 = 211,
    SFX_PULLEY_MOVE = 212,
    SFX_AIRPLANE_IDLE = 213,
    SFX_UNDERWATER_FAN_ON = 215,
    SFX_SMALL_FAN_ON = 217,
    SFX_SWINGING_BOX_BAG = 218,
    SFX_JUMP_PAD_UP = 219,
    SFX_JUMP_PAD_DOWN = 220,
    SFX_BREAKING2 = 221,
    SFX_SNOWBALL_ROLL = 222,
    SFX_SNOWBALL_STOP = 223,
    SFX_ROLLING = 224,
    SFX_ROLLING_STOP1 = 225,
    SFX_ROLLING_STOP2 = 226,
    SFX_ROLLING2 = 227,
    SFX_ROLLING2_HIT = 228,
    SFX_SIDE_BLADE_SWING = 229,
    SFX_SIDE_BLADE_BACK = 230,
    SFX_ROLLING_BLADE = 231,
    SFX_ICILE_DETACH = 232,
    SFX_ICICLE_HIT = 233,
    SFX_ROTATING_HANDLE_LOOSE = 234,
    SFX_ROTATING_HANDLE_TURN = 235,
    SFX_ROTATING_HANDLE_OPEN = 236,
    SFX_ROTATING_HANDLE_CREAK = 237,
    SFX_MONK_FEET = 238,
    SFX_MONK_SWORD_SWING1 = 239,
    SFX_MONK_SWORD_SWING2 = 240,
    SFX_MONK_SHOUT1 = 241,
    SFX_MONK_SHOUT2 = 242,
    SFX_MONK_SHOUT3 = 243,
    SFX_MONK_SHOUT4 = 244,
    SFX_MONK_CRUNCH = 245,
    SFX_MONK_BREATH = 246,
    SFX_SPLASH_SURFACE = 247,
    SFX_WATERFALL1 = 248,
    SFX_ENEMY_FEET_SNOW = 249,
    SFX_ENEMY_FIRE3 = 250,
    SFX_ENEMY_FIRE_SEMIAUTO = 251,
    SFX_ENEMY_DEATH3 = 252,
    SFX_ENEMY_DEATH4 = 253,
    SFX_CIRCLE_BLADE = 254,
    SFX_KNIFETHROWER_FEET = 255,
    SFX_MONK_OYE = 256,
    SFX_MONK_AWEH = 257,
    SFX_CIRCLE_BLADE_HIT = 258,
    SFX_KNIFETHROWER_WARRIOR_FEET = 259,
    SFX_WARRIOR_BLADE_SWING1 = 260,
    SFX_WARRIOR_BLADE_SWING2 = 261,
    SFX_WARRIOR_GROWL = 262,
    SFX_KNIFETHROWER_HICCUP = 263,
    SFX_WARROPR_BURP = 264,
    SFX_WARRIOR_GROWL1 = 265,
    SFX_WARRIOR_WAKE = 267,
    SFX_WARRIOR_GROWL2 = 268,
    SFX_SMALL_SWITCH = 269,
    SFX_CHAIN_PULLEY = 278,
    SFX_DEATH_SLIDE_GRAB = 279,
    SFX_DEATH_SLIDE_GO = 280,
    SFX_DEATH_SLIDE_STOP = 281,
    SFX_BODY_SLUMP = 282,
    SFX_BOWL_TIPPING = 283,
    SFX_BOWL_POUR = 284,
    SFX_WATERFALL2 = 285,
    SFX_ELEVATOR_OPEN = 286,
    SFX_ELEVATOR_CLOSE = 287,
    SFX_MINISUB_CLATTER1 = 288,
    SFX_MINISUB_CLATTER2 = 289,
    SFX_MINISUB_CLATTER3 = 290,
    SFX_BIRD_MONSTER_SCREAM = 291,
    SFX_BIRD_MONSTER_GASP = 292,
    SFX_BIRD_MONSTER_BREATH = 293,
    SFX_BIRD_MONSTER_FEET = 294,
    SFX_BIRD_MONSTER_DEATH = 295,
    SFX_BIRD_MONSTER_SCRAPE = 296,
    SFX_HELICOPTER_LOOP = 297,
    SFX_DRAGON_FEET = 298,
    SFX_DRAGON_GROWL1 = 299,
    SFX_DRAGON_GROWL2 = 300,
    SFX_DRAGON_FALL = 301,
    SFX_DRAGON_BREATH = 302,
    SFX_DRAGON_GROWL3 = 303,
    SFX_DRAGON_GRUNT = 304,
    SFX_DRAGON_FIRE = 305,
    SFX_DRAGON_LEG_LIFT = 306,
    SFX_DRAGON_LEG_HIT = 307,
    SFX_WARRIOR_BLADE_SWING3 = 308,
    SFX_WARRIOR_BLADE_SWING_FAST = 309,
    SFX_WARRIOR_BREATH_ACTIVE = 311,
    SFX_WARRIOR_HOVER = 312,
    SFX_WARRIOR_LANDING = 313,
    SFX_WARRIOR_SWORD_CLANK = 314,
    SFX_WARRIOR_SWORD_SLICE = 315,
    SFX_BIRDS_CHIRP = 316,
    SFX_CRUNCH1 = 317,
    SFX_CRUNCH2 = 318,
    SFX_DOOR_CREAK = 319,
    SFX_BREAKING3 = 320,
    SFX_BIG_SPIDER_SNARL = 321,
    SFX_BIG_SPIDER_FEET = 322,
    SFX_BIG_SPIDER_DEATH = 323,
    SFX_T_REX_ROAR = 324,
    SFX_T_REX_FEET = 325,
    SFX_T_REX_GROWL1 = 326,
    SFX_T_REX_DEATH = 327,
    SFX_DRIPS_REVERB = 329,
    SFX_STAGE_BACKDROP = 330,
    SFX_STONE_DOOR_SLIDE = 331,
    SFX_PLATFORM_ALARM = 332,
    SFX_TICK_TOCK = 333,
    SFX_DOORBELL = 334,
    SFX_BURGLAR_ALARM = 335,
    SFX_BOAT_ENGINE = 336,
    SFX_BOAT_INTO_WATER = 337,
    SFX_UNKNOWN1 = 338,
    SFX_UNKNOWN2 = 339,
    SFX_UNKNOWN3 = 340,
    SFX_MARCO_BARTOLLI_TRANSFORM = 341,
    SFX_WINSTON_SHUFFLE = 342,
    SFX_WINSTON_FEET = 343,
    SFX_WINSTON_GRUNT1 = 344,
    SFX_WINSTON_GRUNT2 = 345,
    SFX_WINSTON_GRUNT3 = 346,
    SFX_WINSTON_CUPS = 347,
    SFX_BRITTLE_GROUND_BREAK = 348,
    SFX_SPIDER_EXPLODE = 349,
    SFX_SHARK_BITE = 350,
    SFX_LAVA_BUBBLES = 351,
    SFX_EXPLOSION2 = 352,
    SFX_BURGLARS = 353,
    SFX_ZIPPER = 354,
    SFX_NUMBER_OF = 370,
} SOUND_EFFECT_ID;

typedef enum {
    SPM_NORMAL     = 0,
    SPM_UNDERWATER = 1,
    SPM_ALWAYS     = 2,
    SPM_PITCH      = 4,
} SOUND_PLAY_MODE;

typedef enum {
    CF_NORMAL        = 0,
    CF_FOLLOW_CENTRE = 1,
    CF_NO_CHUNKY     = 2,
    CF_CHASE_OBJECT  = 3,
} CAMERA_FLAGS;

typedef enum {
    FBBOX_MIN_X = 0,
    FBBOX_MAX_X = 1,
    FBBOX_MIN_Y = 2,
    FBBOX_MAX_Y = 3,
    FBBOX_MIN_Z = 4,
    FBBOX_MAX_Z = 5,
    FBBOX_X     = 6,
    FBBOX_Y     = 7,
    FBBOX_Z     = 8,
    FBBOX_ROT   = 9,
} FRAME_BBOX_INFO;

typedef enum {
    BF_MATRIX_POP  = 1,
    BF_MATRIX_PUSH = 2,
    BF_ROT_X       = 4,
    BF_ROT_Y       = 8,
    BF_ROT_Z       = 16,
} BONE_FLAGS;

typedef struct __unaligned {
    int16_t tx;
    int16_t ty;
    int16_t tz;
    int16_t cx;
    int16_t cy;
    int16_t cz;
    int16_t fov;
    int16_t roll;
} CINE_FRAME;

typedef enum { // decompiled
    IF_ONE_SHOT  = 0x0100,
    IF_CODE_BITS = 0x3E00,
    IF_REVERSE   = 0x4000,
    IF_INVISIBLE = 0x0100,
    IF_KILLED    = 0x8000,
} ITEM_FLAG;

typedef enum { // decompiled
    IS_INACTIVE    = 0,
    IS_ACTIVE      = 1,
    IS_DEACTIVATED = 2,
    IS_INVISIBLE   = 3,
} ITEM_STATUS;

typedef struct __unaligned {
    uint16_t key[14]; // INPUT_ROLE_NUMBER_OF
} CONTROL_LAYOUT;

typedef enum { // decompiled
    IN_FORWARD     = 0x00000001,
    IN_BACK        = 0x00000002,
    IN_LEFT        = 0x00000004,
    IN_RIGHT       = 0x00000008,
    IN_JUMP        = 0x00000010,
    IN_DRAW        = 0x00000020,
    IN_ACTION      = 0x00000040,
    IN_SLOW        = 0x00000080,
    IN_OPTION      = 0x00000100,
    IN_LOOK        = 0x00000200,
    IN_STEP_LEFT   = 0x00000400,
    IN_STEP_RIGHT  = 0x00000800,
    IN_ROLL        = 0x00001000,
    IN_PAUSE       = 0x00002000,
    IN_RESERVED1   = 0x00004000,
    IN_RESERVED2   = 0x00008000,
    IN_DOZY_CHEAT  = 0x00010000,
    IN_STUFF_CHEAT = 0x00020000,
    IN_DEBUG_INFO  = 0x00040000,
    IN_FLARE       = 0x00080000,
    IN_SELECT      = 0x00100000,
    IN_DESELECT    = 0x00200000,
    IN_SAVE        = 0x00400000,
    IN_LOAD        = 0x00800000,
} INPUT_STATE;

typedef enum { // decompiled
    LA_RUN                                   = 0,
    LA_WALK_FORWARD                          = 1,
    LA_WALK_STOP_RIGHT                       = 2,
    LA_WALK_STOP_LEFT                        = 3,
    LA_WALK_TO_RUN_RIGHT                     = 4,
    LA_WALK_TO_RUN_LEFT                      = 5,
    LA_RUN_START                             = 6,
    LA_RUN_TO_WALK_RIGHT                     = 7,
    LA_RUN_TO_STAND_LEFT                     = 8,
    LA_RUN_TO_WALK_LEFT                      = 9,
    LA_RUN_TO_STAND_RIGHT                    = 10,
    LA_STAND_STILL                           = 11,
    LA_TURN_RIGHT_SLOW                       = 12,
    LA_TURN_LEFT_SLOW                        = 13,
    LA_JUMP_FORWARD_LAND_START               = 14,
    LA_JUMP_FORWARD_LAND_END_UNUSED          = 15,
    LA_RUN_JUMP_RIGHT_START                  = 16,
    LA_RUN_JUMP_RIGHT_CONTINUE               = 17,
    LA_RUN_JUMP_LEFT_START                   = 18,
    LA_RUN_JUMP_LEFT_CONTINUE                = 19,
    LA_WALK_FORWARD_START                    = 20,
    LA_WALK_FORWARD_START_CONTINUE           = 21,
    LA_JUMP_FORWARD_TO_FREEFALL              = 22,
    LA_FREEFALL                              = 23,
    LA_FREEFALL_LAND                         = 24,
    LA_FREEFALL_LAND_DEATH                   = 25,
    LA_STAND_TO_JUMP_UP                      = 26,
    LA_STAND_TO_JUMP_UP_CONTINUE             = 27,
    LA_JUMP_UP                               = 28,
    LA_JUMP_UP_TO_HANG                       = 29,
    LA_JUMP_UP_TO_FREEFALL                   = 30,
    LA_JUMP_UP_LAND                          = 31,
    LA_SMASH_JUMP                            = 32,
    LA_SMASH_JUMP_CONTINUE                   = 33,
    LA_FALL_START                            = 34,
    LA_FALL                                  = 35,
    LA_FALL_TO_FREEFALL                      = 36,
    LA_HANG_TO_FREEFALL                      = 37,
    LA_WALK_BACK_END_RIGHT                   = 38,
    LA_WALK_BACK_END_LEFT                    = 39,
    LA_WALK_BACK                             = 40,
    LA_WALK_BACK_START                       = 41,
    LA_CLIMB_3CLICK                          = 42,
    LA_CLIMB_3CLICK_END_TO_RUN               = 43,
    LA_TURN_RIGHT                            = 44,
    LA_JUMP_FORWARD_TO_FREEFALL_2            = 45,
    LA_REACH_TO_FREEFALL                     = 46,
    LA_ROLL_ALTERNATE                        = 47,
    LA_ROLL_END_ALTERNATE                    = 48,
    LA_JUMP_FORWARD_END_TO_FREEFALL          = 49,
    LA_CLIMB_2CLICK                          = 50,
    LA_CLIMB_2CLICK_END                      = 51,
    LA_CLIMB_2CLICK_END_TO_RUN               = 52,
    LA_WALL_SMASH_LEFT                       = 53,
    LA_WALL_SMASH_RIGHT                      = 54,
    LA_RUN_UP_STEP_RIGHT                     = 55,
    LA_RUN_UP_STEP_LEFT                      = 56,
    LA_WALK_UP_STEP_RIGHT                    = 57,
    LA_WALK_UP_STEP_LEFT                     = 58,
    LA_WALK_DOWN_LEFT                        = 59,
    LA_WALK_DOWN_RIGHT                       = 60,
    LA_WALK_DOWN_BACK_LEFT                   = 61,
    LA_WALK_DOWN_BACK_RIGHT                  = 62,
    LA_WALLSWITCH_DOWN                       = 63,
    LA_WALLSWITCH_UP                         = 64,
    LA_SIDESTEP_LEFT                         = 65,
    LA_SIDESTEP_LEFT_END                     = 66,
    LA_SIDESTEP_RIGHT                        = 67,
    LA_SIDESTEP_RIGHT_END                    = 68,
    LA_ROTATE_LEFT                           = 69,
    LA_SLIDE_FORWARD                         = 70,
    LA_SLIDE_FORWARD_END                     = 71,
    LA_SLIDE_FORWARD_STOP                    = 72,
    LA_STAND_TO_JUMP                         = 73,
    LA_JUMP_BACK_START                       = 74,
    LA_JUMP_BACK                             = 75,
    LA_JUMP_FORWARD_START                    = 76,
    LA_JUMP_FORWARD                          = 77,
    LA_JUMP_LEFT_START                       = 78,
    LA_JUMP_LEFT                             = 79,
    LA_JUMP_RIGHT_START                      = 80,
    LA_JUMP_RIGHT                            = 81,
    LA_LAND                                  = 82,
    LA_JUMP_BACK_TO_FREEFALL                 = 83,
    LA_JUMP_LEFT_TO_FREEFALL                 = 84,
    LA_JUMP_RIGHT_TO_FREEFALL                = 85,
    LA_UNDERWATER_SWIM_FORWARD               = 86,
    LA_UNDERWATER_SWIM_FORWARD_DRIFT         = 87,
    LA_SMALL_JUMP_BACK_START                 = 88,
    LA_SMALL_JUMP_BACK                       = 89,
    LA_SMALL_JUMP_BACK_END                   = 90,
    LA_JUMP_UP_START                         = 91,
    LA_LAND_TO_RUN                           = 92,
    LA_FALL_BACK                             = 93,
    LA_JUMP_FORWARD_TO_REACH                 = 94,
    LA_REACH                                 = 95,
    LA_REACH_TO_HANG                         = 96,
    LA_CLIMB_ON                              = 97,
    LA_REACH_TO_FREEFALL_2                   = 98,
    LA_FALL_CROUCHING_LANDING                = 99,
    LA_JUMP_FORWARD_TO_REACH_LATE            = 100,
    LA_JUMP_FORWARD_START_TO_REACH_ALTERNATE = 101,
    LA_CLIMB_ON_END                          = 102,
    LA_STAND_IDLE                            = 103,
    LA_SLIDE_BACKWARD_START                  = 104,
    LA_SLIDE_BACKWARD                        = 105,
    LA_SLIDE_BACKWARD_END                    = 106,
    LA_UNDERWATER_SWIM_TO_IDLE               = 107,
    LA_UNDERWATER_IDLE                       = 108,
    LA_UNDERWARER_IDLE_TO_SWIM               = 109,
    LA_ONWATER_IDLE                          = 110,
    LA_ONWATER_TO_STAND_HIGH                 = 111,
    LA_FREEFALL_TO_UNDERWATER                = 112,
    LA_ONWATER_DIVE_ALTERNATE                = 113,
    LA_UNDERWATER_TO_ONWATER                 = 114,
    LA_ONWATER_SWIM_FORWARD_DIVE             = 115,
    LA_ONWATER_SWIM_FORWARD                  = 116,
    LA_ONWATER_SWIM_FORWARD_TO_IDLE          = 117,
    LA_ONWATER_IDLE_TO_SWIM_FORWARD          = 118,
    LA_ONWATER_DIVE                          = 119,
    LA_PUSHABLE_GRAB                         = 120,
    LA_PUSHABLE_RELEASE                      = 121,
    LA_PUSHABLE_PULL                         = 122,
    LA_PUSHABLE_PUSH                         = 123,
    LA_UNDERWATER_DEATH                      = 124,
    LA_HIT_FRONT                             = 125,
    LA_HIT_BACK                              = 126,
    LA_HIT_LEFT                              = 127,
    LA_HIT_RIGHT                             = 128,
    LA_UNDERWATER_SWITCH                     = 129,
    LA_UNDERWATER_PICKUP                     = 130,
    LA_USE_KEY                               = 131,
    LA_ONWATER_DEATH                         = 132,
    LA_RUN_DEATH                             = 133,
    LA_USE_PUZZLE                            = 134,
    LA_PICKUP                                = 135,
    LA_SHIMMY_LEFT                           = 136,
    LA_SHIMMY_RIGHT                          = 137,
    LA_STAND_DEATH                           = 138,
    LA_BOULDER_DEATH                         = 139,
    LA_ONWATER_IDLE_TO_SWIM_BACK             = 140,
    LA_ONWATER_SWIM_BACK                     = 141,
    LA_ONWATER_SWIM_BACK_TO_IDLE             = 142,
    LA_ONWATER_SWIM_LEFT                     = 143,
    LA_ONWATER_SWIM_RIGHT                    = 144,
    LA_DEATH_JUMP                            = 145,
    LA_ROLL_START                            = 146,
    LA_ROLL_CONTINUE                         = 147,
    LA_ROLL_END                              = 148,
    LA_SPIKE_DEATH                           = 149,
    LA_REACH_TO_THIN_LEDGE                   = 150,
    LA_SWANDIVE_ROLL                         = 151,
    LA_SWANDIVE_TO_UNDERWATER                = 152,
    LA_FREEFALL_SWANDIVE                     = 153,
    LA_FREEFALL_SWANDIVE_TO_UNDERWATER       = 154,
    LA_SWANDIVE_DEATH                        = 155,
    LA_SWANDIVE_LEFT                         = 156,
    LA_SWANDIVE_RIGHT                        = 157,
    LA_SWANDIVE_START                        = 158,
    LA_CLIMB_ON_HANDSTAND                    = 159,
    LA_STAND_TO_LADDER                       = 160,
    LA_LADDER_UP                             = 161,
    LA_LADDER_UP_STOP_RIGHT                  = 162,
    LA_LADDER_UP_STOP_LEFT                   = 163,
    LA_LADDER_IDLE                           = 164,
    LA_LADDER_UP_START                       = 165,
    LA_LADDER_DOWN_STOP_LEFT                 = 166,
    LA_LADDER_DOWN_STOP_RIGHT                = 167,
    LA_LADDER_DOWN                           = 168,
    LA_LADDER_DOWN_START                     = 169,
    LA_LADDER_RIGHT                          = 170,
    LA_LADDER_LEFT                           = 171,
    LA_LADDER_HANG                           = 172,
    LA_LADDER_HANG_TO_IDLE                   = 173,
    LA_LADDER_CLIMB_ON                       = 174,
    LA_UNKNOWN                               = 175,
    LA_ONWATER_TO_WADE_SHALLOW               = 176,
    LA_WADE                                  = 177,
    LA_RUN_TO_WADE_LEFT                      = 178,
    LA_RUN_TO_WADE_RIGHT                     = 179,
    LA_WADE_TO_RUN_LEFT                      = 180,
    LA_WADE_TO_RUN_RIGHT                     = 181,
    LA_LADDER_BACKFLIP_START                 = 182,
    LA_LADDER_BACKFLIP_CONTINUE              = 183,
    LA_WADE_TO_STAND_RIGHT                   = 184,
    LA_WADE_TO_STAND_LEFT                    = 185,
    LA_STAND_TO_WADE                         = 186,
    LA_LADDER_UP_HANGING                     = 187,
    LA_LADDER_DOWN_HANGING                   = 188,
    LA_FLARE_THROW                           = 189,
    LA_ONWATER_TO_WADE                       = 190,
    LA_ONWATER_TO_STAND_MEDIUM               = 191,
    LA_UNDERWATER_TO_STAND                   = 192,
    LA_ONWATER_TO_WADE_LOW                   = 193,
    LA_LADDER_TO_HANG_DOWN                   = 194,
    LA_SWITCH_SMALL_DOWN                     = 195,
    LA_SWITCH_SMALL_UP                       = 196,
    LA_BUTTON_PUSH                           = 197,
    LA_UNDERWATER_SWIM_TO_STILL_HUDDLE       = 198,
    LA_UNDERWATER_SWIM_TO_STILL_SPRAWL       = 199,
    LA_UNDERWATER_SWIM_TO_STILL_MEDIUM       = 200,
    LA_LADDER_TO_HANG_RIGHT                  = 201,
    LA_LADDER_TO_HANG_LEFT                   = 202,
    LA_UNDERWATER_ROLL_START                 = 203,
    LA_FLARE_PICKUP                          = 204,
    LA_UNDERWATER_ROLL_END                   = 205,
    LA_UNDERWATER_FLARE_PICKUP               = 206,
    LA_RUN_JUMP_ROLL_START                   = 207,
    LA_SOMERSAULT                            = 208,
    LA_RUN_JUMP_ROLL_END                     = 209,
    LA_JUMP_FORWARD_ROLL_START               = 210,
    LA_JUMP_FORWARD_ROLL_END                 = 211,
    LA_JUMP_BACK_ROLL_START                  = 212,
    LA_JUMP_BACK_ROLL_END                    = 213,
    LA_KICK                                  = 214,
    LA_ZIPLINE_GRAB                          = 215,
    LA_ZIPLINE_RIDE                          = 216,
    LA_ZIPLINE_FALL                          = 217,
} LARA_ANIMATION;

typedef enum { // decompiled
    LA_EXTRA_BREATH      = 0,
    LA_EXTRA_PLUNGER     = 1,
    LA_EXTRA_YETI_KILL   = 2,
    LA_EXTRA_SHARK_KILL  = 3,
    LA_EXTRA_AIRLOCK     = 4,
    LA_EXTRA_GONG_BONG   = 5,
    LA_EXTRA_DINO_KILL   = 6,
    LA_EXTRA_PULL_DAGGER = 7,
    LA_EXTRA_START_ANIM  = 8,
    LA_EXTRA_START_HOUSE = 9,
    LA_EXTRA_FINAL_ANIM  = 10,
} LARA_EXTRA_ANIMATION;

typedef enum { // decompiled
    LS_WALK         = 0,
    LS_RUN          = 1,
    LS_STOP         = 2,
    LS_FORWARD_JUMP = 3,
    LS_POSE         = 4,
    LS_FAST_BACK    = 5,
    LS_TURN_RIGHT   = 6,
    LS_TURN_LEFT    = 7,
    LS_DEATH        = 8,
    LS_FAST_FALL    = 9,
    LS_HANG         = 10,
    LS_REACH        = 11,
    LS_SPLAT        = 12,
    LS_TREAD        = 13,
    LS_LAND         = 14,
    LS_COMPRESS     = 15,
    LS_BACK         = 16,
    LS_SWIM         = 17,
    LS_GLIDE        = 18,
    LS_NULL         = 19,
    LS_FAST_TURN    = 20,
    LS_STEP_RIGHT   = 21,
    LS_STEP_LEFT    = 22,
    LS_HIT          = 23,
    LS_SLIDE        = 24,
    LS_BACK_JUMP    = 25,
    LS_RIGHT_JUMP   = 26,
    LS_LEFT_JUMP    = 27,
    LS_UP_JUMP      = 28,
    LS_FALL_BACK    = 29,
    LS_HANG_LEFT    = 30,
    LS_HANG_RIGHT   = 31,
    LS_SLIDE_BACK   = 32,
    LS_SURF_TREAD   = 33,
    LS_SURF_SWIM    = 34,
    LS_DIVE         = 35,
    LS_PUSH_BLOCK   = 36,
    LS_PULL_BLOCK   = 37,
    LS_PP_READY     = 38,
    LS_PICKUP       = 39,
    LS_SWITCH_ON    = 40,
    LS_SWITCH_OFF   = 41,
    LS_USE_KEY      = 42,
    LS_USE_PUZZLE   = 43,
    LS_UW_DEATH     = 44,
    LS_ROLL         = 45,
    LS_SPECIAL      = 46,
    LS_SURF_BACK    = 47,
    LS_SURF_LEFT    = 48,
    LS_SURF_RIGHT   = 49,
    LS_USE_MIDAS    = 50,
    LS_DIE_MIDAS    = 51,
    LS_SWAN_DIVE    = 52,
    LS_FAST_DIVE    = 53,
    LS_GYMNAST      = 54,
    LS_WATER_OUT    = 55,
    LS_CLIMB_STANCE = 56,
    LS_CLIMBING     = 57,
    LS_CLIMB_LEFT   = 58,
    LS_CLIMB_END    = 59,
    LS_CLIMB_RIGHT  = 60,
    LS_CLIMB_DOWN   = 61,
    LS_LARA_TEST1   = 62,
    LS_LARA_TEST2   = 63,
    LS_LARA_TEST3   = 64,
    LS_WADE         = 65,
    LS_WATER_ROLL   = 66,
    LS_FLARE_PICKUP = 67,
    LS_TWIST        = 68,
    LS_KICK         = 69,
    LS_DEATH_SLIDE  = 70,
    LS_DUCK         = 71,
    LS_DUCK_ROLL    = 72,
    LS_DASH         = 73,
    LS_DASH_DIVE    = 74,
    LS_MONKEY_SWING = 75,
    LS_MONKEYF      = 76,
    LS_LAST         = 77,
} LARA_STATE;

typedef enum { // decompiled
    LGS_ARMLESS = 0,
    LGS_HANDS_BUSY = 1,
    LGS_DRAW = 2,
    LGS_UNDRAW = 3,
    LGS_READY = 4,
    LGS_SPECIAL = 5,
} LARA_GUN_STATE;

typedef enum { // decompiled
    LGT_UNARMED = 0,
    LGT_PISTOLS = 1,
    LGT_MAGNUMS = 2,
    LGT_UZIS    = 3,
    LGT_SHOTGUN = 4,
    LGT_M16     = 5,
    LGT_GRENADE = 6,
    LGT_HARPOON = 7,
    LGT_FLARE   = 8 ,
    LGT_SKIDOO  = 9,
    NUM_WEAPONS = 10,
} LARA_GUN_TYPE;

typedef enum { // decompiled
    LM_HIPS      = 0,
    LM_THIGH_L   = 1,
    LM_CALF_L    = 2,
    LM_FOOT_L    = 3,
    LM_THIGH_R   = 4,
    LM_CALF_R    = 5,
    LM_FOOT_R    = 6,
    LM_TORSO     = 7,
    LM_UARM_R    = 8,
    LM_LARM_R    = 9,
    LM_HAND_R    = 10,
    LM_UARM_L    = 11,
    LM_LARM_L    = 12,
    LM_HAND_L    = 13,
    LM_HEAD      = 14,
    LM_NUMBER_OF = 15,
} LARA_MESH;

typedef enum { // decompiled
    NO_OBJECT               = -1,
    O_LARA                  = 0,
    O_LARA_PISTOLS          = 1,
    O_LARA_HAIR             = 2,
    O_LARA_SHOTGUN          = 3,
    O_LARA_MAGNUMS          = 4,
    O_LARA_UZIS             = 5,
    O_LARA_M16              = 6,
    O_LARA_GRENADE          = 7,
    O_LARA_HARPOON          = 8,
    O_LARA_FLARE            = 9,
    O_LARA_SKIDOO           = 10,
    O_LARA_BOAT             = 11,
    O_LARA_EXTRA            = 12,
    O_SKIDOO_FAST           = 13,
    O_BOAT                  = 14,
    O_DOG                   = 15,
    O_CULT_1                = 16,
    O_CULT_1A               = 17,
    O_CULT_1B               = 18,
    O_CULT_2                = 19,
    O_CULT_3                = 20,
    O_MOUSE                 = 21,
    O_DRAGON_FRONT          = 22,
    O_DRAGON_BACK           = 23,
    O_GONDOLA               = 24,
    O_SHARK                 = 25,
    O_EEL                   = 26,
    O_BIG_EEL               = 27,
    O_BARRACUDA             = 28,
    O_DIVER                 = 29,
    O_WORKER_1              = 30,
    O_WORKER_2              = 31,
    O_WORKER_3              = 32,
    O_WORKER_4              = 33,
    O_WORKER_5              = 34,
    O_JELLY                 = 35,
    O_SPIDER                = 36,
    O_BIG_SPIDER            = 37,
    O_CROW                  = 38,
    O_TIGER                 = 39,
    O_BARTOLI               = 40,
    O_XIAN_SPEARMAN         = 41,
    O_XIAN_SPEARMAN_STATUE  = 42,
    O_XIAN_KNIGHT           = 43,
    O_XIAN_KNIGHT_STATUE    = 44,
    O_YETI                  = 45,
    O_GIANT_YETI            = 46,
    O_EAGLE                 = 47,
    O_BANDIT_1              = 48,
    O_BANDIT_2              = 49,
    O_BANDIT_2B             = 50,
    O_SKIDOO_ARMED          = 51,
    O_SKIDMAN               = 52,
    O_MONK_1                = 53,
    O_MONK_2                = 54,
    O_FALLING_BLOCK_1       = 55,
    O_FALLING_BLOCK_2       = 56,
    O_FALLING_BLOCK_3       = 57,
    O_PENDULUM_1            = 58,
    O_SPIKES                = 59,
    O_ROLLING_BALL_1        = 60,
    O_DARTS                 = 61,
    O_DART_EMITTER          = 62,
    O_DRAWBRIDGE            = 63,
    O_TEETH_TRAP            = 64,
    O_LIFT                  = 65,
    O_GENERAL               = 66,
    O_MOVABLE_BLOCK_1       = 67,
    O_MOVABLE_BLOCK_2       = 68,
    O_MOVABLE_BLOCK_3       = 69,
    O_MOVABLE_BLOCK_4       = 70,
    O_BIG_BOWL              = 71,
    O_WINDOW_1              = 72,
    O_WINDOW_2              = 73,
    O_WINDOW_3              = 74,
    O_WINDOW_4              = 75,
    O_PROPELLER_1           = 76,
    O_POWER_SAW             = 77,
    O_HOOK                  = 78,
    O_FALLING_CEILING       = 79,
    O_SPINNING_BLADE        = 80,
    O_BLADE                 = 81,
    O_KILLER_STATUE         = 82,
    O_ROLLING_BALL_2        = 83,
    O_ICICLE                = 84,
    O_SPIKE_WALL            = 85,
    O_SPRING_BOARD          = 86,
    O_CEILING_SPIKES        = 87,
    O_BELL                  = 88,
    O_WATER_SPRITE          = 89,
    O_SNOW_SPRITE           = 90,
    O_SKIDOO_LARA           = 91,
    O_SWITCH_TYPE_1         = 92,
    O_SWITCH_TYPE_2         = 93,
    O_PROPELLER_2           = 94,
    O_PROPELLER_3           = 95,
    O_PENDULUM_2            = 96,
    O_MESH_SWAP_1           = 97,
    O_MESH_SWAP_2           = 98,
    O_LARA_SWAP             = 99,
    O_TEXT_BOX              = 100,
    O_ROLLING_BALL_3        = 101,
    O_DEATH_SLIDE           = 102,
    O_SWITCH_TYPE_3         = 103,
    O_SWITCH_TYPE_4         = 104,
    O_SWITCH_TYPE_5         = 105,
    O_DOOR_TYPE_1           = 106,
    O_DOOR_TYPE_2           = 107,
    O_DOOR_TYPE_3           = 108,
    O_DOOR_TYPE_4           = 109,
    O_DOOR_TYPE_5           = 110,
    O_DOOR_TYPE_6           = 111,
    O_DOOR_TYPE_7           = 112,
    O_DOOR_TYPE_8           = 113,
    O_TRAPDOOR_TYPE_1       = 114,
    O_TRAPDOOR_TYPE_2       = 115,
    O_TRAPDOOR_TYPE_3       = 116,
    O_BRIDGE_FLAT           = 117,
    O_BRIDGE_TILT_1         = 118,
    O_BRIDGE_TILT_2         = 119,
    O_PASSPORT_OPTION       = 120,
    O_COMPASS_OPTION        = 121,
    O_PHOTO_OPTION          = 122,
    O_PLAYER_1              = 123,
    O_PLAYER_2              = 124,
    O_PLAYER_3              = 125,
    O_PLAYER_4              = 126,
    O_PLAYER_5              = 127,
    O_PLAYER_6              = 128,
    O_PLAYER_7              = 129,
    O_PLAYER_8              = 130,
    O_PLAYER_9              = 131,
    O_PLAYER_10             = 132,
    O_PASSPORT_CLOSED       = 133,
    O_COMPASS_ITEM          = 134,
    O_PISTOL_ITEM           = 135,
    O_SHOTGUN_ITEM          = 136,
    O_MAGNUM_ITEM           = 137,
    O_UZI_ITEM              = 138,
    O_HARPOON_ITEM          = 139,
    O_M16_ITEM              = 140,
    O_GRENADE_ITEM          = 141,
    O_PISTOL_AMMO_ITEM      = 142,
    O_SHOTGUN_AMMO_ITEM     = 143,
    O_MAGNUM_AMMO_ITEM      = 144,
    O_UZI_AMMO_ITEM         = 145,
    O_HARPOON_AMMO_ITEM     = 146,
    O_M16_AMMO_ITEM         = 147,
    O_GRENADE_AMMO_ITEM     = 148,
    O_SMALL_MEDIPACK_ITEM   = 149,
    O_LARGE_MEDIPACK_ITEM   = 150,
    O_FLARES_ITEM           = 151,
    O_FLARE_ITEM            = 152,
    O_DETAIL_OPTION         = 153,
    O_SOUND_OPTION          = 154,
    O_CONTROL_OPTION        = 155,
    O_GAMMA_OPTION          = 156,
    O_PISTOL_OPTION         = 157,
    O_SHOTGUN_OPTION        = 158,
    O_MAGNUM_OPTION         = 159,
    O_UZI_OPTION            = 160,
    O_HARPOON_OPTION        = 161,
    O_M16_OPTION            = 162,
    O_GRENADE_OPTION        = 163,
    O_PISTOL_AMMO_OPTION    = 164,
    O_SHOTGUN_AMMO_OPTION   = 165,
    O_MAGNUM_AMMO_OPTION    = 166,
    O_UZI_AMMO_OPTION       = 167,
    O_HARPOON_AMMO_OPTION   = 168,
    O_M16_AMMO_OPTION       = 169,
    O_GRENADE_AMMO_OPTION   = 170,
    O_SMALL_MEDIPACK_OPTION = 171,
    O_LARGE_MEDIPACK_OPTION = 172,
    O_FLARES_OPTION         = 173,
    O_PUZZLE_ITEM_1         = 174,
    O_PUZZLE_ITEM_2         = 175,
    O_PUZZLE_ITEM_3         = 176,
    O_PUZZLE_ITEM_4         = 177,
    O_PUZZLE_OPTION_1       = 178,
    O_PUZZLE_OPTION_2       = 179,
    O_PUZZLE_OPTION_3       = 180,
    O_PUZZLE_OPTION_4       = 181,
    O_PUZZLE_HOLE_1         = 182,
    O_PUZZLE_HOLE_2         = 183,
    O_PUZZLE_HOLE_3         = 184,
    O_PUZZLE_HOLE_4         = 185,
    O_PUZZLE_DONE_1         = 186,
    O_PUZZLE_DONE_2         = 187,
    O_PUZZLE_DONE_3         = 188,
    O_PUZZLE_DONE_4         = 189,
    O_SECRET_1              = 190,
    O_SECRET_2              = 191,
    O_SECRET_3              = 192,
    O_KEY_ITEM_1            = 193,
    O_KEY_ITEM_2            = 194,
    O_KEY_ITEM_3            = 195,
    O_KEY_ITEM_4            = 196,
    O_KEY_OPTION_1          = 197,
    O_KEY_OPTION_2          = 198,
    O_KEY_OPTION_3          = 199,
    O_KEY_OPTION_4          = 200,
    O_KEY_HOLE_1            = 201,
    O_KEY_HOLE_2            = 202,
    O_KEY_HOLE_3            = 203,
    O_KEY_HOLE_4            = 204,
    O_PICKUP_ITEM_1         = 205,
    O_PICKUP_ITEM_2         = 206,
    O_PICKUP_OPTION_1       = 207,
    O_PICKUP_OPTION_2       = 208,
    O_SPHERE_OF_DOOM_1      = 209,
    O_SPHERE_OF_DOOM_2      = 210,
    O_SPHERE_OF_DOOM_3      = 211,
    O_ALARM_SOUND           = 212,
    O_BIRD_TWEETER_1        = 213,
    O_DINO                  = 214,
    O_BIRD_TWEETER_2        = 215,
    O_CLOCK_CHIMES          = 216,
    O_DRAGON_BONES_1        = 217,
    O_DRAGON_BONES_2        = 218,
    O_DRAGON_BONES_3        = 219,
    O_HOT_LIQUID            = 220,
    O_BOAT_BITS             = 221,
    O_MINE                  = 222,
    O_INV_BACKGROUND        = 223,
    O_FX_RESERVED           = 224,
    O_GONG_BONGER           = 225,
    O_DETONATOR_1           = 226,
    O_DETONATOR_2           = 227,
    O_COPTER                = 228,
    O_EXPLOSION             = 229,
    O_SPLASH                = 230,
    O_BUBBLES               = 231,
    O_BUBBLE_EMITTER        = 232,
    O_BLOOD                 = 233,
    O_DART_EFFECT           = 234,
    O_FLARE_FIRE            = 235,
    O_GLOW                  = 236,
    O_GLOW_RESERVED         = 237,
    O_RICOCHET              = 238,
    O_TWINKLE               = 239,
    O_GUN_FLASH             = 240,
    O_M16_FLASH             = 241,
    O_BODY_PART             = 242,
    O_CAMERA_TARGET         = 243,
    O_WATERFALL             = 244,
    O_MISSILE_HARPOON       = 245,
    O_MISSILE_FLAME         = 246,
    O_MISSILE_KNIFE         = 247,
    O_GRENADE               = 248,
    O_HARPOON_BOLT          = 249,
    O_EMBER                 = 250,
    O_EMBER_EMITTER         = 251,
    O_FLAME                 = 252,
    O_FLAME_EMITTER         = 253,
    O_SKYBOX                = 254,
    O_ALPHABET              = 255,
    O_DYING_MONK            = 256,
    O_DING_DONG             = 257,
    O_LARA_ALARM            = 258,
    O_MINI_COPTER           = 259,
    O_WINSTON               = 260,
    O_ASSAULT_DIGITS        = 261,
    O_FINAL_LEVEL_COUNTER   = 262,
    O_CUT_SHOTGUN           = 263,
    O_EARTHQUAKE            = 264,
    O_NUMBER_OF             = 265,
} GAME_OBJECT_ID;

typedef enum {
    MX_INACTIVE                = -1,
    MX_UNUSED_0                = 0, // 2.mp3
    MX_UNUSED_1                = 1, // 2.mp3
    MX_CUTSCENE_THE_GREAT_WALL = 2, // 2.mp3
    MX_UNUSED_2                = 3, // 2.mp3
    MX_CUTSCENE_OPERA_HOUSE    = 4, // 3.mp3
    MX_CUTSCENE_BROTHER_CHAN   = 5, // 4.mp3
    MX_GYM_HINT_1              = 6, // 5.mp3
    MX_GYM_HINT_2              = 7, // 6.mp3
    MX_GYM_HINT_3              = 8, // 7.mp3
    MX_GYM_HINT_4              = 9, // 8.mp3
    MX_GYM_HINT_5              = 10, // 9.mp3
    MX_GYM_HINT_6              = 11, // 10.mp3
    MX_GYM_HINT_7              = 12, // 11.mp3
    MX_GYM_HINT_8              = 13, // 12.mp3
    MX_GYM_HINT_9              = 14, // 13.mp3
    MX_GYM_HINT_10             = 15, // 14.mp3
    MX_GYM_HINT_11             = 16, // 15.mp3
    MX_GYM_HINT_12             = 17, // 16.mp3
    MX_GYM_HINT_13             = 18, // 17.mp3
    MX_GYM_HINT_14             = 19, // 18.mp3
    MX_UNUSED_3                = 20, // 18.mp3
    MX_UNUSED_4                = 21, // 18.mp3
    MX_GYM_HINT_15             = 22, // 19.mp3
    MX_GYM_HINT_16             = 23, // 20.mp3
    MX_GYM_HINT_17             = 24, // 21.mp3
    MX_GYM_HINT_18             = 25, // 22.mp3
    MX_UNUSED_5                = 26, // 23.mp3
    MX_CUTSCENE_BATH           = 27, // 23.mp3
    MX_DAGGER_PULL             = 28, // 24.mp3
    MX_GYM_HINT_20             = 29, // 25.mp3
    MX_CUTSCENE_XIAN           = 30, // 26.mp3
    MX_CAVES_AMBIENCE          = 31, // 27.mp3
    MX_SEWERS_AMBIENCE         = 32, // 28.mp3
    MX_WINDY_AMBIENCE          = 33, // 29.mp3
    MX_HEARTBEAT_AMBIENCE      = 34, // 30.mp3
    MX_SURPRISE_1              = 35, // 31.mp3
    MX_SURPRISE_2              = 36, // 32.mp3
    MX_SURPRISE_3              = 37, // 33.mp3
    MX_OOH_AAH_1               = 38, // 34.mp3
    MX_OOH_AAH_2               = 39, // 35.mp3
    MX_VENICE_VIOLINS          = 40, // 36.mp3
    MX_END_OF_LEVEL            = 41, // 37.mp3
    MX_SPOOKY_1                = 42, // 38.mp3
    MX_SPOOKY_2                = 43, // 39.mp3
    MX_SPOOKY_3                = 44, // 40.mp3
    MX_HARP_THEME              = 45, // 41.mp3
    MX_MYSTERY_1               = 46, // 42.mp3
    MX_SECRET                  = 47, // 43.mp3
    MX_AMBUSH_1                = 48, // 44.mp3
    MX_AMBUSH_2                = 49, // 45.mp3
    MX_AMBUSH_3                = 50, // 46.mp3
    MX_AMBUSH_4                = 51, // 47.mp3
    MX_SKIDOO_THEME            = 52, // 48.mp3
    MX_BATTLE_THEME            = 53, // 49.mp3
    MX_MYSTERY_2               = 54, // 50.mp3
    MX_MYSTERY_3               = 55, // 51.mp3
    MX_MYSTERY_4               = 56, // 52.mp3
    MX_MYSTERY_5               = 57, // 53.mp3
    MX_RIG_AMBIENCE            = 58, // 54.mp3
    MX_TOMB_AMBIENCE           = 59, // 55.mp3
    MX_OOH_AAH_3               = 60, // 56.mp3
    MX_REVEAL_1                = 61, // 57.mp3
    MX_CUTSCENE_RIG            = 62, // 58.mp3
    MX_REVEAL_2                = 63, // 59.mp3
    MX_TITLE_THEME             = 64, // 60.mp3
    MX_UNUSED_6                = 65, // 61.mp3
} MUSIC_TRACK_ID;

typedef enum {
    COLL_NONE      = 0x00,
    COLL_FRONT     = 0x01,
    COLL_LEFT      = 0x02,
    COLL_RIGHT     = 0x04,
    COLL_TOP       = 0x08,
    COLL_TOP_FRONT = 0x10,
    COLL_CLAMP     = 0x20,
} COLL_TYPE;

typedef enum {
    FT_FLOOR   = 0,
    FT_DOOR    = 1,
    FT_TILT    = 2,
    FT_ROOF    = 3,
    FT_TRIGGER = 4,
    FT_LAVA    = 5,
    FT_CLIMB   = 6,
} FLOOR_TYPE;

typedef enum {
    HT_WALL        = 0,
    HT_SMALL_SLOPE = 1,
    HT_BIG_SLOPE   = 2,
} HEIGHT_TYPE;

typedef enum { // decompiled
    DIR_UNKNOWN = -1,
    DIR_NORTH   = 0,
    DIR_EAST    = 1,
    DIR_SOUTH   = 2,
    DIR_WEST    = 3,
} DIRECTION;

typedef struct __unaligned {
    uint16_t x;
    uint16_t y;
} XGEN_X;

typedef struct __unaligned {
    int32_t x1;
    int32_t x2;
} XBUF_X;

typedef struct __unaligned {
    int16_t x;
    int16_t y;
    int16_t g;
} XGEN_XG;

typedef struct __unaligned {
    int32_t x1;
    int32_t g1;
    int32_t x2;
    int32_t g2;
} XBUF_XG;

typedef struct __unaligned {
    uint16_t x;
    uint16_t y;
    uint16_t g;
    uint16_t u;
    uint16_t v;
} XGEN_XGUV;

typedef struct __unaligned {
    int32_t x1;
    int32_t g1;
    int32_t u1;
    int32_t v1;
    int32_t x2;
    int32_t g2;
    int32_t u2;
    int32_t v2;
} XBUF_XGUV;

typedef struct __unaligned {
    uint16_t x;
    uint16_t y;
    uint16_t g;
    float rhw;
    float u;
    float v;
} XGEN_XGUVP;

typedef struct __unaligned {
    int32_t x1;
    int32_t g1;
    float u1;
    float v1;
    float rhw1;
    int32_t x2;
    int32_t g2;
    float u2;
    float v2;
    float rhw2;
} XBUF_XGUVP;

typedef struct __unaligned {
    uint8_t manufacturer;
    uint8_t version;
    uint8_t rle;
    uint8_t bpp;
    uint16_t x_min;
    uint16_t y_min;
    uint16_t x_max;
    uint16_t y_max;
    uint16_t h_dpi;
    uint16_t v_dpi;
    RGB_888 palette[16];
    uint8_t reserved;
    uint8_t planes;
    uint16_t bytes_per_line;
    uint16_t pal_pnterpret;
    uint16_t h_res;
    uint16_t v_res;
    uint8_t reserved_data[54];
} PCX_HEADER;

typedef struct __unaligned {
    uint8_t id_length;
    uint8_t color_map_type;
    uint8_t data_type_code;
    uint16_t color_map_origin;
    uint16_t color_map_length;
    uint8_t color_map_depth;
    uint16_t x_origin;
    uint16_t y_origin;
    uint16_t width;
    uint16_t height;
    uint8_t bpp;
    uint8_t image_descriptor;
} TGA_HEADER;

typedef struct __unaligned {
    int16_t number;
    int16_t volume;
    int16_t randomness;
    int16_t flags;
} SAMPLE_INFO;

/*
typedef struct __unaligned {
    int32_t volume;
    int32_t pan;
    int32_t sample_num;
    int32_t pitch;
} SOUND_SLOT;
*/

typedef enum {
    SF_FLIP = 0x40,
    SF_UNFLIP = 0x80,
} SOUND_FLAG;

typedef enum {
    GBUF_TEMP_ALLOC               = 0,
    GBUF_TEXTURE_PAGES            = 1,
    GBUF_MESH_POINTERS            = 2,
    GBUF_MESHES                   = 3,
    GBUF_ANIMS                    = 4,
    GBUF_STRUCTS                  = 5,
    GBUF_ANIM_RANGES              = 6,
    GBUF_ANIM_COMMANDS            = 7,
    GBUF_ANIM_BONES               = 8,
    GBUF_ANIM_FRAMES              = 9,
    GBUF_ROOM_TEXTURES            = 10,
    GBUF_ROOMS                    = 11,
    GBUF_ROOM_MESH                = 12,
    GBUF_ROOM_PORTALS             = 13,
    GBUF_ROOM_FLOOR               = 14,
    GBUF_ROOM_LIGHTS              = 15,
    GBUF_ROOM_STATIC_MESHES       = 16,
    GBUF_FLOOR_DATA               = 17,
    GBUF_ITEMS                    = 18,
    GBUF_CAMERAS                  = 19,
    GBUF_SOUND_FX                 = 20,
    GBUF_BOXES                    = 21,
    GBUF_OVERLAPS                 = 22,
    GBUF_GROUND_ZONE              = 23,
    GBUF_FLY_ZONE                 = 24,
    GBUF_ANIMATING_TEXTURE_RANGES = 25,
    GBUF_CINEMATIC_FRAMES         = 26,
    GBUF_LOAD_DEMO_BUFFER         = 27,
    GBUF_SAVE_DEMO_BUFFER         = 28,
    GBUF_CINEMATIC_EFFECTS        = 29,
    GBUF_MUMMY_HEAD_TURN          = 30,
    GBUF_EXTRA_DOOR_STUFF         = 31,
    GBUF_EFFECTS_ARRAY            = 32,
    GBUF_CREATURE_DATA            = 33,
    GBUF_CREATURE_LOT             = 34,
    GBUF_SAMPLE_INFOS             = 35,
    GBUF_SAMPLES                  = 36,
    GBUF_SAMPLE_OFFSETS           = 37,
    GBUF_ROLLING_BALL_STUFF       = 38,
    GBUF_SKIDOO_STUFF             = 39,
    GBUF_LOAD_PICTURE_BUFFER      = 40,
    GBUF_FMV_BUFFERS              = 41,
    GBUF_POLYGON_BUFFERS          = 42,
    GBUF_ORDER_TABLES             = 43,
    GBUF_CLUTS                    = 44,
    GBUF_TEXTURE_INFOS            = 45,
    GBUF_SPRITE_INFOS             = 46,
    GBUF_NUM_MALLOC_TYPES         = 47,
} GAME_BUFFER;

typedef enum {
    CLRB_PRIMARY_BUFFER          = 0x0001,
    CLRB_BACK_BUFFER             = 0x0002,
    CLRB_THIRD_BUFFER            = 0x0004,
    CLRB_Z_BUFFER                = 0x0008,
    CLRB_RENDER_BUFFER           = 0x0010,
    CLRB_PICTURE_BUFFER          = 0x0020,
    CLRB_WINDOWED_PRIMARY_BUFFER = 0x0040,
    CLRB_RESERVED                = 0x0080,
    CLRB_PHDWINSIZE              = 0x0100,
} CLEAR_BUFFER_FLAGS;

typedef enum {
    AC_NULL          = 0,
    AC_MOVE_ORIGIN   = 1,
    AC_JUMP_VELOCITY = 2,
    AC_ATTACK_READY  = 3,
    AC_DEACTIVATE    = 4,
    AC_SOUND_FX      = 5,
    AC_EFFECT        = 6,
} ANIM_COMMAND;

typedef enum {
    ACE_ALL   = 0,
    ACE_LAND  = 1,
    ACE_WATER = 2,
} ANIM_COMMAND_ENVIRONMENT;

typedef struct __unaligned {
    DDPIXELFORMAT pixel_fmt;
    COLOR_BIT_MASKS color_bit_masks;
    DWORD bpp;
} TEXTURE_FORMAT;

typedef struct __unaligned {
    int32_t boat_turn;
    int32_t left_fallspeed;
    int32_t right_fallspeed;
    int16_t tilt_angle;
    int16_t extra_rotation;
    int32_t water;
    int32_t pitch;
} BOAT_INFO;

typedef struct __unaligned {
    struct {
        XYZ_16 min;
        XYZ_16 max;
    } shift, rot;
} OBJECT_BOUNDS;

typedef struct __unaligned {
    int32_t xv;
    int32_t yv;
    int32_t zv;
} PORTAL_VBUF;

typedef struct __unaligned {
    BOUNDS_16 bounds;
    XYZ_16 offset;
    int16_t mesh_rots[];
} FRAME_INFO;

typedef enum {
    TO_OBJECT      = 0,
    TO_CAMERA      = 1,
    TO_SINK        = 2,
    TO_FLIP_MAP    = 3,
    TO_FLIP_ON     = 4,
    TO_FLIP_OFF    = 5,
    TO_TARGET      = 6,
    TO_FINISH      = 7,
    TO_CD          = 8,
    TO_FLIP_EFFECT = 9,
    TO_SECRET      = 10,
    TO_BODY_BAG    = 11,
} TRIGGER_OBJECT;

typedef enum {
    TT_TRIGGER     = 0,
    TT_PAD         = 1,
    TT_SWITCH      = 2,
    TT_KEY         = 3,
    TT_PICKUP      = 4,
    TT_HEAVY       = 5,
    TT_ANTIPAD     = 6,
    TT_COMBAT      = 7,
    TT_DUMMY       = 8,
    TT_ANTITRIGGER = 9,
} TRIGGER_TYPE;

typedef enum {
    GF_S_PC_DETAIL_LEVELS      = 0,
    GF_S_PC_DEMO_MODE          = 1,
    GF_S_PC_SOUND              = 2,
    GF_S_PC_CONTROLS           = 3,
    GF_S_PC_GAMMA              = 4,
    GF_S_PC_SET_VOLUMES        = 5,
    GF_S_PC_USER_KEYS          = 6,
    GF_S_PC_SAVE_FILE_WARNING  = 7,
    GF_S_PC_TRY_AGAIN_QUESTION = 8,
    GF_S_PC_YES                = 9,
    GF_S_PC_NO                 = 10,
    GF_S_PC_SAVE_COMPLETE      = 11,
    GF_S_PC_NO_SAVE_GAMES      = 12,
    GF_S_PC_NONE_VALID         = 13,
    GF_S_PC_SAVE_GAME_QUESTION = 14,
    GF_S_PC_EMPTY_SLOT         = 15,
    GF_S_PC_OFF                = 16,
    GF_S_PC_ON                 = 17,
    GF_S_PC_SETUP_SOUND_CARD   = 18,
    GF_S_PC_DEFAULT_KEYS       = 19,
    GF_S_PC_DOZY               = 20,
    GF_S_PC_NUMBER_OF          = 41,
} GF_PC_STRING;

typedef enum {
    GF_S_GAME_HEADING_INVENTORY       = 0,
    GF_S_GAME_HEADING_OPTION          = 1,
    GF_S_GAME_HEADING_ITEMS           = 2,
    GF_S_GAME_HEADING_GAME_OVER       = 3,
    GF_S_GAME_PASSPORT_LOAD_GAME      = 4,
    GF_S_GAME_PASSPORT_SAVE_GAME      = 5,
    GF_S_GAME_PASSPORT_NEW_GAME       = 6,
    GF_S_GAME_PASSPORT_RESTART_LEVEL  = 7,
    GF_S_GAME_PASSPORT_EXIT_TO_TITLE  = 8,
    GF_S_GAME_PASSPORT_EXIT_DEMO      = 9,
    GF_S_GAME_PASSPORT_EXIT_GAME      = 10,
    GF_S_GAME_PASSPORT_SELECT_LEVEL   = 11,
    GF_S_GAME_PASSPORT_SAVE_POSITION  = 12,
    GF_S_GAME_DETAIL_SELECT_DETAIL    = 13,
    GF_S_GAME_DETAIL_HIGH             = 14,
    GF_S_GAME_DETAIL_MEDIUM           = 15,
    GF_S_GAME_DETAIL_LOW              = 16,
    GF_S_GAME_KEYMAP_WALK             = 17,
    GF_S_GAME_KEYMAP_ROLL             = 18,
    GF_S_GAME_KEYMAP_RUN              = 19,
    GF_S_GAME_KEYMAP_LEFT             = 20,
    GF_S_GAME_KEYMAP_RIGHT            = 21,
    GF_S_GAME_KEYMAP_BACK             = 22,
    GF_S_GAME_KEYMAP_STEP_LEFT        = 23,
    GF_S_GAME_KEYMAP_RESERVED_1       = 24,
    GF_S_GAME_KEYMAP_STEP_RIGHT       = 25,
    GF_S_GAME_KEYMAP_RESERVED_2       = 26,
    GF_S_GAME_KEYMAP_LOOK             = 27,
    GF_S_GAME_KEYMAP_JUMP             = 28,
    GF_S_GAME_KEYMAP_ACTION           = 29,
    GF_S_GAME_KEYMAP_DRAW_WEAPON      = 30,
    GF_S_GAME_KEYMAP_RESERVED_3       = 31,
    GF_S_GAME_KEYMAP_INVENTORY        = 32,
    GF_S_GAME_KEYMAP_FLARE            = 33,
    GF_S_GAME_KEYMAP_STEP             = 34,
    GF_S_GAME_INV_ITEM_STATISTICS     = 35,
    GF_S_GAME_INV_ITEM_PISTOLS        = 36,
    GF_S_GAME_INV_ITEM_SHOTGUN        = 37,
    GF_S_GAME_INV_ITEM_MAGNUMS        = 38,
    GF_S_GAME_INV_ITEM_UZIS           = 39,
    GF_S_GAME_INV_ITEM_HARPOON        = 40,
    GF_S_GAME_INV_ITEM_M16            = 41,
    GF_S_GAME_INV_ITEM_GRENADE        = 42,
    GF_S_GAME_INV_ITEM_FLARE          = 43,
    GF_S_GAME_INV_ITEM_PISTOL_AMMO    = 44,
    GF_S_GAME_INV_ITEM_SHOTGUN_AMMO   = 45,
    GF_S_GAME_INV_ITEM_MAGNUM_AMMO    = 46,
    GF_S_GAME_INV_ITEM_UZI_AMMO       = 47,
    GF_S_GAME_INV_ITEM_HARPOON_AMMO   = 48,
    GF_S_GAME_INV_ITEM_M16_AMMO       = 49,
    GF_S_GAME_INV_ITEM_GRENADE_AMMO   = 50,
    GF_S_GAME_INV_ITEM_SMALL_MEDIPACK = 51,
    GF_S_GAME_INV_ITEM_LARGE_MEDIPACK = 52,
    GF_S_GAME_INV_ITEM_PICKUP         = 53,
    GF_S_GAME_INV_ITEM_PUZZLE         = 54,
    GF_S_GAME_INV_ITEM_KEY            = 55,
    GF_S_GAME_INV_ITEM_GAME           = 56,
    GF_S_GAME_INV_ITEM_LARA_HOME      = 57,
    GF_S_GAME_MISC_LOADING            = 58,
    GF_S_GAME_MISC_TIME_TAKEN         = 59,
    GF_S_GAME_MISC_SECRETS_FOUND      = 60,
    GF_S_GAME_MISC_LOCATION           = 61,
    GF_S_GAME_MISC_KILLS              = 62,
    GF_S_GAME_MISC_AMMO_USED          = 63,
    GF_S_GAME_MISC_HITS               = 64,
    GF_S_GAME_MISC_SAVES_PERFORMED    = 65,
    GF_S_GAME_MISC_DISTANCE_TRAVELLED = 66,
    GF_S_GAME_MISC_HEALTH_PACKS_USED  = 67,
    GF_S_GAME_MISC_RELEASE_VERSION    = 68,
    GF_S_GAME_MISC_NONE               = 69,
    GF_S_GAME_MISC_FINISH             = 70,
    GF_S_GAME_MISC_BEST_TIMES         = 71,
    GF_S_GAME_MISC_NO_TIMES_SET       = 72,
    GF_S_GAME_MISC_NA                 = 73,
    GF_S_GAME_MISC_CURRENT_POSITION   = 74,
    GF_S_GAME_MISC_FINAL_STATISTICS   = 75,
    GF_S_GAME_MISC_OF                 = 76,
    GF_S_GAME_MISC_STORY_SO_FAR       = 77,
    GF_S_GAME_NUMBER_OF               = 89,
} GF_GAME_STRING;

typedef enum {
    GF_ADD_INV_PISTOLS      = 0,
    GF_ADD_INV_SHOTGUN      = 1,
    GF_ADD_INV_MAGNUMS      = 2,
    GF_ADD_INV_UZIS         = 3,
    GF_ADD_INV_HARPOON      = 4,
    GF_ADD_INV_M16          = 5,
    GF_ADD_INV_GRENADE      = 6,
    GF_ADD_INV_PISTOL_AMMO  = 7,
    GF_ADD_INV_SHOTGUN_AMMO = 8,
    GF_ADD_INV_MAGNUM_AMMO  = 9,
    GF_ADD_INV_UZI_AMMO     = 10,
    GF_ADD_INV_HARPOON_AMMO = 11,
    GF_ADD_INV_M16_AMMO     = 12,
    GF_ADD_INV_GRENADE_AMMO = 13,
    GF_ADD_INV_FLARES       = 14,
    GF_ADD_INV_SMALL_MEDI   = 15,
    GF_ADD_INV_LARGE_MEDI   = 16,
    GF_ADD_INV_PICKUP_1     = 17,
    GF_ADD_INV_PICKUP_2     = 18,
    GF_ADD_INV_PUZZLE_1     = 19,
    GF_ADD_INV_PUZZLE_2     = 20,
    GF_ADD_INV_PUZZLE_3     = 21,
    GF_ADD_INV_PUZZLE_4     = 22,
    GF_ADD_INV_KEY_1        = 23,
    GF_ADD_INV_KEY_2        = 24,
    GF_ADD_INV_KEY_3        = 25,
    GF_ADD_INV_KEY_4        = 26,
    GF_ADD_INV_NUMBER_OF    = 27,
} GF_ADD_INV;

typedef enum {
    IT_NAME      = 0,
    IT_QTY       = 1,
    IT_NUMBER_OF = 2,
} INV_TEXT;

typedef enum {
    REQ_CENTER      = 0x00,
    REQ_USE         = 0x01,
    REQ_ALIGN_LEFT  = 0x02,
    REQ_ALIGN_RIGHT = 0x04,
    REQ_HEADING     = 0x08,
    REQ_BEST_TIME   = 0x10,
    REQ_NORMAL_TIME = 0x20,
    REQ_NO_TIME     = 0x40,
} REQUESTER_FLAGS;


# FUNCTIONS
#   Flags:
#   - to do
#   * to do, called by TR2X
#   x unused
#   + fully decompiled
# Offset    Size    Flags   Declaration

# 3dsystem/3d_gen.c
0x00401000  0x01D0  +       void __cdecl Matrix_GenerateW2V(PHD_3DPOS *viewpos);
0x004011D0  0x0072  +       void __cdecl Matrix_LookAt(int32_t xsrc, int32_t ysrc, int32_t zsrc, int32_t xtar, int32_t ytar, int32_t ztar, int16_t roll);
0x00401250  0x0078  +       void __cdecl Math_GetVectorAngles(int32_t x, int32_t y, int32_t z, int16_t *dest);
0x004012D0  0x00AA  +       void __cdecl Matrix_RotX(int16_t rx);
0x00401380  0x00A8  +       void __cdecl Matrix_RotY(int16_t ry);
0x00401430  0x00A8  +       void __cdecl Matrix_RotZ(int16_t rz);
0x004014E0  0x01DC  +       void __cdecl Matrix_RotYXZ(int16_t ry, int16_t rx, int16_t rz);
0x004016C0  0x01E7  +       void __cdecl Matrix_RotYXZpack(uint32_t rpack);
0x004018B0  0x00AB  +       bool __cdecl Matrix_TranslateRel(int32_t x, int32_t y, int32_t z);
0x00401960  0x007A  +       void __cdecl Matrix_TranslateAbs(int32_t x, int32_t y, int32_t z);
0x004019E0  0x00F3  +       void __cdecl Output_InsertPolygons(const int16_t *obj_ptr, int32_t clip);
0x00401AE0  0x00EA  +       void __cdecl Output_InsertRoom(const int16_t *obj_ptr, int32_t is_outside);
0x00401BD0  0x0032  +       const int16_t *__cdecl Output_CalcSkyboxLight(const int16_t *obj_ptr);
0x00401C10  0x0134  +       void __cdecl Output_InsertSkybox(const int16_t *obj_ptr);
0x00401D50  0x0001  x       void __cdecl Output_InsertInventoryBackground(const int16_t *obj_ptr);
0x00401D60  0x01D5  +       const int16_t *__cdecl Output_CalcObjectVertices(const int16_t *obj_ptr);
0x00401F40  0x016D  +       const int16_t *__cdecl Output_CalcVerticeLight(const int16_t *obj_ptr);
0x004020B0  0x027D  +       const int16_t *__cdecl Output_CalcRoomVertices(const int16_t *obj_ptr, int32_t far_clip);
0x00402330  0x00C7  +       void __cdecl Output_RotateLight(int16_t pitch, int16_t yaw);
0x00402400  0x0039  +       void __cdecl Output_InitPolyList(void);
0x00402430  0x0033  +       void __cdecl Output_SortPolyList(void);
0x00402470  0x00C5  +       void __cdecl Output_QuickSort(int32_t left, int32_t right);
0x00402540  0x0036  +       void __cdecl Output_PrintPolyList(uint8_t *surface_ptr);
0x00402580  0x00A1  +       void __cdecl Output_AlterFOV(int16_t fov);
0x00402690  0x0095  +       void __cdecl Output_SetNearZ(int32_t near_z);
0x004026E0  0x006B  +       void __cdecl Output_SetFarZ(int32_t far_z);
0x00402700  0x0266  +       void __cdecl Output_Init(int16_t x, int16_t y, int32_t width, int32_t height, int32_t near_z, int32_t far_z, int16_t view_angle, int32_t screen_width, int32_t screen_height);

# 3dsystem/3d_out.c
0x00402970  0x019F  +       void __cdecl Output_DrawPolyLine(const int16_t *obj_ptr);
0x00402B10  0x0035  +       void __cdecl Output_DrawPolyFlat(const int16_t *obj_ptr);
0x00402B50  0x0035  +       void __cdecl Output_DrawPolyTrans(const int16_t *obj_ptr);
0x00402B90  0x0035  +       void __cdecl Output_DrawPolyGouraud(const int16_t *obj_ptr);
0x00402BD0  0x003C  +       void __cdecl Output_DrawPolyGTMap(const int16_t *obj_ptr);
0x00402C10  0x003C  +       void __cdecl Output_DrawPolyWGTMap(const int16_t *obj_ptr);
0x00402C50  0x00D2  +       int32_t __cdecl Output_XGenX(const int16_t *obj_ptr);
0x00402D30  0x0146  +       int32_t __cdecl Output_XGenXG(const int16_t *obj_ptr);
0x00402E80  0x0219  +       int32_t __cdecl Output_XGenXGUV(const int16_t *obj_ptr);
0x004030A0  0x0284  +       int32_t __cdecl Output_XGenXGUVPerspFP(const int16_t *obj_ptr);
0x00403330  0x0FC6  +       void __cdecl Output_GTMapPersp32FP(int32_t y1, int32_t y2, uint8_t *tex_page);
0x00404300  0x14C4  +       void __cdecl Output_WGTMapPersp32FP(int32_t y1, int32_t y2, uint8_t *tex_page);
0x004057D0  0x0037  +       void __cdecl Output_DrawPolyGTMapPersp(const int16_t *obj_ptr);
0x00405810  0x0037  +       void __cdecl Output_DrawPolyWGTMapPersp(const int16_t *obj_ptr);

# 3dsystem/3dinsert.c
0x00405850  0x006C  +       int32_t __cdecl Output_VisibleZClip(const PHD_VBUF *vtx0, const PHD_VBUF *vtx1, const PHD_VBUF *vtx2);
0x004058C0  0x0140  +       int32_t __cdecl Output_ZedClipper(int32_t vtx_count, POINT_INFO *pts, VERTEX_INFO *vtx);
0x00405A00  0x0511  +       int32_t __cdecl Output_XYGUVClipper(int32_t vtx_count, VERTEX_INFO *vtx);
0x00405F20  0x0A5C  +       const int16_t *__cdecl Output_InsertObjectGT4(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x00406980  0x0872  +       const int16_t *__cdecl Output_InsertObjectGT3(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x00407200  0x0422  +       int32_t __cdecl Output_XYGClipper(int32_t vtx_count, VERTEX_INFO *vtx);
0x00407630  0x03D1  +       const int16_t *__cdecl Output_InsertObjectG4(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x00407A10  0x031B  +       const int16_t *__cdecl Output_InsertObjectG3(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x00407D30  0x02D0  +       int32_t __cdecl Output_XYClipper(int32_t vtx_count, VERTEX_INFO *vtx);
0x00408000  0x04A4  +       void __cdecl Output_InsertTrans8(const PHD_VBUF *vbuf, int16_t shade);
0x004084B0  0x00D3  +       void __cdecl Output_InsertTransQuad(int32_t x, int32_t y, int32_t width, int32_t height, int32_t z);
0x00408590  0x00CB  +       void __cdecl Output_InsertFlatRect(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
0x00408660  0x00B5  +       void __cdecl Output_InsertLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
0x00408720  0x0642  +       void __cdecl Output_InsertGT3_ZBuffered(const PHD_VBUF *vtx0, const PHD_VBUF *vtx1, const PHD_VBUF *vtx2, const PHD_TEXTURE *texture, const PHD_UV *uv0, const PHD_UV *uv1, const PHD_UV *uv2);
0x00408D70  0x0140  +       void __cdecl Output_DrawClippedPoly_Textured(int32_t vtx_count);
0x00408EB0  0x0444  +       void __cdecl Output_InsertGT4_ZBuffered(const PHD_VBUF *vtx0, const PHD_VBUF *vtx1, const PHD_VBUF *vtx2, const PHD_VBUF *vtx3, const PHD_TEXTURE *texture);
0x00409300  0x0091  +       const int16_t *__cdecl Output_InsertObjectGT4_ZBuffered(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x004093A0  0x00AA  +       const int16_t *__cdecl Output_InsertObjectGT3_ZBuffered(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x00409450  0x039C  +       const int16_t *__cdecl Output_InsertObjectG4_ZBuffered(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x004097F0  0x00F7  +       void __cdecl Output_DrawPoly_Gouraud(int32_t vtx_count, int32_t red, int32_t green, int32_t blue);
0x004098F0  0x02D3  +       const int16_t *__cdecl Output_InsertObjectG3_ZBuffered(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x00409BD0  0x01C9  +       void __cdecl Output_InsertFlatRect_ZBuffered(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
0x00409DA0  0x0133  +       void __cdecl Output_InsertLine_ZBuffered(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
0x00409EE0  0x0706  +       void __cdecl Output_InsertGT3_Sorted(const PHD_VBUF *vtx0, const PHD_VBUF *vtx1, const PHD_VBUF *vtx2, const PHD_TEXTURE *texture, const PHD_UV *uv0, const PHD_UV *uv1, const PHD_UV *uv2, SORT_TYPE sort_type);
0x0040A5F0  0x01AC  +       void __cdecl Output_InsertClippedPoly_Textured(int32_t vtx_count, float z, int16_t poly_type, int16_t tex_page);
0x0040A7A0  0x04D7  +       void __cdecl Output_InsertGT4_Sorted(const PHD_VBUF *vtx0, const PHD_VBUF *vtx1, const PHD_VBUF *vtx2, const PHD_VBUF *vtx3, const PHD_TEXTURE *texture, SORT_TYPE sort_type);
0x0040AC80  0x008C  +       const int16_t *__cdecl Output_InsertObjectGT4_Sorted(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x0040AD10  0x009F  +       const int16_t *__cdecl Output_InsertObjectGT3_Sorted(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x0040ADB0  0x043B  +       const int16_t *__cdecl Output_InsertObjectG4_Sorted(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x0040B1F0  0x0175  +       void __cdecl Output_InsertPoly_Gouraud(int32_t vtx_count, float z, int32_t red, int32_t green, int32_t blue, int16_t poly_type);
0x0040B370  0x0343  +       const int16_t *__cdecl Output_InsertObjectG3_Sorted(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);
0x0040B6C0  0x0347  +       void __cdecl Output_InsertSprite_Sorted(int32_t z, int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t sprite_idx, int16_t shade);
0x0040BA10  0x017F  +       void __cdecl Output_InsertFlatRect_Sorted(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
0x0040BB90  0x012B  +       void __cdecl Output_InsertLine_Sorted(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
0x0040BCC0  0x0195  +       void __cdecl Output_InsertTrans8_Sorted(const PHD_VBUF *vbuf, int16_t shade);
0x0040BE60  0x013D  +       void __cdecl Output_InsertTransQuad_Sorted(int32_t x, int32_t y, int32_t width, int32_t height, int32_t z);
0x0040BFA0  0x00A7  +       void __cdecl Output_InsertSprite(int32_t z, int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t sprite_idx, int16_t shade);

# 3dsystem/scalespr.c
0x0040C050  0x02C7  +       void __cdecl Output_DrawSprite(uint32_t flags, int32_t x, int32_t y, int32_t z, int16_t sprite_idx, int16_t shade, int16_t scale);
0x0040C320  0x0085  +       void __cdecl Output_DrawPickup(int32_t sx, int32_t sy, int32_t scale, int16_t sprite_idx, int16_t shade);
0x0040C3B0  0x0152  +       const int16_t *__cdecl Output_InsertRoomSprite(const int16_t *obj_ptr, int32_t vtx_count);
0x0040C510  0x0096  +       void __cdecl Output_DrawScreenSprite2D(int32_t sx, int32_t sy, int32_t sz, int32_t scale_h, int32_t scale_v, int16_t sprite_idx, int16_t shade, uint16_t flags);
0x0040C5B0  0x009D  +       void __cdecl Output_DrawScreenSprite(int32_t sx, int32_t sy, int32_t sz, int32_t scale_h, int32_t scale_v, int16_t sprite_idx, int16_t shade, uint16_t flags);
0x0040C650  0x0223  +       void __cdecl Output_DrawScaledSpriteC(const int16_t *obj_ptr);

# game/bird.c
0x0040C880  0x0089  +       void __cdecl Bird_Initialise(int16_t item_num);
0x0040C910  0x0200  +       void __cdecl Bird_Control(int16_t item_num);

# game/boat.c
0x0040CB30  0x003C  +       void __cdecl Boat_Initialise(int16_t item_num);
0x0040CB70  0x0170  +       int32_t __cdecl Boat_CheckGeton(int16_t item_num, COLL_INFO *coll);
0x0040CCE0  0x015E  +       void __cdecl Boat_Collision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x0040CE40  0x00F8  +       int32_t __cdecl Boat_TestWaterHeight(ITEM *item, int32_t z_off, int32_t x_off, XYZ_32 *pos);
0x0040CF40  0x01C1  +       void __cdecl Boat_DoShift(int32_t boat_num);
0x0040D110  0x0174  +       void __cdecl Boat_DoWakeEffect(ITEM *boat);
0x0040D290  0x004B  +       int32_t __cdecl Boat_DoDynamics(int32_t height, int32_t fall_speed, int32_t *y);
0x0040D2E0  0x04DD  +       int32_t __cdecl Boat_Dynamics(int16_t boat_num);
0x0040D7C0  0x0187  +       int32_t __cdecl Boat_UserControl(ITEM *boat);
0x0040D950  0x0169  +       void __cdecl Boat_Animation(ITEM *boat, int32_t collide);
0x0040DAC0  0x062A  +       void __cdecl Boat_Control(int16_t item_num);
0x0040E0F0  0x00B3  +       void __cdecl Gondola_Control(int16_t item_num);

# game/box.c
0x0040E1B0  0x002F  +       void __cdecl Creature_Initialise(int16_t item_num);
0x0040E1E0  0x0047  +       int32_t __cdecl Creature_Activate(int16_t item_num);
0x0040E230  0x0242  +       void __cdecl Creature_AIInfo(ITEM *item, AI_INFO *info);
0x0040E490  0x01F3  +       int32_t __cdecl Box_SearchLOT(LOT_INFO *lot, int32_t expansion);
0x0040E690  0x006F  +       int32_t __cdecl Box_UpdateLOT(LOT_INFO *lot, int32_t expansion);
0x0040E700  0x0095  +       void __cdecl Box_TargetBox(LOT_INFO *lot, int16_t box_num);
0x0040E7A0  0x00F2  +       int32_t __cdecl Box_StalkBox(const ITEM *item, const ITEM *enemy, int16_t box_num);
0x0040E8A0  0x00A4  +       int32_t __cdecl Box_EscapeBox(const ITEM *item, const ITEM *enemy, int16_t box_num);
0x0040E950  0x00A7  +       int32_t __cdecl Box_ValidBox(const ITEM *item, int16_t zone_num, int16_t box_num);
0x0040EA00  0x043F  +       void __cdecl Creature_Mood(ITEM *item, AI_INFO *info, int32_t violent);
0x0040EE70  0x0459  +       TARGET_TYPE __cdecl Box_CalculateTarget(XYZ_32 *target, ITEM *item, LOT_INFO *lot);
0x0040F2D0  0x00F8  +       int32_t __cdecl Creature_CheckBaddieOverlap(int16_t item_num);
0x0040F3D0  0x008B  +       int32_t __cdecl Box_BadFloor(int32_t x, int32_t y, int32_t z, int32_t box_height, int32_t next_height, int16_t room_num, LOT_INFO *lot);
0x0040F460  0x00B8  +       void __cdecl Creature_Die(int16_t item_num, int32_t explode);
0x0040F520  0x08CC  +       int32_t __cdecl Creature_Animate(int16_t item_num, int16_t angle, int16_t tilt);
0x0040FDF0  0x00D5  +       int16_t __cdecl Creature_Turn(ITEM *item, int16_t maximum_turn);
0x0040FED0  0x0035  +       void __cdecl Creature_Tilt(ITEM *item, int16_t angle);
0x0040FF10  0x0049  +       void __cdecl Creature_Head(ITEM *item, int16_t required);
0x0040FF60  0x004E  +       void __cdecl Creature_Neck(ITEM *item, int16_t required);
0x0040FFB0  0x00A8  +       void __cdecl Creature_Float(int16_t item_num);
0x00410060  0x0050  +       void __cdecl Creature_Underwater(ITEM *item, int32_t depth);
0x004100B0  0x005C  +       int16_t __cdecl Creature_Effect(ITEM *item, BITE *bite, int16_t (*__cdecl spawn)(int32_t x, int32_t y, int32_t z, int16_t speed, int16_t y_rot, int16_t room_num));
0x00410110  0x0131  +       int32_t __cdecl Creature_Vault(int16_t item_num, int16_t angle, int32_t vault, int32_t shift);
0x00410250  0x016F  +       void __cdecl Creature_Kill(ITEM *item, int32_t kill_anim, int32_t kill_state, int32_t lara_kill_state);
0x004103C0  0x01DB  +       void __cdecl Creature_GetBaddieTarget(int16_t item_num, int32_t goody);

# game/camera.c
0x004105A0  0x00B0  +       void __cdecl Camera_Initialise(void);
0x00410650  0x0372  +       void __cdecl Camera_Move(const GAME_VECTOR *target, int32_t speed);
0x004109D0  0x00D7  +       void __cdecl Camera_Clip(int32_t *x, int32_t *y, int32_t *h, int32_t target_x, int32_t target_y, int32_t target_h, int32_t left, int32_t top, int32_t right, int32_t bottom);
0x00410AB0  0x0154  +       void __cdecl Camera_Shift(int32_t *x, int32_t *y, int32_t *h, int32_t target_x, int32_t target_y, int32_t target_h, int32_t left, int32_t top, int32_t right, int32_t bottom);
0x00410C10  0x0050  +       const SECTOR *__cdecl Camera_GoodPosition(int32_t x, int32_t y, int32_t z, int16_t room_num);
0x00410C60  0x0781  +       void __cdecl Camera_SmartShift(GAME_VECTOR *target, void (*__cdecl shift)(int32_t *x, int32_t *y, int32_t *h, int32_t target_x, int32_t target_y, int32_t target_h, int32_t left, int32_t top, int32_t right, int32_t bottom));
0x004113F0  0x00ED  +       void __cdecl Camera_Chase(const ITEM *item);
0x004114E0  0x019E  +       int32_t __cdecl Camera_ShiftClamp(GAME_VECTOR *pos, int32_t clamp);
0x00411680  0x018E  +       void __cdecl Camera_Combat(const ITEM *item);
0x00411810  0x01E2  +       void __cdecl Camera_Look(const ITEM *item);
0x00411A00  0x0099  +       void __cdecl Camera_Fixed(void);
0x00411AA0  0x04A9  +       void __cdecl Camera_Update(void);

# game/cinema.c
0x00411F50  0x000A  +       void __cdecl Game_SetCutsceneTrack(int32_t track);
0x00411F60  0x0112  +       int32_t __cdecl Game_Cutscene_Start(int32_t level_num);
0x00412080  0x0093  +R      void __cdecl Misc_InitCinematicRooms(void);
0x00412120  0x016F  +       int32_t __cdecl Game_Cutscene_Control(int32_t nframes);
0x00412290  0x0138  +       void __cdecl Camera_UpdateCutscene(void);
0x004123D0  0x007F  +R      int32_t __cdecl Room_FindByPos(int32_t x, int32_t y, int32_t z);
0x00412450  0x00DC  +       void __cdecl CutscenePlayer_Control(int16_t item_num);
0x00412530  0x0096  +       void __cdecl Lara_Control_Cutscene(int16_t item_num);
0x004125D0  0x008F  +R      void __cdecl CutscenePlayer1_Initialise(int16_t item_num);
0x00412660  0x0033  +R      void __cdecl CutscenePlayerGen_Initialise(int16_t item_num);
0x004126A0  0x0245  +       void __cdecl Camera_LoadCutsceneFrame(void);

# game/collide.c
0x004128F0  0x067C  +       void __cdecl Collide_GetCollisionInfo(COLL_INFO *coll, int32_t xpos, int32_t ypos, int32_t zpos, int16_t room_num, int32_t obj_height);
0x00412FB0  0x002F  +       int32_t __cdecl Room_FindGridShift(int32_t src, int32_t dst);
0x00412FE0  0x03D2  +       int32_t __cdecl Collide_CollideStaticObjects(COLL_INFO *coll, int32_t x, int32_t y, int32_t z, int16_t room_num, int32_t height);
0x004133D0  0x00C8  +       void __cdecl Room_GetNearbyRooms(int32_t x, int32_t y, int32_t z, int32_t r, int32_t h, int16_t room_num);
0x004134A0  0x0055  +       void __cdecl Room_GetNewRoom(int32_t x, int32_t y, int32_t z, int16_t room_num);
0x00413500  0x0037  +       void __cdecl Item_ShiftCol(ITEM *item, COLL_INFO *coll);
0x00413540  0x005D  +       void __cdecl Item_UpdateRoom(ITEM *item, int32_t height);
0x004135A0  0x0099  +       int16_t __cdecl Room_GetTiltType(const SECTOR *sector, int32_t x, int32_t y, int32_t z);
0x00413640  0x0195  +       void __cdecl Lara_BaddieCollision(ITEM *lara_item, COLL_INFO *coll);
0x004137E0  0x0079  +       void __cdecl Lara_TakeHit(ITEM *lara_item, COLL_INFO *coll);
0x00413860  0x0078  +       void __cdecl Creature_Collision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x004138E0  0x0055  +       void __cdecl Object_Collision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00413940  0x0077  +       void __cdecl Door_Collision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x004139C0  0x0067  +       void __cdecl Object_Collision_Trap(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00413A30  0x0306  +       void __cdecl Lara_Push(ITEM *item, ITEM *lara_item, COLL_INFO *coll, int32_t spaz_on, int32_t big_push);
0x00413D40  0x00CB  +       int32_t __cdecl Item_TestBoundsCollide(const ITEM *src_item, const ITEM *dst_item, int32_t radius);
0x00413E10  0x0137  +       int32_t __cdecl Item_TestPosition(int16_t *bounds, ITEM *src_item, ITEM *dst_item);
0x00413F50  0x013B  +       void __cdecl Item_AlignPosition(XYZ_32 *vec, ITEM *src_item, ITEM *dst_item);
0x00414090  0x0187  +       int32_t __cdecl Lara_MovePosition(XYZ_32 *vec, ITEM *item, ITEM *lara_item);
0x00414220  0x016E  +R      int32_t __cdecl Misc_Move3DPosTo3DPos(PHD_3DPOS *src_pos, const PHD_3DPOS *dest_pos, int32_t velocity, PHD_ANGLE ang_add);

# game/control.c
0x00414390  0x0356  +       int32_t __cdecl Game_Control(int32_t nframes, int32_t demo_mode);
0x004146F0  0x0338  +       void __cdecl Item_Animate(ITEM *item);
0x00414A60  0x00AB  +       int32_t __cdecl Item_GetAnimChange(ITEM *item, const ANIM *anim);
0x00414B10  0x005F  +       void __cdecl Item_Translate(ITEM *item, int32_t x, int32_t y, int32_t z);
0x00414B70  0x0198  +       SECTOR *__cdecl Room_GetSector(int32_t x, int32_t y, int32_t z, int16_t *room_num);
0x00414D10  0x0168  +       int32_t __cdecl Room_GetWaterHeight(int32_t x, int32_t y, int32_t z, int16_t room_num);
0x00414E80  0x0265  +       int32_t __cdecl Room_GetHeight(const SECTOR *sector, int32_t x, int32_t y, int32_t z);
0x00415100  0x00E7  +       void __cdecl Camera_RefreshFromTrigger(int16_t type, const int16_t *data);
0x004151F0  0x0690  +       void __cdecl Room_TestTriggers(int16_t *data, int32_t heavy);
0x004158D0  0x0055  +       int32_t __cdecl Item_IsTriggerActive(ITEM *item);
0x00415930  0x023D  +       int32_t __cdecl Room_GetCeiling(const SECTOR *sector, int32_t x, int32_t y, int32_t z);
0x00415B90  0x004E  +       int16_t __cdecl Room_GetDoor(const SECTOR *sector);
0x00415BE0  0x00A0  +       int32_t __cdecl LOS_Check(const GAME_VECTOR *start, GAME_VECTOR *target);
0x00415C80  0x02EB  +       int32_t __cdecl LOS_CheckZ(const GAME_VECTOR *start, GAME_VECTOR *target);
0x00415F70  0x02EC  +       int32_t __cdecl LOS_CheckX(const GAME_VECTOR *start, GAME_VECTOR *target);
0x00416260  0x00DA  +       int32_t __cdecl LOS_ClipTarget(const GAME_VECTOR *start, GAME_VECTOR *target, const SECTOR *sector);
0x00416340  0x02FE  +       int32_t __cdecl LOS_CheckSmashable(const GAME_VECTOR *start, GAME_VECTOR *target);
0x00416640  0x00B3  +       void __cdecl Room_FlipMap(void);
0x00416700  0x0096  +       void __cdecl Room_RemoveFlipItems(ROOM *r);
0x004167A0  0x005C  +       void __cdecl Room_AddFlipItems(ROOM *r);
0x00416800  0x0024  +       void __cdecl Room_TriggerMusicTrack(int16_t value, int16_t flags, int16_t type);
0x00416830  0x00DA  +       void __cdecl Room_TriggerMusicTrackImpl(int16_t value, int16_t flags, int16_t type);

# game/demo.c
0x00416910  0x0059  +       int32_t __cdecl Demo_Control(int32_t level_num);
0x00416970  0x01B0  +       int32_t __cdecl Demo_Start(int32_t level_num);
0x00416B20  0x00CD  +       void __cdecl Demo_LoadLaraPos(void);
0x00416BF0  0x002D  +       void __cdecl Demo_GetInput(void);

# game/diver.c
0x00416C20  0x007A  -       int16_t __cdecl Diver_Harpoon(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE y_rot, int16_t room_num);
0x00416CA0  0x0106  -       int32_t __cdecl Diver_GetWaterSurface(int32_t x, int32_t y, int32_t z, int16_t room_num);
0x00416DB0  0x0389  +       void __cdecl Diver_Control(int16_t item_num);

# game/dog.c
0x00417160  0x0387  -       void __cdecl Dog_Control(int16_t item_num);
0x00417510  0x027E  -       void __cdecl Tiger_Control(int16_t item_num);

# game/dragon.c
0x004177B0  0x017F  -R      void __cdecl ControlTwinkle(int16_t fx_num);
0x00417930  0x00D9  -R      void __cdecl CreateBartoliLight(int16_t item_num);
0x00417A10  0x00AB  -R      int16_t __cdecl DragonFire(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);
0x00417AC0  0x02ED  -R      void __cdecl DragonCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00417DB0  0x00D9  -R      void __cdecl DragonBones(int16_t item_num);
0x00417E90  0x0519  -R      void __cdecl DragonControl(int16_t back_num);
0x004183E0  0x0114  -R      void __cdecl InitialiseBartoli(int16_t item_num);
0x00418500  0x0193  -R      void __cdecl BartoliControl(int16_t item_num);
0x004186A0  0x0287  -R      void __cdecl DinoControl(int16_t item_num);

# game/draw.c
0x00418950  0x0037  +       int32_t __cdecl Game_DrawCinematic(void);
0x00418990  0x0037  +       int32_t __cdecl Game_Draw(void);
0x004189D0  0x02B0  +       void __cdecl Room_DrawAllRooms(int16_t current_room);
0x00418C80  0x01C6  +       void __cdecl Room_GetBounds(void);
0x00418E50  0x037F  +       void __cdecl Room_SetBounds(const int16_t *objptr, int32_t room_num, ROOM *parent);
0x004191D0  0x03D2  +       void __cdecl Room_Clip(ROOM *r);
0x004195B0  0x00B4  +       void __cdecl Room_DrawSingleRoomGeometry(int16_t room_num);
0x00419670  0x0218  +       void __cdecl Room_DrawSingleRoomObjects(int16_t room_num);
0x00419890  0x0147  +       void __cdecl Effect_Draw(int16_t fx_num);
0x004199E0  0x0083  -       void __cdecl Object_DrawSpriteItem(ITEM *item);
0x00419A70  0x0378  -       void __cdecl Object_DrawAnimatingItem(ITEM *item);
0x00419DF0  0x0D02  +       void __cdecl Lara_Draw(const ITEM *item);
0x0041AB20  0x0BC6  +       void __cdecl Lara_Draw_I(const ITEM *item, const FRAME_INFO *frame1, const FRAME_INFO *frame2, int32_t frac, int32_t rate);
0x0041B710  0x0034  +       void __cdecl Matrix_InitInterpolate(int32_t frac, int32_t rate);
0x0041B750  0x0022  +       void __cdecl Matrix_Pop_I(void);
0x0041B780  0x0027  +       void __cdecl Matrix_Push_I(void);
0x0041B7B0  0x0031  +       void __cdecl Matrix_RotY_I(int16_t ang);
0x0041B7F0  0x0031  +       void __cdecl Matrix_RotX_I(int16_t ang);
0x0041B830  0x0031  +       void __cdecl Matrix_RotZ_I(int16_t ang);
0x0041B870  0x0041  +       void __cdecl Matrix_TranslateRel_I(int32_t x, int32_t y, int32_t z);
0x0041B8C0  0x0047  +       void __cdecl Matrix_TranslateRel_ID(int32_t x, int32_t y, int32_t z, int32_t x2, int32_t y2, int32_t z2);
0x0041B910  0x0041  +       void __cdecl Matrix_RotYXZ_I(int16_t y, int16_t x, int16_t z);
0x0041B960  0x003D  +       void __cdecl Matrix_RotYXZsuperpack_I(const int16_t **pprot1, const int16_t **pprot2, int32_t skip);
0x0041B9A0  0x00A1  +       void __cdecl Matrix_RotYXZsuperpack(const int16_t **pprot, int32_t skip);
0x0041BA50  0x002A  +       void __cdecl Output_InsertPolygons_I(int16_t *ptr, int32_t clip);
0x0041BA80  0x01A5  +       void __cdecl Matrix_Interpolate(void);
0x0041BC30  0x00FC  +       void __cdecl Matrix_InterpolateArm(void);
0x0041BD30  0x014B  -       void __cdecl Gun_DrawFlash(LARA_GUN_TYPE weapon_type, int32_t clip);
0x0041BEA0  0x00E8  -       void __cdecl Output_CalculateObjectLighting(const ITEM *item, const FRAME_INFO *frame);
0x0041BF90  0x0092  +       int32_t __cdecl Item_GetFrames(const ITEM *item, FRAME_INFO *frmptr[], int32_t *rate);
0x0041C030  0x007C  +       BOUNDS_16 *__cdecl Item_GetBoundsAccurate(const ITEM *item);
0x0041C0B0  0x0035  +       FRAME_INFO *__cdecl Item_GetBestFrame(const ITEM *item);
0x0041C0F0  0x0048  -R      void __cdecl AddDynamicLight(int32_t x, int32_t y, int32_t z, int32_t intensity, int32_t falloff);

# game/eel.c
0x0041C140  0x019D  -R      void __cdecl BigEelControl(int16_t item_num);
0x0041C2E0  0x01E1  -R      void __cdecl EelControl(int16_t item_num);

# game/effects.c
0x0041C4D0  0x008C  +       int32_t __cdecl Lara_IsNearItem(PHD_3DPOS *pos, int32_t distance);
0x0041C560  0x0068  +       void __cdecl Sound_UpdateEffects(void);
0x0041C5D0  0x0059  -R      int16_t __cdecl DoBloodSplat(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE direction, int16_t room_num);
0x0041C630  0x00A4  -R      void __cdecl DoLotsOfBlood(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE direction, int16_t room_num, int32_t num);
0x0041C6E0  0x0082  -R      void __cdecl ControlBlood1(int16_t fx_num);
0x0041C770  0x007F  -R      void __cdecl ControlExplosion1(int16_t fx_num);
0x0041C7F0  0x0072  -R      void __cdecl Richochet(GAME_VECTOR *pos);
0x0041C870  0x0030  -R      void __cdecl ControlRichochet1(int16_t fx_num);
0x0041C8A0  0x0064  -R      void __cdecl CreateBubble(PHD_3DPOS *pos, int16_t room_num);
0x0041C910  0x0078  -R      void __cdecl LaraBubbles(ITEM *item);
0x0041C990  0x00F3  -R      void __cdecl ControlBubble1(int16_t fx_num);
0x0041CA90  0x00C2  -R      void __cdecl Splash(ITEM *item);
0x0041CB60  0x0071  -R      void __cdecl ControlSplash1(int16_t fx_num);
0x0041CBE0  0x00AE  -R      void __cdecl ControlWaterSprite(int16_t fx_num);
0x0041CC90  0x008C  -R      void __cdecl ControlSnowSprite(int16_t fx_num);
0x0041CD20  0x00DE  -R      void __cdecl ControlHotLiquid(int16_t fx_num);
0x0041CE00  0x013D  -R      void __cdecl WaterFall(int16_t fx_num);
0x0041CF40  0x000B  -R      void __cdecl finish_level_effect(ITEM *item);
0x0041CF50  0x0016  -R      void __cdecl turn180_effect(ITEM *item);
0x0041CF70  0x0096  -R      void __cdecl floor_shake_effect(ITEM *item);
0x0041D010  0x0040  -R      void __cdecl lara_normal_effect(ITEM *item);
0x0041D050  0x001C  -R      void __cdecl BoilerFX(ITEM *item);
0x0041D070  0x008F  -R      void __cdecl FloodFX(ITEM *item);
0x0041D100  0x0023  -R      void __cdecl RubbleFX(ITEM *item);
0x0041D130  0x002C  -R      void __cdecl ChandelierFX(ITEM *item);
0x0041D160  0x0023  -R      void __cdecl ExplosionFX(ITEM *item);
0x0041D190  0x001C  -R      void __cdecl PistonFX(ITEM *item);
0x0041D1B0  0x001C  -R      void __cdecl CurtainFX(ITEM *item);
0x0041D1D0  0x001C  -R      void __cdecl StatueFX(ITEM *item);
0x0041D1F0  0x001C  -R      void __cdecl SetChangeFX(ITEM *item);
0x0041D210  0x003F  -R      void __cdecl ControlDingDong(int16_t item_num);
0x0041D250  0x0037  -R      void __cdecl ControlLaraAlarm(int16_t item_num);
0x0041D290  0x0067  -R      void __cdecl ControlAlarmSound(int16_t item_num);
0x0041D300  0x005D  -R      void __cdecl ControlBirdTweeter(int16_t item_num);
0x0041D360  0x0059  -R      void __cdecl DoChimeSound(ITEM *item);
0x0041D3C0  0x0068  -R      void __cdecl ControlClockChimes(int16_t item_num);
0x0041D430  0x0128  -R      void __cdecl SphereOfDoomCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x0041D560  0x00F0  -R      void __cdecl SphereOfDoom(int16_t item_num);
0x0041D650  0x012D  -R      void __cdecl DrawSphereOfDoom(ITEM *item);
0x0041D780  0x000A  -R      void __cdecl lara_hands_free(ITEM *item);
0x0041D790  0x0005  -R      void __cdecl flip_map_effect(ITEM *item);
0x0041D7A0  0x0043  -R      void __cdecl draw_right_gun(ITEM *item);
0x0041D7F0  0x0043  -R      void __cdecl draw_left_gun(ITEM *item);
0x0041D840  0x0063  -R      void __cdecl swap_meshes_with_meshswap1(ITEM *item);
0x0041D8B0  0x0063  -R      void __cdecl swap_meshes_with_meshswap2(ITEM *item);
0x0041D920  0x009A  -R      void __cdecl swap_meshes_with_meshswap3(ITEM *item);
0x0041D9C0  0x0009  -R      void __cdecl invisibility_on(ITEM *item);
0x0041D9D0  0x0016  -R      void __cdecl invisibility_off(ITEM *item);
0x0041D9F0  0x0009  -R      void __cdecl dynamic_light_on(ITEM *item);
0x0041DA00  0x000B  -R      void __cdecl dynamic_light_off(ITEM *item);
0x0041DA10  0x0005  -R      void __cdecl reset_hair(ITEM *item);
0x0041DA20  0x0024  -R      void __cdecl AssaultStart(ITEM *item);
0x0041DA50  0x001F  -R      void __cdecl AssaultStop(ITEM *item);
0x0041DA70  0x0017  -R      void __cdecl AssaultReset(ITEM *item);
0x0041DA90  0x00B2  -R      void __cdecl AssaultFinished(ITEM *item);

# game/enemies.c
0x0041DB50  0x0076  -R      int16_t __cdecl Knife(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);
0x0041DBD0  0x040B  -R      void __cdecl Cult2Control(int16_t item_num);
0x0041E000  0x04A1  -R      void __cdecl MonkControl(int16_t item_num);
0x0041E4D0  0x05BD  -R      void __cdecl Worker3Control(int16_t item_num);
0x0041EAE0  0x03F7  -R      void __cdecl DrawXianLord(ITEM *item);
0x0041EEE0  0x00A8  -R      void __cdecl XianDamage(ITEM *item, CREATURE *xian, int32_t damage);
0x0041EF90  0x0058  -R      void __cdecl InitialiseXianLord(int16_t item_num);
0x0041EFF0  0x0590  -R      void __cdecl XianLordControl(int16_t item_num);
0x0041F5D0  0x0098  -R      void __cdecl WarriorSparkleTrail(ITEM *item);
0x0041F670  0x03BA  -R      void __cdecl WarriorControl(int16_t item_num);

# game/gameflow.c
0x0041FA60  0x01E9  +       int32_t __cdecl GF_LoadScriptFile(const char *fname);
0x0041FC50  0x001F  +       int32_t __cdecl GF_DoFrontendSequence(void);
0x0041FC70  0x0066  +       int32_t __cdecl GF_DoLevelSequence(int32_t level, GAMEFLOW_LEVEL_TYPE type);
0x0041FCE0  0x047C  +       int32_t __cdecl GF_InterpretSequence(int16_t *ptr, GAMEFLOW_LEVEL_TYPE type, int32_t seq_type);
0x004201C0  0x0CD3  +       void __cdecl GF_ModifyInventory(int32_t level, int32_t type);

# game/hair.c
0x00420EA0  0x0074  -R      void __cdecl InitialiseHair(void);
0x00420F20  0x09E5  -R      void __cdecl HairControl(int32_t in_cutscene);
0x00421920  0x0076  -R      void __cdecl DrawHair(void);

# game/health.c
0x004219A0  0x002D  +       BOOL __cdecl Overlay_FlashCounter(void);
0x004219D0  0x0145  +       void __cdecl Overlay_DrawAssaultTimer(void);
0x00421B20  0x0045  +       void __cdecl Overlay_DrawGameInfo(bool pickup_state);
0x00421B70  0x00AB  +       void __cdecl Overlay_DrawHealthBar(bool flash_state);
0x00421C20  0x0097  +       void __cdecl Overlay_DrawAirBar(bool flash_state);
0x00421CC0  0x0028  +       void __cdecl Overlay_MakeAmmoString(char *string);
0x00421CF0  0x0132  +       void __cdecl Overlay_DrawAmmoInfo(void);
0x00421E40  0x0015  +       void __cdecl Overlay_InitialisePickUpDisplay(void);
0x00421E60  0x00FD  +       void __cdecl Overlay_DrawPickups(bool pickup_state);
0x00421F60  0x006C  +       void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_id);
0x00421FD0  0x007A  +       void __cdecl Overlay_DisplayModeInfo(char* string);
0x00422050  0x002C  +       void __cdecl Overlay_DrawModeInfo(void);

# game/inventory.c
0x00422080  0x119E  +       int32_t __cdecl Inv_Display(int32_t inventory_mode);
0x00423310  0x0156  +       void __cdecl Inv_Construct(void);
0x00423470  0x0089  +       void __cdecl Inv_SelectMeshes(INVENTORY_ITEM *inv_item);
0x00423500  0x0081  +       int32_t __cdecl Inv_AnimateInventoryItem(INVENTORY_ITEM *inv_item);
0x00423590  0x041D  +       void __cdecl Inv_DrawInventoryItem(INVENTORY_ITEM *inv_item);
0x004239C0  0x0019  +       int32_t __cdecl Input_GetDebounced(int32_t input);
0x004239E0  0x0005  +       void __cdecl Inv_DoInventoryPicture(void);
0x004239F0  0x0132  +       void __cdecl Inv_DoInventoryBackground(void);

# game/invfunc.c
0x00423B30  0x010A  +       void __cdecl Inv_InitColors(void);
0x00423C40  0x0167  +       void __cdecl Inv_RingIsOpen(RING_INFO *ring);
0x00423DB0  0x0081  +       void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);
0x00423E40  0x0369  +       void __cdecl Inv_RingNotActive(INVENTORY_ITEM *inv_item);
0x004242B0  0x0032  +       void __cdecl Inv_RingActive(void);
0x004242F0  0x06BE  +       int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_id);
0x00424B00  0x0129  +       void __cdecl Inv_InsertItem(INVENTORY_ITEM *inv_item);
0x00424C30  0x0077  +       int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_id);
0x00424CB0  0x001B  +       void __cdecl Inv_RemoveAllItems(void);
0x00424CD0  0x0110  +       int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_id);
0x00424DE0  0x00C1  +       int32_t __cdecl Inv_GetItemOption(GAME_OBJECT_ID object_id);
0x00424FD0  0x0024  +       void __cdecl Inv_RemoveInventoryText(void);
0x00425000  0x010F  +       void __cdecl Inv_Ring_Init(RING_INFO *ring, int16_t type, INVENTORY_ITEM **list, int16_t qty, int16_t current, IMOTION_INFO *imo);
0x00425110  0x0060  +       void __cdecl Inv_Ring_GetView(RING_INFO *ring, PHD_3DPOS *viewer);
0x00425170  0x0040  +       void __cdecl Inv_Ring_Light(RING_INFO *ring);
0x004251B0  0x002C  +       void __cdecl Inv_Ring_CalcAdders(RING_INFO *ring, int16_t rotation_duration);
0x004251E0  0x013E  +       void __cdecl Inv_Ring_DoMotions(RING_INFO *ring);
0x00425320  0x002F  +       void __cdecl Inv_Ring_RotateLeft(RING_INFO *ring);
0x00425350  0x002F  +       void __cdecl Inv_Ring_RotateRight(RING_INFO *ring);
0x00425380  0x0063  +       void __cdecl Inv_Ring_MotionInit(RING_INFO *ring, int16_t frames, int16_t status, int16_t status_target);
0x004253F0  0x002C  +       void __cdecl Inv_Ring_MotionSetup(RING_INFO *ring, int16_t status, int16_t status_target, int16_t frames);
0x00425420  0x0026  +       void __cdecl Inv_Ring_MotionRadius(RING_INFO *ring, int16_t target);
0x00425450  0x0022  +       void __cdecl Inv_Ring_MotionRotation(RING_INFO *ring, int16_t rotation, int16_t target);
0x00425480  0x0025  +       void __cdecl Inv_Ring_MotionCameraPos(RING_INFO *ring, int16_t target);
0x004254B0  0x0020  +       void __cdecl Inv_Ring_MotionCameraPitch(RING_INFO *ring, int16_t target);
0x004254D0  0x005D  +       void __cdecl Inv_Ring_MotionItemSelect(RING_INFO *ring, INVENTORY_ITEM *inv_item);
0x00425530  0x0063  +       void __cdecl Inv_Ring_MotionItemDeselect(RING_INFO *ring, INVENTORY_ITEM *inv_item);

# game/invtext.c
0x004255A0  0x0082  +       void __cdecl Requester_Init(REQUEST_INFO *req);
0x00425630  0x00A3  +       void __cdecl Requester_Shutdown(REQUEST_INFO *req);
0x004256E0  0x001B  +       void __cdecl Requester_Item_CenterAlign(REQUEST_INFO *req, TEXTSTRING *txt);
0x00425700  0x0054  +       void __cdecl Requester_Item_LeftAlign(REQUEST_INFO *req, TEXTSTRING *txt);
0x00425760  0x0056  +       void __cdecl Requester_Item_RightAlign(REQUEST_INFO *req, TEXTSTRING *txt);
0x004257C0  0x0866  +       int32_t __cdecl Requester_Display(REQUEST_INFO *req, int32_t des, int32_t backgrounds);
0x00426030  0x00AA  +       void __cdecl Requester_SetHeading(REQUEST_INFO *req, char *text1, uint32_t flags1, char *text2, uint32_t flags2);
0x004260E0  0x0013  +       void __cdecl Requester_RemoveAllItems(REQUEST_INFO *req);
0x00426100  0x00C0  +       void __cdecl Requester_ChangeItem(REQUEST_INFO *req, int32_t item, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);
0x004261C0  0x00AC  +       void __cdecl Requester_AddItem(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);
0x00426270  0x0039  +       void __cdecl Requester_SetSize(REQUEST_INFO *req, int32_t maxlines, int32_t ypos);
0x004262B0  0x0081  +R      int32_t __cdecl AddAssaultTime(uint32_t time);
0x00426340  0x01D6  +R      void __cdecl ShowGymStatsText(char *time_str, int32_t type);
0x00426520  0x0397  +R      void __cdecl ShowStatsText(char *time_str, int32_t type);
0x004268C0  0x0425  +R      void __cdecl ShowEndStatsText(void);

# game/items.c
0x00426CF0  0x0052  +       void __cdecl Item_InitialiseArray(int32_t num_items);
0x00426D50  0x011E  +       void __cdecl Item_Kill(int16_t item_num);
0x00426E70  0x0039  +       int16_t __cdecl Item_Create(void);
0x00426EB0  0x01B3  +       void __cdecl Item_Initialise(int16_t item_num);
0x00427070  0x008A  +       void __cdecl Item_RemoveActive(int16_t item_num);
0x00427100  0x006F  +       void __cdecl Item_RemoveDrawn(int16_t item_num);
0x00427170  0x005A  +       void __cdecl Item_AddActive(int16_t item_num);
0x004271D0  0x009C  +       void __cdecl Item_NewRoom(int16_t item_num, int16_t room_num);
0x00427270  0x007C  +       int32_t __cdecl Item_GlobalReplace(GAME_OBJECT_ID src_object_id, GAME_OBJECT_ID dst_object_id);
0x004272F0  0x0030  +       void __cdecl Effect_InitialiseArray(void);
0x00427320  0x006C  +       int16_t __cdecl Effect_Create(int16_t room_num);
0x00427390  0x00E3  +       void __cdecl Effect_Kill(int16_t fx_num);
0x00427480  0x0093  +       void __cdecl Effect_NewRoom(int16_t fx_num, int16_t room_num);
0x00427520  0x0058  +       void __cdecl Item_ClearKilled(void);

# game/lara.c
0x00427580  0x0195  +       void __cdecl Lara_HandleAboveWater(ITEM *item, COLL_INFO *coll);
0x00427720  0x0066  +       void __cdecl Lara_LookUpDown(void);
0x00427790  0x0072  +       void __cdecl Lara_LookLeftRight(void);
0x00427810  0x0089  +       void __cdecl Lara_ResetLook(void);
0x004278A0  0x008B  +       void __cdecl Lara_State_Walk(ITEM *item, COLL_INFO *coll);
0x00427930  0x0143  +       void __cdecl Lara_State_Run(ITEM *item, COLL_INFO *coll);
0x00427A80  0x0148  +       void __cdecl Lara_State_Stop(ITEM *item, COLL_INFO *coll);
0x00427BD0  0x00D3  +       void __cdecl Lara_State_ForwardJump(ITEM *item, COLL_INFO *coll);
0x00427CB0  0x0057  +       void __cdecl Lara_State_FastBack(ITEM *item, COLL_INFO *coll);
0x00427D10  0x008A  +       void __cdecl Lara_State_TurnRight(ITEM *item, COLL_INFO *coll);
0x00427DA0  0x0089  +       void __cdecl Lara_State_TurnLeft(ITEM *item, COLL_INFO *coll);
0x00427E30  0x0014  +       void __cdecl Lara_State_Death(ITEM *item, COLL_INFO *coll);
0x00427E50  0x0040  +       void __cdecl Lara_State_FastFall(ITEM *item, COLL_INFO *coll);
0x00427E90  0x0058  +       void __cdecl Lara_State_Hang(ITEM *item, COLL_INFO *coll);
0x00427EF0  0x001C  +       void __cdecl Lara_State_Reach(ITEM *item, COLL_INFO *coll);
0x00427F10  0x000A  +       void __cdecl Lara_State_Splat(ITEM *item, COLL_INFO *coll);
0x00427F20  0x010C  +       void __cdecl Lara_State_Compress(ITEM *item, COLL_INFO *coll);
0x00428030  0x0084  +       void __cdecl Lara_State_Back(ITEM *item, COLL_INFO *coll);
0x004280C0  0x000B  +       void __cdecl Lara_State_Null(ITEM *item, COLL_INFO *coll);
0x004280D0  0x004B  +       void __cdecl Lara_State_FastTurn(ITEM *item, COLL_INFO *coll);
0x00428120  0x007C  +       void __cdecl Lara_State_StepRight(ITEM *item, COLL_INFO *coll);
0x004281A0  0x007C  +       void __cdecl Lara_State_StepLeft(ITEM *item, COLL_INFO *coll);
0x00428220  0x002B  +       void __cdecl Lara_State_Slide(ITEM *item, COLL_INFO *coll);
0x00428250  0x004A  +       void __cdecl Lara_State_BackJump(ITEM *item, COLL_INFO *coll);
0x004282A0  0x0033  +       void __cdecl Lara_State_RightJump(ITEM *item, COLL_INFO *coll);
0x004282E0  0x0033  +       void __cdecl Lara_State_LeftJump(ITEM *item, COLL_INFO *coll);
0x00428320  0x0013  +       void __cdecl Lara_State_UpJump(ITEM *item, COLL_INFO *coll);
0x00428340  0x002C  +       void __cdecl Lara_State_Fallback(ITEM *item, COLL_INFO *coll);
0x00428370  0x0035  +       void __cdecl Lara_State_HangLeft(ITEM *item, COLL_INFO *coll);
0x004283B0  0x0035  +       void __cdecl Lara_State_HangRight(ITEM *item, COLL_INFO *coll);
0x004283F0  0x0018  +       void __cdecl Lara_State_SlideBack(ITEM *item, COLL_INFO *coll);
0x00428410  0x0030  +       void __cdecl Lara_State_PushBlock(ITEM *item, COLL_INFO *coll);
0x00428440  0x0027  +       void __cdecl Lara_State_PPReady(ITEM *item, COLL_INFO *coll);
0x00428470  0x0030  +       void __cdecl Lara_State_Pickup(ITEM *item, COLL_INFO *coll);
0x004284A0  0x0058  +       void __cdecl Lara_State_PickupFlare(ITEM *item, COLL_INFO *coll);
0x00428500  0x0039  +       void __cdecl Lara_State_SwitchOn(ITEM *item, COLL_INFO *coll);
0x00428540  0x0030  +       void __cdecl Lara_State_UseKey(ITEM *item, COLL_INFO *coll);
0x00428570  0x001D  +       void __cdecl Lara_State_Special(ITEM *item, COLL_INFO *coll);
0x00428590  0x002F  +       void __cdecl Lara_State_SwanDive(ITEM *item, COLL_INFO *coll);
0x004285C0  0x0054  +       void __cdecl Lara_State_FastDive(ITEM *item, COLL_INFO *coll);
0x00428620  0x0015  +       void __cdecl Lara_State_WaterOut(ITEM *item, COLL_INFO *coll);
0x00428640  0x00CA  +       void __cdecl Lara_State_Wade(ITEM *item, COLL_INFO *coll);
0x00428710  0x0096  +       void __cdecl Lara_State_DeathSlide(ITEM *item, COLL_INFO *coll);
0x004287B0  0x004C  +       void __cdecl Lara_State_Extra_Breath(ITEM *item, COLL_INFO *coll);
0x00428800  0x0047  +       void __cdecl Lara_State_Extra_YetiKill(ITEM *item, COLL_INFO *coll);
0x00428850  0x0091  +       void __cdecl Lara_State_Extra_SharkKill(ITEM *item, COLL_INFO *coll);
0x004288F0  0x0013  +       void __cdecl Lara_State_Extra_Airlock(ITEM *item, COLL_INFO *coll);
0x00428910  0x001D  +       void __cdecl Lara_State_Extra_GongBong(ITEM *item, COLL_INFO *coll);
0x00428930  0x0051  +       void __cdecl Lara_State_Extra_DinoKill(ITEM *item, COLL_INFO *coll);
0x00428990  0x00BC  +       void __cdecl Lara_State_Extra_PullDagger(ITEM *item, COLL_INFO *coll);
0x00428A50  0x004D  +       void __cdecl Lara_State_Extra_StartAnim(ITEM *item, COLL_INFO *coll);
0x00428AA0  0x00A5  +       void __cdecl Lara_State_Extra_StartHouse(ITEM *item, COLL_INFO *coll);
0x00428B50  0x00A3  +       void __cdecl Lara_State_Extra_FinalAnim(ITEM *item, COLL_INFO *coll);
0x00428C00  0x0051  +       int32_t __cdecl Lara_Fallen(ITEM *item, COLL_INFO *coll);
0x00428C60  0x009B  +       void __cdecl Lara_CollideStop(ITEM *item, COLL_INFO *coll);
0x00428D20  0x0191  +       void __cdecl Lara_Col_Walk(ITEM *item, COLL_INFO *coll);
0x00428EC0  0x0176  +       void __cdecl Lara_Col_Run(ITEM *item, COLL_INFO *coll);
0x00429040  0x0081  +       void __cdecl Lara_Col_Stop(ITEM *item, COLL_INFO *coll);
0x004290D0  0x00D7  +       void __cdecl Lara_Col_ForwardJump(ITEM *item, COLL_INFO *coll);
0x004291B0  0x00B3  +       void __cdecl Lara_Col_FastBack(ITEM *item, COLL_INFO *coll);
0x00429270  0x0095  +       void __cdecl Lara_Col_TurnRight(ITEM *item, COLL_INFO *coll);
0x00429310  0x0013  +       void __cdecl Lara_Col_TurnLeft(ITEM *item, COLL_INFO *coll);
0x00429330  0x0068  +       void __cdecl Lara_Col_Death(ITEM *item, COLL_INFO *coll);
0x004293A0  0x0099  +       void __cdecl Lara_Col_FastFall(ITEM *item, COLL_INFO *coll);
0x00429440  0x0127  +       void __cdecl Lara_Col_Hang(ITEM *item, COLL_INFO *coll);
0x00429570  0x0090  +       void __cdecl Lara_Col_Reach(ITEM *item, COLL_INFO *coll);
0x00429600  0x0059  +       void __cdecl Lara_Col_Splat(ITEM *item, COLL_INFO *coll);
0x00429660  0x0013  +       void __cdecl Lara_Col_Land(ITEM *item, COLL_INFO *coll);
0x00429680  0x0096  +       void __cdecl Lara_Col_Compress( ITEM *item, COLL_INFO *coll );
0x00429720  0x00FB  +       void __cdecl Lara_Col_Back(ITEM *item, COLL_INFO *coll);
0x00429820  0x00BE  +       void __cdecl Lara_Col_StepRight(ITEM *item, COLL_INFO *coll);
0x004298E0  0x0013  +       void __cdecl Lara_Col_StepLeft(ITEM *item, COLL_INFO *coll);
0x00429900  0x001E  +       void __cdecl Lara_Col_Slide(ITEM *item, COLL_INFO *coll);
0x00429920  0x0023  +       void __cdecl Lara_Col_BackJump(ITEM *item, COLL_INFO *coll);
0x00429950  0x0023  +       void __cdecl Lara_Col_RightJump(ITEM *item, COLL_INFO *coll);
0x00429980  0x0023  +       void __cdecl Lara_Col_LeftJump(ITEM *item, COLL_INFO *coll);
0x004299B0  0x011B  +       void __cdecl Lara_Col_UpJump(ITEM *item, COLL_INFO *coll);
0x00429AD0  0x0083  +       void __cdecl Lara_Col_Fallback(ITEM *item, COLL_INFO *coll);
0x00429B60  0x0033  +       void __cdecl Lara_Col_HangLeft(ITEM *item, COLL_INFO *coll);
0x00429BA0  0x0033  +       void __cdecl Lara_Col_HangRight(ITEM *item, COLL_INFO *coll);
0x00429BE0  0x0023  +       void __cdecl Lara_Col_SlideBack(ITEM *item, COLL_INFO *coll);
0x00429C10  0x0013  +       void __cdecl Lara_Col_Null(ITEM *item, COLL_INFO *coll);
0x00429C30  0x0081  +       void __cdecl Lara_Col_Roll(ITEM *item, COLL_INFO *coll);
0x00429CC0  0x00B3  +       void __cdecl Lara_Col_Roll2(ITEM *item, COLL_INFO *coll);
0x00429D80  0x0069  +       void __cdecl Lara_Col_SwanDive(ITEM *item, COLL_INFO *coll);
0x00429DF0  0x0079  +       void __cdecl Lara_Col_FastDive(ITEM *item, COLL_INFO *coll);
0x00429E70  0x0162  +       void __cdecl Lara_Col_Wade(ITEM *item, COLL_INFO *coll);
0x00429FE0  0x0036  +       void __cdecl Lara_Col_Default(ITEM *item, COLL_INFO *coll);
0x0042A020  0x0074  +       void __cdecl Lara_Col_Jumper(ITEM *item, COLL_INFO *coll);
0x0042A0A0  0x0032  +       void __cdecl Lara_GetCollisionInfo(ITEM *item, COLL_INFO *coll);
0x0042A0E0  0x00E2  +       void __cdecl Lara_SlideSlope(ITEM *item, COLL_INFO *coll);
0x0042A1D0  0x0067  +       int32_t __cdecl Lara_HitCeiling(ITEM *item, COLL_INFO *coll);
0x0042A240  0x007F  +       int32_t __cdecl Lara_DeflectEdge(ITEM *item, COLL_INFO *coll);
0x0042A2C0  0x0136  +       void __cdecl Lara_DeflectEdgeJump(ITEM *item, COLL_INFO *coll);
0x0042A440  0x00AB  +       void __cdecl Lara_SlideEdgeJump(ITEM *item, COLL_INFO *coll);
0x0042A530  0x00E1  +       int32_t __cdecl Lara_TestWall(ITEM *item, int32_t front, int32_t right, int32_t down);
0x0042A640  0x00F5  +       int32_t __cdecl Lara_TestHangOnClimbWall(ITEM *item, COLL_INFO *coll);
0x0042A750  0x00BE  +       int32_t __cdecl Lara_TestClimbStance(ITEM *item, COLL_INFO *coll);
0x0042A810  0x033E  +       void __cdecl Lara_HangTest(ITEM *item, COLL_INFO *coll);
0x0042AB70  0x00AD  +       int32_t __cdecl Lara_TestEdgeCatch(ITEM *item, COLL_INFO *coll, int32_t *edge);
0x0042AC20  0x016D  +       int32_t __cdecl Lara_TestHangJumpUp(ITEM *item, COLL_INFO *coll);
0x0042AD90  0x019E  +       int32_t __cdecl Lara_TestHangJump(ITEM *item, COLL_INFO *coll);
0x0042AF30  0x00B1  +       int32_t __cdecl Lara_TestHangSwingIn(ITEM *item, PHD_ANGLE angle);
0x0042AFF0  0x02E7  +       int32_t __cdecl Lara_TestVault(ITEM *item, COLL_INFO *coll);
0x0042B2E0  0x0130  +       int32_t __cdecl Lara_TestSlide(ITEM *item, COLL_INFO *coll);
0x0042B410  0x0075  +       int16_t __cdecl Lara_FloorFront(ITEM *item, PHD_ANGLE ang, int32_t dist);
0x0042B490  0x00BB  +       int32_t __cdecl Lara_LandedBad(ITEM *item, COLL_INFO *coll);
0x0042B550  0x038F  +       void __cdecl Lara_GetJointAbsPosition(XYZ_32 *vec, int32_t joint);
0x0042B8E0  0x031A  +       void __cdecl Lara_GetJointAbsPosition_I(ITEM *item, XYZ_32 *vec, int16_t *frame1, int16_t *frame2, int32_t frac, int32_t rate);

# game/lara1gun.c
0x0042BC00  0x0033  +       void __cdecl Gun_Rifle_DrawMeshes(LARA_GUN_TYPE weapon_type);
0x0042BC40  0x002B  +       void __cdecl Gun_Rifle_UndrawMeshes(LARA_GUN_TYPE weapon_type);
0x0042BC70  0x0070  +       void __cdecl Gun_Rifle_Ready(LARA_GUN_TYPE weapon_type);
0x0042BCE0  0x00F5  +       void __cdecl Gun_Rifle_Control(LARA_GUN_TYPE weapon_type);
0x0042BDE0  0x00F2  +       void __cdecl Gun_Rifle_FireShotgun(void);
0x0042BEE0  0x007B  +       void __cdecl Gun_Rifle_FireM16(bool running);
0x0042BF60  0x0187  +       void __cdecl Gun_Rifle_FireHarpoon(void);
0x0042C0F0  0x0344  -       void __cdecl HarpoonBolt_Control(int16_t item_num);
0x0042C440  0x00F0  +       void __cdecl Gun_Rifle_FireGrenade(void);
0x0042C530  0x03FD  -       void __cdecl Rocket_Control(int16_t item_num);
0x0042C930  0x0166  +       void __cdecl Gun_Rifle_Draw(LARA_GUN_TYPE weapon_type);
0x0042CAA0  0x0104  +       void __cdecl Gun_Rifle_Undraw(LARA_GUN_TYPE weapon_type);
0x0042CBB0  0x037E  +       void __cdecl Gun_Rifle_Animate(LARA_GUN_TYPE weapon_type);

# game/lara2gun.c
0x0042CF60  0x004F  +       void __cdecl Gun_Pistols_SetArmInfo(LARA_ARM *arm, int32_t frame);
0x0042CFB0  0x007C  +       void __cdecl Gun_Pistols_Draw(LARA_GUN_TYPE weapon_type);
0x0042D030  0x0225  +       void __cdecl Gun_Pistols_Undraw(LARA_GUN_TYPE weapon_type);
0x0042D260  0x005C  +       void __cdecl Gun_Pistols_Ready(LARA_GUN_TYPE weapon_type);
0x0042D2C0  0x004E  +       void __cdecl Gun_Pistols_DrawMeshes(LARA_GUN_TYPE weapon_type);
0x0042D310  0x003A  +       void __cdecl Gun_Pistols_UndrawMeshLeft(LARA_GUN_TYPE weapon_type);
0x0042D350  0x003A  +       void __cdecl Gun_Pistols_UndrawMeshRight(LARA_GUN_TYPE weapon_type);
0x0042D390  0x018C  +       void __cdecl Gun_Pistols_Control(LARA_GUN_TYPE weapon_type);
0x0042D520  0x0330  +       void __cdecl Gun_Pistols_Animate(LARA_GUN_TYPE weapon_type);

# game/laraclimb.c
0x0042D850  0x0035  +       void __cdecl Lara_State_ClimbLeft(ITEM *item, COLL_INFO *coll);
0x0042D890  0x0035  +       void __cdecl Lara_State_ClimbRight(ITEM *item, COLL_INFO *coll);
0x0042D8D0  0x0075  +       void __cdecl Lara_State_ClimbStance(ITEM *item, COLL_INFO *coll);
0x0042D950  0x0014  +       void __cdecl Lara_State_Climbing(ITEM *item, COLL_INFO *coll);
0x0042D970  0x001E  +       void __cdecl Lara_State_ClimbEnd(ITEM *item, COLL_INFO *coll);
0x0042D990  0x0014  +       void __cdecl Lara_State_ClimbDown(ITEM *item, COLL_INFO *coll);
0x0042D9B0  0x005D  +       void __cdecl Lara_Col_ClimbLeft(ITEM *item, COLL_INFO *coll);
0x0042DA10  0x0059  +       void __cdecl Lara_Col_ClimbRight(ITEM *item, COLL_INFO *coll);
0x0042DA70  0x020D  +       void __cdecl Lara_Col_ClimbStance(ITEM *item, COLL_INFO *coll);
0x0042DC80  0x014D  +       void __cdecl Lara_Col_Climbing(ITEM *item, COLL_INFO *coll);
0x0042DDD0  0x019C  +       void __cdecl Lara_Col_ClimbDown(ITEM *item, COLL_INFO *coll);
0x0042DF70  0x00AA  +       int32_t __cdecl Lara_CheckForLetGo(ITEM *item, COLL_INFO *coll);
0x0042E020  0x0263  +       int32_t __cdecl Lara_TestClimb(int32_t x, int32_t y, int32_t z, int32_t xfront, int32_t zfront, int32_t item_height, int16_t item_room, int32_t *shift);
0x0042E290  0x00BC  +       int32_t __cdecl Lara_TestClimbPos(ITEM *item, int32_t front, int32_t right, int32_t origin, int32_t height, int32_t *shift);
0x0042E360  0x00EF  +       void __cdecl Lara_DoClimbLeftRight(ITEM *item, COLL_INFO *coll, int32_t result, int32_t shift);
0x0042E450  0x0235  +       int32_t __cdecl Lara_TestClimbUpPos(ITEM *item, int32_t front, int32_t right, int32_t *shift, int32_t *ledge);

# game/larafire.c
0x0042E6A0  0x04E8  +       void __cdecl Gun_Control(void);
0x0042EC10  0x003B  +       int32_t __cdecl Gun_CheckForHoldingState(int32_t state);
0x0042EC50  0x011C  +       void __cdecl Gun_InitialiseNewWeapon(void);
0x0042ED90  0x0194  +       void __cdecl Gun_TargetInfo(const WEAPON_INFO *winfo);
0x0042EF30  0x021C  +       void __cdecl Gun_GetNewTarget(WEAPON_INFO *winfo);
0x0042F150  0x00AA  +       void __cdecl Gun_FindTargetPoint(const ITEM *item, GAME_VECTOR *target);
0x0042F200  0x00C1  +       void __cdecl Gun_AimWeapon(WEAPON_INFO *winfo, LARA_ARM *arm);
0x0042F2D0  0x0360  +       int32_t __cdecl Gun_FireWeapon(LARA_GUN_TYPE weapon_type, ITEM *target, const ITEM *src, const PHD_ANGLE *angles);
0x0042F640  0x0096  +       void __cdecl Gun_HitTarget(ITEM *item, GAME_VECTOR *hitpos, int32_t damage);
0x0042F6E0  0x0051  +       void __cdecl Gun_SmashItem(int16_t item_num, LARA_GUN_TYPE weapon_type);
0x0042F740  0x003B  +       GAME_OBJECT_ID Gun_GetWeaponAnim(const LARA_GUN_TYPE gun_type);

# game/laraflare.c
0x0042F7A0  0x009D  -       int32_t __cdecl Flare_DoLight(XYZ_32 *pos, int32_t flare_age);
0x0042F840  0x00D3  -       void __cdecl Flare_DoInHand(int32_t flare_age);
0x0042F920  0x00F8  -       void __cdecl Flare_DrawInAir(ITEM *item);
0x0042FA20  0x01D7  -       void __cdecl Flare_Create(int32_t thrown);
0x0042FC00  0x004B  -       void __cdecl Flare_SetArm(int32_t frame);
0x0042FC50  0x0169  -       void __cdecl Flare_Draw(void);
0x0042FDC0  0x0221  -       void __cdecl Flare_Undraw(void);
0x0042FFF0  0x0018  -       void __cdecl Flare_DrawMeshes(void);
0x00430010  0x0018  -       void __cdecl Flare_UndrawMeshes(void);
0x00430030  0x003E  -       void __cdecl Flare_Ready(void);
0x00430070  0x026E  -       void __cdecl Flare_Control(int16_t item_num);

# game/laramisc.c
0x004302E0  0x0668  +       void __cdecl Lara_Control(int16_t item_num);
0x00430970  0x02CD  +       void __cdecl Lara_Animate(ITEM *item);
0x00430C70  0x013F  +       void __cdecl Lara_UseItem(GAME_OBJECT_ID object_id);
0x00430E30  0x00BA  +       void __cdecl Lara_CheatGetStuff(void);
0x00430EF0  0x001B  +       void __cdecl Lara_ControlExtra(int16_t item_num);
0x00430F10  0x0021  +       void __cdecl Lara_InitialiseLoad(int16_t item_num);
0x00430F40  0x02BD  +       void __cdecl Lara_Initialise(int32_t type);
0x00431200  0x036C  +       void __cdecl Lara_InitialiseInventory(int32_t level_num);
0x00431570  0x00FA  +       void __cdecl Lara_InitialiseMeshes(int32_t level_num);

# game/larasurf.c
0x00431670  0x0158  +       void __cdecl Lara_HandleSurface(ITEM *item, COLL_INFO *coll);
0x004317D0  0x0070  +       void __cdecl Lara_State_SurfSwim(ITEM *item, COLL_INFO *coll);
0x00431840  0x005E  +       void __cdecl Lara_State_SurfBack(ITEM *item, COLL_INFO *coll);
0x004318A0  0x0060  +       void __cdecl Lara_State_SurfLeft(ITEM *item, COLL_INFO *coll);
0x00431900  0x0060  +       void __cdecl Lara_State_SurfRight(ITEM *item, COLL_INFO *coll);
0x00431960  0x00EB  +       void __cdecl Lara_State_SurfTread(ITEM *item, COLL_INFO *coll);
0x00431A50  0x0032  +       void __cdecl Lara_Col_SurfSwim(ITEM *item, COLL_INFO *coll);
0x00431A90  0x0023  +       void __cdecl Lara_Col_SurfBack(ITEM *item, COLL_INFO *coll);
0x00431AC0  0x0023  +       void __cdecl Lara_Col_SurfLeft(ITEM *item, COLL_INFO *coll);
0x00431AF0  0x0023  +       void __cdecl Lara_Col_SurfRight(ITEM *item, COLL_INFO *coll);
0x00431B20  0x001E  +       void __cdecl Lara_Col_SurfTread(ITEM *item, COLL_INFO *coll);
0x00431B40  0x00F3  +       void __cdecl Lara_SurfaceCollision(ITEM *item, COLL_INFO *coll);
0x00431C40  0x00E7  +       int32_t __cdecl Lara_TestWaterStepOut(ITEM *item, COLL_INFO *coll);
0x00431D30  0x021C  +       int32_t __cdecl Lara_TestWaterClimbOut(ITEM *item, COLL_INFO *coll);

# game/laraswim.c
0x00431F50  0x0223  +       void __cdecl Lara_HandleUnderwater(ITEM *item, COLL_INFO *coll);
0x00432180  0x0086  +       void __cdecl Lara_SwimTurn(ITEM *item);
0x00432210  0x006B  +       void __cdecl Lara_State_Swim(ITEM *item, COLL_INFO *coll);
0x00432280  0x0076  +       void __cdecl Lara_State_Glide(ITEM *item, COLL_INFO *coll);
0x00432300  0x0085  +       void __cdecl Lara_State_Tread(ITEM *item, COLL_INFO *coll);
0x00432390  0x0014  +       void __cdecl Lara_State_Dive(ITEM *item, COLL_INFO *coll);
0x004323B0  0x0053  +       void __cdecl Lara_State_UWDeath(ITEM *item, COLL_INFO *coll);
0x00432410  0x000B  +       void __cdecl Lara_State_UWTwist(ITEM *item, COLL_INFO *coll);
0x00432420  0x0013  +       void __cdecl Lara_Col_Swim(ITEM *item, COLL_INFO *coll);
0x00432440  0x005B  +       void __cdecl Lara_Col_UWDeath(ITEM *item, COLL_INFO *coll);
0x004324A0  0x0192  +       int32_t __cdecl Lara_GetWaterDepth(int32_t x, int32_t y, int32_t z, int16_t room_num);
0x00432640  0x00CE  +       void __cdecl Lara_TestWaterDepth(ITEM *item, COLL_INFO *coll);
0x00432710  0x015C  +       void __cdecl Lara_SwimCollision(ITEM *item, COLL_INFO *coll);
0x00432870  0x01EC  +       void __cdecl Lara_WaterCurrent(COLL_INFO *coll);

# game/lot.c
0x00432A60  0x0053  +       void __cdecl LOT_InitialiseArray(void);
0x00432AC0  0x004F  +       void __cdecl LOT_DisableBaddieAI(int16_t item_num);
0x00432B10  0x01B0  +       bool __cdecl LOT_EnableBaddieAI(int16_t item_num, bool always);
0x00432CC0  0x0106  +       void __cdecl LOT_InitialiseSlot(int16_t item_num, int32_t slot);
0x00432ED0  0x00B8  +       void __cdecl LOT_CreateZone(ITEM *item);
0x00432F90  0x0049  +       void __cdecl LOT_ClearLOT(LOT_INFO *lot);

# game/missile.c
0x00432FE0  0x02D0  -R      void __cdecl ControlMissile(int16_t fx_num);
0x004332B0  0x00A7  -R      void __cdecl ShootAtLara(FX *fx);
0x00433360  0x0386  +R      int32_t __cdecl Effect_ExplodingDeath(int16_t item_num, int32_t mesh_bits, int16_t damage);
0x004336F0  0x0200  -R      void __cdecl BodyPart_Control(int16_t fx_num);

# game/moveblock.c
0x004338F0  0x002C  -R      void __cdecl InitialiseMovingBlock(int16_t item_num);
0x00433920  0x0148  -R      void __cdecl MovableBlock(int16_t item_num);
0x00433A70  0x0239  -R      void __cdecl MovableBlockCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00433CD0  0x004E  -R      int32_t __cdecl TestBlockMovable(ITEM *item, int32_t block_height);
0x00433D20  0x0137  -R      int32_t __cdecl TestBlockPush(ITEM *item, int32_t block_height, uint16_t quadrant);
0x00433E70  0x0225  -R      int32_t __cdecl TestBlockPull(ITEM *item, int32_t block_height, uint16_t quadrant);
0x004340B0  0x00BB  +       void __cdecl Room_AlterFloorHeight(ITEM *item, int32_t height);
0x00434170  0x0022  -R      void __cdecl DrawMovableBlock(ITEM *item);
0x004341A0  0x006B  -R      void __cdecl DrawUnclippedItem(ITEM *item);

# game/objects.c
0x00434210  0x00DB  -R      void __cdecl EarthQuake(int16_t item_num);
0x004342F0  0x003C  -R      void __cdecl ControlCutShotgun(int16_t item_num);
0x00434330  0x009D  -R      void __cdecl InitialiseFinalLevel(void);
0x00434400  0x020F  +       void __cdecl FinalLevelCounter_Control(int16_t item_num);
0x00434610  0x00D9  -R      void __cdecl MiniCopterControl(int16_t item_num);
0x004346F0  0x007C  -R      void __cdecl InitialiseDyingMonk(int16_t item_num);
0x00434770  0x0087  -R      void __cdecl DyingMonk(int16_t item_num);
0x00434800  0x00BD  -R      void __cdecl ControlGongBonger(int16_t item_num);
0x004348C0  0x00BF  -R      void __cdecl DeathSlideCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00434980  0x028F  -R      void __cdecl ControlDeathSlide(int16_t item_num);
0x00434C10  0x00E3  -R      void __cdecl BigBowlControl(int16_t item_num);
0x00434D00  0x007E  -R      void __cdecl BellControl(int16_t item_num);
0x00434D80  0x0075  -R      void __cdecl InitialiseWindow(int16_t item_num);
0x00434E00  0x00C4  -R      void __cdecl SmashWindow(int16_t item_num);
0x00434ED0  0x0096  -R      void __cdecl WindowControl(int16_t item_num);
0x00434F70  0x00DC  -R      void __cdecl SmashIceControl(int16_t item_num);
0x00435050  0x0042  -R      void __cdecl ShutThatDoor(DOORPOS_DATA *d);
0x004350A0  0x0032  -R      void __cdecl OpenThatDoor(DOORPOS_DATA *d);
0x004350E0  0x03DC  -R      void __cdecl InitialiseDoor(int16_t item_num);
0x004354C0  0x00C8  -R      void __cdecl DoorControl(int16_t item_num);
0x00435590  0x00B1  -R      int32_t __cdecl OnDrawBridge(ITEM *item, int32_t x, int32_t y);
0x00435650  0x0036  -R      void __cdecl DrawBridgeFloor(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435690  0x003B  -R      void __cdecl DrawBridgeCeiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x004356D0  0x002C  -R      void __cdecl DrawBridgeCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00435700  0x0035  -R      void __cdecl InitialiseLift(int16_t item_num);
0x00435740  0x00D4  -R      void __cdecl LiftControl(int16_t item_num);
0x00435820  0x0179  -R      void __cdecl LiftFloorCeiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *floor, int32_t *ceiling);
0x004359A0  0x0035  -R      void __cdecl LiftFloor(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x004359E0  0x0035  -R      void __cdecl LiftCeiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435A20  0x0016  -R      void __cdecl BridgeFlatFloor(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435A40  0x001B  -R      void __cdecl BridgeFlatCeiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435A60  0x003B  -R      int32_t __cdecl GetOffset(ITEM *item, int32_t x, int32_t z);
0x00435AA0  0x0030  -R      void __cdecl BridgeTilt1Floor(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435AD0  0x0035  -R      void __cdecl BridgeTilt1Ceiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435B10  0x002F  -R      void __cdecl BridgeTilt2Floor(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435B40  0x0034  -R      void __cdecl BridgeTilt2Ceiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00435B80  0x010C  -R      void __cdecl CopterControl(int16_t item_num);
0x00435C90  0x00D2  -R      void __cdecl GeneralControl(int16_t item_num);
0x00435D70  0x008D  -R      void __cdecl DetonatorControl(int16_t item_num);

# game/people.c
0x00435E00  0x0085  +       bool __cdecl Creature_CanTargetEnemy(const ITEM *item, const AI_INFO *info);
0x00435E90  0x003B  -R      void __cdecl ControlGlow(int16_t fx_num);
0x00435ED0  0x004E  -R      void __cdecl ControlGunShot(int16_t fx_num);
0x00435F20  0x0066  -R      int16_t __cdecl GunShot(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);
0x00435F90  0x00B9  -R      int16_t __cdecl GunHit(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);
0x00436050  0x00A7  -R      int16_t __cdecl GunMiss(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);
0x00436100  0x01C4  -R      int32_t __cdecl ShotLara(ITEM *item, AI_INFO *info, BITE *gun, int16_t extra_rotation, int32_t damage);
0x004362D0  0x0043  -R      void __cdecl InitialiseCult1(int16_t item_num);
0x00436320  0x0401  -R      void __cdecl Cult1Control(int16_t item_num);
0x00436750  0x0050  -R      void __cdecl InitialiseCult3(int16_t item_num);
0x004367A0  0x053C  -R      void __cdecl Cult3Control(int16_t item_num);
0x00436D10  0x03CA  -R      void __cdecl Worker1Control(int16_t item_num);
0x00437110  0x042A  -R      void __cdecl Worker2Control(int16_t item_num);
0x00437570  0x030B  -R      void __cdecl BanditControl(int16_t item_num);
0x004378B0  0x0408  -R      void __cdecl Bandit2Control(int16_t item_num);
0x00437CF0  0x0172  -R      void __cdecl WinstonControl(int16_t item_num);

# game/pickup.c
0x00437E70  0x0480  -R      void __cdecl PickUpCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x004382F0  0x020A  -R      void __cdecl SwitchCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00438500  0x00FC  -R      void __cdecl SwitchCollision2(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00438600  0x023B  -R      void __cdecl DetonatorCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00438840  0x0223  -R      void __cdecl KeyHoleCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00438A80  0x0294  -R      void __cdecl PuzzleHoleCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);
0x00438D40  0x0039  -R      void __cdecl SwitchControl(int16_t item_num);
0x00438D80  0x00BD  -R      int32_t __cdecl SwitchTrigger(int16_t item_num, int16_t timer);
0x00438E40  0x003D  -R      int32_t __cdecl KeyTrigger(int16_t item_num);
0x00438E80  0x0033  -R      int32_t __cdecl PickupTrigger(int16_t item_num);
0x00438EC0  0x0023  -R      void __cdecl SecretControl(int16_t item_num);

# game/rat.c
0x00438EF0  0x01DC  -R      void __cdecl MouseControl(int16_t item_num);

# game/savegame.c
0x004390E0  0x0062  *R      void __cdecl InitialiseStartInfo(void);
0x00439150  0x00DB  -R      void __cdecl ModifyStartInfo(int32_t level_num);
0x00439230  0x0201  -R      void __cdecl CreateStartInfo(int32_t level_num);
0x00439440  0x052B  -R      void __cdecl CreateSaveGameInfo(void);
0x00439970  0x085C  -R      void __cdecl ExtractSaveGameInfo(void);
0x0043A1D0  0x0015  -R      void __cdecl ResetSG(void);
0x0043A1F0  0x004C  -R      void __cdecl WriteSG(void *pointer, int32_t size);
0x0043A240  0x0035  -R      void __cdecl ReadSG(void *pointer, int32_t size);

# game/setup.c
0x0043A280  0x015F  +       int32_t __cdecl Level_Initialise(int32_t level_num, int32_t level_type);
0x0043A3E0  0x0061  -R      void __cdecl InitialiseGameFlags(void);
0x0043A450  0x0027  -R      void __cdecl InitialiseLevelFlags(void);
0x0043A480  0x103B  -R      void __cdecl BaddyObjects(void);
0x0043B4C0  0x05FD  -R      void __cdecl TrapObjects(void);
0x0043BAC0  0x0C4C  -R      void __cdecl ObjectObjects(void);
0x0043C710  0x0068  -R      void __cdecl InitialiseObjects(void);
0x0043C780  0x00CE  -R      void __cdecl GetCarriedItems(void);

# game/shark.c
0x0043C850  0x0116  -R      void __cdecl JellyControl(int16_t item_num);
0x0043C970  0x021B  -R      void __cdecl BaracuddaControl(int16_t item_num);
0x0043CBA0  0x027C  -R      void __cdecl SharkControl(int16_t item_num);

# game/skidoo.c
0x0043CE30  0x0040  -R      void __cdecl InitialiseSkidoo(int16_t item_num);
0x0043CE70  0x00E1  -R      int32_t __cdecl SkidooCheckGeton(int16_t item_num, COLL_INFO *coll);
0x0043CF60  0x00F8  -R      void __cdecl SkidooCollision(int16_t item_num, ITEM *litem, COLL_INFO *coll);
0x0043D060  0x01F9  -R      void __cdecl SkidooBaddieCollision(ITEM *skidoo);
0x0043D260  0x00B2  -R      int32_t __cdecl TestHeight(ITEM *item, int32_t z_off, int32_t x_off, XYZ_32 *pos);
0x0043D320  0x027C  -R      int32_t __cdecl DoShift(ITEM *skidoo, XYZ_32 *pos, XYZ_32 *old);
0x0043D5A0  0x0054  -R      int32_t __cdecl DoDynamics(int32_t height, int32_t fall_speed, int32_t *y);
0x0043D600  0x0090  -R      int32_t __cdecl GetCollisionAnim(ITEM *skidoo, XYZ_32 *moved);
0x0043D690  0x0140  -R      void __cdecl DoSnowEffect(ITEM *skidoo);
0x0043D7D0  0x049E  -R      int32_t __cdecl SkidooDynamics(ITEM *skidoo);
0x0043DC70  0x01B6  -R      int32_t __cdecl SkidooUserControl(ITEM *skidoo, int32_t height, int32_t *pitch);
0x0043DE30  0x0106  -R      int32_t __cdecl SkidooCheckGetOffOK(int32_t direction);
0x0043DF40  0x02B9  -R      void __cdecl SkidooAnimation(ITEM *skidoo, int32_t collide, int32_t dead);
0x0043E220  0x007C  -R      void __cdecl SkidooExplode(ITEM *skidoo);
0x0043E2A0  0x0233  -R      int32_t __cdecl SkidooCheckGetOff(void);
0x0043E4E0  0x011B  -R      void __cdecl SkidooGuns(void);
0x0043E600  0x0440  -R      int32_t __cdecl SkidooControl(void);
0x0043EA60  0x02D5  -R      void __cdecl DrawSkidoo(ITEM *item);
0x0043ED40  0x007F  -R      void __cdecl InitialiseSkidman(int16_t item_num);
0x0043EDD0  0x03E2  -R      void __cdecl SkidManControl(int16_t rider_num);
0x0043F1D0  0x0119  -R      void __cdecl SkidmanPush(ITEM *item, ITEM *lara_item, int32_t radius);
0x0043F2F0  0x0081  -R      void __cdecl SkidmanCollision(int16_t item_num, ITEM *lara_item, COLL_INFO *coll);

# game/sound.c
0x0043F380  0x0031  *       int32_t __cdecl Music_GetRealTrack(int32_t track);
0x0043F3C0  0x0484  +       void __cdecl Sound_Effect(int32_t sample_id, const XYZ_32 *pos, uint32_t flags);
0x0043F860  0x005E  +       void __cdecl Sound_StopEffect(int32_t sample_id);
0x0043F8C0  0x0086  +       void __cdecl Sound_EndScene(void);
0x0043F950  0x0024  +       void __cdecl Sound_Shutdown(void);
0x0043F980  0x002A  +       void __cdecl Sound_Init(void);

# game/sphere.c
0x0043F9B0  0x0128  -       int32_t __cdecl Collide_TestCollision(ITEM *item, const ITEM *lara_item);
0x0043FAE0  0x02D8  -       int32_t __cdecl Collide_GetSpheres(const ITEM *item, SPHERE *spheres, bool world_space);
0x0043FDC0  0x019A  -       void __cdecl Collide_GetJointAbsPosition(const ITEM *item, const XYZ_32 *vec, int32_t joint);
0x0043FF60  0x005D  -R      void __cdecl BaddieBiteEffect(ITEM *item, BITE *bite);

# game/spider.c
0x0043FFC0  0x00AC  -R      void __cdecl SpiderLeap(int16_t item_num, int16_t angle);
0x00440070  0x0206  -R      void __cdecl SpiderControl(int16_t item_num);
0x00440290  0x01A5  -R      void __cdecl BigSpiderControl(int16_t item_num);

# game/text.c
0x00440450  0x002C  +       void __cdecl Text_Init(void);
0x00440480  0x0105  +       TEXTSTRING *__cdecl Text_Create(int32_t x, int32_t y, int32_t z, const char *text);
0x00440590  0x0037  +       void __cdecl Text_ChangeText(TEXTSTRING *string, const char *text);
0x004405D0  0x0017  +       void __cdecl Text_SetScale(TEXTSTRING *string, int32_t scale_h, int32_t scale_v);
0x004405F0  0x002B  +       void __cdecl Text_Flash(TEXTSTRING *string, int16_t enable, int16_t rate);
0x00440620  0x008C  +       void __cdecl Text_AddBackground(TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off, int16_t y_off, int16_t z_off, int16_t color, uint16_t *gour_ptr, uint16_t flags);
0x004406B0  0x0010  +       void __cdecl Text_RemoveBackground(TEXTSTRING *string);
0x004406C0  0x0029  +       void __cdecl Text_AddOutline(TEXTSTRING *string, int16_t enable, int16_t color, uint16_t *gour_ptr, uint16_t flags);
0x004406F0  0x0010  +       void __cdecl Text_RemoveOutline(TEXTSTRING *string);
0x00440700  0x001E  +       void __cdecl Text_CentreH(TEXTSTRING *string, int16_t enable);
0x00440720  0x001E  +       void __cdecl Text_CentreV(TEXTSTRING *string, int16_t enable);
0x00440740  0x001E  +       void __cdecl Text_AlignRight(TEXTSTRING *string, int16_t enable);
0x00440760  0x001E  +       void __cdecl Text_AlignBottom(TEXTSTRING *string, int16_t enable);
0x00440780  0x0107  +       int32_t __cdecl Text_GetWidth(TEXTSTRING *string);
0x00440890  0x0025  +       int32_t __cdecl Text_Remove(TEXTSTRING *string);
0x004408C0  0x0024  +       int16_t __cdecl Text_GetTextLength(const char *text);
0x004408F0  0x0027  +       void __cdecl Text_Draw(void);
0x00440920  0x0189  +       void __cdecl Text_DrawBorder(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height);
0x00440AB0  0x03D2  +       void __cdecl Text_DrawText(const TEXTSTRING *string);
0x00440E90  0x0037  +       uint32_t __cdecl Text_GetScaleH(uint32_t value);
0x00440ED0  0x0039  +       uint32_t __cdecl Text_GetScaleV(uint32_t value);

# game/traps.c
0x00440F10  0x01F4  -R      void __cdecl MineControl(int16_t mine_num);
0x00441110  0x0138  -R      void __cdecl ControlSpikeWall(int16_t item_num);
0x00441250  0x0115  -R      void __cdecl ControlCeilingSpikes(int16_t item_num);
0x00441370  0x0086  -R      void __cdecl HookControl(int16_t item_num);
0x00441400  0x0190  -R      void __cdecl PropellerControl(int16_t item_num);
0x00441590  0x017B  -R      void __cdecl SpinningBlade(int16_t item_num);
0x00441710  0x00FE  -R      void __cdecl IcicleControl(int16_t item_num);
0x00441810  0x003C  -R      void __cdecl InitialiseBlade(int16_t item_num);
0x00441850  0x0091  -R      void __cdecl BladeControl(int16_t item_num);
0x004418F0  0x0046  -R      void __cdecl InitialiseKillerStatue(int16_t item_num);
0x00441940  0x0109  -R      void __cdecl KillerStatueControl(int16_t item_num);
0x00441A50  0x00DB  -R      void __cdecl SpringBoardControl(int16_t item_num);
0x00441B30  0x003C  -R      void __cdecl InitialiseRollingBall(int16_t item_num);
0x00441B70  0x0347  -R      void __cdecl RollingBallControl(int16_t item_num);
0x00441EC0  0x024A  -R      void __cdecl RollingBallCollision(int16_t item_num, ITEM *litem, COLL_INFO *coll);
0x00442110  0x0155  -R      void __cdecl SpikeCollision(int16_t item_num, ITEM *litem, COLL_INFO *coll);
0x00442270  0x004F  -R      void __cdecl TrapDoorControl(int16_t item_num);
0x004422C0  0x003A  -R      void __cdecl TrapDoorFloor(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00442300  0x003F  -R      void __cdecl TrapDoorCeiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00442340  0x00A3  -R      int32_t __cdecl OnTrapDoor(ITEM *item, int32_t x, int32_t z);
0x004423F0  0x010A  -R      void __cdecl Pendulum(int16_t item_num);
0x00442500  0x0105  -R      void __cdecl FallingBlock(int16_t item_num);
0x00442610  0x003E  -R      void __cdecl FallingBlockFloor(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x00442650  0x0044  -R      void __cdecl FallingBlockCeiling(ITEM *item, int32_t x, int32_t y, int32_t z, int32_t *height);
0x004426A0  0x00BD  -R      void __cdecl TeethTrap(int16_t item_num);
0x00442760  0x00E0  -R      void __cdecl FallingCeiling(int16_t item_num);
0x00442840  0x013E  -R      void __cdecl DartEmitterControl(int16_t item_num);
0x00442980  0x0155  -R      void __cdecl DartsControl(int16_t item_num);
0x00442AE0  0x004B  -R      void __cdecl DartEffectControl(int16_t fx_num);
0x00442B30  0x0090  +       void __cdecl FlameEmitter_Control(int16_t item_num);
0x00442BC0  0x0164  +       void __cdecl Flame_Control(int16_t fx_num);
0x00442D30  0x0049  +       void __cdecl Lara_CatchFire(void);
0x00442D80  0x00E6  +       void __cdecl Lara_TouchLava(ITEM *item);
0x00442E70  0x00C5  +       void __cdecl EmberEmitter_Control(int16_t item_num);
0x00442F40  0x010B  +       void __cdecl Ember_Control(int16_t fx_num);

# game/yeti.c
0x00443050  0x02CA  -R      void __cdecl GiantYetiControl(int16_t item_num);
0x00443350  0x05ED  -R      void __cdecl YetiControl(int16_t item_num);

0x00443990  0x01B8  +R      void __cdecl BGND_Make640x480(uint8_t *bitmap, RGB_888 *palette);
0x00443B50  0x00B9  +R      int32_t __cdecl BGND_AddTexture(int32_t tile_idx, BYTE *bitmap, int32_t pal_index, RGB_888 *bmp_pal);
0x00443C10  0x0032  +R      void __cdecl BGND_GetPageHandles(void);
0x00443C50  0x005F  +R      void __cdecl BGND_DrawInGameBlack(void);
0x00443CB0  0x00DC  +R      void __cdecl DrawQuad(float sx, float sy, float width, float height, D3DCOLOR color);
0x00443D90  0x0220  +R      void __cdecl BGND_DrawInGameBackground(void);
0x00443FB0  0x0251  +R      void __cdecl DrawTextureTile(int32_t sx, int32_t sy, int32_t width, int32_t height, HWR_TEXTURE_HANDLE tex_source, int32_t tu, int32_t tv, int32_t t_width, int32_t t_height, D3DCOLOR color0, D3DCOLOR color1, D3DCOLOR color2, D3DCOLOR color3);
0x00444210  0x008B  +R      D3DCOLOR __cdecl BGND_CenterLighting(int32_t x, int32_t y, int32_t width, int32_t height);
0x004444C0  0x004D  +R      void __cdecl BGND_Free(void);
0x00444510  0x0030  +R      bool __cdecl BGND_Init(void);
0x00444540  0x003E  +R      void __cdecl Enumerate3DDevices(DISPLAY_ADAPTER *adapter);
0x00444570  0x001F  +R      bool __cdecl D3DCreate(void);
0x004445B0  0x00BD  +R      HRESULT __stdcall Enum3DDevicesCallback(GUID *lpGuid, LPTSTR lpDeviceDescription, LPTSTR lpDeviceName, LPD3DDEVICEDESC lpD3DHWDeviceDesc, LPD3DDEVICEDESC lpD3DHELDeviceDesc, LPVOID lpContext);
0x00444670  0x0037  +R      bool __cdecl D3DIsSupported(LPD3DDEVICEDESC desc);
0x004446B0  0x00B9  +R      bool __cdecl D3DSetViewport(void);
0x00444770  0x01B8  +R      void __cdecl D3DDeviceCreate(LPDDS lpBackBuffer);
0x00444930  0x006A  +R      void __cdecl Direct3DRelease(void);
0x00444980  0x0006  +R      bool __cdecl Direct3DInit(void);
0x00444990  0x0018  x       sub_444990
0x004449A0  0x0012  x       sub_4449A0
0x004449D0  0x00C6  x       sub_4449D0
0x00444AA0  0x0018  x       sub_444AA0
0x00444AB0  0x005F  x       sub_444AB0
0x00444B20  0x008C  x       sub_444B20
0x00444BB0  0x0005  x       sub_444BB0
0x00444BC0  0x0001  x       sub_444BC0
0x00444BD0  0x0054  +R      bool __cdecl DDrawCreate(LPGUID lpGUID);
0x00444C30  0x0033  +R      void __cdecl DDrawRelease(void);
0x00444C70  0x0073  +R      void __cdecl GameWindowCalculateSizeFromClient(int32_t *width, int32_t *height);
0x00444CF0  0x006A  +R      void __cdecl GameWindowCalculateSizeFromClientByZero(int32_t *width, int32_t *height);
0x00444D60  0x0041  +R      void __cdecl WinVidSetMinWindowSize(int32_t width, int32_t height);
0x00444DB0  0x0008  +R      void __cdecl WinVidClearMinWindowSize(void);
0x00444DC0  0x0041  +R      void __cdecl WinVidSetMaxWindowSize(int32_t width, int32_t height);
0x00444E10  0x0008  +R      void __cdecl WinVidClearMaxWindowSize(void);
0x00444E20  0x0048  +R      int32_t __cdecl CalculateWindowWidth(int32_t width, int32_t height);
0x00444E70  0x0028  +R      int32_t __cdecl CalculateWindowHeight(int32_t width, int32_t height);
0x00444EA0  0x0104  +R      bool __cdecl WinVidGetMinMaxInfo(LPMINMAXINFO info);
0x00444FB0  0x0011  +R      HWND __cdecl WinVidFindGameWindow(void);
0x00444FD0  0x00E2  +R      bool __cdecl WinVidSpinMessageLoop(bool needWait);
0x004450C0  0x0043  +R      void __cdecl WinVidShowGameWindow(int32_t nCmdShow);
0x00445110  0x003A  +R      void __cdecl WinVidHideGameWindow(void);
0x00445150  0x0035  +R      void __cdecl WinVidSetGameWindowSize(int32_t width, int32_t height);
0x00445190  0x00A7  +R      bool __cdecl ShowDDrawGameWindow(bool active);
0x00445240  0x0087  +R      bool __cdecl HideDDrawGameWindow(void);
0x004452D0  0x0044  +R      HRESULT __cdecl DDrawSurfaceCreate(LPDDSDESC dsp, LPDDS *surface);
0x00445320  0x0046  +R      HRESULT __cdecl DDrawSurfaceRestoreLost(LPDDS surface1, LPDDS surface2, bool blank);
0x00445370  0x004D  +R      bool __cdecl WinVidClearBuffer(LPDDS surface, LPRECT rect, DWORD fill_color);
0x004453C0  0x003D  +R      HRESULT __cdecl WinVidBufferLock(LPDDS surface, LPDDSDESC desc, DWORD flags);
0x00445400  0x0025  +R      HRESULT __cdecl WinVidBufferUnlock(LPDDS surface, LPDDSDESC desc);
0x00445430  0x0090  +R      bool __cdecl WinVidCopyBitmapToBuffer(LPDDS surface, const BYTE *bitmap);
0x004454C0  0x0046  +R      DWORD __cdecl GetRenderBitDepth(DWORD dwRGBBitCount);
0x00445550  0x0071  +R      void __thiscall WinVidGetColorBitMasks(COLOR_BIT_MASKS *bm, LPDDPIXELFORMAT pixel_format);
0x004455D0  0x0044  +R      void __cdecl BitMaskGetNumberOfBits(uint32_t bit_mask, uint32_t *bit_depth, uint32_t *bit_offset);
0x00445620  0x0061  +R      DWORD __cdecl CalculateCompatibleColor(COLOR_BIT_MASKS *mask, int32_t red, int32_t green, int32_t blue, int32_t alpha);
0x00445690  0x008C  +R      bool __cdecl WinVidGetDisplayMode(DISPLAY_MODE *disp_mode);
0x00445720  0x0088  +R      bool __cdecl WinVidGoFullScreen(DISPLAY_MODE *disp_mode);
0x004457B0  0x010B  +R      bool __cdecl WinVidGoWindowed(int32_t width, int32_t height, DISPLAY_MODE *dispMode);
0x004458C0  0x00D5  +R      void __cdecl WinVidSetDisplayAdapter(DISPLAY_ADAPTER *disp_adapter);
0x004459A0  0x0045  +R      bool __thiscall CompareVideoModes(const DISPLAY_MODE *mode1, const DISPLAY_MODE *mode2);
0x004459F0  0x0053  +R      bool __cdecl WinVidGetDisplayModes(void);
0x00445A50  0x03B1  +R      HRESULT __stdcall EnumDisplayModesCallback(LPDDSDESC lpDDSurfaceDesc, LPVOID lpContext);
0x00445E10  0x0040  +R      bool __cdecl WinVidInit(void);
0x00445E50  0x00AF  +R      bool __cdecl WinVidGetDisplayAdapters(void);
0x00445F00  0x0013  +       void __thiscall S_FlaggedString_Delete(STRING_FLAGGED *string);
0x00445F20  0x001A  +R      bool __cdecl EnumerateDisplayAdapters(DISPLAY_ADAPTER_LIST *displayAdapterList);
0x00445F40  0x01BE  +R      BOOL __stdcall EnumDisplayAdaptersCallback(GUID *lpGUID, LPTSTR lpDriverDescription, LPTSTR lpDriverName, LPVOID lpContext);
0x00446100  0x0035  +       void __thiscall S_FlaggedString_InitAdapter(DISPLAY_ADAPTER *adapter);
0x00446140  0x006A  +R      bool __cdecl WinVidRegisterGameWindowClass(void);
0x004461B0  0x049F  +R      LRESULT __stdcall WinVidGameWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
0x004467C0  0x01C0  +R      void __cdecl WinVidResizeGameWindow(HWND hWnd, int32_t edge, LPRECT rect);
0x004469A0  0x00BC  +R      bool __cdecl WinVidCheckGameWindowPalette(HWND hWnd);
0x00446A60  0x00C6  +R      bool __cdecl WinVidCreateGameWindow(void);
0x00446B30  0x0022  +R      void __cdecl WinVidFreeWindow(void);
0x00446B60  0x004D  +R      void __cdecl WinVidExitMessage(void);
0x00446BB0  0x0048  +R      DISPLAY_ADAPTER_NODE *__cdecl WinVidGetDisplayAdapter(GUID *lpGuid);
0x00446C00  0x0374  +R      void __cdecl WinVidStart(void);
0x00446F80  0x0013  +R      void __cdecl WinVidFinish(void);
0x00446FA0  0x000D  +R      void __thiscall DisplayModeListInit(DISPLAY_MODE_LIST *pList);
0x00446FB0  0x0032  +R      void __thiscall DisplayModeListDelete(DISPLAY_MODE_LIST *pList);
0x00446FF0  0x0012  +R      DISPLAY_MODE *__thiscall InsertDisplayMode(DISPLAY_MODE_LIST *modeList, DISPLAY_MODE_NODE *before);
0x00447010  0x0048  +R      DISPLAY_MODE *__thiscall InsertDisplayModeInListHead(DISPLAY_MODE_LIST *modeList);
0x00447060  0x004A  +R      DISPLAY_MODE *__thiscall InsertDisplayModeInListTail(DISPLAY_MODE_LIST *modeList);
0x004470B0  0x0018  x       sub_4470B0
0x004470C0  0x0012  x       sub_4470C0
0x004470F0  0x0068  x       sub_4470F0
0x00447160  0x0018  x       sub_447160
0x00447170  0x0039  x       sub_447170
0x004471C0  0x002F  x       sub_4471C0
0x004471F0  0x0022  +R      bool __cdecl DInputCreate(void);
0x00447220  0x001A  +R      void __cdecl DInputRelease(void);
0x00447240  0x005A  +R      void __cdecl WinInReadKeyboard(LPVOID lpInputData);
0x004472A0  0x00F3  -R      DWORD __cdecl WinInReadJoystick(int32_t *x, int32_t *y);
0x004473A0  0x0005  x       sub_4473A0
0x004473B0  0x007F  -R      bool __cdecl WinInputInit(void);
0x00447430  0x0024  -R      bool __cdecl DInputEnumDevices(JOYSTICK_LIST *joystickList);
0x00447460  0x00E8  -R      BOOL __stdcall DInputEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
0x00447550  0x001F  +       void __thiscall S_FlaggedString_Create(STRING_FLAGGED *string, int32_t size);
0x00447570  0x004E  -R      JOYSTICK_NODE *__cdecl GetJoystick(GUID *lpGuid);
0x004475C0  0x00C9  -R      void __cdecl DInputKeyboardCreate(void);
0x00447690  0x0029  -R      void __cdecl DInputKeyboardRelease(void);
0x004476C0  0x00E4  -R      bool __cdecl DInputJoystickCreate(void);
0x004477B0  0x002D  -R      void __cdecl WinInStart(void);
0x004477E0  0x000F  -R      void __cdecl WinInFinish(void);
0x004477F0  0x0017  -R      void __cdecl WinInRunControlPanel(HWND hWnd);
0x00447810  0x0062  *R      void __cdecl IncreaseScreenSize(void);
0x00447880  0x0062  *R      void __cdecl DecreaseScreenSize(void);
0x004478F0  0x009F  *R      void __cdecl setup_screen_size(void);
0x00447990  0x0034  *R      void __cdecl TempVideoAdjust(int32_t hires, double sizer);
0x004479D0  0x0039  -R      void __cdecl TempVideoRemove(void);
0x00447A10  0x0035  -R      void __cdecl S_FadeInInventory(BOOL isFade);
0x00447A50  0x0027  -R      void __cdecl S_FadeOutInventory(BOOL isFade);
0x00447A80  0x0018  x       sub_447A80
0x00447A90  0x0012  x       sub_447A90
0x00447AC0  0x0068  x       sub_447AC0
0x00447B30  0x0018  x       sub_447B30
0x00447B40  0x0039  x       sub_447B40
0x00447B90  0x002F  x       sub_447B90
0x00447BC0  0x0048  +       const SOUND_ADAPTER_NODE *__cdecl S_Audio_Sample_GetAdapter(GUID *guid);
0x00447C10  0x002E  +       void __cdecl S_Audio_Sample_CloseAllTracks(void);
0x00447C40  0x010E  +       bool __cdecl S_Audio_Sample_Load(int32_t sample_id, LPWAVEFORMATEX format, const void *data, int32_t data_size);
0x00447D50  0x0045  +       bool __cdecl S_Audio_Sample_IsTrackPlaying(int32_t track_id);
0x00447DA0  0x00E7  +       int32_t __cdecl S_Audio_Sample_Play(int32_t sample_id, int32_t volume, int32_t pitch, int32_t pan, int32_t flags);
0x00447E90  0x0039  +       int32_t __cdecl S_Audio_Sample_GetFreeTrackIndex(void);
0x00447ED0  0x002C  +       void __cdecl S_Audio_Sample_AdjustTrackVolumeAndPan(int32_t track_id, int32_t volume, int32_t pan);
0x00447F00  0x0031  +       void __cdecl S_Audio_Sample_AdjustTrackPitch(int32_t track_id, int32_t pitch);
0x00447F40  0x002F  +       void __cdecl S_Audio_Sample_CloseTrack(int32_t track_id);
0x00447FA0  0x0005  x       sub_447FA0
0x00447FB0  0x009C  +       bool __cdecl S_Audio_Sample_Init(void);
0x00448050  0x001A  +       bool __cdecl S_Audio_Sample_DSoundEnumerate(SOUND_ADAPTER_LIST *adapter_list);
0x00448070  0x00E2  +       BOOL __stdcall S_Audio_Sample_DSoundEnumCallback(LPGUID guid, LPCTSTR description, LPCTSTR module, LPVOID context);
0x00448160  0x017C  +       void __cdecl S_Audio_Sample_Init2(HWND hwnd);
0x004482E0  0x001C  +       bool __cdecl S_Audio_Sample_DSoundCreate(GUID *guid);
0x00448300  0x00C4  +       bool __cdecl S_Audio_Sample_DSoundBufferTest(void);
0x004483D0  0x002A  +       void __cdecl S_Audio_Sample_Shutdown(void);
0x00448400  0x0006  +       bool __cdecl S_Audio_Sample_IsEnabled(void);
0x00448410  0x0005  x       sub_448410
0x00448420  0x0001  x       sub_448420
0x00448430  0x013B  +R      void __cdecl CreateScreenBuffers(void);
0x00448570  0x0094  +R      void __cdecl CreatePrimarySurface(void);
0x00448610  0x0098  +R      void __cdecl CreateBackBuffer(void);
0x004486B0  0x009D  +R      void __cdecl CreateClipper(void);
0x00448750  0x00D3  +R      void __cdecl CreateWindowPalette(void);
0x00448830  0x00BC  +R      void __cdecl CreateZBuffer(void);
0x004488F0  0x002B  +R      DWORD __cdecl GetZBufferDepth(void);
0x00448920  0x00A1  +R      void __cdecl CreateRenderBuffer(void);
0x004489D0  0x0070  +R      void __cdecl CreatePictureBuffer(void);
0x00448A40  0x01A4  +R      void __cdecl ClearBuffers(DWORD flags, DWORD fill_color);
0x00448BF0  0x013C  +R      void __cdecl RestoreLostBuffers(void);
0x00448D30  0x00CF  +R      void __cdecl UpdateFrame(bool need_run_message_loop, LPRECT rect);
0x00448E00  0x003B  +R      void __cdecl WaitPrimaryBufferFlip(void);
0x00448E40  0x0003  +R      bool __cdecl RenderInit(void);
0x00448E50  0x03A5  +R      void __cdecl RenderStart(bool is_reset);
0x00449200  0x00E6  +R      void __cdecl RenderFinish(bool need_to_clear_textures);
0x004492F0  0x0204  +R      bool __cdecl ApplySettings(APP_SETTINGS *new_settings);
0x00449500  0x0105  +R      void __cdecl FmvBackToGame(void);
0x00449610  0x023A  +R      void __cdecl GameApplySettings(APP_SETTINGS *new_settings);
0x00449850  0x0067  +R      void __cdecl UpdateGameResolution(void);
0x004498C0  0x000C  +R      LPCTSTR __cdecl DecodeErrorMessage(DWORD error_code);
0x004498D0  0x0049  -R      BOOL __cdecl ReadFileSync(HANDLE handle, LPVOID lpBuffer, DWORD nBytesToRead, LPDWORD lpnBytesRead, LPOVERLAPPED lpOverlapped);
0x00449920  0x0188  +       BOOL __cdecl Level_LoadTexturePages(HANDLE handle);
0x00449AB0  0x03A0  +       BOOL __cdecl Level_LoadRooms(HANDLE handle);
0x00449E50  0x0097  -R      void __cdecl AdjustTextureUVs(bool reset_uv_add);
0x00449EF0  0x057E  +       BOOL __cdecl Level_LoadObjects(HANDLE handle);
0x0044A470  0x0135  +       BOOL __cdecl Level_LoadSprites(HANDLE handle);
0x0044A5B0  0x01D6  +       BOOL __cdecl Level_LoadItems(HANDLE handle);
0x0044A790  0x0188  +       BOOL __cdecl Level_LoadDepthQ(HANDLE handle);
0x0044A920  0x0071  +       BOOL __cdecl Level_LoadPalettes(HANDLE handle);
0x0044A9A0  0x0060  +       BOOL __cdecl Level_LoadCameras(HANDLE handle);
0x0044AA00  0x0060  +       BOOL __cdecl Level_LoadSoundEffects(HANDLE handle);
0x0044AA60  0x0221  +       BOOL __cdecl Level_LoadBoxes(HANDLE handle);
0x0044AC90  0x0055  +       BOOL __cdecl Level_LoadAnimatedTextures(HANDLE handle);
0x0044ACF0  0x0079  +       BOOL __cdecl Level_LoadCinematic(HANDLE handle);
0x0044AD70  0x008A  +       BOOL __cdecl Level_LoadDemo(HANDLE handle);
0x0044AE00  0x009A  +       void __cdecl Level_LoadDemoExternal(LPCTSTR level_name);
0x0044AEA0  0x0265  +       BOOL __cdecl Level_LoadSamples(HANDLE handle);
0x0044B110  0x0036  -R      void __cdecl ChangeFileNameExtension(char *file_name, const char *file_ext);
0x0044B150  0x0026  -R      LPCTSTR __cdecl GetFullPath(LPCTSTR file_name);
0x0044B180  0x00E0  -R      BOOL __cdecl SelectDrive(void);
0x0044B260  0x024A  +       bool __cdecl Level_Load(const char *file_name, int32_t level_num);
0x0044B4B0  0x0018  -R      BOOL __cdecl S_LoadLevelFile(LPCTSTR file_name, int32_t level_num, GAMEFLOW_LEVEL_TYPE level_type);
0x0044B4D0  0x002A  -R      void __cdecl S_UnloadLevelFile(void);
0x0044B500  0x0014  -R      void __cdecl S_AdjustTexelCoordinates(void);
0x0044B520  0x00C4  -R      BOOL __cdecl S_ReloadLevelGraphics(BOOL reload_palettes, BOOL reload_tex_pages);
0x0044B5F0  0x00C6  +       BOOL __cdecl GF_ReadStringTable(DWORD count, char **string_table, char **string_buf, LPDWORD buf_size, HANDLE handle);
0x0044B6C0  0x06D1  +       BOOL __cdecl GF_LoadFromFile(const char *file_name);
0x0044BDA0  0x006B  -R      bool __cdecl PlayFMV(const char *file_name);
0x0044BE10  0x02E0  -R      void __cdecl WinPlayFMV(const char *file_name, bool is_playback);
0x0044C0F0  0x0048  -R      void __cdecl WinStopFMV(bool is_playback);
0x0044C140  0x0088  -R      bool __cdecl IntroFMV(const char *file_name1, const char *file_name2);
0x0044C1D0  0x0023  -R      uint16_t __cdecl S_COLOR(int32_t red, int32_t green, int32_t blue);
0x0044C200  0x0035  -R      void __cdecl S_DrawScreenLine(int32_t x, int32_t y, int32_t z, int32_t x_len, int32_t y_len, BYTE color_idx, D3DCOLOR *gour, uint16_t flags);
0x0044C240  0x0116  -R      void __cdecl S_DrawScreenBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_OUTLINE *gour, uint16_t flags);
0x0044C360  0x002E  -R      void __cdecl S_DrawScreenFBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_FILL *gour, uint16_t flags);
0x0044C390  0x000F  -R      void __cdecl S_FinishInventory(void);
0x0044C3A0  0x0043  *R      void __cdecl S_FadeToBlack(void);
0x0044C3F0  0x0057  *R      void __cdecl S_Wait(int32_t timeout, BOOL input_check);
0x0044C450  0x000E  -R      bool __cdecl S_PlayFMV(const char *file_name);
0x0044C460  0x0013  -R      bool __cdecl S_IntroFMV(const char *file_name1, const char *file_name2);
0x0044C480  0x0144  +       int16_t __cdecl Game_Start(int32_t level_num, GAMEFLOW_LEVEL_TYPE level_type);
0x0044C5D0  0x009A  +       int32_t __cdecl Game_Loop(bool demo_mode);
0x0044C670  0x0006  +R      int32_t __cdecl LevelCompleteSequence(void);
0x0044C680  0x01C2  +R      int32_t __cdecl LevelStats(int32_t level_num);
0x0044C850  0x0113  +R      int32_t __cdecl GameStats(int32_t level_num);
0x0044C970  0x001E  +       int32_t __cdecl Random_GetControl(void);
0x0044C990  0x000A  +       void __cdecl Random_SeedControl(int32_t seed);
0x0044C9A0  0x001E  +       int32_t __cdecl Random_GetDraw(void);
0x0044C9C0  0x000A  +       void __cdecl Random_SeedDraw(int32_t seed);
0x0044C9D0  0x0044  -R      void __cdecl GetValidLevelsList(REQUEST_INFO *req);
0x0044CA20  0x004C  -R      void __cdecl GetSavedGamesList(REQUEST_INFO *req);
0x0044CA70  0x0233  -R      void __cdecl DisplayCredits(void);
0x0044CCB0  0x0165  *R      BOOL __cdecl S_FrontEndCheck(void);
0x0044CE20  0x0114  -R      int32_t __cdecl S_SaveGame(const void *save_data, uint32_t save_size, int32_t slot_num);
0x0044CF40  0x0096  -R      int32_t __cdecl S_LoadGame(void *save_data, uint32_t save_size, int32_t slot_num);
0x0044CFE0  0x0128  +R      void __cdecl HWR_InitState(void);
0x0044D110  0x0029  +R      void __cdecl HWR_ResetTexSource(void);
0x0044D140  0x002B  +R      void __cdecl HWR_ResetColorKey(void);
0x0044D170  0x0059  +R      void __cdecl HWR_ResetZBuffer(void);
0x0044D1D0  0x0024  +R      void __cdecl HWR_TexSource(HWR_TEXTURE_HANDLE tex_source);
0x0044D200  0x004A  +R      void __cdecl HWR_EnableColorKey(bool state);
0x0044D250  0x0082  +R      void __cdecl HWR_EnableZBuffer(bool z_write_enable, bool z_enable);
0x0044D2E0  0x0016  +R      void __cdecl HWR_BeginScene(void);
0x0044D310  0x016C  +R      void __cdecl HWR_DrawPolyList(void);
0x0044D490  0x008E  +R      void __cdecl HWR_LoadTexturePages(int32_t pages_count, void *pages_buf, RGB_888 *palette);
0x0044D520  0x004A  +R      void __cdecl HWR_FreeTexturePages(void);
0x0044D570  0x0035  +R      void __cdecl HWR_GetPageHandles(void);
0x0044D5B0  0x0019  +R      bool __cdecl HWR_VertexBufferFull(void);
0x0044D5E0  0x0022  +R      bool __cdecl HWR_Init(void);
0x0044D610  0x005C  *R      BOOL __cdecl S_InitialiseSystem(void);
0x0044D670  0x0011  *       void __cdecl GameBuf_Shutdown(void);
0x0044D690  0x0021  -R      void __cdecl init_game_malloc(void);
0x0044D6C0  0x006C  -R      void *__cdecl game_malloc(size_t alloc_size, GAME_BUFFER buf_index);
0x0044D740  0x0034  -R      void __cdecl game_free(size_t free_size);
0x0044D780  0x00E8  -R      void __cdecl CalculateWibbleTable(void);
0x0044D870  0x007F  +       void __cdecl Random_Seed(void);
0x0044D8F0  0x0120  +       BOOL __cdecl S_Input_Key(KEYMAP keymap);
0x0044DA10  0x0AC4  +       bool __cdecl Input_Update(void);
0x0044E4E0  0x003C  +R      int32_t __cdecl RenderErrorBox(int32_t error_code);
0x0044E520  0x01D6  +R      int32_t __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int32_t nShowCmd);
0x0044E6F0  0x0001  x       sub_44E6F0
0x0044E700  0x0064  +R      int32_t __cdecl GameInit(bool skip_cd_init);
0x0044E770  0x0055  +       void __cdecl Shell_Cleanup(void);
0x0044E7A0  0x007C  +R      int32_t __cdecl WinGameStart(void);
0x0044E820  0x0039  +       void __cdecl Shell_Shutdown(void);
0x0044E860  0x0017  xR      sub_44E860
0x0044E880  0x0010  xR      sub_44E880
0x0044E890  0x003C  +       void __cdecl Shell_ExitSystem(const char *message);
0x0044E8E0  0x010F  +R      void __cdecl ScreenshotPCX(void);
0x0044E9F0  0x00AE  +R      DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB_888 *palette, BYTE **pcx_data);
0x0044EAA0  0x00D2  +R      DWORD __cdecl EncodeLinePCX(BYTE *src, DWORD width, BYTE *dst);
0x0044EB80  0x003E  +R      DWORD __cdecl EncodePutPCX(BYTE value, BYTE num, BYTE *buffer);
0x0044EBC0  0x01F5  +R      void __cdecl Screenshot(LPDDS screen);
0x0044EDC0  0x007F  +       void __cdecl Option_DoInventory(INVENTORY_ITEM *item);
0x0044EED0  0x0648  +       void __cdecl Option_Passport(INVENTORY_ITEM *item);
0x0044F520  0x02DA  +       void __cdecl Option_Detail(INVENTORY_ITEM *item);
0x0044F800  0x049D  +       void __cdecl Option_Sound(INVENTORY_ITEM *item);
0x0044FCA0  0x00C0  +       void __cdecl Option_Compass(INVENTORY_ITEM *item);
0x0044FD60  0x007E  +       void __cdecl Option_Controls_FlashConflicts(void);
0x0044FDE0  0x0040  +       void __cdecl Option_Controls_DefaultConflict(void);
0x0044FE20  0x06F4  +       void __cdecl Option_Controls(INVENTORY_ITEM *item);
0x00450530  0x04D0  +       void __cdecl Option_Controls_ShowControls(void);
0x00450A00  0x0096  +       void __cdecl Option_Controls_UpdateText(void);
0x00450AA0  0x003B  +R      void __cdecl S_RemoveCtrlText(void);
0x00450AE0  0x0006  -R      int32_t __cdecl GetRenderHeight(void);
0x00450AF0  0x0006  -R      int32_t __cdecl GetRenderWidth(void);
0x00450B00  0x00E4  *R      void __cdecl S_InitialisePolyList(BOOL clear_back_buffer);
0x00450BF0  0x0036  *R      DWORD __cdecl S_DumpScreen(void);
0x00450C30  0x000B  -R      void __cdecl S_ClearScreen(void);
0x00450C40  0x0037  -R      void __cdecl S_InitialiseScreen(GAMEFLOW_LEVEL_TYPE level_type);
0x00450C80  0x0089  *R      void __cdecl S_OutputPolyList(void);
0x00450CC0  0x0270  -R      int32_t __cdecl S_GetObjectBounds(const BOUNDS_16 *bounds);
0x00450F30  0x0046  -R      void __cdecl S_InsertBackPolygon(int32_t x0, int32_t y0, int32_t x1, int32_t y1);
0x00450F80  0x01F1  -R      void __cdecl S_PrintShadow(int16_t radius, const BOUNDS_16 *bounds, const ITEM *item);
0x00451180  0x02F6  -R      void __cdecl S_CalculateLight(int32_t x, int32_t y, int32_t z, int16_t room_num);
0x00451480  0x0031  -R      void __cdecl S_CalculateStaticLight(int16_t adder);
0x004514C0  0x0124  -R      void __cdecl S_CalculateStaticMeshLight(int32_t x, int32_t y, int32_t z, int32_t shade_1, int32_t shade_2, ROOM *room);
0x004515F0  0x0206  -R      void __cdecl S_LightRoom(ROOM *room);
0x00451800  0x01CC  -R      void __cdecl S_DrawHealthBar(int32_t percent);
0x004519D0  0x01F6  -R      void __cdecl S_DrawAirBar(int32_t percent);
0x00451BD0  0x00C0  -R      void __cdecl AnimateTextures(int32_t ticks);
0x00451C90  0x0051  -R      void __cdecl S_SetupBelowWater(BOOL underwater);
0x00451CF0  0x0021  -R      void __cdecl S_SetupAboveWater(BOOL underwater);
0x00451D20  0x00B1  -R      void __cdecl S_AnimateTextures(int32_t ticks);
0x00451DE0  0x0105  *R      void __cdecl S_DisplayPicture(const char *file_name, BOOL is_title);
0x00451EF0  0x007E  -R      void __cdecl S_SyncPictureBufferPalette(void);
0x00451F70  0x001C  *R      void __cdecl S_DontDisplayPicture(void);
0x00451F80  0x000D  -R      void __cdecl ScreenDump(void);
0x00451F90  0x0010  -R      void __cdecl ScreenPartialDump(void);
0x00451FA0  0x01C9  *R      void __cdecl FadeToPal(int32_t fade_value, RGB_888 *palette);
0x00452170  0x0026  -R      void __cdecl ScreenClear(bool is_phd_win_size);
0x004521A0  0x00AB  -R      void __cdecl S_CopyScreenToBuffer(void);
0x00452250  0x0254  *R      void __cdecl S_CopyBufferToScreen(void);
0x004522A0  0x00FA  -R      BOOL __cdecl DecompPCX(const uint8_t *pcx, size_t pcx_size, LPBYTE pic, RGB_888 *pal);
0x004523A0  0x0005  x       sub_4523A0
0x004523B0  0x0001  x       sub_4523B0
0x004523C0  0x004E  -R      bool __cdecl OpenGameRegistryKey(LPCTSTR key);
0x00452410  0x0005  -R      LONG __cdecl CloseGameRegistryKey(void);
0x00452420  0x0262  -R      bool __cdecl SE_WriteAppSettings(APP_SETTINGS *settings);
0x00452690  0x0348  -R      int32_t __cdecl SE_ReadAppSettings(APP_SETTINGS *settings);
0x004529E0  0x00D7  -R      bool __cdecl SE_GraphicsTestStart(void);
0x00452AB0  0x0014  -R      void __cdecl SE_GraphicsTestFinish(void);
0x00452AD0  0x0003  -R      int32_t __cdecl SE_GraphicsTestExecute(void);
0x00452AE0  0x0057  -R      int32_t __cdecl SE_GraphicsTest(void);
0x00452B40  0x00C7  -R      bool __cdecl SE_SoundTestStart(void);
0x00452C00  0x0005  -R      void __cdecl SE_SoundTestFinish(void);
0x00452C10  0x003D  -R      int32_t __cdecl SE_SoundTestExecute(void);
0x00452C50  0x0057  -R      int32_t __cdecl SE_SoundTest(void);
0x00452CB0  0x003E  -R      int32_t __stdcall SE_PropSheetCallback(HWND hwndDlg, UINT uMsg, LPARAM lParam);
0x00452CF0  0x005D  -R      LRESULT __stdcall SE_NewPropSheetWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
0x00452D50  0x02DE  -R      bool __cdecl SE_ShowSetupDialog(HWND hParent, bool isDefault);
0x00453030  0x0351  -R      INT_PTR __stdcall SE_GraphicsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
0x004533F0  0x01DC  -R      void __cdecl SE_GraphicsDlgFullScreenModesUpdate(HWND hwndDlg);
0x004535E0  0x0017  -R      void __cdecl SE_GraphicsAdapterSet(HWND hwndDlg, DISPLAY_ADAPTER_NODE *adapter);
0x00453600  0x0735  -R      void __cdecl SE_GraphicsDlgUpdate(HWND hwndDlg);
0x00453D40  0x017C  -R      void __cdecl SE_GraphicsDlgInit(HWND hwndDlg);
0x00453EC0  0x0149  -R      INT_PTR __stdcall SE_SoundDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
0x00454050  0x000A  -R      void __cdecl SE_SoundAdapterSet(HWND hwndDlg, SOUND_ADAPTER_NODE *adapter);
0x00454060  0x011B  -R      void __cdecl SE_SoundDlgUpdate(HWND hwndDlg);
0x00454180  0x00BE  -R      void __cdecl SE_SoundDlgInit(HWND hwndDlg);
0x00454240  0x0106  -R      INT_PTR __stdcall SE_ControlsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
0x00454350  0x000A  -R      void __cdecl SE_ControlsJoystickSet(HWND hwndDlg, JOYSTICK_NODE *joystick);
0x00454360  0x0068  -R      void __cdecl SE_ControlsDlgUpdate(HWND hwndDlg);
0x004543D0  0x00BD  -R      void __cdecl SE_ControlsDlgInit(HWND hwndDlg);
0x00454490  0x008A  -R      INT_PTR __stdcall SE_OptionsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
0x00454520  0x0234  -R      void __cdecl SE_OptionsDlgUpdate(HWND hwndDlg);
0x00454760  0x004B  -R      void __cdecl SE_OptionsStrCat(LPTSTR *dstString, bool isEnabled, bool *isNext, LPCTSTR srcString);
0x004547B0  0x00DC  -R      INT_PTR __stdcall SE_AdvancedDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
0x004548B0  0x0093  -R      void __cdecl SE_AdvancedDlgUpdate(HWND hwndDlg);
0x00454950  0x000E  -R      void __cdecl SE_AdvancedDlgInit(HWND hwndDlg);
0x00454960  0x0011  -R      HWND __cdecl SE_FindSetupDialog(void);
0x00454980  0x02D0  +       BOOL __cdecl Shell_Main(void);
0x00454C50  0x0110  +R      int16_t __cdecl TitleSequence(void);
0x00454D60  0x032D  -R      void __cdecl CheckCheatMode(void);
0x004550C0  0x007D  +R      void __cdecl S_SaveSettings(void);
0x00455140  0x00DB  +R      void __cdecl S_LoadSettings(void);
0x00455220  0x0046  +       int32_t __cdecl S_Audio_Sample_OutPlay(int32_t sample_id, uint16_t volume, int32_t pitch, int32_t pan);
0x00455270  0x002A  +       int32_t __cdecl S_Audio_Sample_CalculateSampleVolume(int32_t volume);
0x004552A0  0x0026  +       int32_t __cdecl S_Audio_Sample_CalculateSamplePan(int16_t pan);
0x004552D0  0x0046  +       int32_t __cdecl S_Audio_Sample_OutPlayLooped(int32_t track_id, uint16_t volume, int32_t pitch, int32_t pan);
0x00455320  0x0039  +       void __cdecl S_Audio_Sample_OutSetPanAndVolume(int32_t track_id, int32_t pan, uint16_t volume);
0x00455360  0x001C  +       void __cdecl S_Audio_Sample_OutSetPitch(int32_t track_id, int32_t pitch);
0x00455380  0x000A  +       void __cdecl Sound_SetMasterVolume(int32_t volume);
0x00455390  0x0017  +       void __cdecl S_Audio_Sample_OutCloseTrack(int32_t track_id);
0x004553B0  0x003C  +       void __cdecl S_Audio_Sample_OutCloseAllTracks(void);
0x004553C0  0x001F  +       BOOL __cdecl S_Audio_Sample_OutIsTrackPlaying(int32_t track_id);
0x004553E0  0x0077  +       bool __cdecl Music_Init(void);
0x00455460  0x0051  +       void __cdecl Music_Shutdown(void);
0x00455500  0x006F  +       void __cdecl Music_Play(int16_t track_id, bool is_looped);
0x00455570  0x0039  +       void __cdecl Music_Stop(void);
0x004555B0  0x0084  +       bool __cdecl Music_PlaySynced(int32_t track_id);
0x00455640  0x0061  +       int32_t __cdecl Music_GetFrames(void);
0x004556B0  0x0092  +       void __cdecl Music_SetVolume(int32_t volume);
0x004557A0  0x0137  -R      void __cdecl CopyBitmapPalette(RGB_888 *src_pal, BYTE *src_bitmap, int32_t bitmap_size, RGB_888 *dest_pal);
0x004558E0  0x00C8  -R      BYTE __cdecl FindNearestPaletteEntry(RGB_888 *palette, int32_t red, int32_t green, int32_t blue, bool ignore_sys_palette);
0x004559B0  0x00AE  -R      void __cdecl SyncSurfacePalettes(void *src_data, int32_t width, int32_t height, int32_t src_pitch, RGB_888 *src_palette, void *dst_data, int32_t dst_pitch, RGB_888 *dst_palette, bool preserve_sys_palette);
0x00455A60  0x0087  -R      int32_t __cdecl CreateTexturePalette(const RGB_888 *pal);
0x00455AF0  0x001C  -R      int32_t __cdecl GetFreePaletteIndex(void);
0x00455B10  0x0023  -R      void __cdecl FreePalette(int32_t palette_idx);
0x00455B40  0x0012  -R      void __cdecl SafeFreePalette(int32_t palette_idx);
0x00455B90  0x006A  -R      int32_t __cdecl CreateTexturePage(int32_t width, int32_t height, bool alpha);
0x00455C00  0x001C  -R      int32_t __cdecl GetFreeTexturePageIndex(void);
0x00455C20  0x0098  -R      bool __cdecl CreateTexturePageSurface(TEXPAGE_DESC *desc);
0x00455CC0  0x0174  -R      bool __cdecl TexturePageInit(TEXPAGE_DESC *page);
0x00455E40  0x0025  -R      LPDIRECT3DTEXTURE2 __cdecl Create3DTexture(LPDDS surface);
0x00455E70  0x0020  -R      void __cdecl SafeFreeTexturePage(int32_t page_idx);
0x00455E90  0x0032  -R      void __cdecl FreeTexturePage(int32_t page_idx);
0x00455ED0  0x003B  -R      void __cdecl TexturePageReleaseVidMemSurface(TEXPAGE_DESC *page);
0x00455F10  0x0026  -R      void __cdecl FreeTexturePages(void);
0x00455F40  0x00A2  -R      bool __cdecl LoadTexturePage(int32_t page_idx, bool reset);
0x00455FF0  0x0035  -R      bool __cdecl ReloadTextures(bool reset);
0x00456030  0x003E  -R      HWR_TEXTURE_HANDLE __cdecl GetTexturePageHandle(int32_t page_idx);
0x00456070  0x00F5  -R      int32_t __cdecl AddTexturePage8(int32_t width, int32_t height, const uint8_t *page_buf, int32_t pal_idx);
0x00456170  0x0196  -R      int32_t __cdecl AddTexturePage16(int32_t width, int32_t height, const uint8_t *page_buf);
0x00456310  0x011A  -R      HRESULT __stdcall EnumTextureFormatsCallback(LPDDSDESC lpDdsd, LPVOID lpContext);
0x00456430  0x0025  -R      HRESULT __cdecl EnumerateTextureFormats(void);
0x00456460  0x0030  -R      void __cdecl CleanupTextures(void);
0x00456470  0x001F  -R      bool __cdecl InitTextures(void);
0x00456490  0x0040  -R      void __cdecl UpdateTicks(void);
0x004564D0  0x0051  -R      bool __cdecl TIME_Init(void);
0x00456530  0x0058  -R      DWORD __cdecl Sync(void);
0x00456590  0x0036  -R      LPVOID __cdecl UT_LoadResource(LPCTSTR lpName, LPCTSTR lpType);
0x004565D0  0x0060  -R      void __cdecl UT_InitAccurateTimer(void);
0x00456630  0x004E  -R      double __cdecl UT_Microseconds(void);
0x00456680  0x006F  -R      BOOL __cdecl UT_CenterWindow(HWND hWnd);
0x004566F0  0x002C  -R      LPTSTR __cdecl UT_FindArg(LPCTSTR str);
0x00456720  0x0018  -R      int32_t __cdecl UT_MessageBox(LPCTSTR lpText, HWND hWnd);
0x00456740  0x0042  -R      int32_t __cdecl UT_ErrorBox(UINT uID, HWND hWnd);
0x00456790  0x0051  -R      LPCTSTR __cdecl GuidBinaryToString(GUID *guid);
0x004567F0  0x00AA  -R      bool __cdecl GuidStringToBinary(LPCTSTR lpString, GUID *guid);
0x004568A0  0x0030  -R      BOOL __cdecl OpenRegistryKey(LPCTSTR lpSubKey);
0x004568D0  0x000F  -R      bool __cdecl IsNewRegistryKeyCreated(void);
0x004568E0  0x000D  -R      LONG __cdecl CloseRegistryKey(void);
0x004568F0  0x001E  -R      LONG __cdecl SetRegistryDwordValue(LPCTSTR lpValueName, DWORD value);
0x00456910  0x002A  -R      LONG __cdecl SetRegistryBoolValue(LPCTSTR lpValueName, bool value);
0x00456940  0x0036  -R      LONG __cdecl SetRegistryFloatValue(LPCTSTR lpValueName, double value);
0x00456980  0x0037  -R      LONG __cdecl SetRegistryBinaryValue(LPCTSTR lpValueName, LPBYTE value, DWORD valueSize);
0x004569C0  0x004A  -R      LONG __cdecl SetRegistryStringValue(LPCTSTR lpValueName, LPCTSTR value, int32_t length);
0x00456A10  0x0013  -R      LONG __cdecl DeleteRegistryValue(LPCTSTR lpValueName);
0x00456A30  0x005E  -R      bool __cdecl GetRegistryDwordValue(LPCTSTR lpValueName, DWORD *pValue, DWORD defaultValue);
0x00456A90  0x0076  -R      bool __cdecl GetRegistryBoolValue(LPCTSTR lpValueName, bool *pValue, bool defaultValue);
0x00456B10  0x005C  -R      bool __cdecl GetRegistryFloatValue(LPCTSTR lpValueName, double *value, double defaultValue);
0x00456B70  0x0071  -R      bool __cdecl GetRegistryBinaryValue(LPCTSTR lpValueName, LPBYTE value, DWORD valueSize, LPBYTE defaultValue);
0x00456BF0  0x0095  -R      bool __cdecl GetRegistryStringValue(LPCTSTR lpValueName, LPTSTR value, DWORD maxSize, LPCTSTR defaultValue);
0x00456C90  0x0091  -R      bool __cdecl GetRegistryGuidValue(LPCTSTR lpValueName, GUID *value, GUID *defaultValue);
0x00456D30  0x0037  -R      void __thiscall SE_ReleaseBitmapResource(BITMAP_RESOURCE *bmpRsrc);
0x00456D70  0x00C4  -R      void __thiscall SE_LoadBitmapResource(BITMAP_RESOURCE *bmpRsrc, LPCTSTR lpName);
0x00456E40  0x0064  -R      void __thiscall SE_DrawBitmap(BITMAP_RESOURCE *bmpRsrc, HDC hdc, int32_t x, int32_t y);
0x00456EB0  0x001C  -R      void __thiscall SE_UpdateBitmapPalette(BITMAP_RESOURCE *bmpRsrc, HWND hWnd, HWND hSender);
0x00456ED0  0x0057  -R      void __thiscall SE_ChangeBitmapPalette(BITMAP_RESOURCE *bmpRsrc, HWND hWnd);
0x00456F30  0x0061  -R      bool __cdecl SE_RegisterSetupWindowClass(void);
0x00456FA0  0x023A  -R      LRESULT __stdcall SE_SetupWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
0x004571E0  0x0026  -R      void __cdecl SE_PassMessageToImage(HWND hWnd, UINT uMsg, WPARAM wParam);
0x00457210  0x006E  -R      void __cdecl UT_MemBlt(BYTE *dstBuf, DWORD dstX, DWORD dstY, DWORD width, DWORD height, DWORD dstPitch, BYTE *srcBuf, DWORD srcX, DWORD srcY, DWORD srcPitch);
0x00457280  0x001E  +       void __cdecl Matrix_Push(void);
0x0045729E  0x0033  +       void __cdecl Matrix_PushUnit(void);
0x004572D4  0x0061  +       void __fastcall Output_FlatA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
0x00457335  0x013A  +       void __fastcall Output_TransA(int32_t y0, int32_t y1, uint8_t depth_q); // actually, __watcall, which is esoteric and rarely supported
0x0045746F  0x0160  +       void __fastcall Output_GourA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
0x004575CF  0x02FD  +       void __fastcall Output_GTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
0x004578CC  0x0341  +       void __fastcall Output_WGTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
0x00457C10  0x0048  +       int32_t __fastcall Math_Atan(int32_t x, int32_t y);
0x00457C58  0x0006  +       int32_t __fastcall Math_Cos(int16_t angle);
0x00457C5E  0x001B  +       int32_t __fastcall Math_Sin(int16_t angle);
0x00457C79  0x001A  +       int32_t __fastcall Math_SinImpl(int16_t angle);
0x00457C93  0x002C  +       uint32_t  __fastcall Math_Sqrt(uint32_t n);



# VARIABLES
#   Flags:
#   - to do
#   + decompiled
# Offset    Flag    Declaration

0x00464060  -       uint32_t g_PerspectiveDistance = 0x3000000;
0x00464068  -       void (*__cdecl g_PolyDrawRoutines[9])(const int16_t *);
0x0046408C  -       float g_RhwFactor = 335544320.0f; // 10*2**25
0x004640B0  -       int32_t g_CineTrackID = 1;
0x004640B8  -       int32_t g_CineTickRate = 0x8000; // 0x8000 = PHD_ONE/TICKS_PER_FRAME
0x004640BC  -       int16_t g_CD_TrackID = -1;
0x004640C4  -       int32_t g_FlipEffect = -1;
0x004641F0  -       int32_t g_AssaultBestTime = -1;
0x004641F8  -       void (*__cdecl g_EffectRoutines[32])(ITEM *item);
0x00464310  -       int16_t g_CineTargetAngle = 0x4000; // PHD_90
0x004644E0  -       int32_t g_OverlayStatus = 1;
0x004654E0  -       int16_t g_Inv_MainObjectsCount = 8;
0x00465604  +       int16_t g_Inv_OptionObjectsCount = 4;
0x00465618  -       BOOL g_GymInvOpenEnabled = TRUE;
0x00465A50  -       int16_t g_Inv_Chosen = -1;
0x00465A54  -       INVENTORY_MODE g_Inv_Mode = INV_TITLE_MODE;
0x00465A5C  -       int16_t g_OptionSoundVolume = 165; // NOTE: value should be 10
0x00465A60  -       int16_t g_OptionMusicVolume = 255; // NOTE: should be 10
0x00465AD4  -       int32_t g_JumpPermitted = 1;
0x00465AD8  -       int16_t g_LaraOldSlideAngle = 1;
0x00465CD0  -       void (*__cdecl g_LaraControlRoutines[71])(ITEM *item, COLL_INFO *coll);
0x00465DF0  -       void (*__cdecl g_ExtraControlRoutines[11])(ITEM *item, COLL_INFO *coll);
0x00465E20  -       void (*__cdecl g_LaraCollisionRoutines[71])(ITEM *item, COLL_INFO *coll);
0x00466290  -       int8_t g_TextSpacing[80];
0x004662E0  -       int8_t g_TextASCIIMap[];
0x00466400  -       int32_t g_BGND_PaletteIndex = -1;
0x00466480  -       double g_GameSizer = 1.0;
0x00466488  -       double g_GameSizerCopy = 1.0;
0x00466490  -       int32_t g_FadeValue = 0x100000;
0x00466494  -       int32_t g_FadeLimit = 0x100000;
0x00466498  -       int32_t g_FadeAdder = 0x8000;
0x004664E8  -       const char *g_ErrorMessages[43];
0x00466BB0  +       int32_t g_RandControl;
0x00466BB4  +       int32_t g_RandDraw;
0x00466F70  +       CONTROL_LAYOUT g_Layout[2];
0x00467DD0  +       const int32_t g_AtanBaseTable[8];
0x00467DF0  +       const int16_t g_AtanAngleTable[0x800];
0x00468DF4  +       const int16_t g_SinTable[0x402];
0x0046C300  -       int32_t g_MidSort = 0;
0x0046C304  -       float g_ViewportAspectRatio = 0.0f;
0x0046C308  -       int32_t g_XGenY1;
0x0046C30C  -       int32_t g_XGenY2;
0x0046C310  -       GOURAUD_ENTRY g_GouraudTable[256];
0x0046E310  -       int32_t g_PhdWinTop;
0x0046E318  -       PHD_SPRITE g_PhdSprites[512];
0x00470318  -       int32_t g_LsAdder;
0x0047031C  -       float g_FltWinBottom;
0x00470320  -       float g_FltResZBuf;
0x00470324  -       float g_FltResZ;
0x00470328  -       void (*__cdecl g_Output_InsertTransQuad)(int32_t x, int32_t y, int32_t width, int32_t height, int32_t z);
0x0047032C  -       int32_t g_PhdWinHeight;
0x00470330  -       int32_t g_PhdWinCenterX;
0x00470334  -       int32_t g_PhdWinCenterY;
0x00470338  -       int16_t g_LsYaw;
0x0047033C  -       void (*__cdecl g_Output_InsertTrans8)(const PHD_VBUF *vbuf, int16_t shade);
0x00470340  -       float g_FltWinTop;
0x00470348  -       SORT_ITEM g_SortBuffer[4000];
0x00478048  -       float g_FltWinLeft;
0x0047804C  -       int16_t g_PhdWinMinY;
0x00478058  -       int32_t g_PhdFarZ;
0x0047805C  -       float g_FltRhwOPersp;
0x00478060  -       int32_t g_PhdWinBottom;
0x00478064  -       int32_t g_PhdPersp;
0x00478068  -       int32_t g_PhdWinLeft;
0x0047806C  -       void (*__cdecl g_Output_InsertFlatRect)(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
0x00478070  -       int16_t g_Info3DBuffer[120000];
0x004B29F0  -       int32_t g_PhdWinMaxX;
0x004B29F4  -       int32_t g_PhdNearZ;
0x004B29F8  -       float g_FltResZORhw;
0x004B29FC  -       float g_FltFarZ;
0x004B2A00  -       float g_FltWinCenterX;
0x004B2A04  -       float g_FltWinCenterY;
0x004B2A08  -       int32_t g_PhdScreenHeight;
0x004B2A0C  -       uint8_t *g_PrintSurfacePtr;
0x004B2A10  -       int16_t g_PhdWinMinX;
0x004B2A14  -       float g_FltPerspONearZ;
0x004B2A18  -       float g_FltRhwONearZ;
0x004B2A1C  -       int32_t g_PhdWinMaxY;
0x004B2A20  -       void (*__cdecl g_Output_InsertSprite)(int32_t z, int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t sprite_idx, int16_t shade);
0x004B2A24  -       float g_FltNearZ;
0x004B2A28  -       MATRIX *g_MatrixPtr;
0x004B2A2C  -       const int16_t *(*__cdecl g_Output_DrawObjectGT3)(const int16_t*, int32_t, SORT_TYPE);
0x004B2A30  -       const int16_t *(*__cdecl g_Output_DrawObjectGT4)(const int16_t*, int32_t, SORT_TYPE);
0x004B2A38  -       int32_t g_RandomTable[32];
0x004B2AB8  -       float g_FltPersp;
0x004B2AC0  -       MATRIX g_W2VMatrix;
0x004B2AF0  -       int16_t *g_Info3DPtr;
0x004B2AF4  -       int32_t g_PhdWinWidth;
0x004B2AF8  -       void (*__cdecl g_Output_InsertLine)(int32_t, int32_t, int32_t, int32_t, int32_t, uint8_t);
0x004B2B00  -       PHD_TEXTURE g_PhdTextureInfo[0x800];
0x004BCB00  -       int32_t g_PhdViewDistance;
0x004BCB04  -       int16_t g_LsPitch;
0x004BCB08  -       const int16_t *(*__cdecl g_Output_DrawObjectG4)(const int16_t*,int32_t, SORT_TYPE);
0x004BCB10  -       int16_t g_ShadesTable[32];
0x004BCB50  -       const int16_t *(*__cdecl g_Output_DrawObjectG3)(const int16_t*,int32_t, SORT_TYPE);
0x004BCB58  -       MATRIX g_MatrixStack[];
0x004BD2D8  -       DEPTHQ_ENTRY g_DepthQTable[32];
0x004BF3D8  -       int32_t g_PhdScreenWidth;
0x004BF3DC  -       int32_t g_LsDivider;
0x004BF3E0  -       PHD_VBUF g_PhdVBuf[1500];
0x004CAF60  -       void *g_XBuffer; // no-dereferencing
0x004D6AE0  -       uint8_t *g_TexturePageBuffer8[32];
0x004D6B60  -       float g_FltWinRight;
0x004D6B68  -       XYZ_32 g_LsVectorView;
0x004D6B78  -       float g_WibbleTable[32];
0x004D6BF8  -       int32_t g_PhdWinRight;
0x004D6BFC  -       int32_t g_SurfaceCount;
0x004D6C00  -       SORT_ITEM *g_Sort3DPtr;
0x004D6C0C  -       int32_t g_WibbleOffset;
0x004D6C10  -       int32_t g_IsWibbleEffect;
0x004D6C14  -       int32_t g_IsWaterEffect;
0x004D6CD8  -       VERTEX_INFO g_VBuffer[20];
0x004D6F78  -       int8_t g_IsShadeEffect;
0x004D6F80  -       D3DTLVERTEX g_VBufferD3D[32];
0x004D7380  -       PALETTEENTRY g_GamePalette16[256];
0x004D7780  -       int32_t g_CineFrameCurrent;
0x004D778C  -       int32_t g_IsChunkyCamera;
0x004D7794  -       int32_t g_NoInputCounter;
0x004D7798  +       BOOL g_IsResetFlag;
0x004D779C  -       int32_t g_FlipTimer;
0x004D77A0  -       int32_t g_LOSNumRooms = 0;
0x004D77A4  -       BOOL g_StopInventory;
0x004D77AC  -       BOOL g_IsDemoLevelType;
0x004D77B0  -       BOOL g_IsDemoLoaded;
0x004D77C0  -       int32_t g_BoundStart;
0x004D77C4  -       int32_t g_BoundEnd;
0x004D77E0  -       int32_t g_IsAssaultTimerDisplay;
0x004D77E4  -       BOOL g_IsAssaultTimerActive;
0x004D77E8  -       BOOL g_IsMonkAngry;
0x004D791C  +       int32_t g_OldGameTimer;
0x004D7920  +       BOOL g_FlashState;
0x004D7924  +       int32_t g_FlashCounter;
0x004D7928  +       int32_t g_OldHitPoints;
0x004D792C  -       TEXTSTRING *g_AmmoTextInfo;
0x004D7930  -       TEXTSTRING *g_DisplayModeTextInfo;
0x004D7934  -       DWORD g_DisplayModeInfoTimer;
0x004D7938  -       UINT16 g_Inv_MainCurrent;
0x004D793C  -       UINT16 g_Inv_KeyObjectsCount;
0x004D7940  -       UINT16 g_Inv_KeysCurrent;
0x004D7944  -       UINT16 g_Inv_OptionCurrent;
0x004D7954  -       TEXTSTRING* g_Inv_RingText;
0x004D795C  -       TEXTSTRING* g_Inv_UpArrow1;
0x004D7960  -       TEXTSTRING* g_Inv_UpArrow2;
0x004D7964  -       TEXTSTRING* g_Inv_DownArrow1;
0x004D7968  -       TEXTSTRING* g_Inv_DownArrow2;
0x004D796C  -       uint32_t g_InputDB;
0x004D7978  -       uint16_t g_Inv_IsActive;
0x004D79A0  -       BOOL g_Inv_DemoMode;
0x004D79B4  -       BOOL g_Inv_IsOptionsDelay;
0x004D79B8  -       int32_t g_Inv_OptionsDelayCounter;
0x004D79BC  -       uint16_t g_SoundOptionLine;
0x004D79C0  -       REQUEST_INFO g_StatsRequester;
0x004D7BD8  -       ASSAULT_STATS g_Assault;
0x004D7C38  -       int32_t g_LevelItemCount;
0x004D7C3C  -       int32_t g_HealthBarTimer;
0x004D7C80  -       int32_t g_SoundTrackIds[128];
0x004D7EBC  -       LPDIRECT3DDEVICE2 g_D3DDev;
0x004D7EE4  -       bool g_IsGameWindowCreated;
0x004D7EE8  -       bool g_IsGameWindowUpdating;
0x004D7EEC  -       bool g_IsDDrawGameWindowShow;
0x004D7EF0  -       int32_t g_MinWindowClientWidth;
0x004D7ED0  -       int32_t g_MinWindowClientHeight;
0x004D8388  -       int32_t g_MinWindowWidth;
0x004D838C  -       int32_t g_MinWindowHeight;
0x004D7EF4  -       bool g_IsGameWindowShow;
0x004D7EF8  -       bool g_IsMinWindowSizeSet;
0x004D7EFC  -       int32_t g_MaxWindowClientWidth;
0x004D7F00  -       int32_t g_GameWindowWidth;
0x004D7F04  -       bool g_IsMinMaxInfoSpecial;
0x004D7F08  -       bool g_IsGameFullScreen;
0x004D7F0C  -       bool g_IsGameWindowMaximized;
0x004D7F10  -       HWND g_GameWindowHandle;
0x004D7F14  -       int32_t g_GameWindowHeight;
0x004D7F18  -       DISPLAY_ADAPTER_NODE* g_PrimaryDisplayAdapter;
0x004D7F20  -       DISPLAY_ADAPTER g_CurrentDisplayAdapter;
0x004D8338  -       uint32_t g_LockedBufferCount;
0x004D833C  -       int32_t g_GameWindowPositionX;
0x004D8340  -       int32_t g_GameWindowPositionY;
0x004D8348  -       DISPLAY_ADAPTER_LIST g_DisplayAdapterList;
0x004D8354  -       int32_t g_MaxWindowClientHeight;
0x004D8358  -       bool g_IsMessageLoopClosed;
0x004D835C  -       int32_t g_MaxWindowWidth;
0x004D7EDC  -       int32_t g_MaxWindowHeight;
0x004D8360  -       bool g_IsMaxWindowSizeSet;
0x004D8364  -       uint32_t g_AppResultCode;
0x004D8368  -       int32_t g_FullScreenWidth;
0x004D836C  -       int32_t g_FullScreenHeight;
0x004D8370  -       int32_t g_FullScreenBPP;
0x004D8374  -       int32_t g_FullScreenVGA;
0x004D8378  -       uint8_t g_IsGameToExit;
0x004D8568  -       int32_t g_ScreenSizer;
0x004D856C  -       int32_t g_IsVidSizeLock;
0x004D8570  -       DWORD g_SampleFreqs[256];
0x004D8970  -       SOUND_ADAPTER_LIST g_SoundAdapterList;
0x004D8980  -       LPDIRECTSOUNDBUFFER g_SampleBuffers[256];
0x004D8D80  -       uint8_t g_IsSoundEnabled;
0x004D8D84  -       LPDIRECTSOUND g_DSound;
0x004D8D88  -       int32_t g_ChannelSamples[32];
0x004D8E08  -       LPDIRECTSOUNDBUFFER g_ChannelBuffers[32];
0x004D8E8C  -       SOUND_ADAPTER g_CurrentSoundAdapter;
0x004D8EAC  -       SOUND_ADAPTER_NODE *g_PrimarySoundAdapter;
0x004D8EB0  -       LPDDS g_RenderBufferSurface;
0x004D92B8  -       LPDDS g_ThirdBufferSurface;
0x004D92BC  -       LPDDS g_PictureBufferSurface;
0x004D92C0  -       LPDDS g_ZBufferSurface;
0x004D92C8  -       LPDDS g_PrimaryBufferSurface;
0x004D9338  -       int32_t g_GameVid_Width;
0x004D933C  -       int32_t g_GameVid_Height;
0x004D9340  -       int32_t g_GameVid_BPP;
0x004D934C  -       int32_t g_UVAdd;
0x004D9351  -       int8_t g_GameVid_IsWindowedVGA;
0x004D9EAC  -       int32_t g_IsFMVPlaying;
0x004D9EC0  -       int32_t g_CurrentLevel;
0x004D9EC4  -       int32_t g_LevelComplete;
0x004D9ED8  -       D3DTLVERTEX g_HWR_VertexBuffer[0x2000]; // MAX_VERTICES
0x00519EE0  -       HWR_TEXTURE_HANDLE g_HWR_PageHandles[32];
0x00519F60  -       D3DTLVERTEX *g_HWR_VertexPtr;
0x0051A0CC  -       void *g_GameMemoryPtr;
0x0051A0D0  +       BOOL g_ConflictLayout[14]; // INPUT_ROLE_NUMBER_OF
0x0051A108  -       uint8_t g_DIKeys[256];
0x0051A208  -       int32_t g_Input;
0x0051A20C  -       int8_t g_IsVidModeLock;
0x0051A210  -       int32_t g_JoyKeys;
0x0051A214  +       int32_t g_JoyXPos;
0x0051A218  +       int32_t g_JoyYPos;
0x0051A220  +       int32_t g_MediPackCooldown;
0x0051A224  +       int8_t g_IsF3Pressed;
0x0051A228  +       int8_t g_IsF4Pressed;
0x0051A22C  +       int8_t g_IsF7Pressed;
0x0051A230  +       int8_t g_IsF8Pressed;
0x0051A234  +       int8_t g_IsF11Pressed;
0x0051A238  -       HINSTANCE g_GameModule;
0x0051A23C  -       char *g_CmdLine;
0x0051A240  -       int32_t g_ScreenshotCounter;
0x0051B918  -       RECT g_PhdWinRect;
0x0051B928  -       int32_t g_HiRes;
0x0051B930  -       RGB_888 g_GamePalette8[256];
0x0051BCC0  -       APP_SETTINGS g_SavedAppSettings;
0x0051BD20  -       char g_ErrorMessage[128];
0x0051BDA8  -       int32_t g_MasterVolume;
0x0051BDAC  -       MCIDEVICEID g_MciDeviceID;
0x0051BDB0  -       int32_t g_CD_LoopTrack;
0x0051C820  +       TEXTSTRING g_TextstringTable[64]; // MAX_TEXTSTRINGS
0x0051D6A0  -       int16_t g_TextstringCount = 0;
0x0051D6C0  -       char g_TextstringBuffers[64][64];
0x0051E6C4  -       int32_t g_SoundIsActive;
0x0051E9E0  -       SAVEGAME_INFO g_SaveGame;
0x005206E0  -       LARA_INFO g_Lara;
0x005207BC  -       ITEM *g_LaraItem;
0x005207C0  -       FX *g_Effects;
0x005207C4  -       int16_t g_NextEffectFree;
0x005207C6  -       int16_t g_NextItemFree;
0x005207C8  -       int16_t g_NextItemActive;
0x005207CA  -       int16_t g_NextEffectActive;
0x005207CC  -       int16_t g_PrevItemActive;
0x00521CA0  -       PICKUP_INFO g_Pickups[12];
0x00521DE0  -       GAME_FLOW g_GameFlow;
0x00521FDC  -       int32_t g_SoundEffectCount;
0x00522000  -       OBJECT g_Objects[265];
0x005252B0  -       int16_t **g_Meshes;
0x005252C0  -       MATRIX g_IMMatrixStack[256];
0x005258F0  -       int32_t g_IMFrac;
0x005258F4  -       ANIM *g_Anims;
0x00525BE8  -       int32_t *g_AnimBones;
0x00526180  -       int32_t g_RoomCount;
0x00526184  -       int32_t g_IMRate;
0x00526188  -       MATRIX *g_IMMatrixPtr;
0x0052618C  -       ROOM *g_Rooms;
0x00526240  -       int32_t g_FlipStatus;
0x00526288  -       int16_t *g_TriggerIndex;
0x005262A0  -       int32_t g_LOSRooms[20];
0x005262F0  -       ITEM *g_Items;
0x005262F6  -       int16_t g_NumCineFrames;
0x005262F8  -       CINE_FRAME *g_CineData = NULL;
0x00526300  -       PHD_3DPOS g_CinePos;
0x00526314  -       int16_t g_CineFrameIdx;
0x00526320  -       CAMERA_INFO g_Camera;
0x005263CC  -       BOX_INFO *g_Boxes;
0x004D855C  -       LPDIRECTINPUT g_DInput;
0x004D8560  -       LPDIRECTINPUTDEVICE IDID_SysKeyboard;
0x0051BDA0  -       BOOL g_IsTitleLoaded;
0x004D7980  -       int32_t g_Inv_ExtraData[8];
0x004D8394  -       int32_t g_MessageLoopCounter;
0x004D8384  -       bool g_IsGameWindowMinimized;
0x004D8390  -       bool g_IsGameWindowActive;
0x004D837C  -       int32_t g_GameWindowY;
0x004D7EE0  -       LPDIRECTDRAW3 g_DDraw;
0x004D8380  -       int32_t g_GameWindowX;
0x00463150  -       GUID g_IID_IDirectDrawSurface3;
0x004640A0  +       BITE g_CrowBite;
0x00464090  +       BITE g_BirdBite;
0x005263C0  -       int16_t *g_FlyZone[2];
0x005263A0  -       int16_t *g_GroundZone[][2];
0x005263C8  -       uint16_t *g_Overlap;
0x005206C0  -       CREATURE *g_BaddieSlots;
0x00526312  +       int16_t g_CineLevelID;
0x005252B8  -       int32_t g_DrawRoomsCount;
0x00525B20  -       int16_t g_DrawRoomsArray[100];
0x00525BEC  -       int32_t g_DynamicLightCount;
0x004D7784  -       int32_t g_CineTickCount;
0x004D7788  -       int32_t g_OriginalRoom;
0x00465518  -       INVENTORY_ITEM *g_Inv_MainList[];
0x00465608  +       INVENTORY_ITEM *g_Inv_OptionList[];
0x004655A8  -       INVENTORY_ITEM *g_Inv_KeysList[];
0x004644F8  -       int32_t g_Inv_NFrames;
0x00525C00  -       STATIC_INFO g_StaticObjects[50]; // MAX_STATIC_OBJECTS
0x00521FE0  -       OBJECT_VECTOR *g_SoundEffects;
0x0051E6E0  -       int16_t g_SampleLUT[];
0x0051E9C4  -       SAMPLE_INFO *g_SampleInfos;
0x004D7C78  +       SOUND_SLOT g_SoundSlots[32];
0x004D9328  -       RECT g_GameVid_Rect;
0x004D9358  -       LPDDS g_BackBufferSurface;
0x004D9350  -       bool g_GameVid_IsVga;
0x004D9344  -       int32_t g_GameVid_BufWidth;
0x004D9348  -       int32_t g_GameVid_BufHeight;
0x004D8EB4  -       LPDIRECTDRAWCLIPPER g_DDrawClipper;
0x004D8EB8  -       PALETTEENTRY g_WinVid_Palette[256];
0x004D92C4  -       LPDIRECTDRAWPALETTE g_DDrawPalette;
0x004D7EC4  -       LPDIRECT3DVIEWPORT2 g_D3DView;
0x004D9355  -       bool g_NeedToReloadTextures;
0x004D9352  -       bool g_GameVid_IsFullscreenVGA;
0x004D9353  -       bool g_IsWindowedVGA;
0x004D9354  -       bool g_Is16bitTextures;
0x004D9318  -       RECT g_GameVid_BufRect;
0x00466BE4  -       int16_t g_DumpX;
0x00466BE6  -       int16_t g_DumpY;
0x00466BE8  -       int16_t g_DumpWidth;
0x00466BEA  -       int16_t g_DumpHeight;
0x0051C1B8  -       TEXTURE_FORMAT g_TextureFormat;
0x004D92E8  -       COLOR_BIT_MASKS g_ColorBitMasks;
0x0051BC30  -       bool g_WinVidNeedToResetBuffers;
0x004D7E88  -       bool g_BGND_PictureIsReady;
0x004D7E90  -       int32_t g_BGND_TexturePageIndexes[5];
0x004D7EA8  -       HWR_TEXTURE_HANDLE g_BGND_PageHandles[5];
0x004D7EC0  -       LPDIRECT3D2 g_D3D;
0x004D7EC8  -       LPDIRECT3DMATERIAL2 g_D3DMaterial;
0x004D7ED4  -       LPDIRECTDRAW g_DDrawInterface;
0x00466448  -       const char g_GameClassName[];
0x00466468  -       const char g_GameWindowName[];
0x004D7ED8  -       bool g_IsGameWindowChanging;
0x00519F68  -       D3DRENDERSTATETYPE g_AlphaBlendEnabler;
0x00519ED8  -       D3DTEXTUREHANDLE g_CurrentTexSource;
0x00519F6C  -       bool g_ColorKeyState;
0x0051C20C  -       bool g_TexturesAlphaChannel;
0x00519F64  -       bool g_ZEnableState;
0x00519F70  -       bool g_ZWriteEnableState;
0x00466BDC  -       int32_t g_PaletteIndex;
0x00519F78  -       int32_t g_HWR_TexturePageIndexes[32]; // MAX_TEXTURE_PAGES
0x004D7790  -       int32_t g_HeightType;
0x004D9D94  -       int16_t *g_FloorData;
0x00525B08  -       int16_t *g_AnimCommands;
0x0052617C  -       ANIM_CHANGE *g_AnimChanges;
0x00525B04  -       ANIM_RANGE *g_AnimRanges;
0x00526260  -       int32_t g_FlipMaps[10]; // MAX_FLIPMAPS
0x005252B4  -       int32_t g_Outside;
0x00526198  -       int32_t g_OutsideRight;
0x00526178  -       int32_t g_OutsideLeft;
0x005261AC  -       int32_t g_OutsideTop;
0x00525B00  -       int32_t g_OutsideBottom;
0x00525900  -       int32_t g_BoundRooms[128]; // MAX_BOUND_ROOMS
0x005258C0  -       DOOR_VBUF g_DoorVBuf[4];
0x00464180  -       int32_t g_BoxLines[12][2];
0x00526190  -       BOOL g_CameraUnderwater;
0x005263D0  -       int32_t g_BoxCount;
0x004D7C50  -       int32_t g_SlotsUsed;
0x004D9360  -       int32_t g_TexturePageCount;
0x004D9D90  -       int16_t *g_MeshBase;
0x004D9E98  -       int32_t g_TextureInfoCount;
0x004D93F0  -       uint8_t g_LabTextureUVFlag[2048]; // MAX_TEXTURES
0x004B2B00  -       PHD_TEXTURE g_TextureInfo[];
0x005251B0  -       FRAME_INFO *g_AnimFrames;
0x0051BC38  -       int32_t g_IsWet;
0x0051B308  -       RGB_888 g_WaterPalette[256];
0x004BF2D8  -       uint8_t g_DepthQIndex[256];
0x004D7C74  -       int32_t g_NumCameras;
0x0051B92C  -       int16_t *g_AnimTextureRanges;
0x005262F4  -       int16_t g_CineLoaded;
0x005261B0  -       uint32_t *g_DemoPtr;
0x005261B4  -       int32_t g_DemoCount;
0x0051E6C0  -       int32_t g_NumSampleInfos;
0x004D9BF4  -       int32_t g_LevelFilePalettesOffset;
0x004D9BF8  -       int32_t g_LevelFileTexPagesOffset;
0x004D9E9C  -       int32_t g_LevelFileDepthQOffset;
0x004D9D98  -       char g_LevelFileName[256];
0x005261C0  -       uint16_t g_MusicTrackFlags[64];
0x00465AE0  -       WEAPON_INFO g_Weapons[];
0x005206A8  -       int16_t g_FinalBossActive;
0x005206BA  -       int16_t g_FinalLevelCount;
0x005206BC  -       int16_t g_FinalBossCount;
0x005206B0  -       int16_t g_FinalBossItem[5];
0x004D77B4  +       int32_t g_DemoLevel;
0x004D77B8  +       int32_t g_DemoLevel2;
0x00464A90  -       INVENTORY_ITEM g_Inv_Item_Stopwatch;
0x00464AE0  -       INVENTORY_ITEM g_Inv_Item_Pistols;
0x00464B30  -       INVENTORY_ITEM g_Inv_Item_Flare;
0x00464B80  -       INVENTORY_ITEM g_Inv_Item_Shotgun;
0x00464BD0  -       INVENTORY_ITEM g_Inv_Item_Magnums;
0x00464C20  -       INVENTORY_ITEM g_Inv_Item_Uzis;
0x00464C70  -       INVENTORY_ITEM g_Inv_Item_Harpoon;
0x00464CC0  -       INVENTORY_ITEM g_Inv_Item_M16;
0x00464D10  -       INVENTORY_ITEM g_Inv_Item_Grenade;
0x00464D60  -       INVENTORY_ITEM g_Inv_Item_PistolAmmo;
0x00464DB0  -       INVENTORY_ITEM g_Inv_Item_ShotgunAmmo;
0x00464E00  -       INVENTORY_ITEM g_Inv_Item_MagnumAmmo;
0x00464E50  -       INVENTORY_ITEM g_Inv_Item_UziAmmo;
0x00464EA0  -       INVENTORY_ITEM g_Inv_Item_HarpoonAmmo;
0x00464EF0  -       INVENTORY_ITEM g_Inv_Item_M16Ammo;
0x00464F40  -       INVENTORY_ITEM g_Inv_Item_GrenadeAmmo;
0x00464F90  -       INVENTORY_ITEM g_Inv_Item_SmallMedi;
0x00464FE0  -       INVENTORY_ITEM g_Inv_Item_LargeMedi;
0x00465030  -       INVENTORY_ITEM g_Inv_Item_Pickup1;
0x00465080  -       INVENTORY_ITEM g_Inv_Item_Pickup2;
0x004650D0  -       INVENTORY_ITEM g_Inv_Item_Puzzle1;
0x00465120  -       INVENTORY_ITEM g_Inv_Item_Puzzle2;
0x00465170  -       INVENTORY_ITEM g_Inv_Item_Puzzle3;
0x004651C0  -       INVENTORY_ITEM g_Inv_Item_Puzzle4;
0x00465210  -       INVENTORY_ITEM g_Inv_Item_Key1;
0x00465260  -       INVENTORY_ITEM g_Inv_Item_Key2;
0x004652B0  -       INVENTORY_ITEM g_Inv_Item_Key3;
0x00465300  -       INVENTORY_ITEM g_Inv_Item_Key4;
0x00465350  -       INVENTORY_ITEM g_Inv_Item_Passport;
0x004653A0  -       INVENTORY_ITEM g_Inv_Item_Graphics;
0x004653F0  -       INVENTORY_ITEM g_Inv_Item_Sound;
0x00465440  -       INVENTORY_ITEM g_Inv_Item_Controls;
0x00465490  -       INVENTORY_ITEM g_Inv_Item_Photo;
0x00465620  -       REQUEST_INFO g_LoadGameRequester;
0x00465838  -       REQUEST_INFO g_SaveGameRequester;
0x004642E8  -       int16_t g_GF_NumSecrets = 3;
0x004642F0  -       int16_t g_GF_MusicTracks[16];
0x004D77EC  -       int32_t g_GF_ScriptVersion;
0x004D77F0  -       int32_t g_GF_LaraStartAnim;
0x004D77F4  -       int16_t g_GF_SunsetEnabled;
0x004D77F8  -       int16_t g_GF_DeadlyWater;
0x004D77FC  -       int16_t g_GF_NoFloor;
0x004D7800  -       int16_t g_GF_RemoveWeapons;
0x004D7804  -       int16_t g_GF_RemoveAmmo;
0x004D7808  -       char g_GF_Kill2Complete;
0x004D780C  -       int8_t g_GF_StartGame;
0x004D7818  -       char g_GF_Description[256];
0x004D9C00  -       int16_t g_GF_LevelOffsets[200];
0x00521DC4  -       char **g_GF_CutsceneFileNames;
0x00521E68  -       char *g_GF_FMVFilenamesBuf;
0x00521E6C  -       char *g_GF_Key1StringsBuf;
0x00521E70  -       int16_t *g_GF_FrontendSequence;
0x00521E74  -       char **g_GF_Key2Strings;
0x00521E78  -       char *g_GF_CutsceneFileNamesBuf;
0x00521E7C  -       char *g_GF_Key4StringsBuf;
0x00521E80  -       int16_t *g_GF_SequenceBuf;
0x00521E84  -       char *g_GF_Key2StringsBuf;
0x00521E8C  -       char *g_GF_PicFilenamesBuf;
0x00521E90  -       char **g_GF_Key4Strings;
0x00521DC0  -       char **g_GF_Puzzle1Strings;
0x00521E98  -       char **g_GF_Puzzle2Strings;
0x00521EC0  -       char **g_GF_Puzzle3Strings;
0x00521E60  -       char **g_GF_Puzzle4Strings;
0x00521E94  -       char **g_GF_Pickup1Strings;
0x00521F44  -       char **g_GF_Pickup2Strings;
0x00521EA8  -       char *g_GF_Puzzle1StringsBuf;
0x00521F40  -       char *g_GF_Puzzle2StringsBuf;
0x00521F98  -       char *g_GF_Puzzle3StringsBuf;
0x00521F90  -       char *g_GF_Puzzle4StringsBuf;
0x00521E64  -       char *g_GF_Pickup1StringsBuf;
0x00521E88  -       char *g_GF_Pickup2StringsBuf;
0x00521E9C  -       char *g_GF_LevelFileNamesBuf;
0x00521EA0  -       char **g_GF_PicFilenames;
0x00521EA4  -       char **g_GF_Key1Strings;
0x00521EAC  -       char *g_GF_LevelNamesBuf;
0x00521EB0  -       char **g_GF_GameStrings;
0x00521EB4  -       char *g_GF_PCStringsBuf;
0x00521EB8  -       char *g_GF_GameStringsBuf;
0x00521EBC  -       char **g_GF_Key3Strings;
0x00521EC4  -       char **g_GF_LevelNames;
0x00521EE0  -       int16_t *g_GF_ScriptTable[24]; // MAX_LEVELS
0x00521F48  -       char **g_GF_TitleFileNames;
0x00521F4C  -       char *g_GF_TitleFileNamesBuf;
0x00521F50  -       char **g_GF_PCStrings;
0x00521F54  -       char **g_GF_LevelFileNames;
0x00521F60  -       int16_t g_GF_ValidDemos[24]; // MAX_DEMO_FILES
0x00521F94  -       char **g_GF_FMVFilenames;
0x00521F9C  -       char *g_GF_Key3StringsBuf;
0x00521FA0  -       char g_GF_SecretInvItems[27]; // GF_ADD_INV_NUMBER_OF
0x00521FC0  -       char g_GF_Add2InvItems[27]; // GF_ADD_INV_NUMBER_OF
0x004D9ECC  -       int32_t g_GameMode; // GAMEMODE
0x004D7970  -       int32_t g_OldInputDB;
0x004D7948  -       TEXTSTRING *g_Inv_ItemText[3]; // IT_NUMBER_OF
0x004D7950  -       TEXTSTRING *g_Inv_LevelText;
0x004D7958  -       TEXTSTRING *g_Inv_TagText;
0x004D9EBC  -       int32_t g_SavedGames;
0x0051A2CC  -       TEXTSTRING *g_PasswordText1;
0x0051A2D0  -       int32_t g_PassportMode;
0x0051A2D8  -       TEXTSTRING *g_DetailText[5];
0x0051A2F0  -       TEXTSTRING *g_SoundText[4];
0x0051A290  +       TEXTSTRING *m_ControlsTextA[14]; // INPUT_ROLE_NUMBER_OF
0x0051A258  +       TEXTSTRING *g_ControlsTextB[14]; // INPUT_ROLE_NUMBER_OF
0x0051A300  +       TEXTSTRING *g_ControlsText[2];
0x004D7C30  +       int32_t m_ShowStatsTextMode;
0x005207E0  -       char g_ValidLevelStrings1[];
0x00521720  -       char g_ValidLevelStrings2[];
0x004D7C34  +       int32_t m_ShowEndStatsTextMode;
0x004D7C2C  +       int32_t m_ShowGymStatsTextMode;
0x00520D00  -       uint32_t g_RequesterFlags1[24]; // MAX_REQUESTER_ITEMS
0x00520CA0  -       uint32_t g_RequesterFlags2[24]; // MAX_REQUESTER_ITEMS
0x00521C40  -       uint32_t g_SaveGameReqFlags1[24]; // MAX_REQUESTER_ITEMS
0x00521BE0  -       uint32_t g_SaveGameReqFlags2[24]; // MAX_REQUESTER_ITEMS
0x004D9EC8  -       int32_t g_SaveCounter;
0x00466B80  -       int16_t g_SavedLevels[24]; // MAX_LEVELS
0x004654E8  -       int16_t g_Inv_MainQtys[];
0x00465578  -       int16_t g_Inv_KeysQtys[];
0x0046773C  -       int32_t g_DetailLevel;
0x0051A250  +       int32_t g_LayoutPage;
0x0051A24C  +       int32_t g_KeySelector;
0x0051A248  +       int32_t g_KeyCursor;
0x00466FA8  +       const char *g_KeyNames[];
0x00464500  -       const uint16_t g_Requester_BackgroundGour1[];
0x00464520  -       const uint16_t g_Requester_BackgroundGour2[];
0x00464538  -       const uint16_t g_Requester_MainGour1[];
0x00464558  -       const uint16_t g_Requester_MainGour2[];
0x00464590  -       const uint16_t g_Requester_SelectionGour2[];
0x004645A8  -       const uint16_t g_Requester_UnselectionGour1[];
0x005216E0  -       uint16_t g_InvColors[17]; // INV_COLOR_NUMBER_OF
