diff mm7_data.h @ 1459:2ca62c9e7b3c

Function names
author Nomad
date Wed, 21 Aug 2013 16:06:50 +0200
parents 934074e7fcc1
children c987b5ed09af
line wrap: on
line diff
--- a/mm7_data.h	Wed Aug 21 14:26:36 2013 +0200
+++ b/mm7_data.h	Wed Aug 21 16:06:50 2013 +0200
@@ -783,8 +783,8 @@
 
 extern std::array<int, 777> _6807B8_level_decorations_ids; // idb
 extern int _6807E0_num_decorations_with_sounds_6807B8; // weak
-extern std::array<int, 777> _6807E8_level_decorations_ids; // idb
-extern int _6836C8_num_decorations_6807E8; // weak
+extern std::array<int, 3000> event_triggers; // 6807E8
+extern int                   num_event_triggers; // 6836C8
 extern std::array<int, 64> dword_69B010;
 extern float flt_69B138_dist; // weak
 extern char byte_69BD41_unused; // weak
@@ -1058,249 +1058,16 @@
 //-------------------------------------------------------------------------
 // Function declarations
 
-void sub_4452BB();
-const char *GetProfessionActionText(int a1);
-struct NPCData *__fastcall GetNPCData(signed int npcid);
-struct NPCData * GetNewNPCData(signed int npcid, int* npc_indx);
-int __fastcall GetGreetType(signed int SpeakingNPC_ID);
-void  DialogueEnding();
-void PrepareHouse(enum HOUSE_ID house); // idb
-bool  EnterHouse(enum HOUSE_ID uHouseID);
-int sub_4465DF_check_season(int a1);
-int __fastcall IsActorAlive(unsigned int uType, unsigned int uParam, unsigned int uNumAlive); // idb
-// void  crt_construct_5773C4();
-int NPC_EventProcessor(int npc_event_id, int entry_line = 0);
 
