# HG changeset patch # User Grumpy7 # Date 1397072707 -7200 # Node ID 7c10dfb6d802bf29432435c5469c46fb6b3412ef # Parent 7ebc07cd6c537af0c2497e408dddb0039daade1c Finishing moving all known UI functions to their appropriate headers diff -r 7ebc07cd6c53 -r 7c10dfb6d802 Build/Visual Studio 2012/World of Might and Magic.vcxproj --- a/Build/Visual Studio 2012/World of Might and Magic.vcxproj Wed Apr 09 21:30:45 2014 +0200 +++ b/Build/Visual Studio 2012/World of Might and Magic.vcxproj Wed Apr 09 21:45:07 2014 +0200 @@ -271,6 +271,7 @@ + diff -r 7ebc07cd6c53 -r 7c10dfb6d802 CastSpellInfo.cpp --- a/CastSpellInfo.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/CastSpellInfo.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -27,6 +27,7 @@ #include "LOD.h" #include "Level/Decoration.h" #include "mm7_unsorted_subs.h" +#include "UI\UIPartyCreation.h" const size_t CastSpellInfoCount = 10; std::array pCastSpellInfo; diff -r 7ebc07cd6c53 -r 7c10dfb6d802 GUIButton.h --- a/GUIButton.h Wed Apr 09 21:30:45 2014 +0200 +++ b/GUIButton.h Wed Apr 09 21:45:07 2014 +0200 @@ -1,2 +1,3 @@ -void CreateButtonInColumn(int a1, unsigned int a2); \ No newline at end of file +void CreateButtonInColumn(int a1, unsigned int a2); +void UI_CreateEndConversationButton(); \ No newline at end of file diff -r 7ebc07cd6c53 -r 7c10dfb6d802 GUIWindow.h --- a/GUIWindow.h Wed Apr 09 21:30:45 2014 +0200 +++ b/GUIWindow.h Wed Apr 09 21:45:07 2014 +0200 @@ -613,6 +613,8 @@ void free_book_subwindow(); void CreateScrollWindow(); void OnPaperdollLeftClick(); +void DrawJoinGuildWindow(int pEventCode); +void DialogueEnding(); void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue); diff -r 7ebc07cd6c53 -r 7c10dfb6d802 Game.cpp --- a/Game.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/Game.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -44,6 +44,8 @@ #include "Level/Decoration.h" #include "PaletteManager.h" #include "UI\UIHouses.h" +#include "UI\UIShops.h" +#include "UI\UIPartyCreation.h" #include "SaveLoad.h" #include "SpriteObject.h" #include "mm7.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 Player.cpp --- a/Player.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/Player.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -33,6 +33,7 @@ #include "DecalBuilder.h" #include "CastSpellInfo.h" #include "OurMath.h" +#include "UI\UIPartyCreation.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 SpriteObject.cpp --- a/SpriteObject.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/SpriteObject.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -1,4 +1,5 @@ #define _CRT_SECURE_NO_WARNINGS +#include "Sprites.h" #include "BSPModel.h" #include "SpriteObject.h" #include "Party.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 Sprites.h --- a/Sprites.h Wed Apr 09 21:30:45 2014 +0200 +++ b/Sprites.h Wed Apr 09 21:45:07 2014 +0200 @@ -82,6 +82,7 @@ +void __fastcall _46E26D_collide_against_sprites(signed int a1, signed int a2); extern struct SpriteFrameTable *pSpriteFrameTable; \ No newline at end of file diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIGuilds.h --- a/UI/UIGuilds.h Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIGuilds.h Wed Apr 09 21:45:07 2014 +0200 @@ -0,0 +1,2 @@ + +void SpellBookGenerator(); \ No newline at end of file diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIHouses.cpp --- a/UI/UIHouses.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIHouses.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -1,4 +1,7 @@ #define _CRT_SECURE_NO_WARNINGS +#include "UIGuilds.h" +#include "UIPartyCreation.h" +#include "UIShops.h" #include "..\GUIButton.h" #include "..\mm7_unsorted_subs.h" #include "..\SaveLoad.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIHouses.h --- a/UI/UIHouses.h Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIHouses.h Wed Apr 09 21:45:07 2014 +0200 @@ -134,6 +134,9 @@ void AlchemistDialog(); void ArmorShopDialog(); void SimpleHouseDialog(); +void __fastcall OnSelectShopDialogueOption(signed int uMessageParam); +void PrepareHouse(enum HOUSE_ID house); // idb +bool EnterHouse(enum HOUSE_ID uHouseID); void InitializaDialogueOptions_Tavern(BuildingType type); // idb diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIPartyCreation.cpp --- a/UI/UIPartyCreation.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIPartyCreation.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -1,4 +1,5 @@ #define _CRT_SECURE_NO_WARNINGS +#include "UIPartyCreation.h" #include "..\mm7_unsorted_subs.h" #include "..\Mouse.h" #include "..\Keyboard.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIPartyCreation.h --- a/UI/UIPartyCreation.h Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIPartyCreation.h Wed Apr 09 21:45:07 2014 +0200 @@ -0,0 +1,8 @@ + +bool PlayerCreation_Choose4Skills(); +void LoadPlayerPortraintsAndVoices(); +void ReloadPlayerPortraits(int player_id, int face_id); +void PlayerCreationUI_Draw(); +void PlayerCreationUI_Initialize(); +void DeleteCCharFont(); +bool PlayerCreationUI_Loop(); diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIPopup.cpp --- a/UI/UIPopup.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIPopup.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -1,5 +1,6 @@ #define _CRT_SECURE_NO_WARNINGS #include "Books\UIMapBook.h" +#include "UIShops.h" #include "..\MM7.h" #include "..\mm7_unsorted_subs.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIShops.cpp --- a/UI/UIShops.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIShops.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -1,4 +1,5 @@ #define _CRT_SECURE_NO_WARNINGS +#include "UIShops.h" #include "..\mm7_unsorted_subs.h" #include "..\Items.h" #include "..\GUIWindow.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 UI/UIShops.h --- a/UI/UIShops.h Wed Apr 09 21:30:45 2014 +0200 +++ b/UI/UIShops.h Wed Apr 09 21:45:07 2014 +0200 @@ -0,0 +1,5 @@ + +void UIShop_Buy_Identify_Repair(); +void sub_4B1523_showSpellbookInfo(int spellItemId); +void ShowPopupShopItem(); +void GetHouseGoodbyeSpeech(); diff -r 7ebc07cd6c53 -r 7c10dfb6d802 mm7_2.cpp --- a/mm7_2.cpp Wed Apr 09 21:30:45 2014 +0200 +++ b/mm7_2.cpp Wed Apr 09 21:45:07 2014 +0200 @@ -2,6 +2,8 @@ #include #include #include "mm7_unsorted_subs.h" +#include "UI\UIPartyCreation.h" +#include "GUIButton.h" #include "mm7_data.h" diff -r 7ebc07cd6c53 -r 7c10dfb6d802 mm7_unsorted_subs.h --- a/mm7_unsorted_subs.h Wed Apr 09 21:30:45 2014 +0200 +++ b/mm7_unsorted_subs.h Wed Apr 09 21:45:07 2014 +0200 @@ -60,18 +60,13 @@ void OracleDialogue(); const char * _4B254D_SkillMasteryTeacher(int trainerInfo); void sub_4B3E1E(); -void DrawJoinGuildWindow(int pEventCode); void _4B3FE5_training_dialogue(int a4); void __fastcall DrawTextAtStatusBar(const char *Str, int a5); __int64 GetExperienceRequiredForLevel(int a1); void CheckBountyRespawnAndAward(); void Arena_SelectionFightLevel(); void ArenaFight(); -void SpellBookGenerator(); -void UI_CreateEndConversationButton(); -void __fastcall OnSelectShopDialogueOption(signed int uMessageParam); int HouseDialogPressCloseBtn(); -void UIShop_Buy_Identify_Repair(); bool __fastcall IsBModelVisible(unsigned int uModelID, int *unused); void ODM_LoadAndInitialize(const char *pLevelFilename, struct ODMRenderParams *thisa); unsigned int GetLevelFogColor(); @@ -86,9 +81,6 @@ int __fastcall GetTerrainHeightsAroundParty2(int a1, int a2, int *a3, int a4); void sub_487DA9(); double GetFogDensityByTime(struct OutdoorLocation *_this); -bool PlayerCreation_Choose4Skills(); -void LoadPlayerPortraintsAndVoices(); -void ReloadPlayerPortraits(int player_id, int face_id); void sub_491E3A(); void _493938_regenerate(); void init_summoned_item(struct stru351_summoned_item *_this, __int64 duration); @@ -96,21 +88,13 @@ unsigned int __fastcall _494820_training_time(unsigned int a1); const char *GetReputationString(signed int a1); char *BuildDialogueString(const 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); void sub_4B1447_party_fine(int shopId, int stealingResult, int fineToAdd); -void sub_4B1523_showSpellbookInfo(int spellItemId); -void ShowPopupShopItem(); -void GetHouseGoodbyeSpeech(); unsigned int GetGravityStrength(); void UpdateUserInput_and_MapSpecificStuff(); bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2); unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID); 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 @@ -126,9 +110,6 @@ 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(); -void DialogueEnding(); -void PrepareHouse(enum HOUSE_ID house); // idb -bool EnterHouse(enum HOUSE_ID uHouseID); bool sub_4465DF_check_season(int a1); void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename); void __fastcall SetDecorationSprite(uint16_t uCog, bool bHide, const char *pFileName); // idb