changeset 2339:63e1388c5463

Moving functions from unsorted_subs.h pt3
author Grumpy7
date Sun, 06 Apr 2014 12:37:28 +0200
parents 1e865e8690ba
children dc822157c98d
files Arcomage.cpp Arcomage.h GUIFont.h GUIWindow.cpp GUIWindow.h Game.cpp Mouse.cpp Mouse.h OSWindow.cpp mm7_unsorted_subs.h texts.h
diffstat 11 files changed, 29 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/Arcomage.cpp	Sat Apr 05 20:27:09 2014 +0200
+++ b/Arcomage.cpp	Sun Apr 06 12:37:28 2014 +0200
@@ -3557,7 +3557,7 @@
 }
 
 //----- (00409C8B) --------------------------------------------------------
-void PrepareArcomage()
+void ArcomageGame::PrepareArcomage()
 {
 //  signed __int64 v1; // qax@4
   int v2; // esi@4
--- a/Arcomage.h	Sat Apr 05 20:27:09 2014 +0200
+++ b/Arcomage.h	Sun Apr 06 12:37:28 2014 +0200
@@ -143,6 +143,8 @@
   static void OnMouseClick(char right_left, bool bDown);
   static void OnMouseMove(int x, int y);
   static void GetCardRect(unsigned int uCardID, RECT *pCardRect);
+  static void PrepareArcomage();
+  static void DoBlt_Copy(unsigned __int16 *pPixels); // idb
 
   static void Loop();
 
--- a/GUIFont.h	Sat Apr 05 20:27:09 2014 +0200
+++ b/GUIFont.h	Sun Apr 06 12:37:28 2014 +0200
@@ -32,6 +32,8 @@
                                         unsigned __int16 *pPixels, unsigned int uPixelsWidth);
 
   static char * FitTwoFontStringINWindow(const char *pString, GUIFont *pFontMain, GUIFont *pFontSecond, GUIWindow* pWindow, int startPixlOff, int a6);
+  static void uGameUIFontMain_initialize();
+  static void uGameUIFontShadow_initialize();
 
   unsigned char cFirstChar;  //0
   unsigned char cLastChar;  //1
--- a/GUIWindow.cpp	Sat Apr 05 20:27:09 2014 +0200
+++ b/GUIWindow.cpp	Sun Apr 06 12:37:28 2014 +0200
@@ -1738,7 +1738,7 @@
   ItemGen ItemGen2; // [sp+E4h] [bp-24h]@129
 
   if (GetCurrentMenuID() != MENU_CREATEPARTY)
-    UI_OnKeyDown(VK_NEXT);
+    Mouse::UI_OnKeyDown(VK_NEXT);
 
   for ( i = 1; i <= uNumVisibleWindows; ++i )
   {
--- a/GUIWindow.h	Sat Apr 05 20:27:09 2014 +0200
+++ b/GUIWindow.h	Sun Apr 06 12:37:28 2014 +0200
@@ -599,8 +599,18 @@
 void FillAwardsData();
 void CreateAwardsScrollBar();
 void ReleaseAwardsScrollBar();
+void Inventory_ItemPopupAndAlchemy();
+void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer);
+unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(signed int current_pos, signed int base_pos);
+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 DrawBuff_remaining_time_string(int uY, struct GUIWindow *window, __int64 remaining_time, struct GUIFont *Font);
 
 
+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
 
 
 
--- a/Game.cpp	Sat Apr 05 20:27:09 2014 +0200
+++ b/Game.cpp	Sun Apr 06 12:37:28 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "Arcomage.h"
 #include "mm7_unsorted_subs.h"
 #include "Vis.h"
 #include "Weather.h"
@@ -1344,7 +1345,7 @@
         case UIMSG_PlayArcomage:
           pVideoPlayer->_4BF5B2();
           pArcomageGame->bGameInProgress = 1;
-          PrepareArcomage();
+          ArcomageGame::PrepareArcomage();
           continue;
         case UIMSG_StartNPCDialogue:
           if ( !uActiveCharacter )
--- a/Mouse.cpp	Sat Apr 05 20:27:09 2014 +0200
+++ b/Mouse.cpp	Sun Apr 06 12:37:28 2014 +0200
@@ -430,7 +430,7 @@
   uMouseClickY = y;
 }
 //----- (004175C0) --------------------------------------------------------