-void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3);
-void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename);
-void __fastcall SetDecorationSprite(unsigned int uCog, int a2, const char *pFileName); // idb
-void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on);
-void __fastcall ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle);
-void  GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide); // idb
-void OnTimer(int);
-void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName);
-void __fastcall EventCastSpell(int spellnum, int uSkillLevel, int uSkill, int fromx, int fromy, int fromz, int tox, int toy, int toz);//sub_448DF8
-__int16 __fastcall sub_449A49_door_switch_animation(unsigned int uDoorID, int a2); // idb
-bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2);
-void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle); // idb
-void ShowStatusBarString(const char *pString, unsigned int uNumSeconds);
-void  ShowNothingHereStatus();
-signed int  const_2();
-bool  sub_44C28F_open_nwc_dungeon();
-// int  crt_deconstruct_44C42C();
-void SpawnEncounter(struct MapInfo *pMapInfo, struct SpawnPointMM7 *spawn, int a3, int a4, int a5);
-int __fastcall sub_44FA4C_spawn_light_elemental(int a1, int a2, int a3);
-
-signed int __fastcall sub_450521_ProllyDropItemAt(int ecx0, signed int a2, int a3, int a4, int a5, unsigned __int16 a6);
-int __fastcall _45063B_spawn_some_monster(struct MapInfo *a1, int a2);
-void RespawnGlobalDecorations();
-bool __fastcall SpawnActor(unsigned int uMonsterID);
-int  GetAlertStatus();
-unsigned int __fastcall sub_452442(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4);
-int integer_sqrt(int val);
-int __fastcall MakeColorMaskFromBitDepth(int a1);
-void __fastcall fill_pixels_fast(unsigned int a1, unsigned __int16 *pPixels, unsigned int uNumPixels);
-int __fastcall GetDiceResult(unsigned int uNumDice, unsigned int uDiceSides); // idb
-inline int round(float x) { return (int)floor(x + 0.5f); }
-inline void __fastcall memset32(void *ptr, unsigned __int32 value, int count)
-{
-  auto p = (unsigned __int32 *)ptr;
-  for ( int i=0; i < count; i++ )
-    *p++ = value;
-}
-inline void __fastcall j_memset32(int a2, void *a1, unsigned int a3) {memset32(a1, a2, a3);}
-// int  crt_452B74();
-int  j_SetSomeItemsNames();
+void init_event_triggers();
+void check_event_triggers();
 
 
-int SkillToMastery(unsigned int skill_value);
-unsigned int __fastcall GetSpellColor(signed int a1);
-void * unknown_vdtor_6(void *_this, bool a2);
-unsigned short * MakeScreenshot(signed int width, signed int height);
-void  SaveScreenshot(const char *pFilename);
-void __fastcall LoadGame(unsigned int uSlot); // idb
-void SaveGame(bool IsAutoSAve, bool NotSaveWorld);
-void __fastcall DoSavegame(unsigned int uSlot); // idb
-void  TryLoadLevelFromLOD();
-void  sub_46080D();
-bool  Initialize_GamesLOD_NewLOD();
-void SaveNewGame();
-void  PrepareToLoadBLV(unsigned int bLoading);
-void __fastcall PrepareToLoadODM(unsigned int bLoading, struct OutdoorCamera *a2);
-void  sub_461103();
-int  sub_4613C4();
-int int_get_vector_length(signed int x, signed int y, signed int z);
-int  sub_46224A();
-void MainMenu_Loop();
-char sub_4637E0_is_there_popup_onscreen();
-void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows();
-void PrepareWorld(unsigned int _0_box_loading_1_fullscreen);
-void Game_DeinitializeAndTerminate(int exitCode); // idb
-void FinalInitialization();
-char Is_out15odm_underwater();
-void SetUnderwaterFog();
-void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box);
-int __fastcall ReadWindowsRegistryInt(const char *pKey, int uDefValue); // idb
-void __fastcall WriteWindowsRegistryString(const char *pKey, const char *pString);
-void __fastcall ReadWindowsRegistryString(const char *pKeyName, char *pOutString, int uBufLen, const char *pDefaultValue);
-void __fastcall WriteWindowsRegistryInt(const char *pKey, int val);
-bool __fastcall CheckMM7CD(char c);
-int loc_465CC8(); // weak
-void  SecondaryInitialization();
-void  CreateAsyncMouse();
-void  CreateAsyncKeyboard();
-void  MM6_Initialize(const wchar_t *pIniFilename);
-void  MM7Initialization();
-int  AbortWithError();
-void Abortf(const char *Format, ...);
-void SetCurrentMenuID(enum MENU_STATE); // idb
-enum MENU_STATE GetCurrentMenuID();
-void * output_debug_string(void *_this, std::string a2, const char *a3, int a4);
-std::string *__fastcall _4678E2_make_error_string(std::string *a1, int line, std::string file);
-void  CreateMsgScrollWindow(signed int mscroll_id);
-void  free_book_subwindow();
-void  CreateScrollWindow();
-void  OnPaperdollLeftClick();
-void OnPressSpace();
-char __fastcall DoInteractionWithTopmostZObject(int a1, int a2);
-int __fastcall sub_46A6AC(int a1, int a2, int a3);
-int __fastcall sub_46A7C8(int a1, int a2, signed int a3);
-int __fastcall sub_46A89E(int a1, int a2, signed int a3);
-int  sub_46A99B();
-void * unknown_libname_8(void *_this, char a2);
-unsigned int  GetGravityStrength();
-void  UpdateUserInput_and_MapSpecificStuff();
-void  BLV_UpdateUserInputAndOther();
-void  ODM_UpdateUserInputAndOther();
-bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2);
-void  check_event_triggers();
-int BLV_GetFloorLevel(int x, int y, int z, unsigned int uSectorID, unsigned int *pFaceID);
-int ODM_GetFloorLevel(int X, signed int Y, int Z, int, int *pOnWater, int *bmodel_pid, int bWaterWalk);
-int __fastcall sub_46D8E3(int a1, signed int a2, int a3, int a4);
-void ODM_GetTerrainNormalAt(int pos_x, int pos_z, Vec3_int_ *out);
-unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID);
-int __fastcall _46DF1A_collide_against_actor(int, int); // weak
-void  _46E0B2_collide_against_decorations();
-void __fastcall _46E26D_collide_against_sprites(signed int a1, signed int a2);
-int  _46E44E_collide_against_faces_and_portals(unsigned int b1); // idb
-int __fastcall _46E889_collide_against_bmodels(unsigned int ecx0);
-int collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb
-void __fastcall _46ED8A_collide_against_sprite_objects(unsigned int _this);
-int  _46EF01_collision_chech_player(int a1); // idb
-signed int  _46F04E_collide_against_portals();
-void BLV_UpdateDoors();
-void UpdateActors_BLV();
-void UpdateActors_ODM();
-void UpdateObjects();
-int collide_against_floor_approximate(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb
-void BLV_ProcessPartyActions();
-void ODM_ProcessPartyActions();
-bool __fastcall sub_47531C(int a1, int *a2, int a3, int a4, int a5, int a6, int a7, int a8, struct BLVFace *a9, int a10);
-bool __fastcall sub_4754BF(int a1, int *a2, int a3, int a4, int a5, int a6, int a7, int a8, struct BLVFace *a9, int a10, int a11);
-signed int sub_475665(struct BLVFace *_this, int a2, __int16 a3);
-bool __fastcall sub_4759C9(struct BLVFace *a1, int a2, int a3, __int16 a4);
-bool __fastcall sub_475D85(Vec3_int_ *a1, Vec3_int_ *a2, int *a3, struct BLVFace *a4);
-bool __fastcall sub_475F30(int *a1, struct BLVFace *a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9);
-
-int  GetPartyReputation();
-void  sub_4783FA_construct_global_73D150();
-void  loc_4789D4(); // idb
-void  loc_47907F(); // idb
-bool __fastcall IsBModelVisible(unsigned int uModelID, int *unused);
-void  ODM_LoadAndInitialize(const char *pLevelFilename, struct OutdoorCamera *thisa);
-unsigned int GetLevelFogColor();
-int __fastcall sub_47C3D7_get_fog_related_stuff(int a1, int a2, float a3);
-signed int __fastcall GetActorTintColor(int max_dim, int min_dim, float distance, int a4, struct RenderBillboard *a5);
-unsigned int WorldPosToGridCellX(int); // weak
-unsigned int WorldPosToGridCellZ(int); // weak
-int __stdcall GridCellToWorldPosX(int); // weak
-int __stdcall GridCellToWorldPosZ(int); // weak
-void  loc_48118F(); // idb
-void  loc_481199(); // idb
-void ResetPolygons();
-void  sub_481ED9_MessWithOutdoorCamera();
-bool IsTerrainSlopeTooHigh(int pos_x, int pos_y);
-int __fastcall GetTerrainHeightsAroundParty2(int a1, int a2, int *a3, int a4);
-signed int  const_1_0();
-void  sub_487DA9();
-double  GetFogDensityByTime(struct OutdoorLocation *_this);
-int __stdcall loc_489BB3(struct stru320 *a2, int thisa, unsigned int uNumVertices, struct RenderVertexSoft *a5, float a6, char uClipFlag); // weak
-bool __fastcall HSV2RGB(float *a1, float *a2, float *a3, float a4, float a5, float a6);
-void __fastcall RGB2HSV(float *a1, float *a2, float a3, float a4, float a5, float *a6);
-unsigned int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4);
-signed int  PlayerCreation_Chose4Skills();
-signed int  PlayerCreation_GetUnspentAttributePointCount();
-void LoadPlayerPortraintsAndVoices();
-int __fastcall ReloadPlayerPortraits(int, int); // weak
-void sub_491E3A();
-signed int  CycleCharacter(unsigned int _this);
-void __fastcall Rest(unsigned int uHoursToSleep);
-int _493938_regenerate();
-void sub_493F79(struct stru351_summoned_item *_this, __int64 a2);
-void _494035_timed_effects__water_walking_damage__etc();
-unsigned int __fastcall _494820_training_time(unsigned int a1);
-char *__fastcall sub_495366(unsigned __int8 a1, unsigned __int8 a2);
-char *GetReputationString(signed int a1);
-char *BuildDialogueString(char *lpsz, unsigned __int8 uPlayerID, struct ItemGen *a3, char *a4, int a5, __int64 *a6);
-void PlayerCreationUI_Draw();
-void PlayerCreationUI_Initialize();
-void DeleteCCharFont();
-bool PlayerCreationUI_Loop();
-unsigned int __fastcall GetMaxMipLevels(unsigned int uDim);
-bool CheckTextureStages();
-bool AreRenderSurfacesOk();
-unsigned int BlendColors(unsigned int c1, unsigned int c2); // weak
-void DoRenderBillboards_D3D();
-int __fastcall sr_4A46E6_draw_particle_segment(unsigned int x, signed int y, signed int z, int a4, unsigned int lightColor);
-void Present_ColorKey();
-void Present_NoColorKey();
-unsigned int ModulateColor(unsigned int diffuse, float multiplier); // idb
-struct SoundHeader *FindSound_BinSearch(unsigned int uStart, unsigned int uEnd, const char *pName);
-struct SoundData *LoadSound(const char *pSoundName, struct SoundData *pOutBuff, unsigned int uID);
-int __fastcall sub_4AAEA6_transform(struct RenderVertexSoft *a1);
-int __fastcall sub_4AB66C(int, int); // weak
-int GetSoundStrengthByDistanceFromParty(int x, int y, int z);
-struct _DIG_DRIVER *Audio_GetFirstHardwareDigitalDriver(void);
-void  PlayLevelMusic();
-unsigned int __fastcall sub_4B0E07(unsigned int uFaceID); // idb
-struct Player *__fastcall sub_4B1447_party_fine(int a1, int a2, int a3);
-void  sub_4B1523(int *_this);
-void  ShowPopupShopItem();
-void __stdcall RestAndHeal(__int64 uNumMinutes); // idb
-void  GetHouseGoodbyeSpeech();
-
-void  sub_4B1ECE();
-void __fastcall ClickNPCTopic(signed int uMessageParam);
-char * _4B254D_SkillMasteryTeacher(int _this);
-const char * ContractSelectText(int pEventCode);
-void SimpleHouseAndBoatsDialog();
-void  CreateButtonInColumn(int a1, unsigned int a2);
-void FillAviableSkillsToTeach(int _this);
-void  sub_4B3E1E();
-void DrawJoinGuildWindow(int pEventCode);
-void __fastcall sub_4B3FE5(int a4);
-void NPCHireableDialogPrepare();
-void _4B4224_UpdateNPCTopics(int _this);
-void __fastcall DrawTextAtStatusBar(const char *Str, int a5);
-int __fastcall sub_4B46F8(int a1);
-
-const char *sub_4BBA85_bounties();
-void  sub_4BBCDD();
-void __fastcall _4BBF61_summon_actor(int a1, __int16 x, int y, int z); // idb
-void  ArenaFight();
-void  SpellBookGenerator();
-void UI_CreateEndConversationButton();
-void __fastcall OnSelectShopDialogueOption(signed int uMessageParam);
-signed int  sub_4BD8B5();
-bool __fastcall MerchandiseTest(ItemGen *item, int _2da_idx);
-void  UIShop_Buy_Identify_Repair();
 
 
-void  ShowIntroVideo_and_LoadingScreen();
-unsigned int  GameOverMenu(void *ecx0);
-bool  BinkLockBuffer(struct _BINKBUF *_this);
-void  BinkUnlockBuffer(struct _BINKBUF *_this);
-signed int __fastcall SpawnRandomTreasure(struct MapInfo *a1, struct SpawnPointMM7 *a2);
+void ShowIntroVideo_and_LoadingScreen();
+unsigned int GameOverMenu(void *ecx0);
+int __fastcall SpawnRandomTreasure(struct MapInfo *a1, struct SpawnPointMM7 *a2);
 void DamageMonsterFromParty(signed int a1, unsigned int uActorID_Monster, struct Vec3_int_ *pVelocity);
 
 void MakeActorAIList_ODM();
