comparison mm7_1.cpp @ 832:dfd683c4f538

Hotkeys fixed Moved GUIButton.h to GUIWindow.h
author Nomad
date Wed, 27 Mar 2013 19:50:37 +0200
parents c232f160e6f3
children ceef50611567 710cf848ad24
comparison
equal deleted inserted replaced
831:9c3f28b31b4a 832:dfd683c4f538
10 #include "MM7.h" 10 #include "MM7.h"
11 #include "MapInfo.h" 11 #include "MapInfo.h"
12 #include "Game.h" 12 #include "Game.h"
13 #include "GUIWindow.h" 13 #include "GUIWindow.h"
14 #include "GUIFont.h" 14 #include "GUIFont.h"
15 #include "GUIButton.h"
16 #include "GUIProgressBar.h" 15 #include "GUIProgressBar.h"
17 #include "Party.h" 16 #include "Party.h"
18 #include "AudioPlayer.h" 17 #include "AudioPlayer.h"
19 #include "Outdoor.h" 18 #include "Outdoor.h"
20 #include "IndoorCamera.h" 19 #include "IndoorCamera.h"
90 pAllocator->FreeChunk(i); 89 pAllocator->FreeChunk(i);
91 } 90 }
92 } 91 }
93 for ( j = pGUIWindow_CurrentMenu->pControlsHead; j; j = j->pNext ) 92 for ( j = pGUIWindow_CurrentMenu->pControlsHead; j; j = j->pNext )
94 { 93 {
95 if ( j->uControlID == 120 ) 94 if ( j->msg == UIMSG_InventoryLeftClick)
96 { 95 {
97 j->uX = dword_50698C; 96 j->uX = dword_50698C;
98 j->uY = dword_506988; 97 j->uY = dword_506988;
99 j->uZ = dword_506984; 98 j->uZ = dword_506984;
100 j->uW = dword_506980; 99 j->uW = dword_506980;
101 pGUIWindow_CurrentMenu->_41D08F(1, 0, 0, 0); 100 pGUIWindow_CurrentMenu->_41D08F(1, 0, 0, 0);
102 } 101 }
103 } 102 }
104 } 103 }
105 } 104 }
106 // 506980: using guessed type int dword_506980;
107 // 506984: using guessed type int dword_506984;
108 // 506988: using guessed type int dword_506988;
109 // 50698C: using guessed type int dword_50698C;
110 // 507CC0: using guessed type int dword_507CC0;
111 // 50651C: using guessed type int dword_50651C;
112 // 506520: using guessed type int dword_506520;
113 // 506524: using guessed type int dword_506524;
114 // 506528: using guessed type int dword_506528;
115 // 506544: using guessed type int dword_506544;
116 // 506548: using guessed type int dword_506548;
117 // 723E80: using guessed type int dword_723E80_award_related[];
118 // 723E84: using guessed type int dword_723E84[];
119 // 5075E0: using guessed type int pVisibleWindowsIdxs[20];
120 105
121 //----- (0041CD4F) -------------------------------------------------------- 106 //----- (0041CD4F) --------------------------------------------------------
122 bool __thiscall sub_41CD4F(unsigned int _this) 107 bool __thiscall sub_41CD4F(unsigned int _this)
123 { 108 {
124 unsigned int v1; // edi@1 109 unsigned int v1; // edi@1
129 int v6; // edx@12 114 int v6; // edx@12
130 int v7; // ecx@20 115 int v7; // ecx@20
131 char v8; // zf@21 116 char v8; // zf@21
132 GUIButton *v9; // ecx@24 117 GUIButton *v9; // ecx@24
133 int v10; // esi@24 118 int v10; // esi@24
134 int v11; // edx@26 119 //int v11; // edx@26
135 int v12; // edx@28 120 int v12; // edx@28
136 int v13; // esi@32 121 int v13; // esi@32
137 GUIButton *v14; // eax@37 122 GUIButton *v14; // eax@37
138 int v15; // edx@38 123 int v15; // edx@38
139 int v17; // ecx@50 124 int v17; // ecx@50
140 int v18; // edx@50 125 int v18; // edx@50
141 GUIButton *v19; // ecx@54 126 GUIButton *v19; // ecx@54
142 int v20; // esi@54 127 int v20; // esi@54
143 int v21; // edx@56 128 //int v21; // edx@56
144 int v22; // ecx@59 129 int v22; // ecx@59
145 int v23; // edx@59 130 int v23; // edx@59
146 int v24; // ecx@60 131 int v24; // ecx@60
147 int v25; // esi@63 132 int v25; // esi@63
148 unsigned int v26; // [sp+Ch] [bp-14h]@1 133 unsigned int v26; // [sp+Ch] [bp-14h]@1
191 v9 = v9->pNext; 176 v9 = v9->pNext;
192 --v13; 177 --v13;
193 } 178 }
194 while ( v13 ); 179 while ( v13 );
195 } 180 }
196 v11 = v9->uControlParam; 181
197 /*if ( (signed int)v2 < 40 ) 182 pMessageQueue_50CBD0->AddMessage(v9->msg, v9->msg_param, v1);
198 {
199 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v9->uControlID;
200 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v11;
201 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1;
202 v2 = pMessageQueue_50CBD0->uNumMessages + 1;
203 ++pMessageQueue_50CBD0->uNumMessages;
204 }*/
205 pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1);
206 break; 183 break;
207 } 184 }
208 case VK_RIGHT: 185 case VK_RIGHT:
209 { 186 {
210 v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34; 187 v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34;
231 v9 = v9->pNext; 208 v9 = v9->pNext;
232 --v10; 209 --v10;
233 } 210 }
234 while ( v10 ); 211 while ( v10 );
235 } 212 }
236 v11 = v9->uControlParam; 213 pMessageQueue_50CBD0->AddMessage(v9->msg, v9->msg_param, v1);
237 pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1);
238 break; 214 break;
239 } 215 }
240 case VK_DOWN: 216 case VK_DOWN:
241 { 217 {
242 v17 = pWindowList[v3].pStartingPosActiveItem; 218 v17 = pWindowList[v3].pStartingPosActiveItem;
256 v19 = v19->pNext; 232 v19 = v19->pNext;
257 --v20; 233 --v20;
258 } 234 }
259 while ( v20 ); 235 while ( v20 );
260 } 236 }
261 v21 = v19->uControlParam; 237 pMessageQueue_50CBD0->AddMessage(v19->msg, v19->msg_param, v1);
262 pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1);
263 return 1; 238 return 1;
264 } 239 }
265 case VK_SELECT: 240 case VK_SELECT:
266 { 241 {
267 pMouse->GetClickPos(&uClickX, &uClickY); 242 pMouse->GetClickPos(&uClickX, &uClickY);
325 v19 = v19->pNext; 300 v19 = v19->pNext;
326 --v25; 301 --v25;
327 } 302 }
328 while ( v25 ); 303 while ( v25 );
329 } 304 }
330 v21 = v19->uControlParam; 305
331 /*if ( (signed int)v2 < 40 ) 306 pMessageQueue_50CBD0->AddMessage(v19->msg, v19->msg_param, v1);
332 {
333 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v19->uControlID;
334 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v21;
335 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1;
336 ++pMessageQueue_50CBD0->uNumMessages;
337 }*/
338 pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1);
339 return 1; 307 return 1;
340 } 308 }
341 case VK_NEXT: 309 case VK_NEXT:
342 { 310 {
343 if ( pWindowList[v3].field_30 != v1 ) 311 if ( pWindowList[v3].field_30 != v1 )
727 318u, 695 318u,
728 75u, 696 75u,
729 33u, 697 33u,
730 1, 698 1,
731 0, 699 0,
732 0xA8u, 700 UIMSG_A8,
733 0, 701 0,
734 0, 702 0,
735 pGlobalTXT_LocalizationStrings[79], // Close 703 pGlobalTXT_LocalizationStrings[79], // Close
736 (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0), 704 (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0),
737 papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0, 705 papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0,
738 0); 706 0);
739 v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, 0x78u, 0, 0, "", 0); 707 v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
740 pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, 0x85u, 0, 0, "", 0); 708 pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_85, 0, 0, "", 0);
741 v2->CreateButton(61u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0); 709 v2->CreateButton(61u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0);
742 v2->CreateButton(177u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0); 710 v2->CreateButton(177u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0);
743 v2->CreateButton(292u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0); 711 v2->CreateButton(292u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0);
744 v2->CreateButton(407u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0); 712 v2->CreateButton(407u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0);
745 return v2; 713 return v2;
746 } 714 }
747 715
748 //----- (00421B2C) -------------------------------------------------------- 716 //----- (00421B2C) --------------------------------------------------------
749 bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem() 717 bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem()