Mercurial > mm7
diff mm7_data.h @ 1458:934074e7fcc1
ModalWindow
__thiscall and __cdecl removed
Some random renames & refactors
author | Nomad |
---|---|
date | Wed, 21 Aug 2013 14:26:36 +0200 |
parents | bfe342ae0c1f |
children | 2ca62c9e7b3c |
line wrap: on
line diff
--- a/mm7_data.h Wed Aug 14 00:40:51 2013 +0400 +++ b/mm7_data.h Wed Aug 21 14:26:36 2013 +0200 @@ -570,7 +570,6 @@ extern std::array<bool, 28> GameMenuUI_InvaligKeyBindingsFlags; // 506E6C extern std::array<unsigned int, 27> pPrevVirtualCidesMapping; extern int KeyboardPageNum; // weak -extern std::array<int, 777> dword_506F0C; // idb extern int uRestUI_FoodRequiredToRest; extern int dword_506F14; // weak extern int _506F18_num_minutes_to_sleep; // weak @@ -603,7 +602,7 @@ extern int dword_507B98_ctrl_pressed; // weak extern unsigned int uActiveCharacter; extern int dword_507BF0_is_there_popup_onscreen; // weak -extern int dword_507CBC; // weak +extern int awards_scroll_bar_created; // weak extern int dword_507CC0_activ_ch; // weak extern __int64 GameUI_RightPanel_BookFlashTimer; // weak extern int _507CD4_RestUI_hourglass_anim_controller; // weak @@ -1043,18 +1042,6 @@ extern volatile bool initing; //ADDED -//extern int crt_F94004; // weak -//extern int crtdword_F9400C; // weak -extern FARPROC lpfn; // idb -//extern int crt_F944EC; // weak -//extern int crtdword_F944F0; // weak -//extern void *crt_F944F4; // idb -//extern int crtdword_F944F8; // weak -//extern LPVOID crt_lpMem; // idb -//extern int crt_F94500; // weak -//extern HANDLE crt_hHeap; // idb -//extern int crt_F94508; // weak - @@ -1071,168 +1058,17 @@ //------------------------------------------------------------------------- // Function declarations -#define __thiscall __cdecl // Test compile in C mode - -void __stdcall mm7__vector_constructor(void *a1, int objSize, int numObjs, int (__thiscall *constructor)(int)); -void MakeActorAIList_ODM(); -int __cdecl MakeActorAIList_BLV(); -void __cdecl UpdateActorAI(); -bool __fastcall sub_4070EF_prolly_collide_objects(unsigned int uObjID, unsigned int uObj2ID); -bool __fastcall sub_4075DB(int a1, int a2, int a3, struct BLVFace *a4); -bool __fastcall sub_4077F1(int a1, int a2, int a3, struct ODMFace *a4, struct BSPVertexBuffer *a5); -bool __fastcall sub_407A1C(int x, int z, int y, struct Vec3_int_ v); // idb -void InitializeActors(); -void InitializeSpriteObjects(); -int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6); -unsigned int __thiscall SearchAliveActors(unsigned int *pTotalActors); -unsigned int __fastcall SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID); -unsigned int __fastcall SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup); -unsigned int __fastcall SearchActorByID(unsigned int *pTotalActors, unsigned int a2); -void PrepareArcomage(); - -unsigned short TargetColor(unsigned __int16 r, unsigned __int16 g, unsigned __int16 b); // idb -void __cdecl CallRenderPresent(); -void __thiscall DoBlt_Copy(unsigned __int16 *pPixels); // idb -int __stdcall retzero_sub_40DFA7(int); // weak -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 sub_40F92A(int *pZBuffer, struct Texture *a2, int a3); // idb -void __cdecl SetMoonPhaseNames(); -signed int __fastcall sub_410D99_get_map_index(int a1); -void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer); -void SetAttributeNames(); -void uGameUIFontMain_initialize(); -void uGameUIFontShadow_initialize(); -void sub_41420D_press_esc(); -void sub_41426F(); -void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight); // idb -void DrawCopyrightWindow(); -void LoadFonts_and_DrawCopyrightWindow(); -void GUI_UpdateWindows(); -void identify_item(); -void __thiscall sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(struct Vec2_int_ *_this); -void UI_OnMouseLeftClick(int *pXY); // idb -void __thiscall sub_417871(int *pXY); -unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2); -signed int __thiscall GetConditionDrawColor(unsigned int uConditionIdx); // idb -void FillAwardsData(); -void CreateAwardsScrollBar(); -void sub_419379(); -unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels); -struct GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey); // idb -int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall); -void __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2); -bool UI_OnKeyDown(unsigned int vkKey); -void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb -void MonsterPopup_Draw(unsigned int uActorID, struct GUIWindow *edx0); -void __cdecl nullsub_3(); // idb -void __cdecl LoadActualSkyFrame(); -void __cdecl Sleep6Hours(); -void __cdecl 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 __cdecl GameUI_WritePointedObjectStatusString(); -//struct GUIWindow *__thiscall GetCastSpellInInventoryWindow(void *a4); -bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem(); -void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID); // idb -void OnInventoryLeftClick(); -void OnGameViewportClick(); -bool PauseGameDrawing(); -void SetUserInterface(enum PartyAlignment alignment, bool bReplace); -void __cdecl 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 _4268E3_smthn_to_a1r5g5b5(unsigned int uColor); // idb -int __fastcall _42690D_colors_cvt(unsigned int a1); -void __cdecl 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 __thiscall InitializeTurnBasedAnimations(void *); -signed int __cdecl sub_42F4DA(); -bool __fastcall sub_42F7EB_DropItemAt(unsigned int uSpriteID, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9); -void __fastcall sub_42F960_create_object(int x, int y, int z); // idb -void CompactLayingItemsList(); -signed int __fastcall _42FA66_do_explosive_impact(int a1, int a2, int a3, int a4, __int16 a5, signed int a6); -bool __fastcall sub_42FB5C(signed int a1); -// int __cdecl crt_sub_42FBB7(); -// void __cdecl crt_construct_50CDB4(); -void __cdecl sub_42FBDD(); -void __cdecl CloseWindowBackground(); -void __cdecl ProcessInputActions(); -void __cdecl GameUI_MsgProc(); -void __cdecl back_to_game(); -void __cdecl GUI_MainMenuMessageProc(); -double __cdecl get_shading_dist_mist(); -void Vec3_short__to_RenderVertexSoft(struct RenderVertexSoft *_this, struct Vec3_short_ *a2); -void __cdecl nullsub_4(); // idb -void __cdecl nullsub_5(); // idb -void __cdecl nullsub_6(); // idb -void __cdecl area_of_effect__damage_evaluate(); -void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, struct Vec3_int_ *pPos, unsigned int a4); -void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2); // idb -double __fastcall sub_43AE12(signed int a1); -int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4); -void __fastcall sub_43B057(unsigned int uObjID, unsigned int uActorID, struct Vec3_int_ *pVelocity); -void sub_43B1B0(signed int a1, unsigned int a2, struct Vec3_int_ *pVelocity, signed int a4); -int __stdcall DirectInputKeyboard_enumerator_43B9B9(int, int); // weak -void Software_ResetNewEdges(); -// int __cdecl crt_deconstruct_43B9E3(); -int __stdcall DirectInputMouse_enumerator(int, int); // weak -void CharacterUI_LoadPaperdollTextures(); -int __fastcall GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder); -bool _43ED6F_check_party_races(bool b); -bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this); -bool __fastcall Player_has_item(unsigned int uItemID, struct Player *pPlayer, char a3); -bool __fastcall sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(signed int a1); -void WetsuitOn(unsigned int uPlayerID); // idb -void WetsuitOff(unsigned int uPlayerID); -void __fastcall PrepareDrawLists_BLV(struct IndoorLocation_drawstru *_this); -void __cdecl FindBillboardsLightLevels_BLV(); -int __fastcall _43F55F_get_billboard_light_level(struct RenderBillboard *a1, int uBaseLightLevel); -int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z); -void PrepareBspRenderList_BLV(); -void __fastcall PrepareDecorationsRenderList_BLV(unsigned int uDecorationID, unsigned int uSectorID); -void PrepareActorRenderList_BLV(); -void PrepareItemsRenderList_BLV(); -void AddBspNodeToRenderList(unsigned int node_id); -void __fastcall sub_4406BC(unsigned int node_id, unsigned int uFirstNode); // idb -void __fastcall sub_440BED(struct IndoorLocation_drawstru *_this); -bool sub_44100D(); -__int16 __fastcall sub_441A4E(int a1); -void DrawBook_Map_sub(unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074); // idb -void Initialize2DA(); - -void LoadLevel_InitializeLevelStr(); - -void __cdecl OnMapLeave(); -void /*__usercall*/ OnMapLoad(); -void Level_LoadEvtAndStr(const char *pLevelName); -const char *__cdecl sub_444564(); -char *__thiscall GetEventHintString(unsigned int uEventID); // idb -int GetTravelTime(); -void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4); -void __cdecl sub_4452BB(); +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 __cdecl DialogueEnding(); +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 __cdecl crt_construct_5773C4(); +// 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); @@ -1240,7 +1076,7 @@ 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 __thiscall GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide); // idb +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 @@ -1248,10 +1084,10 @@ 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 __cdecl ShowNothingHereStatus(); -signed int __cdecl const_2(); -bool __cdecl sub_44C28F_open_nwc_dungeon(); -// int __cdecl crt_deconstruct_44C42C(); +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); @@ -1259,7 +1095,7 @@ int __fastcall _45063B_spawn_some_monster(struct MapInfo *a1, int a2); void RespawnGlobalDecorations(); bool __fastcall SpawnActor(unsigned int uMonsterID); -int __cdecl GetAlertStatus(); +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); @@ -1273,89 +1109,85 @@ *p++ = value; } inline void __fastcall j_memset32(int a2, void *a1, unsigned int a3) {memset32(a1, a2, a3);} -// int __cdecl crt_452B74(); -int __cdecl j_SetSomeItemsNames(); +// int crt_452B74(); +int j_SetSomeItemsNames(); int SkillToMastery(unsigned int skill_value); unsigned int __fastcall GetSpellColor(signed int a1); -void *__thiscall unknown_vdtor_6(void *_this, bool a2); +void * unknown_vdtor_6(void *_this, bool a2); unsigned short * MakeScreenshot(signed int width, signed int height); -void __thiscall SaveScreenshot(const char *pFilename); +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 __cdecl TryLoadLevelFromLOD(); -void __cdecl sub_46080D(); -bool __cdecl Initialize_GamesLOD_NewLOD(); +void TryLoadLevelFromLOD(); +void sub_46080D(); +bool Initialize_GamesLOD_NewLOD(); void SaveNewGame(); -void __thiscall PrepareToLoadBLV(unsigned int bLoading); +void PrepareToLoadBLV(unsigned int bLoading); void __fastcall PrepareToLoadODM(unsigned int bLoading, struct OutdoorCamera *a2); -void __cdecl sub_461103(); -int __cdecl sub_4613C4(); +void sub_461103(); +int sub_4613C4(); int int_get_vector_length(signed int x, signed int y, signed int z); -int __cdecl sub_46224A(); -int __cdecl crt_init_globals_462620(); -void __cdecl crt_init_globals_462659(); -void __cdecl crt_init_globals_46269B(); -void __cdecl crt_init_globals_46271C(); -void __cdecl MainMenu_Loop(); -char __cdecl sub_4637E0_is_there_popup_onscreen(); -void __cdecl ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows(); -void __thiscall PrepareWorld(unsigned int _this); -void __thiscall Game_DeinitializeAndTerminate(int exitCode); // idb -void __cdecl FinalInitialization(); -char __cdecl Is_out15odm_underwater(); -void __cdecl SetUnderwaterFog(); -void __fastcall DoPrepareWorld(unsigned int bLoading, int a2); +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 __cdecl SecondaryInitialization(); -void __cdecl CreateAsyncMouse(); -void __cdecl CreateAsyncKeyboard(); -void __cdecl MM6_Initialize(const wchar_t *pIniFilename); -void __cdecl MM7Initialization(); -int __cdecl AbortWithError(); +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 *__thiscall output_debug_string(void *_this, std::string a2, const char *a3, int a4); +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 __cdecl free_book_subwindow(); +void free_book_subwindow(); void CreateScrollWindow(); -void __cdecl OnPaperdollLeftClick(); +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 __cdecl sub_46A99B(); -void *__thiscall unknown_libname_8(void *_this, char a2); -unsigned int __cdecl GetGravityStrength(); -void __cdecl UpdateUserInput_and_MapSpecificStuff(); -void __cdecl BLV_UpdateUserInputAndOther(); -void __cdecl ODM_UpdateUserInputAndOther(); +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 __cdecl check_event_triggers(); +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 __cdecl _46E0B2_collide_against_decorations(); +void _46E0B2_collide_against_decorations(); void __fastcall _46E26D_collide_against_sprites(signed int a1, signed int a2); -int __thiscall _46E44E_collide_against_faces_and_portals(unsigned int b1); // idb +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 __thiscall _46EF01_collision_chech_player(int a1); // idb -signed int __cdecl _46F04E_collide_against_portals(); +int _46EF01_collision_chech_player(int a1); // idb +signed int _46F04E_collide_against_portals(); void BLV_UpdateDoors(); void UpdateActors_BLV(); void UpdateActors_ODM(); @@ -1363,19 +1195,19 @@ 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, BLVFace *a9, int a10); -bool __fastcall sub_4754BF(int a1, int *a2, int a3, int a4, int a5, int a6, int a7, int a8, BLVFace *a9, int a10, int a11); -signed int __thiscall sub_475665(BLVFace *_this, int a2, __int16 a3); -bool __fastcall sub_4759C9(BLVFace *a1, int a2, int a3, __int16 a4); -bool __fastcall sub_475D85(Vec3_int_ *a1, Vec3_int_ *a2, int *a3, BLVFace *a4); -bool __fastcall sub_475F30(int *a1, BLVFace *a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9); +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 __cdecl GetPartyReputation(); -void __cdecl sub_4783FA_construct_global_73D150(); -void __cdecl loc_4789D4(); // idb -void __cdecl loc_47907F(); // idb +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 __thiscall ODM_LoadAndInitialize(const char *pLevelFilename, struct OutdoorCamera *thisa); +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); @@ -1383,25 +1215,25 @@ unsigned int WorldPosToGridCellZ(int); // weak int __stdcall GridCellToWorldPosX(int); // weak int __stdcall GridCellToWorldPosZ(int); // weak -void __cdecl loc_48118F(); // idb -void __cdecl loc_481199(); // idb +void loc_48118F(); // idb +void loc_481199(); // idb void ResetPolygons(); -void __cdecl sub_481ED9_MessWithOutdoorCamera(); +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 __cdecl const_1_0(); -void __cdecl sub_487DA9(); -double __thiscall GetFogDensityByTime(struct OutdoorLocation *_this); -int __stdcall loc_489BB3(struct stru320 *a2, int thisa, unsigned int uNumVertices, RenderVertexSoft *a5, float a6, char uClipFlag); // weak +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 __cdecl PlayerCreation_Chose4Skills(); -signed int __cdecl PlayerCreation_GetUnspentAttributePointCount(); +signed int PlayerCreation_Chose4Skills(); +signed int PlayerCreation_GetUnspentAttributePointCount(); void LoadPlayerPortraintsAndVoices(); int __fastcall ReloadPlayerPortraits(int, int); // weak void sub_491E3A(); -signed int __thiscall CycleCharacter(unsigned int _this); +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); @@ -1425,26 +1257,26 @@ 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(RenderVertexSoft *a1); +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 __cdecl PlayLevelMusic(); +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 __thiscall sub_4B1523(int *_this); -void __cdecl ShowPopupShopItem(); +void sub_4B1523(int *_this); +void ShowPopupShopItem(); void __stdcall RestAndHeal(__int64 uNumMinutes); // idb -void __cdecl GetHouseGoodbyeSpeech(); +void GetHouseGoodbyeSpeech(); -void __cdecl sub_4B1ECE(); +void sub_4B1ECE(); void __fastcall ClickNPCTopic(signed int uMessageParam); -char *__thiscall _4B254D_SkillMasteryTeacher(int _this); +char * _4B254D_SkillMasteryTeacher(int _this); const char * ContractSelectText(int pEventCode); void SimpleHouseAndBoatsDialog(); void CreateButtonInColumn(int a1, unsigned int a2); void FillAviableSkillsToTeach(int _this); -void __cdecl sub_4B3E1E(); +void sub_4B3E1E(); void DrawJoinGuildWindow(int pEventCode); void __fastcall sub_4B3FE5(int a4); void NPCHireableDialogPrepare(); @@ -1453,24 +1285,147 @@ int __fastcall sub_4B46F8(int a1); const char *sub_4BBA85_bounties(); -void __cdecl sub_4BBCDD(); +void sub_4BBCDD(); void __fastcall _4BBF61_summon_actor(int a1, __int16 x, int y, int z); // idb -void __cdecl ArenaFight(); +void ArenaFight(); void SpellBookGenerator(); void UI_CreateEndConversationButton(); void __fastcall OnSelectShopDialogueOption(signed int uMessageParam); -signed int __cdecl sub_4BD8B5(); +signed int sub_4BD8B5(); bool __fastcall MerchandiseTest(ItemGen *item, int _2da_idx); -void __cdecl UIShop_Buy_Identify_Repair(); +void UIShop_Buy_Identify_Repair(); -void __cdecl ShowIntroVideo_and_LoadingScreen(); -unsigned int __thiscall GameOverMenu(void *ecx0); -bool __thiscall BinkLockBuffer(struct _BINKBUF *_this); -void __thiscall BinkUnlockBuffer(struct _BINKBUF *_this); +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 DamageMonsterFromParty(signed int a1, unsigned int uActorID_Monster, struct Vec3_int_ *pVelocity); +void MakeActorAIList_ODM(); +int MakeActorAIList_BLV(); +void UpdateActorAI(); +bool __fastcall sub_4070EF_prolly_collide_objects(unsigned int uObjID, unsigned int uObj2ID); +bool __fastcall sub_4075DB(int a1, int a2, int a3, struct BLVFace *a4); +bool __fastcall sub_4077F1(int a1, int a2, int a3, struct ODMFace *a4, struct BSPVertexBuffer *a5); +bool __fastcall sub_407A1C(int x, int z, int y, struct Vec3_int_ v); // idb +void InitializeActors(); +void InitializeSpriteObjects(); +int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6); +unsigned int SearchAliveActors(unsigned int *pTotalActors); +unsigned int SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID); +unsigned int SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup); +unsigned int SearchActorByID(unsigned int *pTotalActors, unsigned int a2); +void PrepareArcomage(); +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 +void SetMoonPhaseNames(); +int __fastcall sub_410D99_get_map_index(int a1); +void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer); +void SetAttributeNames(); +void uGameUIFontMain_initialize(); +void uGameUIFontShadow_initialize(); +void identify_item(); +void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(struct Vec2_int_ *_this); +void UI_OnMouseLeftClick(int *pXY); // idb +unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2); +unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels); +struct GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey); // idb +int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall); +void __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2); +bool UI_OnKeyDown(unsigned int vkKey); +void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb +void MonsterPopup_Draw(unsigned int uActorID, struct GUIWindow *edx0); +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(); +void OnGameViewportClick(); +bool PauseGameDrawing(); +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 _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(); +bool __fastcall sub_42F7EB_DropItemAt(unsigned int uSpriteID, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9); +void __fastcall sub_42F960_create_object(int x, int y, int z); // idb +void CompactLayingItemsList(); +int __fastcall _42FA66_do_explosive_impact(int a1, int a2, int a3, int a4, __int16 a5, signed int a6); +bool _42FB5C_check_spell(signed int a1); +void sub_42FBDD(); +void CloseWindowBackground(); +void ProcessInputActions(); +void GameUI_MsgProc(); +void back_to_game(); +void GUI_MainMenuMessageProc(); +double get_shading_dist_mist(); +void Vec3_short__to_RenderVertexSoft(struct RenderVertexSoft *_this, struct Vec3_short_ *a2); +void area_of_effect__damage_evaluate(); +void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, struct Vec3_int_ *pPos, unsigned int a4); +void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2); // idb +double __fastcall sub_43AE12(signed int a1); +int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4); +void __fastcall sub_43B057(unsigned int uObjID, unsigned int uActorID, struct Vec3_int_ *pVelocity); +void sub_43B1B0(signed int a1, unsigned int a2, struct Vec3_int_ *pVelocity, signed int a4); +void Software_ResetNewEdges(); +void CharacterUI_LoadPaperdollTextures(); +int __fastcall GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder); +bool _43ED6F_check_party_races(bool b); +bool sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this); +bool __fastcall Player_has_item(unsigned int uItemID, struct Player *pPlayer, char a3); +bool __fastcall sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(signed int a1); +void WetsuitOn(unsigned int uPlayerID); // idb +void WetsuitOff(unsigned int uPlayerID); +void __fastcall PrepareDrawLists_BLV(struct IndoorLocation_drawstru *_this); +void FindBillboardsLightLevels_BLV(); +int __fastcall _43F55F_get_billboard_light_level(struct RenderBillboard *a1, int uBaseLightLevel); +int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z); +void PrepareBspRenderList_BLV(); +void __fastcall PrepareDecorationsRenderList_BLV(unsigned int uDecorationID, unsigned int uSectorID); +void PrepareActorRenderList_BLV(); +void PrepareItemsRenderList_BLV(); +void AddBspNodeToRenderList(unsigned int node_id); +void __fastcall sub_4406BC(unsigned int node_id, unsigned int uFirstNode); // idb +void __fastcall sub_440BED(struct IndoorLocation_drawstru *_this); +bool sub_44100D(); +__int16 __fastcall sub_441A4E(int a1); +void DrawBook_Map_sub(unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074); // idb +void Initialize2DA(); +void LoadLevel_InitializeLevelStr(); +void OnMapLeave(); +void OnMapLoad(); +void Level_LoadEvtAndStr(const char *pLevelName); +const char *sub_444564(); +char *GetEventHintString(unsigned int uEventID); // idb +int GetTravelTime(); +void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4); #define ErrD3D(hr) do {extern void ErrHR(HRESULT, const char *, const char *, const char *, int); ErrHR(hr, "Direct3D", __FUNCTION__, __FILE__, __LINE__);} while(0)