-void UI_OnMouseLeftClick(int *pXY)
+void Mouse::UI_OnMouseLeftClick(int *pXY)
 {
   signed int y; // eax@7
   signed int x; // ecx@7
@@ -560,7 +560,7 @@
 
 
 //----- (0041CD4F) --------------------------------------------------------
-bool UI_OnKeyDown(unsigned int vkKey)
+bool Mouse::UI_OnKeyDown(unsigned int vkKey)
 {
   //unsigned int v1; // edi@1
   //unsigned int v2; // eax@2
--- a/Mouse.h	Sat Apr 05 20:27:09 2014 +0200
+++ b/Mouse.h	Sun Apr 06 12:37:28 2014 +0200
@@ -80,6 +80,9 @@
   void ChangeActivation(int a1);
   void SetMouseClick(int x, int y);
 
+  static void UI_OnMouseLeftClick(int *pXY); // idb
+  static bool UI_OnKeyDown(unsigned int vkKey);
+
 
   unsigned int uPointingObjectID;
   unsigned int bActive;
--- a/OSWindow.cpp	Sat Apr 05 20:27:09 2014 +0200
+++ b/OSWindow.cpp	Sun Apr 06 12:37:28 2014 +0200
@@ -45,12 +45,12 @@
   pMouse->SetMouseClick(x, y);
 
   if (GetCurrentMenuID() == MENU_CREATEPARTY)
-    UI_OnKeyDown(VK_SELECT);
+    Mouse::UI_OnKeyDown(VK_SELECT);
 
   if (pGame)
     pGame->PickMouse(512.0, x, y, false, &vis_sprite_filter_3, &vis_door_filter);
 
-  UI_OnMouseLeftClick(0);
+  Mouse::UI_OnMouseLeftClick(0);
   return true;
 }
 
@@ -225,7 +225,7 @@
         if ( wparam == VK_RETURN )
         {
           if ( !viewparams->field_4C )
-            UI_OnKeyDown(wparam);
+            Mouse::UI_OnKeyDown(wparam);
           return 0;
         }
         if (wparam == VK_CONTROL)
@@ -254,7 +254,7 @@
           if ( pCurrentScreen != SCREEN_GAME && pCurrentScreen != SCREEN_MODAL_WINDOW )
           {
             if ( !viewparams->field_4C )
-              UI_OnKeyDown(wparam);
+              Mouse::UI_OnKeyDown(wparam);
             return 0;
           }
         }
--- a/mm7_unsorted_subs.h	Sat Apr 05 20:27:09 2014 +0200
+++ b/mm7_unsorted_subs.h	Sun Apr 06 12:37:28 2014 +0200
@@ -19,24 +19,6 @@
 bool __fastcall sub_4077F1(int a1, int a2, int a3, struct ODMFace *face, struct BSPVertexBuffer *a5);
 bool __fastcall sub_407A1C(int x, int z, int y, struct Vec3_int_ v); // idb
 int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6);
-void PrepareArcomage();
-void DoBlt_Copy(unsigned __int16 *pPixels); // idb
-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();
-void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer);
-void SetAttributeNames();
-void uGameUIFontMain_initialize();
-void uGameUIFontShadow_initialize();
-void Inventory_ItemPopupAndAlchemy();
-void UI_OnMouseLeftClick(int *pXY); // idb
-unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(signed int current_pos, signed int base_pos);
-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 DrawBuff_remaining_time_string(int uY, struct GUIWindow *window, __int64 remaining_time, struct GUIFont *Font);
-bool UI_OnKeyDown(unsigned int vkKey);
 void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb
 void MonsterPopup_Draw(unsigned int uActorID, struct GUIWindow *window);
 void LoadActualSkyFrame();
--- a/texts.h	Sat Apr 05 20:27:09 2014 +0200
+++ b/texts.h	Sun Apr 06 12:37:28 2014 +0200
@@ -9,6 +9,8 @@
 void  SetSomeItemsNames();
 char *RemoveQuotes(char *Str);
 void  InitializeGameText();
+void SetMoonPhaseNames();
+void SetAttributeNames();
 
 struct ci_less : std::binary_function<std::string, std::string, bool>   //case insensitive comparator for dictionaries
 {