changeset 2350:7c10dfb6d802

Finishing moving all known UI functions to their appropriate headers
author Grumpy7
date Wed, 09 Apr 2014 21:45:07 +0200
parents 7ebc07cd6c53
children 12a935783629
files Build/Visual Studio 2012/World of Might and Magic.vcxproj CastSpellInfo.cpp GUIButton.h GUIWindow.h Game.cpp Player.cpp SpriteObject.cpp Sprites.h UI/UIGuilds.h UI/UIHouses.cpp UI/UIHouses.h UI/UIPartyCreation.cpp UI/UIPartyCreation.h UI/UIPopup.cpp UI/UIShops.cpp UI/UIShops.h mm7_2.cpp mm7_unsorted_subs.h
diffstat 18 files changed, 37 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
     <ClInclude Include="..\..\FrameTableInc.h" />
     <ClInclude Include="..\..\Game.h" />
     <ClInclude Include="..\..\GammaControl.h" />
+    <ClInclude Include="..\..\GUIButton.h" />
     <ClInclude Include="..\..\GUIFont.h" />
     <ClInclude Include="..\..\GUIProgressBar.h" />
     <ClInclude Include="..\..\GUIWindow.h" />
--- 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<CastSpellInfo, CastSpellInfoCount> pCastSpellInfo;
--- 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
--- 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);
--- 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"
--- 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"
 
 
 
--- 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"
--- 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
--- 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
--- 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"
--- 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
--- 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"
--- 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();
--- 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"
 
--- 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"
--- 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();
--- 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 <io.h>
 #include <direct.h>
 #include "mm7_unsorted_subs.h"
+#include "UI\UIPartyCreation.h"
+#include "GUIButton.h"
 
 
 #include "mm7_data.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