@@ -1321,7 +1088,6 @@
 unsigned short TargetColor(unsigned __int16 r, unsigned __int16 g, unsigned __int16 b); // idb
 void CallRenderPresent();
 void DoBlt_Copy(unsigned __int16 *pPixels); // idb
-int loc_40E4FC(); // weak
 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue);
 void __fastcall ZBuffer_DoFill(int *pZBuffer, struct Texture *pTex, int uZValue);
 void __fastcall ZBuffer_DoFill2(int *pZBuffer, struct Texture *a2, int a3); // idb
@@ -1345,11 +1111,9 @@
 void LoadActualSkyFrame();
 void Sleep6Hours();
 void ChestUI_WritePointedObjectStatusString();
-
 void __fastcall party_finds_gold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal); // idb
 void OnChestLeftClick();
 void GameUI_WritePointedObjectStatusString();
-//struct GUIWindow * GetCastSpellInInventoryWindow(void *a4);
 bool sub_421B2C_PlaceInInventory_or_DropPickedItem();
 void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID); // idb
 void OnInventoryLeftClick();
@@ -1358,19 +1122,14 @@
 void SetUserInterface(enum PartyAlignment alignment, bool bReplace);
 void reset_some_strus_flt_2Cs();
 int __fastcall GetPortalScreenCoord(unsigned int uFaceID);
