diff --git a/docs/progress.svg b/docs/progress.svg
index e47dec36..2412d38e 100644
--- a/docs/progress.svg
+++ b/docs/progress.svg
@@ -391,18 +391,18 @@
void __cdecl InitialiseHair(void);
void __cdecl HairControl(int32_t in_cutscene);
void __cdecl DrawHair(void);
-int32_t __cdecl FlashIt(void);
-void __cdecl DrawAssaultTimer(void);
-void __cdecl DrawGameInfo(int32_t timed);
-void __cdecl DrawHealthBar(int32_t flash_state);
-void __cdecl DrawAirBar(int32_t flash_state);
-void __cdecl MakeAmmoString(char *string);
-void __cdecl DrawAmmoInfo(void);
-void __cdecl InitialisePickUpDisplay(void);
-void __cdecl DrawPickups(int32_t timed);
-void __cdecl AddDisplayPickup(int16_t obj_num);
-void __cdecl DisplayModeInfo(char* string);
-void __cdecl DrawModeInfo(void);
+int32_t __cdecl Overlay_FlashCounter(void);
+void __cdecl Overlay_DrawAssaultTimer(void);
+void __cdecl Overlay_DrawGameInfo(int32_t timed);
+void __cdecl Overlay_DrawHealthBar(int32_t flash_state);
+void __cdecl Overlay_DrawAirBar(int32_t flash_state);
+void __cdecl Overlay_MakeAmmoString(char *string);
+void __cdecl Overlay_DrawAmmoInfo(void);
+void __cdecl Overlay_InitialisePickUpDisplay(void);
+void __cdecl Overlay_DrawPickups(int32_t timed);
+void __cdecl Overlay_AddDisplayPickup(int16_t obj_num);
+void __cdecl Overlay_DisplayModeInfo(char* string);
+void __cdecl Overlay_DrawModeInfo(void);
int32_t __cdecl Display_Inventory(int32_t inventory_mode);
void __cdecl Construct_Inventory(void);
void __cdecl SelectMeshes(struct INVENTORY_ITEM *inv_item);
@@ -1017,22 +1017,22 @@
DWORD __cdecl GetZBufferDepth(void);
void __cdecl CreateRenderBuffer(void);
void __cdecl CreatePictureBuffer(void);
-void __cdecl ClearBuffers(DWORD flags, DWORD fillColor);
+void __cdecl ClearBuffers(DWORD flags, DWORD fill_color);
void __cdecl RestoreLostBuffers(void);
-void __cdecl UpdateFrame(bool needRunMessageLoop, LPRECT rect);
+void __cdecl UpdateFrame(bool need_run_message_loop, LPRECT rect);
void __cdecl WaitPrimaryBufferFlip(void);
bool __cdecl RenderInit(void);
-void __cdecl RenderStart(bool isReset);
-void __cdecl RenderFinish(bool needToClearTextures);
-bool __cdecl ApplySettings(struct APP_SETTINGS *newSettings);
+void __cdecl RenderStart(bool is_reset);
+void __cdecl RenderFinish(bool need_to_clear_textures);
+bool __cdecl ApplySettings(struct APP_SETTINGS *new_settings);
void __cdecl FmvBackToGame(void);
-void __cdecl GameApplySettings(struct APP_SETTINGS *newSettings);
+void __cdecl GameApplySettings(struct APP_SETTINGS *new_settings);
void __cdecl UpdateGameResolution(void);
-LPCTSTR __cdecl DecodeErrorMessage(DWORD errorCode);
+LPCTSTR __cdecl DecodeErrorMessage(DWORD error_code);
BOOL __cdecl ReadFileSync(HANDLE handle, LPVOID lpBuffer, DWORD nBytesToRead, LPDWORD lpnBytesRead, LPOVERLAPPED lpOverlapped);
BOOL __cdecl LoadTexturePages(HANDLE handle);
BOOL __cdecl LoadRooms(HANDLE handle);
-void __cdecl AdjustTextureUVs(bool resetUvAdd);
+void __cdecl AdjustTextureUVs(bool reset_uv_add);
BOOL __cdecl LoadObjects(HANDLE handle);
BOOL __cdecl LoadSprites(HANDLE handle);
BOOL __cdecl LoadItems(HANDLE handle);
@@ -1044,36 +1044,36 @@
BOOL __cdecl LoadAnimatedTextures(HANDLE handle);
BOOL __cdecl LoadCinematic(HANDLE handle);
BOOL __cdecl LoadDemo(HANDLE handle);
-void __cdecl LoadDemoExternal(LPCTSTR levelName);
+void __cdecl LoadDemoExternal(LPCTSTR level_name);
BOOL __cdecl LoadSamples(HANDLE handle);
-void __cdecl ChangeFileNameExtension(char *fileName, const char *fileExt);
-LPCTSTR __cdecl GetFullPath(LPCTSTR fileName);
+void __cdecl ChangeFileNameExtension(char *file_name, const char *file_ext);
+LPCTSTR __cdecl GetFullPath(LPCTSTR file_name);
BOOL __cdecl SelectDrive(void);
-BOOL __cdecl LoadLevel(LPCTSTR fileName, int32_t levelID);
-BOOL __cdecl S_LoadLevelFile(LPCTSTR fileName, int32_t levelID, GF_LEVEL_TYPE levelType);
+BOOL __cdecl LoadLevel(LPCTSTR file_name, int32_t level_num);
+BOOL __cdecl S_LoadLevelFile(LPCTSTR file_name, int32_t level_num, GF_LEVEL_TYPE level_type);
void __cdecl S_UnloadLevelFile(void);
void __cdecl S_AdjustTexelCoordinates(void);
-BOOL __cdecl S_ReloadLevelGraphics(BOOL reloadPalettes, BOOL reloadTexPages);
-BOOL __cdecl Read_Strings(DWORD dwCount, char **stringTable, char **stringBuffer, LPDWORD lpBufferSize, HANDLE handle);
-BOOL __cdecl S_LoadGameFlow(LPCTSTR fileName);
-bool __cdecl PlayFMV(LPCTSTR fileName);
-void __cdecl WinPlayFMV(LPCTSTR fileName, bool isPlayback);
-void __cdecl WinStopFMV(bool isPlayback);
-bool __cdecl IntroFMV(LPCTSTR fileName1, LPCTSTR fileName2);
+BOOL __cdecl S_ReloadLevelGraphics(BOOL reload_palettes, BOOL reload_tex_pages);
+BOOL __cdecl Read_Strings(DWORD count, char **string_table, char **string_buf, LPDWORD buf_size, HANDLE handle);
+BOOL __cdecl S_LoadGameFlow(const char *file_name);
+bool __cdecl PlayFMV(const char *file_name);
+void __cdecl WinPlayFMV(const char *file_name, bool is_playback);
+void __cdecl WinStopFMV(bool is_playback);
+bool __cdecl IntroFMV(const char *file_name1, const char *file_name2);
uint16_t __cdecl S_COLOUR(int32_t red, int32_t green, int32_t blue);
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);
void __cdecl S_DrawScreenBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const struct GOURAUD_OUTLINE *gour, uint16_t flags);
void __cdecl S_DrawScreenFBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const struct GOURAUD_FILL *gour, uint16_t flags);
void __cdecl S_FinishInventory(void);
void __cdecl S_FadeToBlack(void);
-void __cdecl S_Wait(int32_t timeout, BOOL inputCheck);
-bool __cdecl S_PlayFMV(LPCTSTR fileName);
-bool __cdecl S_IntroFMV(LPCTSTR fileName1, LPCTSTR fileName2);
-int16_t __cdecl StartGame(int32_t levelID, GF_LEVEL_TYPE levelType);
-int32_t __cdecl GameLoop(BOOL demoMode);
+void __cdecl S_Wait(int32_t timeout, BOOL input_check);
+bool __cdecl S_PlayFMV(const char *file_name);
+bool __cdecl S_IntroFMV(const char *file_name1, const char *file_name2);
+int16_t __cdecl StartGame(int32_t level_num, GF_LEVEL_TYPE level_type);
+int32_t __cdecl GameLoop(BOOL demo_mode);
int32_t __cdecl LevelCompleteSequence(void);
-int32_t __cdecl LevelStats(int32_t levelID);
-int32_t __cdecl GameStats(int32_t levelID);
+int32_t __cdecl LevelStats(int32_t level_num);
+int32_t __cdecl GameStats(int32_t level_num);
int32_t __cdecl Random_GetControl(void);
void __cdecl Random_SeedControl(int32_t seed);
int32_t __cdecl Random_GetDraw(void);
@@ -1088,12 +1088,12 @@
void __cdecl HWR_ResetTexSource(void);
void __cdecl HWR_ResetColorKey(void);
void __cdecl HWR_ResetZBuffer(void);
-void __cdecl HWR_TexSource(HWR_TEX_HANDLE texSource);
+void __cdecl HWR_TexSource(HWR_TEX_HANDLE tex_source);
void __cdecl HWR_EnableColorKey(bool state);
void __cdecl HWR_EnableZBuffer(bool z_write_enable, bool z_enable);
void __cdecl HWR_BeginScene(void);
void __cdecl HWR_DrawPolyList(void);
-void __cdecl HWR_LoadTexturePages(int32_t pagesCount, LPVOID pagesBuffer, RGB888 *palette);
+void __cdecl HWR_LoadTexturePages(int32_t pages_count, void *pages_buf, RGB888 *palette);
void __cdecl HWR_FreeTexturePages(void);
void __cdecl HWR_GetPageHandles(void);
bool __cdecl HWR_VertexBufferFull(void);
@@ -1101,16 +1101,16 @@
BOOL __cdecl S_InitialiseSystem(void);
void __cdecl GameBuf_Shutdown(void);
void __cdecl init_game_malloc(void);
-void *__cdecl game_malloc(DWORD allocSize, DWORD bufIndex);
-void __cdecl game_free(DWORD freeSize);
+void *__cdecl game_malloc(uint32_t alloc_size, uint32_t buf_index);
+void __cdecl game_free(uint32_t free_size);
void __cdecl CalculateWibbleTable(void);
void __cdecl Random_Seed(void);
BOOL __cdecl S_Input_Key(KEYMAP keymap);
bool __cdecl Input_Update(void);
-int32_t __cdecl RenderErrorBox(int32_t errorCode);
+int32_t __cdecl RenderErrorBox(int32_t error_code);
int32_t __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int32_t nShowCmd);
sub_44E6F0
-int32_t __cdecl GameInit(bool skipCDInit);
+int32_t __cdecl GameInit(bool skip_cd_init);
void __cdecl Shell_Cleanup(void);
int32_t __cdecl WinGameStart(void);
void __cdecl Shell_Shutdown(void);
@@ -1118,7 +1118,7 @@
sub_44E880
void __cdecl Shell_ExitSystem(const char *message);
void __cdecl ScreenShotPCX(void);
-DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcxData);
+DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcx_data);
DWORD __cdecl EncodeLinePCX(BYTE *src, DWORD width, BYTE *dst);
DWORD __cdecl EncodePutPCX(BYTE value, BYTE num, BYTE *buffer);
void __cdecl ScreenShot(LPDDS screen);
@@ -1135,34 +1135,34 @@
void __cdecl S_RemoveCtrlText(void);
int32_t __cdecl GetRenderHeight(void);
int32_t __cdecl GetRenderWidth(void);
-void __cdecl S_InitialisePolyList(BOOL clearBackBuffer);
+void __cdecl S_InitialisePolyList(BOOL clear_back_buffer);
DWORD __cdecl S_DumpScreen(void);
void __cdecl S_ClearScreen(void);
-void __cdecl S_InitialiseScreen(GF_LEVEL_TYPE levelType);
+void __cdecl S_InitialiseScreen(GF_LEVEL_TYPE level_type);
void __cdecl S_OutputPolyList(void);
-int32_t __cdecl S_GetObjectBounds(int16_t *bPtr);
+int32_t __cdecl S_GetObjectBounds(int16_t *obj_ptr);
void __cdecl S_InsertBackPolygon(int32_t x0, int32_t y0, int32_t x1, int32_t y1);
-void __cdecl S_PrintShadow(int16_t radius, int16_t *bPtr, ITEM_INFO *item);
+void __cdecl S_PrintShadow(int16_t radius, int16_t *obj_ptr, ITEM_INFO *item);
void __cdecl S_CalculateLight(int32_t x, int32_t y, int32_t z, int16_t room_num);
void __cdecl S_CalculateStaticLight(int16_t adder);
void __cdecl S_CalculateStaticMeshLight(int32_t x, int32_t y, int32_t z, int32_t shade1, int32_t shade2, ROOM_INFO *room);
void __cdecl S_LightRoom(ROOM_INFO *room);
void __cdecl S_DrawHealthBar(int32_t percent);
void __cdecl S_DrawAirBar(int32_t percent);
-void __cdecl AnimateTextures(int32_t nTicks);
+void __cdecl AnimateTextures(int32_t ticks);
void __cdecl S_SetupBelowWater(BOOL underwater);
void __cdecl S_SetupAboveWater(BOOL underwater);
-void __cdecl S_AnimateTextures(int32_t nTicks);
-void __cdecl S_DisplayPicture(LPCTSTR fileName, BOOL isTitle);
+void __cdecl S_AnimateTextures(int32_t ticks);
+void __cdecl S_DisplayPicture(const char *file_name, BOOL is_title);
void __cdecl S_SyncPictureBufferPalette(void);
void __cdecl S_DontDisplayPicture(void);
void __cdecl ScreenDump(void);
void __cdecl ScreenPartialDump(void);
-void __cdecl FadeToPal(int32_t fadeValue, RGB888 *palette);
-void __cdecl ScreenClear(bool isPhdWinSize);
+void __cdecl FadeToPal(int32_t fade_value, RGB888 *palette);
+void __cdecl ScreenClear(bool is_phd_win_size);
void __cdecl S_CopyScreenToBuffer(void);
void __cdecl S_CopyBufferToScreen(void);
-BOOL __cdecl DecompPCX(LPCBYTE pcx, DWORD pcxSize, LPBYTE pic, RGB888 *pal);
+BOOL __cdecl DecompPCX(const uint8_t *pcx, size_t pcx_size, LPBYTE pic, RGB888 *pal);
sub_4523A0
sub_4523B0
bool __cdecl OpenGameRegistryKey(LPCTSTR key);
@@ -1219,30 +1219,30 @@
void __cdecl Music_Shutdown(void);
void __cdecl Music_Play(int16_t track_id, bool is_looped);
void __cdecl Music_Stop(void);
-bool __cdecl Music_PlaySynced(int32_t trackID);
+bool __cdecl Music_PlaySynced(int32_t track_id);
int32_t __cdecl Music_GetFrames(void);
void __cdecl Music_SetVolume(int32_t volume);
-void __cdecl CopyBitmapPalette(RGB888 *srcPal, BYTE *srcBitmap, int32_t bitmapSize, RGB888 *destPal);
-BYTE __cdecl FindNearestPaletteEntry(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignoreSysPalette);
-void __cdecl SyncSurfacePalettes(void *srcData, int32_t width, int32_t height, int32_t srcPitch, RGB888 *srcPalette, void *dstData, int32_t dstPitch, RGB888 *dstPalette, bool preserveSysPalette);
+void __cdecl CopyBitmapPalette(RGB888 *src_pal, BYTE *src_bitmap, int32_t bitmap_size, RGB888 *dest_pal);
+BYTE __cdecl FindNearestPaletteEntry(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignore_sys_palette);
+void __cdecl SyncSurfacePalettes(void *src_data, int32_t width, int32_t height, int32_t src_pitch, RGB888 *src_palette, void *dst_data, int32_t dst_pitch, RGB888 *dst_palette, bool preserve_sys_palette);
int32_t __cdecl CreateTexturePalette(RGB888 *pal);
int32_t __cdecl GetFreePaletteIndex(void);
-void __cdecl FreePalette(int32_t paletteIndex);
-void __cdecl SafeFreePalette(int32_t paletteIndex);
+void __cdecl FreePalette(int32_t palette_idx);
+void __cdecl SafeFreePalette(int32_t palette_idx);
int32_t __cdecl CreateTexturePage(int32_t width, int32_t height, bool alpha);
int32_t __cdecl GetFreeTexturePageIndex(void);
bool __cdecl CreateTexturePageSurface(TEXPAGE_DESC *desc);
bool __cdecl TexturePageInit(TEXPAGE_DESC *page);
LPDIRECT3DTEXTURE2 __cdecl Create3DTexture(LPDDS surface);
-void __cdecl SafeFreeTexturePage(int32_t pageIndex);
-void __cdecl FreeTexturePage(int32_t pageIndex);
+void __cdecl SafeFreeTexturePage(int32_t page_idx);
+void __cdecl FreeTexturePage(int32_t page_idx);
void __cdecl TexturePageReleaseVidMemSurface(TEXPAGE_DESC *page);
void __cdecl FreeTexturePages(void);
-bool __cdecl LoadTexturePage(int32_t pageIndex, bool reset);
+bool __cdecl LoadTexturePage(int32_t page_idx, bool reset);
bool __cdecl ReloadTextures(bool reset);
-HWR_TEX_HANDLE __cdecl GetTexturePageHandle(int32_t pageIndex);
-int32_t __cdecl AddTexturePage8(int32_t width, int32_t height, BYTE *pageBuffer, int32_t palIndex);
-int32_t __cdecl AddTexturePage16(int32_t width, int32_t height, BYTE *pageBuffer);
+HWR_TEX_HANDLE __cdecl GetTexturePageHandle(int32_t page_idx);
+int32_t __cdecl AddTexturePage8(int32_t width, int32_t height, BYTE *page_buf, int32_t pal_idx);
+int32_t __cdecl AddTexturePage16(int32_t width, int32_t height, BYTE *page_buf);
HRESULT __stdcall EnumTextureFormatsCallback(LPDDSDESC lpDdsd, LPVOID lpContext);
HRESULT __cdecl EnumerateTextureFormats(void);
void __cdecl CleanupTextures(void);
@@ -1285,11 +1285,11 @@
void __cdecl UT_MemBlt(BYTE *dstBuf, DWORD dstX, DWORD dstY, DWORD width, DWORD height, DWORD dstPitch, BYTE *srcBuf, DWORD srcX, DWORD srcY, DWORD srcPitch);
void __cdecl Matrix_Push(void);
void __cdecl Matrix_PushUnit(void);
-void __fastcall Output_FlatA(int32_t y1, int32_t y2, BYTE colorIdx); // actually, __watcall, which is esoteric and rarely supported
-void __fastcall Output_TransA(int32_t y1, int32_t y2, BYTE depthQ); // actually, __watcall, which is esoteric and rarely supported
-void __fastcall Output_GourA(int32_t y1, int32_t y2, BYTE colorIdx); // actually, __watcall, which is esoteric and rarely supported
-void __fastcall Output_GTMapA(int32_t y1, int32_t y2, BYTE *texPage); // actually, __watcall, which is esoteric and rarely supported
-void __fastcall Output_WGTMapA(int32_t y1, int32_t y2, BYTE *texPage); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_FlatA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_TransA(int32_t y0, int32_t y1, uint8_t depth_q); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_GourA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_GTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_WGTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
int32_t __fastcall Math_Atan(int32_t x, int32_t y);
int32_t __fastcall Math_Cos(int16_t angle);
int32_t __fastcall Math_Sin(int16_t angle);
@@ -1326,7 +1326,7 @@
void __cdecl SE_GraphicsDlgUpdate(HWND hwndDlg);
void __cdecl Output_InsertGT3_Sorted(const struct PHD_VBUF *vtx0, const struct PHD_VBUF *vtx1, const struct PHD_VBUF *vtx2, const struct PHD_TEXTURE *texture, const struct PHD_UV *uv0, const struct PHD_UV *uv1, const struct PHD_UV *uv2, enum SORT_TYPE sort_type);
void __cdecl do_control_option(INVENTORY_ITEM *item);
-BOOL __cdecl S_LoadGameFlow(LPCTSTR fileName);
+BOOL __cdecl S_LoadGameFlow(const char *file_name);
int32_t __cdecl Inv_AddItem(int32_t item_num);
void __cdecl Room_TestTriggers(int16_t *data, int32_t heavy);
void __cdecl Collide_GetCollisionInfo(struct COLL_INFO *coll, int32_t xpos, int32_t ypos, int32_t zpos, int16_t room_num, int32_t obj_height);
@@ -1379,7 +1379,7 @@
void __cdecl Worker1Control(int16_t item_num);
void __cdecl WarriorControl(int16_t item_num);
HRESULT __stdcall EnumDisplayModesCallback(LPDDSDESC lpDDSurfaceDesc, LPVOID lpContext);
-void __cdecl RenderStart(bool isReset);
+void __cdecl RenderStart(bool is_reset);
BOOL __cdecl LoadRooms(HANDLE handle);
const int16_t *__cdecl Output_InsertObjectG4_ZBuffered(const int16_t *obj_ptr, int32_t num, enum SORT_TYPE sort_type);
void __cdecl ShowStatsText(char *time_str, int32_t type);
@@ -1402,7 +1402,7 @@
void __cdecl RollingBallControl(int16_t item_num);
void __cdecl ControlHarpoonBolt(int16_t item_num);
const int16_t *__cdecl Output_InsertObjectG3_Sorted(const int16_t *obj_ptr, int32_t num, enum SORT_TYPE sort_type);
-void __fastcall Output_WGTMapA(int32_t y1, int32_t y2, BYTE *texPage); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_WGTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
void __cdecl Lara_HangTest(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Item_Animate(struct ITEM_INFO *item);
void __cdecl AnimatePistols(int32_t weapon_type);
@@ -1412,13 +1412,13 @@
void __cdecl BanditControl(int16_t item_num);
void __cdecl Lara_Push(struct ITEM_INFO *item, struct ITEM_INFO *lara_item, struct COLL_INFO *coll, int32_t spaz_on, int32_t big_push);
int32_t __cdecl LOS_CheckSmashable(const struct GAME_VECTOR *start, struct GAME_VECTOR *target);
-void __fastcall Output_GTMapA(int32_t y1, int32_t y2, BYTE *texPage); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_GTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
void __cdecl S_CalculateLight(int32_t x, int32_t y, int32_t z, int16_t room_num);
void __cdecl DragonCollision(int16_t item_num, struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
int32_t __cdecl LOS_CheckX(const struct GAME_VECTOR *start, struct GAME_VECTOR *target);
int32_t __cdecl LOS_CheckZ(const struct GAME_VECTOR *start, struct GAME_VECTOR *target);
int32_t __cdecl Lara_TestVault(struct ITEM_INFO *item, struct COLL_INFO *coll);
-void __cdecl WinPlayFMV(LPCTSTR fileName, bool isPlayback);
+void __cdecl WinPlayFMV(const char *file_name, bool is_playback);
bool __cdecl SE_ShowSetupDialog(HWND hParent, bool isDefault);
void __cdecl do_detail_option(INVENTORY_ITEM *item);
int32_t __cdecl GetSpheres(struct ITEM_INFO *item, struct SPHERE *ptr, int32_t world_space);
@@ -1441,7 +1441,7 @@
const int16_t *__cdecl Output_CalcRoomVertices(const int16_t *obj_ptr, int32_t far_clip);
void __cdecl SharkControl(int16_t item_num);
int32_t __cdecl DoShift(struct ITEM_INFO *skidoo, struct PHD_VECTOR *pos, struct PHD_VECTOR *old);
-int32_t __cdecl S_GetObjectBounds(int16_t *bPtr);
+int32_t __cdecl S_GetObjectBounds(int16_t *obj_ptr);
void __cdecl FlareControl(int16_t item_num);
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);
int32_t __cdecl Room_GetHeight(const struct FLOOR_INFO *floor, int32_t x, int32_t y, int32_t z);
@@ -1451,12 +1451,12 @@
void __cdecl S_CopyBufferToScreen(void);
void __cdecl DrawTextureTile(int32_t sx, int32_t sy, int32_t width, int32_t height, HWR_TEX_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);
void __cdecl RollingBallCollision(int16_t item_num, struct ITEM_INFO *litem, struct COLL_INFO *coll);
-BOOL __cdecl LoadLevel(LPCTSTR fileName, int32_t levelID);
+BOOL __cdecl LoadLevel(LPCTSTR file_name, int32_t level_num);
void __cdecl Camera_LoadCutsceneFrame(void);
void __cdecl Creature_AIInfo(struct ITEM_INFO *item, struct AI_INFO *info);
int32_t __cdecl Room_GetCeiling(const struct FLOOR_INFO *floor, int32_t x, int32_t y, int32_t z);
void __cdecl DetonatorCollision(int16_t item_num, struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
-void __cdecl GameApplySettings(struct APP_SETTINGS *newSettings);
+void __cdecl GameApplySettings(struct APP_SETTINGS *new_settings);
LRESULT __stdcall SE_SetupWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void __cdecl MovableBlockCollision(int16_t item_num, struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
int32_t __cdecl Lara_TestClimbUpPos(struct ITEM_INFO *item, int32_t front, int32_t right, int32_t *shift, int32_t *ledge);
@@ -1481,7 +1481,7 @@
void __cdecl SwitchCollision(int16_t item_num, struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
void __cdecl SpiderControl(int16_t item_num);
void __cdecl S_LightRoom(ROOM_INFO *room);
-bool __cdecl ApplySettings(struct APP_SETTINGS *newSettings);
+bool __cdecl ApplySettings(struct APP_SETTINGS *new_settings);
void __cdecl CreateStartInfo(int32_t level_num);
void __cdecl Eagle_Control(int16_t item_num);
void __cdecl ControlBodyPart(int16_t fx_num);
@@ -1490,7 +1490,7 @@
void __cdecl ScreenShot(LPDDS screen);
void __cdecl MineControl(int16_t mine_num);
int32_t __cdecl Box_SearchLOT(struct LOT_INFO *lot, int32_t expansion);
-void __cdecl S_PrintShadow(int16_t radius, int16_t *bPtr, ITEM_INFO *item);
+void __cdecl S_PrintShadow(int16_t radius, int16_t *obj_ptr, ITEM_INFO *item);
void __cdecl Lara_WaterCurrent(struct COLL_INFO *coll);
int32_t __cdecl GF_LoadScriptFile(char *fname);
void __cdecl Matrix_RotYXZpack(uint32_t rpack);
@@ -1508,10 +1508,10 @@
void __cdecl Matrix_GenerateW2V(struct PHD_3DPOS *viewpos);
void __cdecl S_DrawHealthBar(int32_t percent);
void __cdecl Output_InsertFlatRect_ZBuffered(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
-void __cdecl FadeToPal(int32_t fadeValue, RGB888 *palette);
+void __cdecl FadeToPal(int32_t fade_value, RGB888 *palette);
void __cdecl Room_GetBounds(void);
int32_t __cdecl ShotLara(struct ITEM_INFO *item, AI_INFO *info, struct BITE_INFO *gun, int16_t extra_rotation, int32_t damage);
-int32_t __cdecl LevelStats(int32_t levelID);
+int32_t __cdecl LevelStats(int32_t level_num);
void __cdecl Boat_DoShift(int32_t boat_num);
void __cdecl WinVidResizeGameWindow(HWND hWnd, int32_t edge, LPRECT rect);
BOOL __stdcall EnumDisplayAdaptersCallback(GUID *lpGUID, LPTSTR lpDriverDescription, LPTSTR lpDriverName, LPVOID lpContext);
@@ -1524,7 +1524,7 @@
void __cdecl Output_InsertClippedPoly_Textured(int32_t vtx_count, float z, int16_t poly_type, int16_t tex_page);
void __cdecl Matrix_Interpolate(void);
void __cdecl BigSpiderControl(int16_t item_num);
-void __cdecl ClearBuffers(DWORD flags, DWORD fillColor);
+void __cdecl ClearBuffers(DWORD flags, DWORD fill_color);
void __cdecl Output_DrawPolyLine(const int16_t *obj_ptr);
int32_t __cdecl Camera_ShiftClamp(struct GAME_VECTOR *pos, int32_t clamp);
int32_t __cdecl Lara_TestHangJump(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1532,7 +1532,7 @@
void __cdecl Lara_Col_ClimbDown(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Collide_GetJointAbsPosition(struct ITEM_INFO *item, struct PHD_VECTOR *vec, int32_t joint);
struct FLOOR_INFO *__cdecl Room_GetFloor(int32_t x, int32_t y, int32_t z, int16_t *room_num);
-int32_t __cdecl AddTexturePage16(int32_t width, int32_t height, BYTE *pageBuffer);
+int32_t __cdecl AddTexturePage16(int32_t width, int32_t height, BYTE *page_buf);
void __cdecl Output_InsertTrans8_Sorted(const struct PHD_VBUF *vbuf, int16_t shade);
void __cdecl Lara_BaddieCollision(struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
void __cdecl Lara_HandleAboveWater(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1575,7 +1575,7 @@
BOOL __cdecl S_FrontEndCheck(void);
void __cdecl FlameControl(int16_t fx_num);
void __cdecl Lara_Col_Wade(struct ITEM_INFO *item, struct COLL_INFO *coll);
-void __fastcall Output_GourA(int32_t y1, int32_t y2, BYTE colorIdx); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_GourA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
int32_t __cdecl Level_Initialise(int32_t level_num, int32_t level_type);
void __cdecl Boat_Collision(int16_t item_num, struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
void __cdecl Lara_SwimCollision(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1592,8 +1592,8 @@
void __cdecl MovableBlock(int16_t item_num);
void __cdecl Effect_Draw(int16_t fx_num);
int32_t __cdecl Output_XGenXG(const int16_t *obj_ptr);
-void __cdecl DrawAssaultTimer(void);
-int16_t __cdecl StartGame(int32_t levelID, GF_LEVEL_TYPE levelType);
+void __cdecl Overlay_DrawAssaultTimer(void);
+int16_t __cdecl StartGame(int32_t level_num, GF_LEVEL_TYPE level_type);
void __cdecl Lara_State_Run(struct ITEM_INFO *item, struct COLL_INFO *coll);
int32_t __cdecl Output_ZedClipper(int32_t vtx_count, struct POINT_INFO *pts, struct VERTEX_INFO *vtx);
void __cdecl Output_DrawClippedPoly_Textured(int32_t vtx_count);
@@ -1606,17 +1606,17 @@
void __cdecl RestoreLostBuffers(void);
void __cdecl Item_AlignPosition(struct PHD_VECTOR *vec, struct ITEM_INFO *src_item, struct ITEM_INFO *dst_item);
void __cdecl CreateScreenBuffers(void);
-void __fastcall Output_TransA(int32_t y1, int32_t y2, BYTE depthQ); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_TransA(int32_t y0, int32_t y1, uint8_t depth_q); // actually, __watcall, which is esoteric and rarely supported
void __cdecl Camera_UpdateCutscene(void);
void __cdecl ControlSpikeWall(int16_t item_num);
int32_t __cdecl Item_TestPosition(int16_t *bounds, struct ITEM_INFO *src_item, struct ITEM_INFO *dst_item);
int32_t __cdecl TestBlockPush(struct ITEM_INFO *item, int32_t block_height, uint16_t quadrant);
-void __cdecl CopyBitmapPalette(RGB888 *srcPal, BYTE *srcBitmap, int32_t bitmapSize, RGB888 *destPal);
+void __cdecl CopyBitmapPalette(RGB888 *src_pal, BYTE *src_bitmap, int32_t bitmap_size, RGB888 *dest_pal);
void __cdecl Lara_DeflectEdgeJump(struct ITEM_INFO *item, struct COLL_INFO *coll);
BOOL __cdecl LoadSprites(HANDLE handle);
void __cdecl Output_InsertSkybox(const int16_t *obj_ptr);
void __cdecl Output_InsertLine_ZBuffered(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t z, uint8_t color_idx);
-void __cdecl DrawAmmoInfo(void);
+void __cdecl Overlay_DrawAmmoInfo(void);
void __cdecl DoInventoryBackground(void);
int32_t __cdecl Creature_Vault(int16_t item_num, int16_t angle, int32_t vault, int32_t shift);
int32_t __cdecl Lara_TestSlide(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1641,7 +1641,7 @@
void __cdecl ControlCeilingSpikes(int16_t item_num);
void __cdecl InitialiseBartoli(int16_t item_num);
int32_t __cdecl S_SaveGame(const void *save_data, uint32_t save_size, int32_t slot_num);
-int32_t __cdecl GameStats(int32_t levelID);
+int32_t __cdecl GameStats(int32_t level_num);
int32_t __cdecl Game_Cutscene_Start(int32_t level_num);
int32_t __cdecl Inv_RemoveItem(int32_t item_num);
int16_t __cdecl TitleSequence(void);
@@ -1663,16 +1663,16 @@
TEXTSTRING *__cdecl Text_Create(int32_t x, int32_t y, int32_t z, const char *text);
void __cdecl FallingBlock(int16_t item_num);
void __cdecl FmvBackToGame(void);
-void __cdecl S_DisplayPicture(LPCTSTR fileName, BOOL isTitle);
+void __cdecl S_DisplayPicture(const char *file_name, BOOL is_title);
void __cdecl undraw_shotgun(int32_t weapon_type);
bool __cdecl WinVidGetMinMaxInfo(LPMINMAXINFO info);
void __cdecl IcicleControl(int16_t item_num);
-void __cdecl DrawPickups(int32_t timed);
+void __cdecl Overlay_DrawPickups(int32_t timed);
void __cdecl Matrix_InterpolateArm(void);
void __cdecl SwitchCollision2(int16_t item_num, struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
void __cdecl Lara_Col_Back(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_InitialiseMeshes(int32_t level_num);
-BOOL __cdecl DecompPCX(LPCBYTE pcx, DWORD pcxSize, LPBYTE pic, RGB888 *pal);
+BOOL __cdecl DecompPCX(const uint8_t *pcx, size_t pcx_size, LPBYTE pic, RGB888 *pal);
int32_t __cdecl Boat_TestWaterHeight(struct ITEM_INFO *item, int32_t z_off, int32_t x_off, struct PHD_VECTOR *pos);
int32_t __cdecl Creature_CheckBaddieOverlap(int16_t item_num);
void __cdecl DrawFlareInAir(struct ITEM_INFO *item);
@@ -1680,7 +1680,7 @@
void __cdecl Output_DrawPoly_Gouraud(int32_t vtx_count, int32_t red, int32_t green, int32_t blue);
int32_t __cdecl Lara_TestHangOnClimbWall(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl RifleHandler(int32_t weapon_type);
-int32_t __cdecl AddTexturePage8(int32_t width, int32_t height, BYTE *pageBuffer, int32_t palIndex);
+int32_t __cdecl AddTexturePage8(int32_t width, int32_t height, BYTE *page_buf, int32_t pal_idx);
void __cdecl Output_InsertPolygons(const int16_t *obj_ptr, int32_t clip);
void __cdecl ControlBubble1(int16_t fx_num);
void __cdecl Lara_SurfaceCollision(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1700,9 +1700,9 @@
int32_t __cdecl Lara_TestWaterStepOut(struct ITEM_INFO *item, struct COLL_INFO *coll);
int32_t __cdecl S_Audio_Sample_Play(int32_t sample_id, int32_t volume, int32_t pitch, int32_t pan, int32_t flags);
void __cdecl LavaBurn(struct ITEM_INFO *item);
-void __cdecl RenderFinish(bool needToClearTextures);
+void __cdecl RenderFinish(bool need_to_clear_textures);
bool __cdecl DInputJoystickCreate(void);
-void __cdecl S_InitialisePolyList(BOOL clearBackBuffer);
+void __cdecl S_InitialisePolyList(BOOL clear_back_buffer);
void __cdecl Effect_Kill(int16_t fx_num);
void __cdecl BigBowlControl(int16_t item_num);
void __cdecl Lara_SlideSlope(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1739,7 +1739,7 @@
int32_t __cdecl Output_XGenX(const int16_t *obj_ptr);
void __cdecl GeneralControl(int16_t item_num);
DWORD __cdecl EncodeLinePCX(BYTE *src, DWORD width, BYTE *dst);
-void __cdecl UpdateFrame(bool needRunMessageLoop, LPRECT rect);
+void __cdecl UpdateFrame(bool need_run_message_loop, LPRECT rect);
void __cdecl Lara_TestWaterDepth(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl GetCarriedItems(void);
void __cdecl Demo_LoadLaraPos(void);
@@ -1749,24 +1749,24 @@
void __cdecl DInputKeyboardCreate(void);
void __cdecl Room_GetNearbyRooms(int32_t x, int32_t y, int32_t z, int32_t r, int32_t h, int16_t room_num);
void __cdecl DoorControl(int16_t item_num);
-BYTE __cdecl FindNearestPaletteEntry(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignoreSysPalette);
+BYTE __cdecl FindNearestPaletteEntry(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignore_sys_palette);
void __cdecl Output_RotateLight(int16_t pitch, int16_t yaw);
bool __cdecl SE_SoundTestStart(void);
sub_4449D0
bool __cdecl WinVidCreateGameWindow(void);
-BOOL __cdecl Read_Strings(DWORD dwCount, char **stringTable, char **stringBuffer, LPDWORD lpBufferSize, HANDLE handle);
+BOOL __cdecl Read_Strings(DWORD count, char **string_table, char **string_buf, LPDWORD buf_size, HANDLE handle);
void __cdecl Output_QuickSort(int32_t left, int32_t right);
void __cdecl LavaSpray(int16_t item_num);
void __cdecl SmashWindow(int16_t item_num);
bool __cdecl S_Audio_Sample_DSoundBufferTest(void);
-BOOL __cdecl S_ReloadLevelGraphics(BOOL reloadPalettes, BOOL reloadTexPages);
+BOOL __cdecl S_ReloadLevelGraphics(BOOL reload_palettes, BOOL reload_tex_pages);
void __thiscall SE_LoadBitmapResource(BITMAP_RESOURCE *bmpRsrc, LPCTSTR lpName);
void __cdecl Splash(struct ITEM_INFO *item);
int32_t __cdecl Inv_GetItemOption(int32_t item_num);
void __cdecl AimWeapon(struct WEAPON_INFO *winfo, struct LARA_ARM *arm);
void __cdecl ChangeRequesterItem(struct REQUEST_INFO *req, int32_t item, char *text1, uint32_t flags1, char *text2, uint32_t flags2);
void __cdecl do_compass_option(INVENTORY_ITEM *item);
-void __cdecl AnimateTextures(int32_t nTicks);
+void __cdecl AnimateTextures(int32_t ticks);
void __cdecl DeathSlideCollision(int16_t item_num, ITEM_INFO *lara_item, COLL_INFO *coll);
void __cdecl Lara_Col_StepRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
int32_t __cdecl Lara_TestClimbStance(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1798,19 +1798,19 @@
int32_t __cdecl TestHeight(struct ITEM_INFO *item, int32_t z_off, int32_t x_off, struct PHD_VECTOR *pos);
int32_t __cdecl Lara_TestHangSwingIn(struct ITEM_INFO *item, PHD_ANGLE angle);
int32_t __cdecl OnDrawBridge(struct ITEM_INFO *item, int32_t x, int32_t y);
-void __cdecl S_AnimateTextures(int32_t nTicks);
+void __cdecl S_AnimateTextures(int32_t ticks);
void __cdecl Camera_Initialise(void);
bool __cdecl WinVidGetDisplayAdapters(void);
void __cdecl ControlWaterSprite(int16_t fx_num);
-DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcxData);
-void __cdecl SyncSurfacePalettes(void *srcData, int32_t width, int32_t height, int32_t srcPitch, RGB888 *srcPalette, void *dstData, int32_t dstPitch, RGB888 *dstPalette, bool preserveSysPalette);
+DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcx_data);
+void __cdecl SyncSurfacePalettes(void *src_data, int32_t width, int32_t height, int32_t src_pitch, RGB888 *src_palette, void *dst_data, int32_t dst_pitch, RGB888 *dst_palette, bool preserve_sys_palette);
int32_t __cdecl Lara_TestEdgeCatch(struct ITEM_INFO *item, struct COLL_INFO *coll, int32_t *edge);
void __cdecl AddRequesterItem(struct REQUEST_INFO *req, char *text1, uint32_t flags1, char *text2, uint32_t flags2);
void __cdecl SpiderLeap(int16_t item_num, int16_t angle);
bool __cdecl Matrix_TranslateRel(int32_t x, int32_t y, int32_t z);
int32_t __cdecl Item_GetAnimChange(struct ITEM_INFO *item, struct ANIM_STRUCT *anim);
int16_t __cdecl DragonFire(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);
-void __cdecl DrawHealthBar(int32_t flash_state);
+void __cdecl Overlay_DrawHealthBar(int32_t flash_state);
void __cdecl Lara_SlideEdgeJump(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl S_CopyScreenToBuffer(void);
void __cdecl Matrix_RotX(int16_t rx);
@@ -1834,7 +1834,7 @@
void __cdecl Remove_Requester(struct REQUEST_INFO *req);
void __cdecl Lara_State_Extra_FinalAnim(struct ITEM_INFO *item, struct COLL_INFO *coll);
int32_t __cdecl OnTrapDoor(struct ITEM_INFO *item, int32_t x, int32_t z);
-bool __cdecl LoadTexturePage(int32_t pageIndex, bool reset);
+bool __cdecl LoadTexturePage(int32_t page_idx, bool reset);
void __cdecl Output_AlterFOV(int16_t fov);
void __cdecl Matrix_RotYXZsuperpack(int16_t **pprot, int32_t skip);
void __cdecl CreateRenderBuffer(void);
@@ -1849,16 +1849,16 @@
bool __cdecl S_Audio_Sample_Init(void);
void __cdecl Lara_CollideStop(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl swap_meshes_with_meshswap3(struct ITEM_INFO *item);
-void __cdecl LoadDemoExternal(LPCTSTR levelName);
-int32_t __cdecl GameLoop(BOOL demoMode);
+void __cdecl LoadDemoExternal(LPCTSTR level_name);
+int32_t __cdecl GameLoop(BOOL demo_mode);
void __cdecl Camera_Fixed(void);
int16_t __cdecl Room_GetTiltType(struct FLOOR_INFO *floor, int32_t x, int32_t y, int32_t z);
void __cdecl Lara_Col_FastFall(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl WarriorSparkleTrail(struct ITEM_INFO *item);
void __cdecl CreateBackBuffer(void);
bool __cdecl CreateTexturePageSurface(TEXPAGE_DESC *desc);
-void __cdecl DrawAirBar(int32_t flash_state);
-void __cdecl AdjustTextureUVs(bool resetUvAdd);
+void __cdecl Overlay_DrawAirBar(int32_t flash_state);
+void __cdecl AdjustTextureUVs(bool reset_uv_add);
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);
void __cdecl Lara_Control_Cutscene(int16_t item_num);
void __cdecl Room_RemoveFlipItems(struct ROOM_INFO *r);
@@ -1889,7 +1889,7 @@
bool __cdecl WinVidCopyBitmapToBuffer(LPDDS surface, BYTE *bitmap);
void __cdecl CutscenePlayer1_Initialise(int16_t item_num);
void __cdecl FloodFX(struct ITEM_INFO *item);
-void __cdecl HWR_LoadTexturePages(int32_t pagesCount, LPVOID pagesBuffer, RGB888 *palette);
+void __cdecl HWR_LoadTexturePages(int32_t pages_count, void *pages_buf, RGB888 *palette);
void __cdecl DetonatorControl(int16_t item_num);
const int16_t *__cdecl Output_InsertObjectGT4_Sorted(const int16_t *obj_ptr, int32_t num, enum SORT_TYPE sort_type);
int32_t __cdecl ItemNearLara(struct PHD_3DPOS *pos, int32_t distance);
@@ -1910,7 +1910,7 @@
void __cdecl Lara_State_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl S_OutputPolyList(void);
bool __cdecl WinVidGoFullScreen(DISPLAY_MODE *dispMode);
-bool __cdecl IntroFMV(LPCTSTR fileName1, LPCTSTR fileName2);
+bool __cdecl IntroFMV(const char *file_name1, const char *file_name2);
void __cdecl DyingMonk(int16_t item_num);
bool __cdecl HideDDrawGameWindow(void);
int32_t __cdecl CreateTexturePalette(RGB888 *pal);
@@ -1921,7 +1921,7 @@
void __cdecl Lara_State_Tread(struct ITEM_INFO *item, struct COLL_INFO *coll);
int32_t __cdecl Targetable(struct ITEM_INFO *item, AI_INFO *info);
void __cdecl Lara_State_Back(struct ITEM_INFO *item, struct COLL_INFO *coll);
-bool __cdecl Music_PlaySynced(int32_t trackID);
+bool __cdecl Music_PlaySynced(int32_t track_id);
void __cdecl Object_DrawSpriteItem(struct ITEM_INFO *item);
void __cdecl Lara_Col_Fallback(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl ControlBlood1(int16_t fx_num);
@@ -1955,7 +1955,7 @@
void __cdecl FireM16(int32_t running);
void __cdecl Matrix_TranslateAbs(int32_t x, int32_t y, int32_t z);
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);
-void __cdecl DisplayModeInfo(char* string);
+void __cdecl Overlay_DisplayModeInfo(char* string);
void __cdecl Misc_EffectSpaz(struct ITEM_INFO *lara_item, struct COLL_INFO *coll);
void __cdecl Lara_Col_FastDive(struct ITEM_INFO *item, struct COLL_INFO *coll);
BOOL __cdecl LoadCinematic(HANDLE handle);
@@ -1991,13 +1991,13 @@
BOOL __cdecl UT_CenterWindow(HWND hWnd);
void __cdecl UT_MemBlt(BYTE *dstBuf, DWORD dstX, DWORD dstY, DWORD width, DWORD height, DWORD dstPitch, BYTE *srcBuf, DWORD srcX, DWORD srcY, DWORD srcPitch);
int32_t __cdecl Output_VisibleZClip(const struct PHD_VBUF *vtx0, const struct PHD_VBUF *vtx1, const struct PHD_VBUF *vtx2);
-void __cdecl AddDisplayPickup(int16_t obj_num);
+void __cdecl Overlay_AddDisplayPickup(int16_t obj_num);
int16_t __cdecl Effect_Create(int16_t room_num);
-void *__cdecl game_malloc(DWORD allocSize, DWORD bufIndex);
+void *__cdecl game_malloc(uint32_t alloc_size, uint32_t buf_index);
void __cdecl Output_SetFarZ(int32_t far_z);
void __cdecl Lara_State_Swim(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl DrawUnclippedItem(struct ITEM_INFO *item);
-bool __cdecl PlayFMV(LPCTSTR fileName);
+bool __cdecl PlayFMV(const char *file_name);
void __cdecl Direct3DRelease(void);
void __cdecl GameWindowCalculateSizeFromClientByZero(int32_t *width, int32_t *height);
bool __cdecl WinVidRegisterGameWindowClass(void);
@@ -2018,7 +2018,7 @@
void __cdecl Lara_LookUpDown(void);
int16_t __cdecl GunShot(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);
void __cdecl CreateBubble(struct PHD_3DPOS *pos, int16_t room_num);
-int32_t __cdecl GameInit(bool skipCDInit);
+int32_t __cdecl GameInit(bool skip_cd_init);
void __thiscall SE_DrawBitmap(BITMAP_RESOURCE *bmpRsrc, HDC hdc, int32_t x, int32_t y);
void __cdecl swap_meshes_with_meshswap1(struct ITEM_INFO *item);
void __cdecl swap_meshes_with_meshswap2(struct ITEM_INFO *item);
@@ -2031,7 +2031,7 @@
DWORD __cdecl CalculateCompatibleColor(COLOR_BIT_MASKS *mask, int32_t red, int32_t green, int32_t blue, int32_t alpha);
int32_t __cdecl Music_GetFrames(void);
bool __cdecl SE_RegisterSetupWindowClass(void);
-void __fastcall Output_FlatA(int32_t y1, int32_t y2, BYTE colorIdx); // actually, __watcall, which is esoteric and rarely supported
+void __fastcall Output_FlatA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
void __cdecl Inv_RingGetView(struct RING_INFO *ring, struct PHD_3DPOS *viewer);
void __cdecl Lara_State_SurfLeft(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_State_SurfRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -2070,7 +2070,7 @@
void __cdecl Lara_State_PickupFlare(struct ITEM_INFO *item, struct COLL_INFO *coll);
DWORD __cdecl Sync(void);
void __cdecl Lara_State_FastBack(struct ITEM_INFO *item, struct COLL_INFO *coll);
-void __cdecl S_Wait(int32_t timeout, BOOL inputCheck);
+void __cdecl S_Wait(int32_t timeout, BOOL input_check);
int32_t __cdecl SE_GraphicsTest(void);
int32_t __cdecl SE_SoundTest(void);
void __thiscall SE_ChangeBitmapPalette(BITMAP_RESOURCE *bmpRsrc, HWND hWnd);
@@ -2135,7 +2135,7 @@
DISPLAY_ADAPTER_NODE *__cdecl WinVidGetDisplayAdapter(GUID *lpGuid);
DISPLAY_MODE *__thiscall InsertDisplayModeInListHead(DISPLAY_MODE_LIST *modeList);
const struct SOUND_ADAPTER_NODE *__cdecl S_Audio_Sample_GetAdapter(GUID *guid);
-void __cdecl WinStopFMV(bool isPlayback);
+void __cdecl WinStopFMV(bool is_playback);
int32_t __fastcall Math_Atan(int32_t x, int32_t y);
int32_t __cdecl Creature_Activate(int16_t item_num);
void __cdecl Matrix_TranslateRel_ID(int32_t x, int32_t y, int32_t z, int32_t x2, int32_t y2, int32_t z2);
@@ -2146,7 +2146,7 @@
void __cdecl S_InsertBackPolygon(int32_t x0, int32_t y0, int32_t x1, int32_t y1);
int32_t __cdecl S_Audio_Sample_OutPlay(int32_t sample_id, uint16_t volume, int32_t pitch, int32_t pan);
int32_t __cdecl S_Audio_Sample_OutPlayLooped(int32_t track_id, uint16_t volume, int32_t pitch, int32_t pan);
-void __cdecl DrawGameInfo(int32_t timed);
+void __cdecl Overlay_DrawGameInfo(int32_t timed);
bool __thiscall CompareVideoModes(const DISPLAY_MODE *mode1, const DISPLAY_MODE *mode2);
bool __cdecl S_Audio_Sample_IsTrackPlaying(int32_t track_id);
void __cdecl FallingBlockCeiling(struct ITEM_INFO *item, int32_t x, int32_t y, int32_t z, int32_t *height);
@@ -2178,7 +2178,7 @@
void __cdecl Enumerate3DDevices(struct DISPLAY_ADAPTER *adapter);
DWORD __cdecl EncodePutPCX(BYTE value, BYTE num, BYTE *buffer);
int32_t __stdcall SE_PropSheetCallback(HWND hwndDlg, UINT uMsg, LPARAM lParam);
-HWR_TEX_HANDLE __cdecl GetTexturePageHandle(int32_t pageIndex);
+HWR_TEX_HANDLE __cdecl GetTexturePageHandle(int32_t page_idx);
void __cdecl Matrix_RotYXZsuperpack_I(int16_t **pprot1, int16_t **pprot2, int32_t skip);
int32_t __cdecl KeyTrigger(int16_t item_num);
HRESULT __cdecl WinVidBufferLock(LPDDS surface, LPDDSDESC desc, DWORD flags);
@@ -2189,7 +2189,7 @@
void __cdecl ControlCutShotgun(int16_t item_num);
void __cdecl InitialiseBlade(int16_t item_num);
void __cdecl InitialiseRollingBall(int16_t item_num);
-int32_t __cdecl RenderErrorBox(int32_t errorCode);
+int32_t __cdecl RenderErrorBox(int32_t error_code);
void __cdecl Shell_ExitSystem(const char *message);
void __cdecl S_Audio_Sample_OutCloseAllTracks(void);
int32_t __cdecl CheckForHoldingState(int32_t state);
@@ -2226,13 +2226,13 @@
void __cdecl Text_ChangeText(struct TEXTSTRING *string, const char *text);
uint32_t __cdecl Text_GetScaleH(uint32_t value);
bool __cdecl D3DIsSupported(LPD3DDEVICEDESC desc);
-void __cdecl S_InitialiseScreen(GF_LEVEL_TYPE levelType);
+void __cdecl S_InitialiseScreen(GF_LEVEL_TYPE level_type);
LONG __cdecl SetRegistryBinaryValue(LPCTSTR lpValueName, LPBYTE value, DWORD valueSize);
void __thiscall SE_ReleaseBitmapResource(BITMAP_RESOURCE *bmpRsrc);
void __cdecl Output_PrintPolyList(uint8_t *surface_ptr);
void __cdecl Lara_Col_Default(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl DrawBridgeFloor(struct ITEM_INFO *item, int32_t x, int32_t y, int32_t z, int32_t *height);
-void __cdecl ChangeFileNameExtension(char *fileName, const char *fileExt);
+void __cdecl ChangeFileNameExtension(char *file_name, const char *file_ext);
DWORD __cdecl S_DumpScreen(void);
LPVOID __cdecl UT_LoadResource(LPCTSTR lpName, LPCTSTR lpType);
LONG __cdecl SetRegistryFloatValue(LPCTSTR lpValueName, double value);
@@ -2259,7 +2259,7 @@
void __cdecl Matrix_InitInterpolate(int32_t frac, int32_t rate);
void __cdecl BridgeTilt2Ceiling(struct ITEM_INFO *item, int32_t x, int32_t y, int32_t z, int32_t *height);
void __cdecl TempVideoAdjust(int32_t hires, double sizer);
-void __cdecl game_free(DWORD freeSize);
+void __cdecl game_free(uint32_t free_size);
void __cdecl Output_SortPolyList(void);
void __cdecl CutscenePlayerGen_Initialise(int16_t item_num);
void __cdecl Lara_State_RightJump(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -2277,7 +2277,7 @@
void __cdecl OpenThatDoor(struct DOORPOS_DATA *d);
void __cdecl BGND_GetPageHandles(void);
void __thiscall DisplayModeListDelete(DISPLAY_MODE_LIST *pList);
-void __cdecl FreeTexturePage(int32_t pageIndex);
+void __cdecl FreeTexturePage(int32_t page_idx);
void __cdecl Matrix_RotY_I(int16_t ang);
void __cdecl Matrix_RotX_I(int16_t ang);
void __cdecl Matrix_RotZ_I(int16_t ang);
@@ -2305,10 +2305,10 @@
void __cdecl S_Audio_Sample_CloseAllTracks(void);
void __cdecl S_DrawScreenFBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const struct GOURAUD_FILL *gour, uint16_t flags);
void __cdecl Demo_GetInput(void);
-int32_t __cdecl FlashIt(void);
+int32_t __cdecl Overlay_FlashCounter(void);
void __cdecl WinInStart(void);
void __cdecl ChandelierFX(struct ITEM_INFO *item);
-void __cdecl DrawModeInfo(void);
+void __cdecl Overlay_DrawModeInfo(void);
void __cdecl Inv_RingCalcAdders(struct RING_INFO *ring, int16_t rotation_duration);
void __cdecl Inv_RingMotionSetup(struct RING_INFO *ring, int16_t status, int16_t status_target, int16_t frames);
void __cdecl Lara_State_Fallback(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -2332,7 +2332,7 @@
void __cdecl Text_AddOutline(struct TEXTSTRING *string, int16_t enable, int16_t colour, uint16_t *gour_ptr, uint16_t flags);
void __cdecl DInputKeyboardRelease(void);
void __cdecl HWR_ResetTexSource(void);
-void __cdecl MakeAmmoString(char *string);
+void __cdecl Overlay_MakeAmmoString(char *string);
int32_t __cdecl CalculateWindowHeight(int32_t width, int32_t height);
void __cdecl Matrix_Push_I(void);
void __cdecl Lara_State_PPReady(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -2340,8 +2340,8 @@
void __cdecl Text_Draw(void);
void __cdecl S_FadeOutInventory(BOOL isFade);
void __cdecl Inv_RingMotionRadius(struct RING_INFO *ring, int16_t target);
-LPCTSTR __cdecl GetFullPath(LPCTSTR fileName);
-void __cdecl ScreenClear(bool isPhdWinSize);
+LPCTSTR __cdecl GetFullPath(LPCTSTR file_name);
+void __cdecl ScreenClear(bool is_phd_win_size);
int32_t __cdecl S_Audio_Sample_CalculateSamplePan(int16_t pan);
void __cdecl FreeTexturePages(void);
void __cdecl SE_PassMessageToImage(HWND hWnd, UINT uMsg, WPARAM wParam);
@@ -2356,7 +2356,7 @@
void __cdecl Sound_Shutdown(void);
int16_t __cdecl Text_GetTextLength(const char *text);
bool __cdecl DInputEnumDevices(JOYSTICK_LIST *joystickList);
-void __cdecl HWR_TexSource(HWR_TEX_HANDLE texSource);
+void __cdecl HWR_TexSource(HWR_TEX_HANDLE tex_source);
void __cdecl RubbleFX(struct ITEM_INFO *item);
void __cdecl ExplosionFX(struct ITEM_INFO *item);
void __cdecl Lara_Col_BackJump(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -2368,7 +2368,7 @@
void __cdecl Lara_Col_SurfRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl SecretControl(int16_t item_num);
uint16_t __cdecl S_COLOUR(int32_t red, int32_t green, int32_t blue);
-void __cdecl FreePalette(int32_t paletteIndex);
+void __cdecl FreePalette(int32_t palette_idx);
void __cdecl Matrix_Pop_I(void);
void __cdecl Inv_RingMotionRotation(struct RING_INFO *ring, int16_t rotation, int16_t target);
void __cdecl DrawMovableBlock(struct ITEM_INFO *item);
@@ -2379,7 +2379,7 @@
void __cdecl init_game_malloc(void);
void __cdecl S_SetupAboveWater(BOOL underwater);
void __cdecl Inv_RingMotionCameraPitch(struct RING_INFO *ring, int16_t target);
-void __cdecl SafeFreeTexturePage(int32_t pageIndex);
+void __cdecl SafeFreeTexturePage(int32_t page_idx);
void __cdecl AssaultStop(struct ITEM_INFO *item);
int32_t __cdecl GF_DoFrontEndSequence(void);
bool __cdecl D3DCreate(void);
@@ -2431,7 +2431,7 @@
sub_447160
sub_447A80
sub_447B30
-BOOL __cdecl S_LoadLevelFile(LPCTSTR fileName, int32_t levelID, GF_LEVEL_TYPE levelType);
+BOOL __cdecl S_LoadLevelFile(LPCTSTR file_name, int32_t level_num, GF_LEVEL_TYPE level_type);
int32_t __cdecl UT_MessageBox(LPCTSTR lpText, HWND hWnd);
void __cdecl AssaultReset(struct ITEM_INFO *item);
void __cdecl Text_SetScale(struct TEXTSTRING *string, int32_t scale_h, int32_t scale_v);
@@ -2443,7 +2443,7 @@
void __cdecl invisibility_off(struct ITEM_INFO *item);
void __cdecl BridgeFlatFloor(struct ITEM_INFO *item, int32_t x, int32_t y, int32_t z, int32_t *height);
void __cdecl HWR_BeginScene(void);
-void __cdecl InitialisePickUpDisplay(void);
+void __cdecl Overlay_InitialisePickUpDisplay(void);
void __cdecl Lara_State_WaterOut(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl ResetSG(void);
void __cdecl Lara_State_Death(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -2462,13 +2462,13 @@
void __cdecl Lara_Col_Swim(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __thiscall S_FlaggedString_Delete(struct STRING_FLAGGED *string);
void __cdecl WinVidFinish(void);
-bool __cdecl S_IntroFMV(LPCTSTR fileName1, LPCTSTR fileName2);
+bool __cdecl S_IntroFMV(const char *file_name1, const char *file_name2);
LONG __cdecl DeleteRegistryValue(LPCTSTR lpValueName);
sub_4449A0
DISPLAY_MODE *__thiscall InsertDisplayMode(DISPLAY_MODE_LIST *modeList, DISPLAY_MODE_NODE *before);
sub_4470C0
sub_447A90
-void __cdecl SafeFreePalette(int32_t paletteIndex);
+void __cdecl SafeFreePalette(int32_t palette_idx);
HWND __cdecl WinVidFindGameWindow(void);
void __cdecl GameBuf_Shutdown(void);
HWND __cdecl SE_FindSetupDialog(void);
@@ -2479,12 +2479,12 @@
void __cdecl WinInFinish(void);
void __cdecl S_FinishInventory(void);
bool __cdecl IsNewRegistryKeyCreated(void);
-bool __cdecl S_PlayFMV(LPCTSTR fileName);
+bool __cdecl S_PlayFMV(const char *file_name);
void __cdecl SE_AdvancedDlgInit(HWND hwndDlg);
void __thiscall DisplayModeListInit(DISPLAY_MODE_LIST *pList);
void __cdecl ScreenDump(void);
LONG __cdecl CloseRegistryKey(void);
-LPCTSTR __cdecl DecodeErrorMessage(DWORD errorCode);
+LPCTSTR __cdecl DecodeErrorMessage(DWORD error_code);
void __cdecl finish_level_effect(struct ITEM_INFO *item);
void __cdecl dynamic_light_off(struct ITEM_INFO *item);
void __cdecl Lara_State_Null(struct ITEM_INFO *item, struct COLL_INFO *coll);
diff --git a/docs/progress.txt b/docs/progress.txt
index 36ca5d12..7ce4d85f 100644
--- a/docs/progress.txt
+++ b/docs/progress.txt
@@ -644,6 +644,11 @@ typedef enum GF_LEVEL_TYPE {
GFL_MIDSTORY,
} GF_LEVEL_TYPE;
+typedef struct PICKUP_INFO {
+ int16_t timer;
+ int16_t sprite;
+} PICKUP_INFO;
+
typedef struct __unaligned INVENTORY_ITEM {
char *string;
int16_t obj_num;
@@ -1964,18 +1969,18 @@ typedef enum GAME_OBJECT_ID {
00421920 00000076 -R void __cdecl DrawHair(void);
# game/health.c
-004219A0 0000002D -R int32_t __cdecl FlashIt(void);
-004219D0 00000145 -R void __cdecl DrawAssaultTimer(void);
-00421B20 00000045 -R void __cdecl DrawGameInfo(int32_t timed);
-00421B70 000000AB -R void __cdecl DrawHealthBar(int32_t flash_state);
-00421C20 00000097 -R void __cdecl DrawAirBar(int32_t flash_state);
-00421CC0 00000028 -R void __cdecl MakeAmmoString(char *string);
-00421CF0 00000132 -R void __cdecl DrawAmmoInfo(void);
-00421E40 00000015 -R void __cdecl InitialisePickUpDisplay(void);
-00421E60 000000FD -R void __cdecl DrawPickups(int32_t timed);
-00421F60 0000006C -R void __cdecl AddDisplayPickup(int16_t obj_num);
-00421FD0 0000007A *R void __cdecl DisplayModeInfo(char* string);
-00422050 0000002C -R void __cdecl DrawModeInfo(void);
+004219A0 0000002D - int32_t __cdecl Overlay_FlashCounter(void);
+004219D0 00000145 - void __cdecl Overlay_DrawAssaultTimer(void);
+00421B20 00000045 - void __cdecl Overlay_DrawGameInfo(int32_t timed);
+00421B70 000000AB - void __cdecl Overlay_DrawHealthBar(int32_t flash_state);
+00421C20 00000097 - void __cdecl Overlay_DrawAirBar(int32_t flash_state);
+00421CC0 00000028 - void __cdecl Overlay_MakeAmmoString(char *string);
+00421CF0 00000132 - void __cdecl Overlay_DrawAmmoInfo(void);
+00421E40 00000015 - void __cdecl Overlay_InitialisePickUpDisplay(void);
+00421E60 000000FD - void __cdecl Overlay_DrawPickups(int32_t timed);
+00421F60 0000006C - void __cdecl Overlay_AddDisplayPickup(int16_t obj_num);
+00421FD0 0000007A * void __cdecl Overlay_DisplayModeInfo(char* string);
+00422050 0000002C - void __cdecl Overlay_DrawModeInfo(void);
# game/inventory.c
00422080 0000119E -R int32_t __cdecl Display_Inventory(int32_t inventory_mode);
@@ -2651,22 +2656,22 @@ typedef enum GAME_OBJECT_ID {
004488F0 0000002B -R DWORD __cdecl GetZBufferDepth(void);
00448920 000000A1 -R void __cdecl CreateRenderBuffer(void);
004489D0 00000070 -R void __cdecl CreatePictureBuffer(void);
-00448A40 000001A4 -R void __cdecl ClearBuffers(DWORD flags, DWORD fillColor);
+00448A40 000001A4 -R void __cdecl ClearBuffers(DWORD flags, DWORD fill_color);
00448BF0 0000013C -R void __cdecl RestoreLostBuffers(void);
-00448D30 000000CF -R void __cdecl UpdateFrame(bool needRunMessageLoop, LPRECT rect);
+00448D30 000000CF -R void __cdecl UpdateFrame(bool need_run_message_loop, LPRECT rect);
00448E00 0000003B -R void __cdecl WaitPrimaryBufferFlip(void);
00448E40 00000003 -R bool __cdecl RenderInit(void);
-00448E50 000003A5 -R void __cdecl RenderStart(bool isReset);
-00449200 000000E6 -R void __cdecl RenderFinish(bool needToClearTextures);
-004492F0 00000204 -R bool __cdecl ApplySettings(struct APP_SETTINGS *newSettings);
+00448E50 000003A5 -R void __cdecl RenderStart(bool is_reset);
+00449200 000000E6 -R void __cdecl RenderFinish(bool need_to_clear_textures);
+004492F0 00000204 -R bool __cdecl ApplySettings(struct APP_SETTINGS *new_settings);
00449500 00000105 -R void __cdecl FmvBackToGame(void);
-00449610 0000023A *R void __cdecl GameApplySettings(struct APP_SETTINGS *newSettings);
+00449610 0000023A *R void __cdecl GameApplySettings(struct APP_SETTINGS *new_settings);
00449850 00000067 -R void __cdecl UpdateGameResolution(void);
-004498C0 0000000C -R LPCTSTR __cdecl DecodeErrorMessage(DWORD errorCode);
+004498C0 0000000C -R LPCTSTR __cdecl DecodeErrorMessage(DWORD error_code);
004498D0 00000049 -R BOOL __cdecl ReadFileSync(HANDLE handle, LPVOID lpBuffer, DWORD nBytesToRead, LPDWORD lpnBytesRead, LPOVERLAPPED lpOverlapped);
00449920 00000188 -R BOOL __cdecl LoadTexturePages(HANDLE handle);
00449AB0 000003A0 -R BOOL __cdecl LoadRooms(HANDLE handle);
-00449E50 00000097 -R void __cdecl AdjustTextureUVs(bool resetUvAdd);
+00449E50 00000097 -R void __cdecl AdjustTextureUVs(bool reset_uv_add);
00449EF0 0000057E -R BOOL __cdecl LoadObjects(HANDLE handle);
0044A470 00000135 -R BOOL __cdecl LoadSprites(HANDLE handle);
0044A5B0 000001D6 -R BOOL __cdecl LoadItems(HANDLE handle);
@@ -2678,36 +2683,36 @@ typedef enum GAME_OBJECT_ID {
0044AC90 00000055 -R BOOL __cdecl LoadAnimatedTextures(HANDLE handle);
0044ACF0 00000079 -R BOOL __cdecl LoadCinematic(HANDLE handle);
0044AD70 0000008A -R BOOL __cdecl LoadDemo(HANDLE handle);
-0044AE00 0000009A -R void __cdecl LoadDemoExternal(LPCTSTR levelName);
+0044AE00 0000009A -R void __cdecl LoadDemoExternal(LPCTSTR level_name);
0044AEA0 00000265 -R BOOL __cdecl LoadSamples(HANDLE handle);
-0044B110 00000036 -R void __cdecl ChangeFileNameExtension(char *fileName, const char *fileExt);
-0044B150 00000026 -R LPCTSTR __cdecl GetFullPath(LPCTSTR fileName);
+0044B110 00000036 -R void __cdecl ChangeFileNameExtension(char *file_name, const char *file_ext);
+0044B150 00000026 -R LPCTSTR __cdecl GetFullPath(LPCTSTR file_name);
0044B180 000000E0 -R BOOL __cdecl SelectDrive(void);
-0044B260 0000024A -R BOOL __cdecl LoadLevel(LPCTSTR fileName, int32_t levelID);
-0044B4B0 00000018 -R BOOL __cdecl S_LoadLevelFile(LPCTSTR fileName, int32_t levelID, GF_LEVEL_TYPE levelType);
+0044B260 0000024A -R BOOL __cdecl LoadLevel(LPCTSTR file_name, int32_t level_num);
+0044B4B0 00000018 -R BOOL __cdecl S_LoadLevelFile(LPCTSTR file_name, int32_t level_num, GF_LEVEL_TYPE level_type);
0044B4D0 0000002A -R void __cdecl S_UnloadLevelFile(void);
0044B500 00000014 -R void __cdecl S_AdjustTexelCoordinates(void);
-0044B520 000000C4 -R BOOL __cdecl S_ReloadLevelGraphics(BOOL reloadPalettes, BOOL reloadTexPages);
-0044B5F0 000000C6 -R BOOL __cdecl Read_Strings(DWORD dwCount, char **stringTable, char **stringBuffer, LPDWORD lpBufferSize, HANDLE handle);
-0044B6C0 000006D1 -R BOOL __cdecl S_LoadGameFlow(LPCTSTR fileName);
-0044BDA0 0000006B -R bool __cdecl PlayFMV(LPCTSTR fileName);
-0044BE10 000002E0 -R void __cdecl WinPlayFMV(LPCTSTR fileName, bool isPlayback);
-0044C0F0 00000048 -R void __cdecl WinStopFMV(bool isPlayback);
-0044C140 00000088 -R bool __cdecl IntroFMV(LPCTSTR fileName1, LPCTSTR fileName2);
+0044B520 000000C4 -R BOOL __cdecl S_ReloadLevelGraphics(BOOL reload_palettes, BOOL reload_tex_pages);
+0044B5F0 000000C6 -R BOOL __cdecl Read_Strings(DWORD count, char **string_table, char **string_buf, LPDWORD buf_size, HANDLE handle);
+0044B6C0 000006D1 -R BOOL __cdecl S_LoadGameFlow(const char *file_name);
+0044BDA0 0000006B -R bool __cdecl PlayFMV(const char *file_name);
+0044BE10 000002E0 -R void __cdecl WinPlayFMV(const char *file_name, bool is_playback);
+0044C0F0 00000048 -R void __cdecl WinStopFMV(bool is_playback);
+0044C140 00000088 -R bool __cdecl IntroFMV(const char *file_name1, const char *file_name2);
0044C1D0 00000023 -R uint16_t __cdecl S_COLOUR(int32_t red, int32_t green, int32_t blue);
0044C200 00000035 -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);
0044C240 00000116 -R void __cdecl S_DrawScreenBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const struct GOURAUD_OUTLINE *gour, uint16_t flags);
0044C360 0000002E -R void __cdecl S_DrawScreenFBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const struct GOURAUD_FILL *gour, uint16_t flags);
0044C390 0000000F -R void __cdecl S_FinishInventory(void);
0044C3A0 00000043 *R void __cdecl S_FadeToBlack(void);
-0044C3F0 00000057 *R void __cdecl S_Wait(int32_t timeout, BOOL inputCheck);
-0044C450 0000000E -R bool __cdecl S_PlayFMV(LPCTSTR fileName);
-0044C460 00000013 -R bool __cdecl S_IntroFMV(LPCTSTR fileName1, LPCTSTR fileName2);
-0044C480 00000144 -R int16_t __cdecl StartGame(int32_t levelID, GF_LEVEL_TYPE levelType);
-0044C5D0 0000009A -R int32_t __cdecl GameLoop(BOOL demoMode);
+0044C3F0 00000057 *R void __cdecl S_Wait(int32_t timeout, BOOL input_check);
+0044C450 0000000E -R bool __cdecl S_PlayFMV(const char *file_name);
+0044C460 00000013 -R bool __cdecl S_IntroFMV(const char *file_name1, const char *file_name2);
+0044C480 00000144 -R int16_t __cdecl StartGame(int32_t level_num, GF_LEVEL_TYPE level_type);
+0044C5D0 0000009A -R int32_t __cdecl GameLoop(BOOL demo_mode);
0044C670 00000006 *R int32_t __cdecl LevelCompleteSequence(void);
-0044C680 000001C2 -R int32_t __cdecl LevelStats(int32_t levelID);
-0044C850 00000113 -R int32_t __cdecl GameStats(int32_t levelID);
+0044C680 000001C2 -R int32_t __cdecl LevelStats(int32_t level_num);
+0044C850 00000113 -R int32_t __cdecl GameStats(int32_t level_num);
0044C970 0000001E + int32_t __cdecl Random_GetControl(void);
0044C990 0000000A + void __cdecl Random_SeedControl(int32_t seed);
0044C9A0 0000001E + int32_t __cdecl Random_GetDraw(void);
@@ -2722,12 +2727,12 @@ typedef enum GAME_OBJECT_ID {
0044D110 00000029 -R void __cdecl HWR_ResetTexSource(void);
0044D140 0000002B -R void __cdecl HWR_ResetColorKey(void);
0044D170 00000059 -R void __cdecl HWR_ResetZBuffer(void);
-0044D1D0 00000024 -R void __cdecl HWR_TexSource(HWR_TEX_HANDLE texSource);
+0044D1D0 00000024 -R void __cdecl HWR_TexSource(HWR_TEX_HANDLE tex_source);
0044D200 0000004A -R void __cdecl HWR_EnableColorKey(bool state);
0044D250 00000082 *R void __cdecl HWR_EnableZBuffer(bool z_write_enable, bool z_enable);
0044D2E0 00000016 -R void __cdecl HWR_BeginScene(void);
0044D310 0000016C -R void __cdecl HWR_DrawPolyList(void);
-0044D490 0000008E -R void __cdecl HWR_LoadTexturePages(int32_t pagesCount, LPVOID pagesBuffer, RGB888 *palette);
+0044D490 0000008E -R void __cdecl HWR_LoadTexturePages(int32_t pages_count, void *pages_buf, RGB888 *palette);
0044D520 0000004A -R void __cdecl HWR_FreeTexturePages(void);
0044D570 00000035 -R void __cdecl HWR_GetPageHandles(void);
0044D5B0 00000019 -R bool __cdecl HWR_VertexBufferFull(void);
@@ -2735,16 +2740,16 @@ typedef enum GAME_OBJECT_ID {
0044D610 0000005C *R BOOL __cdecl S_InitialiseSystem(void);
0044D670 00000011 * void __cdecl GameBuf_Shutdown(void);
0044D690 00000021 -R void __cdecl init_game_malloc(void);
-0044D6C0 0000006C -R void *__cdecl game_malloc(DWORD allocSize, DWORD bufIndex);
-0044D740 00000034 -R void __cdecl game_free(DWORD freeSize);
+0044D6C0 0000006C -R void *__cdecl game_malloc(uint32_t alloc_size, uint32_t buf_index);
+0044D740 00000034 -R void __cdecl game_free(uint32_t free_size);
0044D780 000000E8 -R void __cdecl CalculateWibbleTable(void);
0044D870 0000007F + void __cdecl Random_Seed(void);
0044D8F0 00000120 + BOOL __cdecl S_Input_Key(KEYMAP keymap);
0044DA10 00000AC4 + bool __cdecl Input_Update(void);
-0044E4E0 0000003C -R int32_t __cdecl RenderErrorBox(int32_t errorCode);
+0044E4E0 0000003C -R int32_t __cdecl RenderErrorBox(int32_t error_code);
0044E520 000001D6 -R int32_t __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int32_t nShowCmd);
0044E6F0 00000001 x sub_44E6F0
-0044E700 00000064 -R int32_t __cdecl GameInit(bool skipCDInit);
+0044E700 00000064 -R int32_t __cdecl GameInit(bool skip_cd_init);
0044E770 00000055 * void __cdecl Shell_Cleanup(void);
0044E7A0 0000007C -R int32_t __cdecl WinGameStart(void);
0044E820 00000039 * void __cdecl Shell_Shutdown(void);
@@ -2752,7 +2757,7 @@ typedef enum GAME_OBJECT_ID {
0044E880 00000010 -R sub_44E880
0044E890 0000003C + void __cdecl Shell_ExitSystem(const char *message);
0044E8E0 0000010F -R void __cdecl ScreenShotPCX(void);
-0044E9F0 000000AE -R DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcxData);
+0044E9F0 000000AE -R DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcx_data);
0044EAA0 000000D2 -R DWORD __cdecl EncodeLinePCX(BYTE *src, DWORD width, BYTE *dst);
0044EB80 0000003E -R DWORD __cdecl EncodePutPCX(BYTE value, BYTE num, BYTE *buffer);
0044EBC0 000001F5 *R void __cdecl ScreenShot(LPDDS screen);
@@ -2769,34 +2774,34 @@ typedef enum GAME_OBJECT_ID {
00450AA0 0000003B -R void __cdecl S_RemoveCtrlText(void);
00450AE0 00000006 -R int32_t __cdecl GetRenderHeight(void);
00450AF0 00000006 -R int32_t __cdecl GetRenderWidth(void);
-00450B00 000000E4 *R void __cdecl S_InitialisePolyList(BOOL clearBackBuffer);
+00450B00 000000E4 *R void __cdecl S_InitialisePolyList(BOOL clear_back_buffer);
00450BF0 00000036 *R DWORD __cdecl S_DumpScreen(void);
00450C30 0000000B -R void __cdecl S_ClearScreen(void);
-00450C40 00000037 -R void __cdecl S_InitialiseScreen(GF_LEVEL_TYPE levelType);
+00450C40 00000037 -R void __cdecl S_InitialiseScreen(GF_LEVEL_TYPE level_type);
00450C80 00000089 *R void __cdecl S_OutputPolyList(void);
-00450CC0 00000270 -R int32_t __cdecl S_GetObjectBounds(int16_t *bPtr);
+00450CC0 00000270 -R int32_t __cdecl S_GetObjectBounds(int16_t *obj_ptr);
00450F30 00000046 -R void __cdecl S_InsertBackPolygon(int32_t x0, int32_t y0, int32_t x1, int32_t y1);
-00450F80 000001F1 -R void __cdecl S_PrintShadow(int16_t radius, int16_t *bPtr, ITEM_INFO *item);
+00450F80 000001F1 -R void __cdecl S_PrintShadow(int16_t radius, int16_t *obj_ptr, ITEM_INFO *item);
00451180 000002F6 -R void __cdecl S_CalculateLight(int32_t x, int32_t y, int32_t z, int16_t room_num);
00451480 00000031 -R void __cdecl S_CalculateStaticLight(int16_t adder);
004514C0 00000124 -R void __cdecl S_CalculateStaticMeshLight(int32_t x, int32_t y, int32_t z, int32_t shade1, int32_t shade2, ROOM_INFO *room);
004515F0 00000206 -R void __cdecl S_LightRoom(ROOM_INFO *room);
00451800 000001CC -R void __cdecl S_DrawHealthBar(int32_t percent);
004519D0 000001F6 -R void __cdecl S_DrawAirBar(int32_t percent);
-00451BD0 000000C0 -R void __cdecl AnimateTextures(int32_t nTicks);
+00451BD0 000000C0 -R void __cdecl AnimateTextures(int32_t ticks);
00451C90 00000051 -R void __cdecl S_SetupBelowWater(BOOL underwater);
00451CF0 00000021 -R void __cdecl S_SetupAboveWater(BOOL underwater);
-00451D20 000000B1 -R void __cdecl S_AnimateTextures(int32_t nTicks);
-00451DE0 00000105 *R void __cdecl S_DisplayPicture(LPCTSTR fileName, BOOL isTitle);
+00451D20 000000B1 -R void __cdecl S_AnimateTextures(int32_t ticks);
+00451DE0 00000105 *R void __cdecl S_DisplayPicture(const char *file_name, BOOL is_title);
00451EF0 0000007E -R void __cdecl S_SyncPictureBufferPalette(void);
00451F70 0000001C *R void __cdecl S_DontDisplayPicture(void);
00451F80 0000000D -R void __cdecl ScreenDump(void);
00451F90 00000010 -R void __cdecl ScreenPartialDump(void);
-00451FA0 000001C9 *R void __cdecl FadeToPal(int32_t fadeValue, RGB888 *palette);
-00452170 00000026 -R void __cdecl ScreenClear(bool isPhdWinSize);
+00451FA0 000001C9 *R void __cdecl FadeToPal(int32_t fade_value, RGB888 *palette);
+00452170 00000026 -R void __cdecl ScreenClear(bool is_phd_win_size);
004521A0 000000AB -R void __cdecl S_CopyScreenToBuffer(void);
00452250 00000254 *R void __cdecl S_CopyBufferToScreen(void);
-004522A0 000000FA -R BOOL __cdecl DecompPCX(LPCBYTE pcx, DWORD pcxSize, LPBYTE pic, RGB888 *pal);
+004522A0 000000FA -R BOOL __cdecl DecompPCX(const uint8_t *pcx, size_t pcx_size, LPBYTE pic, RGB888 *pal);
004523A0 00000005 -R sub_4523A0
004523B0 00000001 -R sub_4523B0
004523C0 0000004E -R bool __cdecl OpenGameRegistryKey(LPCTSTR key);
@@ -2853,30 +2858,30 @@ typedef enum GAME_OBJECT_ID {
00455460 00000051 + void __cdecl Music_Shutdown(void);
00455500 0000006F + void __cdecl Music_Play(int16_t track_id, bool is_looped);
00455570 00000039 + void __cdecl Music_Stop(void);
-004555B0 00000084 + bool __cdecl Music_PlaySynced(int32_t trackID);
+004555B0 00000084 + bool __cdecl Music_PlaySynced(int32_t track_id);
00455640 00000061 + int32_t __cdecl Music_GetFrames(void);
004556B0 00000092 + void __cdecl Music_SetVolume(int32_t volume);
-004557A0 00000137 -R void __cdecl CopyBitmapPalette(RGB888 *srcPal, BYTE *srcBitmap, int32_t bitmapSize, RGB888 *destPal);
-004558E0 000000C8 -R BYTE __cdecl FindNearestPaletteEntry(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignoreSysPalette);
-004559B0 000000AE -R void __cdecl SyncSurfacePalettes(void *srcData, int32_t width, int32_t height, int32_t srcPitch, RGB888 *srcPalette, void *dstData, int32_t dstPitch, RGB888 *dstPalette, bool preserveSysPalette);
+004557A0 00000137 -R void __cdecl CopyBitmapPalette(RGB888 *src_pal, BYTE *src_bitmap, int32_t bitmap_size, RGB888 *dest_pal);
+004558E0 000000C8 -R BYTE __cdecl FindNearestPaletteEntry(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignore_sys_palette);
+004559B0 000000AE -R void __cdecl SyncSurfacePalettes(void *src_data, int32_t width, int32_t height, int32_t src_pitch, RGB888 *src_palette, void *dst_data, int32_t dst_pitch, RGB888 *dst_palette, bool preserve_sys_palette);
00455A60 00000087 -R int32_t __cdecl CreateTexturePalette(RGB888 *pal);
00455AF0 0000001C -R int32_t __cdecl GetFreePaletteIndex(void);
-00455B10 00000023 -R void __cdecl FreePalette(int32_t paletteIndex);
-00455B40 00000012 -R void __cdecl SafeFreePalette(int32_t paletteIndex);
+00455B10 00000023 -R void __cdecl FreePalette(int32_t palette_idx);
+00455B40 00000012 -R void __cdecl SafeFreePalette(int32_t palette_idx);
00455B90 0000006A -R int32_t __cdecl CreateTexturePage(int32_t width, int32_t height, bool alpha);
00455C00 0000001C -R int32_t __cdecl GetFreeTexturePageIndex(void);
00455C20 00000098 -R bool __cdecl CreateTexturePageSurface(TEXPAGE_DESC *desc);
00455CC0 00000174 -R bool __cdecl TexturePageInit(TEXPAGE_DESC *page);
00455E40 00000025 -R LPDIRECT3DTEXTURE2 __cdecl Create3DTexture(LPDDS surface);
-00455E70 00000020 -R void __cdecl SafeFreeTexturePage(int32_t pageIndex);
-00455E90 00000032 -R void __cdecl FreeTexturePage(int32_t pageIndex);
+00455E70 00000020 -R void __cdecl SafeFreeTexturePage(int32_t page_idx);
+00455E90 00000032 -R void __cdecl FreeTexturePage(int32_t page_idx);
00455ED0 0000003B -R void __cdecl TexturePageReleaseVidMemSurface(TEXPAGE_DESC *page);
00455F10 00000026 -R void __cdecl FreeTexturePages(void);
-00455F40 000000A2 -R bool __cdecl LoadTexturePage(int32_t pageIndex, bool reset);
+00455F40 000000A2 -R bool __cdecl LoadTexturePage(int32_t page_idx, bool reset);
00455FF0 00000035 -R bool __cdecl ReloadTextures(bool reset);
-00456030 0000003E -R HWR_TEX_HANDLE __cdecl GetTexturePageHandle(int32_t pageIndex);
-00456070 000000F5 -R int32_t __cdecl AddTexturePage8(int32_t width, int32_t height, BYTE *pageBuffer, int32_t palIndex);
-00456170 00000196 -R int32_t __cdecl AddTexturePage16(int32_t width, int32_t height, BYTE *pageBuffer);
+00456030 0000003E -R HWR_TEX_HANDLE __cdecl GetTexturePageHandle(int32_t page_idx);
+00456070 000000F5 -R int32_t __cdecl AddTexturePage8(int32_t width, int32_t height, BYTE *page_buf, int32_t pal_idx);
+00456170 00000196 -R int32_t __cdecl AddTexturePage16(int32_t width, int32_t height, BYTE *page_buf);
00456310 0000011A -R HRESULT __stdcall EnumTextureFormatsCallback(LPDDSDESC lpDdsd, LPVOID lpContext);
00456430 00000025 -R HRESULT __cdecl EnumerateTextureFormats(void);
00456460 00000030 -R void __cdecl CleanupTextures(void);
@@ -2919,11 +2924,11 @@ typedef enum GAME_OBJECT_ID {
00457210 0000006E -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);
00457280 0000001E + void __cdecl Matrix_Push(void);
0045729E 00000033 + void __cdecl Matrix_PushUnit(void);
-004572D4 00000061 + void __fastcall Output_FlatA(int32_t y1, int32_t y2, BYTE colorIdx); // actually, __watcall, which is esoteric and rarely supported
-00457335 0000013A + void __fastcall Output_TransA(int32_t y1, int32_t y2, BYTE depthQ); // actually, __watcall, which is esoteric and rarely supported
-0045746F 00000160 + void __fastcall Output_GourA(int32_t y1, int32_t y2, BYTE colorIdx); // actually, __watcall, which is esoteric and rarely supported
-004575CF 000002FD + void __fastcall Output_GTMapA(int32_t y1, int32_t y2, BYTE *texPage); // actually, __watcall, which is esoteric and rarely supported
-004578CC 00000341 + void __fastcall Output_WGTMapA(int32_t y1, int32_t y2, BYTE *texPage); // actually, __watcall, which is esoteric and rarely supported
+004572D4 00000061 + void __fastcall Output_FlatA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
+00457335 0000013A + void __fastcall Output_TransA(int32_t y0, int32_t y1, uint8_t depth_q); // actually, __watcall, which is esoteric and rarely supported
+0045746F 00000160 + void __fastcall Output_GourA(int32_t y0, int32_t y1, uint8_t color_idx); // actually, __watcall, which is esoteric and rarely supported
+004575CF 000002FD + void __fastcall Output_GTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
+004578CC 00000341 + void __fastcall Output_WGTMapA(int32_t y0, int32_t y1, uint8_t *tex_page); // actually, __watcall, which is esoteric and rarely supported
00457C10 00000048 + int32_t __fastcall Math_Atan(int32_t x, int32_t y);
00457C58 00000006 + int32_t __fastcall Math_Cos(int16_t angle);
00457C5E 0000001B + int32_t __fastcall Math_Sin(int16_t angle);
@@ -3135,6 +3140,7 @@ typedef enum GAME_OBJECT_ID {
005207C8 - int16_t g_NextItemActive;
005207CA - int16_t g_NextEffectActive;
005207CC - int16_t g_PrevItemActive;
+00521CA0 - struct PICKUP_INFO g_Pickups[12];
00521DE0 - struct GAME_FLOW g_GameFlow;
00521FDC - int32_t g_SoundFxCount;
00522000 - struct OBJECT_INFO g_Objects[265];
diff --git a/src/game/text.c b/src/game/text.c
index fff08aa4..eeb75de7 100644
--- a/src/game/text.c
+++ b/src/game/text.c
@@ -25,7 +25,7 @@
void __cdecl Text_Init(void)
{
- DisplayModeInfo(0);
+ Overlay_DisplayModeInfo(0);
for (int i = 0; i < TEXT_MAX_STRINGS; i++) {
g_TextstringTable[i].flags.all = 0;
}
diff --git a/src/global/funcs.h b/src/global/funcs.h
index e93b6605..4631b3f0 100644
--- a/src/global/funcs.h
+++ b/src/global/funcs.h
@@ -203,18 +203,18 @@
#define InitialiseHair ((void __cdecl (*)(void))0x00420EA0)
#define HairControl ((void __cdecl (*)(int32_t in_cutscene))0x00420F20)
#define DrawHair ((void __cdecl (*)(void))0x00421920)
-#define FlashIt ((int32_t __cdecl (*)(void))0x004219A0)
-#define DrawAssaultTimer ((void __cdecl (*)(void))0x004219D0)
-#define DrawGameInfo ((void __cdecl (*)(int32_t timed))0x00421B20)
-#define DrawHealthBar ((void __cdecl (*)(int32_t flash_state))0x00421B70)
-#define DrawAirBar ((void __cdecl (*)(int32_t flash_state))0x00421C20)
-#define MakeAmmoString ((void __cdecl (*)(char *string))0x00421CC0)
-#define DrawAmmoInfo ((void __cdecl (*)(void))0x00421CF0)
-#define InitialisePickUpDisplay ((void __cdecl (*)(void))0x00421E40)
-#define DrawPickups ((void __cdecl (*)(int32_t timed))0x00421E60)
-#define AddDisplayPickup ((void __cdecl (*)(int16_t obj_num))0x00421F60)
-#define DisplayModeInfo ((void __cdecl (*)(char* string))0x00421FD0)
-#define DrawModeInfo ((void __cdecl (*)(void))0x00422050)
+#define Overlay_FlashCounter ((int32_t __cdecl (*)(void))0x004219A0)
+#define Overlay_DrawAssaultTimer ((void __cdecl (*)(void))0x004219D0)
+#define Overlay_DrawGameInfo ((void __cdecl (*)(int32_t timed))0x00421B20)
+#define Overlay_DrawHealthBar ((void __cdecl (*)(int32_t flash_state))0x00421B70)
+#define Overlay_DrawAirBar ((void __cdecl (*)(int32_t flash_state))0x00421C20)
+#define Overlay_MakeAmmoString ((void __cdecl (*)(char *string))0x00421CC0)
+#define Overlay_DrawAmmoInfo ((void __cdecl (*)(void))0x00421CF0)
+#define Overlay_InitialisePickUpDisplay ((void __cdecl (*)(void))0x00421E40)
+#define Overlay_DrawPickups ((void __cdecl (*)(int32_t timed))0x00421E60)
+#define Overlay_AddDisplayPickup ((void __cdecl (*)(int16_t obj_num))0x00421F60)
+#define Overlay_DisplayModeInfo ((void __cdecl (*)(char* string))0x00421FD0)
+#define Overlay_DrawModeInfo ((void __cdecl (*)(void))0x00422050)
#define Display_Inventory ((int32_t __cdecl (*)(int32_t inventory_mode))0x00422080)
#define Construct_Inventory ((void __cdecl (*)(void))0x00423310)
#define SelectMeshes ((void __cdecl (*)(struct INVENTORY_ITEM *inv_item))0x00423470)
@@ -605,22 +605,22 @@
#define GetZBufferDepth ((DWORD __cdecl (*)(void))0x004488F0)
#define CreateRenderBuffer ((void __cdecl (*)(void))0x00448920)
#define CreatePictureBuffer ((void __cdecl (*)(void))0x004489D0)
-#define ClearBuffers ((void __cdecl (*)(DWORD flags, DWORD fillColor))0x00448A40)
+#define ClearBuffers ((void __cdecl (*)(DWORD flags, DWORD fill_color))0x00448A40)
#define RestoreLostBuffers ((void __cdecl (*)(void))0x00448BF0)
-#define UpdateFrame ((void __cdecl (*)(bool needRunMessageLoop, LPRECT rect))0x00448D30)
+#define UpdateFrame ((void __cdecl (*)(bool need_run_message_loop, LPRECT rect))0x00448D30)
#define WaitPrimaryBufferFlip ((void __cdecl (*)(void))0x00448E00)
#define RenderInit ((bool __cdecl (*)(void))0x00448E40)
-#define RenderStart ((void __cdecl (*)(bool isReset))0x00448E50)
-#define RenderFinish ((void __cdecl (*)(bool needToClearTextures))0x00449200)
-#define ApplySettings ((bool __cdecl (*)(struct APP_SETTINGS *newSettings))0x004492F0)
+#define RenderStart ((void __cdecl (*)(bool is_reset))0x00448E50)
+#define RenderFinish ((void __cdecl (*)(bool need_to_clear_textures))0x00449200)
+#define ApplySettings ((bool __cdecl (*)(struct APP_SETTINGS *new_settings))0x004492F0)
#define FmvBackToGame ((void __cdecl (*)(void))0x00449500)
-#define GameApplySettings ((void __cdecl (*)(struct APP_SETTINGS *newSettings))0x00449610)
+#define GameApplySettings ((void __cdecl (*)(struct APP_SETTINGS *new_settings))0x00449610)
#define UpdateGameResolution ((void __cdecl (*)(void))0x00449850)
-#define DecodeErrorMessage ((LPCTSTR __cdecl (*)(DWORD errorCode))0x004498C0)
+#define DecodeErrorMessage ((LPCTSTR __cdecl (*)(DWORD error_code))0x004498C0)
#define ReadFileSync ((BOOL __cdecl (*)(HANDLE handle, LPVOID lpBuffer, DWORD nBytesToRead, LPDWORD lpnBytesRead, LPOVERLAPPED lpOverlapped))0x004498D0)
#define LoadTexturePages ((BOOL __cdecl (*)(HANDLE handle))0x00449920)
#define LoadRooms ((BOOL __cdecl (*)(HANDLE handle))0x00449AB0)
-#define AdjustTextureUVs ((void __cdecl (*)(bool resetUvAdd))0x00449E50)
+#define AdjustTextureUVs ((void __cdecl (*)(bool reset_uv_add))0x00449E50)
#define LoadObjects ((BOOL __cdecl (*)(HANDLE handle))0x00449EF0)
#define LoadSprites ((BOOL __cdecl (*)(HANDLE handle))0x0044A470)
#define LoadItems ((BOOL __cdecl (*)(HANDLE handle))0x0044A5B0)
@@ -632,36 +632,36 @@
#define LoadAnimatedTextures ((BOOL __cdecl (*)(HANDLE handle))0x0044AC90)
#define LoadCinematic ((BOOL __cdecl (*)(HANDLE handle))0x0044ACF0)
#define LoadDemo ((BOOL __cdecl (*)(HANDLE handle))0x0044AD70)
-#define LoadDemoExternal ((void __cdecl (*)(LPCTSTR levelName))0x0044AE00)
+#define LoadDemoExternal ((void __cdecl (*)(LPCTSTR level_name))0x0044AE00)
#define LoadSamples ((BOOL __cdecl (*)(HANDLE handle))0x0044AEA0)
-#define ChangeFileNameExtension ((void __cdecl (*)(char *fileName, const char *fileExt))0x0044B110)
-#define GetFullPath ((LPCTSTR __cdecl (*)(LPCTSTR fileName))0x0044B150)
+#define ChangeFileNameExtension ((void __cdecl (*)(char *file_name, const char *file_ext))0x0044B110)
+#define GetFullPath ((LPCTSTR __cdecl (*)(LPCTSTR file_name))0x0044B150)
#define SelectDrive ((BOOL __cdecl (*)(void))0x0044B180)
-#define LoadLevel ((BOOL __cdecl (*)(LPCTSTR fileName, int32_t levelID))0x0044B260)
-#define S_LoadLevelFile ((BOOL __cdecl (*)(LPCTSTR fileName, int32_t levelID, GF_LEVEL_TYPE levelType))0x0044B4B0)
+#define LoadLevel ((BOOL __cdecl (*)(LPCTSTR file_name, int32_t level_num))0x0044B260)
+#define S_LoadLevelFile ((BOOL __cdecl (*)(LPCTSTR file_name, int32_t level_num, GF_LEVEL_TYPE level_type))0x0044B4B0)
#define S_UnloadLevelFile ((void __cdecl (*)(void))0x0044B4D0)
#define S_AdjustTexelCoordinates ((void __cdecl (*)(void))0x0044B500)
-#define S_ReloadLevelGraphics ((BOOL __cdecl (*)(BOOL reloadPalettes, BOOL reloadTexPages))0x0044B520)
-#define Read_Strings ((BOOL __cdecl (*)(DWORD dwCount, char **stringTable, char **stringBuffer, LPDWORD lpBufferSize, HANDLE handle))0x0044B5F0)
-#define S_LoadGameFlow ((BOOL __cdecl (*)(LPCTSTR fileName))0x0044B6C0)
-#define PlayFMV ((bool __cdecl (*)(LPCTSTR fileName))0x0044BDA0)
-#define WinPlayFMV ((void __cdecl (*)(LPCTSTR fileName, bool isPlayback))0x0044BE10)
-#define WinStopFMV ((void __cdecl (*)(bool isPlayback))0x0044C0F0)
-#define IntroFMV ((bool __cdecl (*)(LPCTSTR fileName1, LPCTSTR fileName2))0x0044C140)
+#define S_ReloadLevelGraphics ((BOOL __cdecl (*)(BOOL reload_palettes, BOOL reload_tex_pages))0x0044B520)
+#define Read_Strings ((BOOL __cdecl (*)(DWORD count, char **string_table, char **string_buf, LPDWORD buf_size, HANDLE handle))0x0044B5F0)
+#define S_LoadGameFlow ((BOOL __cdecl (*)(const char *file_name))0x0044B6C0)
+#define PlayFMV ((bool __cdecl (*)(const char *file_name))0x0044BDA0)
+#define WinPlayFMV ((void __cdecl (*)(const char *file_name, bool is_playback))0x0044BE10)
+#define WinStopFMV ((void __cdecl (*)(bool is_playback))0x0044C0F0)
+#define IntroFMV ((bool __cdecl (*)(const char *file_name1, const char *file_name2))0x0044C140)
#define S_COLOUR ((uint16_t __cdecl (*)(int32_t red, int32_t green, int32_t blue))0x0044C1D0)
#define S_DrawScreenLine ((void __cdecl (*)(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))0x0044C200)
#define S_DrawScreenBox ((void __cdecl (*)(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const struct GOURAUD_OUTLINE *gour, uint16_t flags))0x0044C240)
#define S_DrawScreenFBox ((void __cdecl (*)(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const struct GOURAUD_FILL *gour, uint16_t flags))0x0044C360)
#define S_FinishInventory ((void __cdecl (*)(void))0x0044C390)
#define S_FadeToBlack ((void __cdecl (*)(void))0x0044C3A0)
-#define S_Wait ((void __cdecl (*)(int32_t timeout, BOOL inputCheck))0x0044C3F0)
-#define S_PlayFMV ((bool __cdecl (*)(LPCTSTR fileName))0x0044C450)
-#define S_IntroFMV ((bool __cdecl (*)(LPCTSTR fileName1, LPCTSTR fileName2))0x0044C460)
-#define StartGame ((int16_t __cdecl (*)(int32_t levelID, GF_LEVEL_TYPE levelType))0x0044C480)
-#define GameLoop ((int32_t __cdecl (*)(BOOL demoMode))0x0044C5D0)
+#define S_Wait ((void __cdecl (*)(int32_t timeout, BOOL input_check))0x0044C3F0)
+#define S_PlayFMV ((bool __cdecl (*)(const char *file_name))0x0044C450)
+#define S_IntroFMV ((bool __cdecl (*)(const char *file_name1, const char *file_name2))0x0044C460)
+#define StartGame ((int16_t __cdecl (*)(int32_t level_num, GF_LEVEL_TYPE level_type))0x0044C480)
+#define GameLoop ((int32_t __cdecl (*)(BOOL demo_mode))0x0044C5D0)
#define LevelCompleteSequence ((int32_t __cdecl (*)(void))0x0044C670)
-#define LevelStats ((int32_t __cdecl (*)(int32_t levelID))0x0044C680)
-#define GameStats ((int32_t __cdecl (*)(int32_t levelID))0x0044C850)
+#define LevelStats ((int32_t __cdecl (*)(int32_t level_num))0x0044C680)
+#define GameStats ((int32_t __cdecl (*)(int32_t level_num))0x0044C850)
#define GetValidLevelsList ((void __cdecl (*)(REQUEST_INFO *req))0x0044C9D0)
#define GetSavedGamesList ((void __cdecl (*)(REQUEST_INFO *req))0x0044CA20)
#define DisplayCredits ((void __cdecl (*)(void))0x0044CA70)
@@ -672,12 +672,12 @@
#define HWR_ResetTexSource ((void __cdecl (*)(void))0x0044D110)
#define HWR_ResetColorKey ((void __cdecl (*)(void))0x0044D140)
#define HWR_ResetZBuffer ((void __cdecl (*)(void))0x0044D170)
-#define HWR_TexSource ((void __cdecl (*)(HWR_TEX_HANDLE texSource))0x0044D1D0)
+#define HWR_TexSource ((void __cdecl (*)(HWR_TEX_HANDLE tex_source))0x0044D1D0)
#define HWR_EnableColorKey ((void __cdecl (*)(bool state))0x0044D200)
#define HWR_EnableZBuffer ((void __cdecl (*)(bool z_write_enable, bool z_enable))0x0044D250)
#define HWR_BeginScene ((void __cdecl (*)(void))0x0044D2E0)
#define HWR_DrawPolyList ((void __cdecl (*)(void))0x0044D310)
-#define HWR_LoadTexturePages ((void __cdecl (*)(int32_t pagesCount, LPVOID pagesBuffer, RGB888 *palette))0x0044D490)
+#define HWR_LoadTexturePages ((void __cdecl (*)(int32_t pages_count, void *pages_buf, RGB888 *palette))0x0044D490)
#define HWR_FreeTexturePages ((void __cdecl (*)(void))0x0044D520)
#define HWR_GetPageHandles ((void __cdecl (*)(void))0x0044D570)
#define HWR_VertexBufferFull ((bool __cdecl (*)(void))0x0044D5B0)
@@ -685,17 +685,17 @@
#define S_InitialiseSystem ((BOOL __cdecl (*)(void))0x0044D610)
#define GameBuf_Shutdown ((void __cdecl (*)(void))0x0044D670)
#define init_game_malloc ((void __cdecl (*)(void))0x0044D690)
-#define game_malloc ((void *__cdecl (*)(DWORD allocSize, DWORD bufIndex))0x0044D6C0)
-#define game_free ((void __cdecl (*)(DWORD freeSize))0x0044D740)
+#define game_malloc ((void *__cdecl (*)(uint32_t alloc_size, uint32_t buf_index))0x0044D6C0)
+#define game_free ((void __cdecl (*)(uint32_t free_size))0x0044D740)
#define CalculateWibbleTable ((void __cdecl (*)(void))0x0044D780)
-#define RenderErrorBox ((int32_t __cdecl (*)(int32_t errorCode))0x0044E4E0)
+#define RenderErrorBox ((int32_t __cdecl (*)(int32_t error_code))0x0044E4E0)
#define WinMain ((int32_t __stdcall (*)(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int32_t nShowCmd))0x0044E520)
-#define GameInit ((int32_t __cdecl (*)(bool skipCDInit))0x0044E700)
+#define GameInit ((int32_t __cdecl (*)(bool skip_cd_init))0x0044E700)
#define Shell_Cleanup ((void __cdecl (*)(void))0x0044E770)
#define WinGameStart ((int32_t __cdecl (*)(void))0x0044E7A0)
#define Shell_Shutdown ((void __cdecl (*)(void))0x0044E820)
#define ScreenShotPCX ((void __cdecl (*)(void))0x0044E8E0)
-#define CompPCX ((DWORD __cdecl (*)(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcxData))0x0044E9F0)
+#define CompPCX ((DWORD __cdecl (*)(BYTE *bitmap, DWORD width, DWORD height, RGB888 *palette, BYTE **pcx_data))0x0044E9F0)
#define EncodeLinePCX ((DWORD __cdecl (*)(BYTE *src, DWORD width, BYTE *dst))0x0044EAA0)
#define EncodePutPCX ((DWORD __cdecl (*)(BYTE value, BYTE num, BYTE *buffer))0x0044EB80)
#define ScreenShot ((void __cdecl (*)(LPDDS screen))0x0044EBC0)
@@ -712,34 +712,34 @@
#define S_RemoveCtrlText ((void __cdecl (*)(void))0x00450AA0)
#define GetRenderHeight ((int32_t __cdecl (*)(void))0x00450AE0)
#define GetRenderWidth ((int32_t __cdecl (*)(void))0x00450AF0)
-#define S_InitialisePolyList ((void __cdecl (*)(BOOL clearBackBuffer))0x00450B00)
+#define S_InitialisePolyList ((void __cdecl (*)(BOOL clear_back_buffer))0x00450B00)
#define S_DumpScreen ((DWORD __cdecl (*)(void))0x00450BF0)
#define S_ClearScreen ((void __cdecl (*)(void))0x00450C30)
-#define S_InitialiseScreen ((void __cdecl (*)(GF_LEVEL_TYPE levelType))0x00450C40)
+#define S_InitialiseScreen ((void __cdecl (*)(GF_LEVEL_TYPE level_type))0x00450C40)
#define S_OutputPolyList ((void __cdecl (*)(void))0x00450C80)
-#define S_GetObjectBounds ((int32_t __cdecl (*)(int16_t *bPtr))0x00450CC0)
+#define S_GetObjectBounds ((int32_t __cdecl (*)(int16_t *obj_ptr))0x00450CC0)
#define S_InsertBackPolygon ((void __cdecl (*)(int32_t x0, int32_t y0, int32_t x1, int32_t y1))0x00450F30)
-#define S_PrintShadow ((void __cdecl (*)(int16_t radius, int16_t *bPtr, ITEM_INFO *item))0x00450F80)
+#define S_PrintShadow ((void __cdecl (*)(int16_t radius, int16_t *obj_ptr, ITEM_INFO *item))0x00450F80)
#define S_CalculateLight ((void __cdecl (*)(int32_t x, int32_t y, int32_t z, int16_t room_num))0x00451180)
#define S_CalculateStaticLight ((void __cdecl (*)(int16_t adder))0x00451480)
#define S_CalculateStaticMeshLight ((void __cdecl (*)(int32_t x, int32_t y, int32_t z, int32_t shade1, int32_t shade2, ROOM_INFO *room))0x004514C0)
#define S_LightRoom ((void __cdecl (*)(ROOM_INFO *room))0x004515F0)
#define S_DrawHealthBar ((void __cdecl (*)(int32_t percent))0x00451800)
#define S_DrawAirBar ((void __cdecl (*)(int32_t percent))0x004519D0)
-#define AnimateTextures ((void __cdecl (*)(int32_t nTicks))0x00451BD0)
+#define AnimateTextures ((void __cdecl (*)(int32_t ticks))0x00451BD0)
#define S_SetupBelowWater ((void __cdecl (*)(BOOL underwater))0x00451C90)
#define S_SetupAboveWater ((void __cdecl (*)(BOOL underwater))0x00451CF0)
-#define S_AnimateTextures ((void __cdecl (*)(int32_t nTicks))0x00451D20)
-#define S_DisplayPicture ((void __cdecl (*)(LPCTSTR fileName, BOOL isTitle))0x00451DE0)
+#define S_AnimateTextures ((void __cdecl (*)(int32_t ticks))0x00451D20)
+#define S_DisplayPicture ((void __cdecl (*)(const char *file_name, BOOL is_title))0x00451DE0)
#define S_SyncPictureBufferPalette ((void __cdecl (*)(void))0x00451EF0)
#define S_DontDisplayPicture ((void __cdecl (*)(void))0x00451F70)
#define ScreenDump ((void __cdecl (*)(void))0x00451F80)
#define ScreenPartialDump ((void __cdecl (*)(void))0x00451F90)
-#define FadeToPal ((void __cdecl (*)(int32_t fadeValue, RGB888 *palette))0x00451FA0)
-#define ScreenClear ((void __cdecl (*)(bool isPhdWinSize))0x00452170)
+#define FadeToPal ((void __cdecl (*)(int32_t fade_value, RGB888 *palette))0x00451FA0)
+#define ScreenClear ((void __cdecl (*)(bool is_phd_win_size))0x00452170)
#define S_CopyScreenToBuffer ((void __cdecl (*)(void))0x004521A0)
#define S_CopyBufferToScreen ((void __cdecl (*)(void))0x00452250)
-#define DecompPCX ((BOOL __cdecl (*)(LPCBYTE pcx, DWORD pcxSize, LPBYTE pic, RGB888 *pal))0x004522A0)
+#define DecompPCX ((BOOL __cdecl (*)(const uint8_t *pcx, size_t pcx_size, LPBYTE pic, RGB888 *pal))0x004522A0)
#define OpenGameRegistryKey ((bool __cdecl (*)(LPCTSTR key))0x004523C0)
#define CloseGameRegistryKey ((LONG __cdecl (*)(void))0x00452410)
#define SE_WriteAppSettings ((bool __cdecl (*)(APP_SETTINGS *settings))0x00452420)
@@ -779,27 +779,27 @@
#define CheckCheatMode ((void __cdecl (*)(void))0x00454D60)
#define S_SaveSettings ((void __cdecl (*)(void))0x004550C0)
#define S_LoadSettings ((void __cdecl (*)(void))0x00455140)
-#define CopyBitmapPalette ((void __cdecl (*)(RGB888 *srcPal, BYTE *srcBitmap, int32_t bitmapSize, RGB888 *destPal))0x004557A0)
-#define FindNearestPaletteEntry ((BYTE __cdecl (*)(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignoreSysPalette))0x004558E0)
-#define SyncSurfacePalettes ((void __cdecl (*)(void *srcData, int32_t width, int32_t height, int32_t srcPitch, RGB888 *srcPalette, void *dstData, int32_t dstPitch, RGB888 *dstPalette, bool preserveSysPalette))0x004559B0)
+#define CopyBitmapPalette ((void __cdecl (*)(RGB888 *src_pal, BYTE *src_bitmap, int32_t bitmap_size, RGB888 *dest_pal))0x004557A0)
+#define FindNearestPaletteEntry ((BYTE __cdecl (*)(RGB888 *palette, int32_t red, int32_t green, int32_t blue, bool ignore_sys_palette))0x004558E0)
+#define SyncSurfacePalettes ((void __cdecl (*)(void *src_data, int32_t width, int32_t height, int32_t src_pitch, RGB888 *src_palette, void *dst_data, int32_t dst_pitch, RGB888 *dst_palette, bool preserve_sys_palette))0x004559B0)
#define CreateTexturePalette ((int32_t __cdecl (*)(RGB888 *pal))0x00455A60)
#define GetFreePaletteIndex ((int32_t __cdecl (*)(void))0x00455AF0)
-#define FreePalette ((void __cdecl (*)(int32_t paletteIndex))0x00455B10)
-#define SafeFreePalette ((void __cdecl (*)(int32_t paletteIndex))0x00455B40)
+#define FreePalette ((void __cdecl (*)(int32_t palette_idx))0x00455B10)
+#define SafeFreePalette ((void __cdecl (*)(int32_t palette_idx))0x00455B40)
#define CreateTexturePage ((int32_t __cdecl (*)(int32_t width, int32_t height, bool alpha))0x00455B90)
#define GetFreeTexturePageIndex ((int32_t __cdecl (*)(void))0x00455C00)
#define CreateTexturePageSurface ((bool __cdecl (*)(TEXPAGE_DESC *desc))0x00455C20)
#define TexturePageInit ((bool __cdecl (*)(TEXPAGE_DESC *page))0x00455CC0)
#define Create3DTexture ((LPDIRECT3DTEXTURE2 __cdecl (*)(LPDDS surface))0x00455E40)
-#define SafeFreeTexturePage ((void __cdecl (*)(int32_t pageIndex))0x00455E70)
-#define FreeTexturePage ((void __cdecl (*)(int32_t pageIndex))0x00455E90)
+#define SafeFreeTexturePage ((void __cdecl (*)(int32_t page_idx))0x00455E70)
+#define FreeTexturePage ((void __cdecl (*)(int32_t page_idx))0x00455E90)
#define TexturePageReleaseVidMemSurface ((void __cdecl (*)(TEXPAGE_DESC *page))0x00455ED0)
#define FreeTexturePages ((void __cdecl (*)(void))0x00455F10)
-#define LoadTexturePage ((bool __cdecl (*)(int32_t pageIndex, bool reset))0x00455F40)
+#define LoadTexturePage ((bool __cdecl (*)(int32_t page_idx, bool reset))0x00455F40)
#define ReloadTextures ((bool __cdecl (*)(bool reset))0x00455FF0)
-#define GetTexturePageHandle ((HWR_TEX_HANDLE __cdecl (*)(int32_t pageIndex))0x00456030)
-#define AddTexturePage8 ((int32_t __cdecl (*)(int32_t width, int32_t height, BYTE *pageBuffer, int32_t palIndex))0x00456070)
-#define AddTexturePage16 ((int32_t __cdecl (*)(int32_t width, int32_t height, BYTE *pageBuffer))0x00456170)
+#define GetTexturePageHandle ((HWR_TEX_HANDLE __cdecl (*)(int32_t page_idx))0x00456030)
+#define AddTexturePage8 ((int32_t __cdecl (*)(int32_t width, int32_t height, BYTE *page_buf, int32_t pal_idx))0x00456070)
+#define AddTexturePage16 ((int32_t __cdecl (*)(int32_t width, int32_t height, BYTE *page_buf))0x00456170)
#define EnumTextureFormatsCallback ((HRESULT __stdcall (*)(LPDDSDESC lpDdsd, LPVOID lpContext))0x00456310)
#define EnumerateTextureFormats ((HRESULT __cdecl (*)(void))0x00456430)
#define CleanupTextures ((void __cdecl (*)(void))0x00456460)
diff --git a/src/global/types.h b/src/global/types.h
index 795ee1de..de2b8d1a 100644
--- a/src/global/types.h
+++ b/src/global/types.h
@@ -678,6 +678,11 @@ typedef enum GF_LEVEL_TYPE {
GFL_MIDSTORY,
} GF_LEVEL_TYPE;
+typedef struct PICKUP_INFO {
+ int16_t timer;
+ int16_t sprite;
+} PICKUP_INFO;
+
typedef struct INVENTORY_ITEM {
char *string;
int16_t obj_num;
diff --git a/src/global/vars.h b/src/global/vars.h
index 40c8b7a3..dc5ecd4b 100644
--- a/src/global/vars.h
+++ b/src/global/vars.h
@@ -192,6 +192,7 @@
#define g_NextItemActive (*(int16_t*)0x005207C8)
#define g_NextEffectActive (*(int16_t*)0x005207CA)
#define g_PrevItemActive (*(int16_t*)0x005207CC)
+#define g_Pickups (*(struct PICKUP_INFO(*)[12])0x00521CA0)
#define g_GameFlow (*(struct GAME_FLOW*)0x00521DE0)
#define g_SoundFxCount (*(int32_t*)0x00521FDC)
#define g_Objects (*(struct OBJECT_INFO(*)[265])0x00522000)