-signed int __fastcall sr_424579(int uFaceID, struct stru320 *a2);
 bool PortalFrustrum(int pNumVertices, struct BspRenderer_PortalViewportData *a2, struct BspRenderer_PortalViewportData *near_portal, int uFaceID);
 int sr_424CD7(unsigned int uVertexID); // idb
-signed int __fastcall sr_424EE0_MakeFanFromTriangle(unsigned int uVertexID); // idb
-signed int __fastcall sr_4250FE(unsigned int uVertexID); // idb
-bool sr_42620A(struct RenderVertexSoft *p);
+int __fastcall sr_424EE0_MakeFanFromTriangle(unsigned int uVertexID); // idb
 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor); // idb
 int __fastcall _42690D_colors_cvt(unsigned int a1);
-void  sub_426947();
 void __fastcall GivePartyExp(unsigned int pEXPNum);
 bool __fastcall sub_427769_spell(unsigned int uSpellID);
 void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6);
-int __fastcall sub_42EBBE(int, int); // weak
 void _42ECB5_PlayerAttacksActor();
 void  InitializeTurnBasedAnimations(void *);
 int _42F4DA_check_actor_proximity();
@@ -1426,6 +1185,217 @@
 char *GetEventHintString(unsigned int uEventID); // idb
 int GetTravelTime();
 void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4);
+int SkillToMastery(unsigned int skill_value);
+unsigned int __fastcall GetSpellColor(signed int a1);
+unsigned short * MakeScreenshot(signed int width, signed int height);
+void SaveScreenshot(const char *pFilename);
+void __fastcall LoadGame(unsigned int uSlot); // idb
+void SaveGame(bool IsAutoSAve, bool NotSaveWorld);
+void __fastcall DoSavegame(unsigned int uSlot); // idb
+void TryLoadLevelFromLOD();
+void sub_46080D();
+bool Initialize_GamesLOD_NewLOD();
+void SaveNewGame();
+void PrepareToLoadBLV(unsigned int bLoading);
+void __fastcall PrepareToLoadODM(unsigned int bLoading, struct OutdoorCamera *a2);
+void _461103_load_level_sub();
+int int_get_vector_length(signed int x, signed int y, signed int z);
+void MainMenu_Loop();
+char sub_4637E0_is_there_popup_onscreen();
+void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows();
+void PrepareWorld(unsigned int _0_box_loading_1_fullscreen);
+void Game_DeinitializeAndTerminate(int exitCode); // idb
+void FinalInitialization();
+char Is_out15odm_underwater();
+void SetUnderwaterFog();
+void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box);
+int __fastcall ReadWindowsRegistryInt(const char *pKey, int uDefValue); // idb
+void __fastcall WriteWindowsRegistryString(const char *pKey, const char *pString);
+void __fastcall ReadWindowsRegistryString(const char *pKeyName, char *pOutString, int uBufLen, const char *pDefaultValue);
+void __fastcall WriteWindowsRegistryInt(const char *pKey, int val);
+bool __fastcall CheckMM7CD(char c);
+void SecondaryInitialization();
+void CreateAsyncMouse();
+void CreateAsyncKeyboard();
+void MM6_Initialize(const wchar_t *pIniFilename);
+void MM7Initialization();
+int AbortWithError();
+void Abortf(const char *Format, ...);
+void SetCurrentMenuID(enum MENU_STATE); // idb
+enum MENU_STATE GetCurrentMenuID();
+void CreateMsgScrollWindow(signed int mscroll_id);
+void free_book_subwindow();
+void CreateScrollWindow();
+void OnPaperdollLeftClick();
+void OnPressSpace();
+char __fastcall DoInteractionWithTopmostZObject(int a1, int a2);
+int GetPartyReputation();
+void OracleDialogue();
+void __fastcall ClickNPCTopic(signed int uMessageParam);
+char * _4B254D_SkillMasteryTeacher(int _this);
+const char *ContractSelectText(int pEventCode);
+void SimpleHouseAndBoatsDialog();
+void CreateButtonInColumn(int a1, unsigned int a2);
+void FillAviableSkillsToTeach(int _this);
+void sub_4B3E1E();
+void DrawJoinGuildWindow(int pEventCode);
+void __fastcall sub_4B3FE5(int a4);
+void NPCHireableDialogPrepare();
+void _4B4224_UpdateNPCTopics(int _this);
+void __fastcall DrawTextAtStatusBar(const char *Str, int a5);
+__int64 GetExperienceRequiredForLevel(int a1);
+const char *sub_4BBA85_bounties();
+void sub_4BBCDD();
+void __fastcall _4BBF61_summon_actor(int a1, __int16 x, int y, int z); // idb
+void ArenaFight();
+void SpellBookGenerator();
+void UI_CreateEndConversationButton();
+void __fastcall OnSelectShopDialogueOption(signed int uMessageParam);
+int sub_4BD8B5();
+bool __fastcall MerchandiseTest(ItemGen *item, int _2da_idx);
+void UIShop_Buy_Identify_Repair();
+bool __fastcall IsBModelVisible(unsigned int uModelID, int *unused);
+void ODM_LoadAndInitialize(const char *pLevelFilename, struct OutdoorCamera *thisa);
+unsigned int GetLevelFogColor();
+int __fastcall sub_47C3D7_get_fog_related_stuff(int a1, int a2, float a3);
+int __fastcall GetActorTintColor(int max_dim, int min_dim, float distance, int a4, struct RenderBillboard *a5);
+unsigned int WorldPosToGridCellX(int); // weak
+unsigned int WorldPosToGridCellZ(int); // weak
+int GridCellToWorldPosX(int); // weak
+int GridCellToWorldPosZ(int); // weak
+void ResetPolygons();
+void sub_481ED9_MessWithOutdoorCamera();
+bool IsTerrainSlopeTooHigh(int pos_x, int pos_y);
+int __fastcall GetTerrainHeightsAroundParty2(int a1, int a2, int *a3, int a4);
+void sub_487DA9();
+double GetFogDensityByTime(struct OutdoorLocation *_this);
+bool __fastcall HSV2RGB(float *a1, float *a2, float *a3, float a4, float a5, float a6);
+void __fastcall RGB2HSV(float *a1, float *a2, float a3, float a4, float a5, float *a6);
+unsigned int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4);
+int PlayerCreation_Choose4Skills();
+int PlayerCreation_GetUnspentAttributePointCount();
+void LoadPlayerPortraintsAndVoices();
+int __fastcall ReloadPlayerPortraits(int, int); // weak
+void sub_491E3A();
+int CycleCharacter(bool backwards);
+void __fastcall Rest(unsigned int uHoursToSleep);
+int _493938_regenerate();
+void init_summoned_item(struct stru351_summoned_item *_this, __int64 duration);
+void _494035_timed_effects__water_walking_damage__etc();
+unsigned int __fastcall _494820_training_time(unsigned int a1);
+char *__fastcall sub_495366(unsigned __int8 a1, unsigned __int8 a2);
+char *GetReputationString(signed int a1);
+char *BuildDialogueString(char *lpsz, unsigned __int8 uPlayerID, struct ItemGen *a3, char *a4, int a5, __int64 *a6);
+void PlayerCreationUI_Draw();
+void PlayerCreationUI_Initialize();
+void DeleteCCharFont();
+bool PlayerCreationUI_Loop();
+unsigned int __fastcall GetMaxMipLevels(unsigned int uDim);
+bool CheckTextureStages();
+bool AreRenderSurfacesOk();
+unsigned int BlendColors(unsigned int c1, unsigned int c2); // weak
+void DoRenderBillboards_D3D();
+int __fastcall sr_4A46E6_draw_particle_segment(unsigned int x, signed int y, signed int z, int a4, unsigned int lightColor);
+void Present_ColorKey();
+void Present_NoColorKey();
+unsigned int ModulateColor(unsigned int diffuse, float multiplier); // idb
+struct SoundHeader *FindSound_BinSearch(unsigned int uStart, unsigned int uEnd, const char *pName);
+struct SoundData *LoadSound(const char *pSoundName, struct SoundData *pOutBuff, unsigned int uID);
+int __fastcall sub_4AAEA6_transform(struct RenderVertexSoft *a1);
+int __fastcall sub_4AB66C(int, int); // weak
+int GetSoundStrengthByDistanceFromParty(int x, int y, int z);
+struct _DIG_DRIVER *Audio_GetFirstHardwareDigitalDriver(void);
+void PlayLevelMusic();
+unsigned int __fastcall sub_4B0E07(unsigned int uFaceID); // idb
+struct Player *__fastcall sub_4B1447_party_fine(int a1, int a2, int a3);
+void sub_4B1523(int *_this);
+void ShowPopupShopItem();
+void RestAndHeal(__int64 uNumMinutes); // idb
+void GetHouseGoodbyeSpeech();
+int __fastcall _46A6AC_spell_render(int a1, int a2, int a3);
+int __fastcall _46A6AC_spell_render_d3d(int a1, int a2, int a3);
+int __fastcall _46A89E_immolation_effect(int a1, int a2, int a3);
+int sub_46A99B();
+unsigned int GetGravityStrength();
+void UpdateUserInput_and_MapSpecificStuff();
+void BLV_UpdateUserInputAndOther();
+void ODM_UpdateUserInputAndOther();
+bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2);
+int BLV_GetFloorLevel(int x, int y, int z, unsigned int uSectorID, unsigned int *pFaceID);
+int ODM_GetFloorLevel(int X, signed int Y, int Z, int, int *pOnWater, int *bmodel_pid, int bWaterWalk);
+int __fastcall sub_46D8E3(int a1, signed int a2, int a3, int a4);
+void ODM_GetTerrainNormalAt(int pos_x, int pos_z, Vec3_int_ *out);
+unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID);
+int __fastcall _46DF1A_collide_against_actor(int, int); // weak
+void _46E0B2_collide_against_decorations();
+void __fastcall _46E26D_collide_against_sprites(signed int a1, signed int a2);
+int _46E44E_collide_against_faces_and_portals(unsigned int b1); // idb
+int __fastcall _46E889_collide_against_bmodels(unsigned int ecx0);
+int collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb
+void __fastcall _46ED8A_collide_against_sprite_objects(unsigned int _this);
+int _46EF01_collision_chech_player(int a1); // idb
+int _46F04E_collide_against_portals();
+void BLV_UpdateDoors();
+void UpdateActors_BLV();
+void UpdateActors_ODM();
+void UpdateObjects();
+int collide_against_floor_approximate(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb
+void BLV_ProcessPartyActions();
+void ODM_ProcessPartyActions();
+bool __fastcall sub_47531C(int a1, int *a2, int a3, int a4, int a5, int a6, int a7, int a8, struct BLVFace *a9, int a10);
+bool __fastcall sub_4754BF(int a1, int *a2, int a3, int a4, int a5, int a6, int a7, int a8, struct BLVFace *a9, int a10, int a11);
+int sub_475665(struct BLVFace *_this, int a2, __int16 a3);
+bool __fastcall sub_4759C9(struct BLVFace *a1, int a2, int a3, __int16 a4);
+bool __fastcall sub_475D85(Vec3_int_ *a1, Vec3_int_ *a2, int *a3, struct BLVFace *a4);
+bool __fastcall sub_475F30(int *a1, struct BLVFace *a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9);
+void sub_4452BB();
+const char *GetProfessionActionText(int a1);
+struct NPCData *__fastcall GetNPCData(signed int npcid);
+struct NPCData * GetNewNPCData(signed int npcid, int* npc_indx);
+int __fastcall GetGreetType(signed int SpeakingNPC_ID);
+void  DialogueEnding();
+void PrepareHouse(enum HOUSE_ID house); // idb
+bool EnterHouse(enum HOUSE_ID uHouseID);
+int sub_4465DF_check_season(int a1);
+int __fastcall IsActorAlive(unsigned int uType, unsigned int uParam, unsigned int uNumAlive); // idb
+int NPC_EventProcessor(int npc_event_id, int entry_line = 0);
+void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3);
+void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename);
+void __fastcall SetDecorationSprite(unsigned int uCog, int a2, const char *pFileName); // idb
+void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on);
+void __fastcall ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle);
+void  GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide); // idb
+void OnTimer(int);
+void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName);
+void __fastcall EventCastSpell(int spellnum, int uSkillLevel, int uSkill, int fromx, int fromy, int fromz, int tox, int toy, int toz);//sub_448DF8
+__int16 __fastcall sub_449A49_door_switch_animation(unsigned int uDoorID, int a2); // idb
+bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2);
+void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle); // idb
+void ShowStatusBarString(const char *pString, unsigned int uNumSeconds);
+void ShowNothingHereStatus();
+int const_2();
+bool TeleportToNWCDungeon();
+void SpawnEncounter(struct MapInfo *pMapInfo, struct SpawnPointMM7 *spawn, int a3, int a4, int a5);
+int __fastcall sub_44FA4C_spawn_light_elemental(int a1, int a2, int a3);
+int __fastcall sub_450521_ProllyDropItemAt(int ecx0, signed int a2, int a3, int a4, int a5, unsigned __int16 a6);
+int __fastcall _45063B_spawn_some_monster(struct MapInfo *a1, int a2);
+void RespawnGlobalDecorations();
+bool __fastcall SpawnActor(unsigned int uMonsterID);
+int GetAlertStatus();
+unsigned int __fastcall sub_452442(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4);
+int integer_sqrt(int val);
+int __fastcall MakeColorMaskFromBitDepth(int a1);
+void __fastcall fill_pixels_fast(unsigned int a1, unsigned __int16 *pPixels, unsigned int uNumPixels);
+int __fastcall GetDiceResult(unsigned int uNumDice, unsigned int uDiceSides); // idb
+inline int round(float x) { return (int)floor(x + 0.5f); }
+inline void __fastcall memset32(void *ptr, unsigned __int32 value, int count)
+{
+  auto p = (unsigned __int32 *)ptr;
+  for ( int i=0; i < count; i++ )
+    *p++ = value;
+}
+inline void __fastcall j_memset32(int a2, void *a1, unsigned int a3) {memset32(a1, a2, a3);}
+
 
 #define ErrD3D(hr) do {extern void ErrHR(HRESULT, const char *, const char *, const char *, int); ErrHR(hr, "Direct3D", __FUNCTION__, __FILE__, __LINE__);} while(0)