Mercurial > mm7
annotate GUIWindow.h @ 480:d4ea191229ff
BildingType
author | Ritor1 |
---|---|
date | Tue, 26 Feb 2013 15:23:15 +0600 |
parents | c43f156a95c9 |
children | 5b6e2021c6fe |
rev | line source |
---|---|
0 | 1 #pragma once |
2 #include "GUIButton.h" | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 /* 251 */ | |
9 enum MENU_STATE : __int32 | |
10 { | |
11 MENU_MAIN = 0x0, | |
12 MENU_NEWGAME = 0x1, | |
13 MENU_CREDITS = 0x2, | |
14 MENU_SAVELOAD = 0x3, | |
15 MENU_FINISHED = 0x4, | |
16 MENU_5 = 0x5, | |
17 MENU_CREATEPARTY = 0x6, | |
165 | 18 MENU_NAMEPANELESC = 0x7, |
19 MENU_CREDITSPROC = 0x8, | |
20 MENU_LOADINGPROC = 0x9, | |
0 | 21 MENU_10 = 0xA, |
165 | 22 MENU_CREDITSCLOSE = 0xB, |
0 | 23 }; |
24 | |
25 | |
167 | 26 enum DIALOGUE_TYPE |
27 { | |
248 | 28 DIALOGUE_9 = 9, |
179 | 29 DIALOGUE_13 = 0xD, |
30 DIALOGUE_18 = 0x12, | |
248 | 31 DIALOGUE_19 = 19, |
32 DIALOGUE_20 = 20, | |
33 DIALOGUE_21 = 21, | |
34 DIALOGUE_22 = 22, | |
35 DIALOGUE_23 = 23, | |
179 | 36 DIALOGUE_24 = 0x18, |
248 | 37 DIALOGUE_76 = 76, |
38 DIALOGUE_PROFESSION_DETAILS = 77, | |
179 | 39 DIALOGUE_ARENA_WELCOME = 0x59, |
40 DIALOGUE_ARENA_FIGHT_NOT_OVER_YET = 0x5A, | |
41 DIALOGUE_ARENA_REWARD = 0x5B, | |
42 DIALOGUE_ARENA_ALREADY_WON = 0x5C, | |
167 | 43 }; |
0 | 44 |
45 | |
46 | |
47 | |
48 | |
49 /* 298 */ | |
50 enum WindowType: unsigned __int32 | |
51 { | |
52 WINDOW_null = 0, | |
53 WINDOW_MainMenu = 0x1, | |
17 | 54 WINDOW_3 = 0x3, |
0 | 55 WINDOW_CharacterRecord = 0x4, |
56 WINDOW_Options = 0x6, | |
57 WINDOW_Book = 0x9, | |
165 | 58 WINDOW_Dialogue = 0xA, |
158 | 59 WINDOW_QuickReference = 0xC, |
60 WINDOW_Rest = 0x10, | |
61 WINDOW_ChangeLocation = 0x11, | |
62 WINDOW_SpellBook = 0x12, | |
63 WINDOW_GreetingNPC = 0x13, | |
0 | 64 WINDOW_Chest = 0x14, |
17 | 65 WINDOW_17 = 0x17, |
0 | 66 WINDOW_MainMenu_Load = 0x18, |
67 WINDOW_HouseInterior = 0x19, | |
158 | 68 WINDOW_Transition = 0x1A, |
69 WINDOW_1B = 0x1B, | |
70 WINDOW_Scroll = 0x1E, | |
71 WINDOW_1F = 0x1F, | |
0 | 72 WINDOW_FinalWindow = 0x46, |
17 | 73 WINDOW_50 = 0x50, |
74 WINDOW_59 = 0x59, | |
0 | 75 WINDOW_5A = 0x5A, |
17 | 76 WINDOW_5B = 0x5B, |
187 | 77 WINDOW_VoiceSwitcherButton = 0x5C, |
17 | 78 WINDOW_5D = 0x5D, |
0 | 79 WINDOW_5E = 0x5E, |
4 | 80 WINDOW_5F = 0x5F, |
81 WINDOW_60 = 0x60, | |
17 | 82 WINDOW_61 = 0x61, |
83 WINDOW_RestWindow = 0x62, | |
84 WINDOW_63 = 0x63, | |
85 WINDOW_CharacterWindow_Stats = 0x64, | |
86 WINDOW_CharacterWindow_Skills = 0x65, | |
87 WINDOW_CharacterWindow_Awards = 0x66, | |
88 WINDOW_CharacterWindow_Inventory = 0x67, | |
0 | 89 WINDOW_KeyMappingOptions = 0x69, |
17 | 90 WINDOW_VideoOptions = 0x6A, |
91 WINDOW_Lloyd = 0xB1, | |
92 WINDOW_TownPortal = 0xC3, | |
93 WINDOW_QuestBook = 0xC8, | |
94 WINDOW_AutonotesBook = 0xC9, | |
95 WINDOW_MapsBook = 0xCA, | |
96 WINDOW_CalendarBook = 0xCB, | |
92 | 97 WINDOW_HistoryBook = 0xE0, |
0 | 98 }; |
99 | |
100 /* 155 */ | |
101 #pragma pack(push, 1) | |
102 struct GUIWindow | |
103 { | |
200 | 104 inline GUIWindow() |
105 { | |
106 pControlsHead = pControlsTail = nullptr; | |
107 eWindowType = WINDOW_null; | |
108 } | |
109 | |
189 | 110 GUIButton *CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int a6, int a7, |
111 unsigned int uControlID, unsigned int uControlParam, unsigned __int8 uHotkey, const char *pName, Texture *pTextures, ...); | |
0 | 112 void DrawFlashingInputCursor(signed int a3, int a4, struct GUIFont *a2); |
113 int DrawTextInRect(GUIFont *a2, unsigned int uX, unsigned int uY, unsigned int uColor, const char *Str1, int Source, int a8); | |
114 char DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, unsigned int uFontShadowColor); | |
189 | 115 char *DrawTitleText(GUIFont *a2, unsigned int uHorizontalMargin, unsigned int uVerticalMargin, |
116 unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing); | |
471
c43f156a95c9
ArmorShopDialog crash fixed. All shops show its items
Gloval
parents:
467
diff
changeset
|
117 void DrawCurrentTime(__int64 a2); |
405 | 118 void HouseDialogManager(); |
198 | 119 void OpenSpellBook(); |
0 | 120 void InitializeBookView(); |
121 void DrawMessageBox(int arg0); | |
122 GUIButton *GetControl(unsigned int uID); | |
123 void Release(); | |
124 void _41D08F(int a2, int a3, int a4, int a5); | |
125 char DrawQuickCharRecord(); | |
126 char _41D73D_draw_buff_tooltip(); | |
127 | |
128 static GUIWindow *Create(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, enum WindowType eType, int a4, int a5); | |
129 | |
130 unsigned int uFrameX; | |
131 unsigned int uFrameY; | |
132 unsigned int uFrameWidth; | |
133 unsigned int uFrameHeight; | |
134 unsigned int uFrameZ; | |
135 unsigned int uFrameW; | |
136 WindowType eWindowType; | |
137 void *ptr_1C; | |
138 unsigned int uNumControls; | |
139 int field_24; | |
140 int pNumPresenceButton; | |
141 int pCurrentPosActiveItem; | |
142 int field_30; | |
143 int field_34; | |
144 int pStartingPosActiveItem; | |
145 int field_3C; | |
146 int field_40; | |
147 int field_44; | |
148 char *Hint; | |
149 GUIButton *pControlsHead; | |
150 GUIButton *pControlsTail; | |
151 }; | |
152 #pragma pack(pop) | |
153 | |
154 | |
155 | |
156 | |
157 | |
158 | |
159 /* 296 */ | |
480 | 160 enum BildingType |
161 { | |
162 BildingType_WeaponShop = 0x1, | |
163 BildingType_ArmorShop = 0x2, | |
164 BildingType_MagicShop = 0x3, | |
165 BildingType_AlchemistShop = 0x4, | |
166 BildingType_FireGuild = 0x5, | |
167 BildingType_AirGuild = 0x6, | |
168 BildingType_WaterGuild = 0x7, | |
169 BildingType_EarthGuild = 0x8, | |
170 BildingType_SpiritGuild = 0x9, | |
171 BildingType_MindGuild = 0xA, | |
172 BildingType_BodyGuild = 0xB, | |
173 BildingType_LightGuild = 0xC, | |
174 BildingType_Dark = 0xD, | |
175 BildingType_14 = 0xE, | |
176 BildingType_15 = 0xF, | |
177 BildingType_16 = 0x10, | |
178 BildingType_TownHall = 0x11, | |
179 BildingType_18 = 0x12, | |
180 BildingType_19 = 0x13, | |
181 BildingType_20 = 0x14, | |
182 BildingType_Tavern = 0x15, | |
183 BildingType_Bank = 0x16, | |
184 BildingType_Tample = 0x17, | |
185 BildingType_1A = 0x1A, | |
186 BildingType_Stables = 0x1B, | |
187 BildingType_Boats = 0x1C, | |
188 BildingType_House = 0x1D, | |
189 BildingType_Training = 0x1E, | |
190 BildingType_Jail = 0x1F, | |
191 }; | |
0 | 192 enum UIMessageType |
193 { | |
194 UIMSG_00 = 0x0, | |
195 UIMSG_ChangeGameState = 0x5, | |
151 | 196 UIMSG_A = 0xA, |
197 UIMSG_C = 0xC, | |
198 UIMSG_E = 0xE, | |
199 UIMSG_F = 0xF, | |
3 | 200 UIMSG_11 = 0x11, |
271 | 201 UIMSG_Attack = 23, |
151 | 202 UIMSG_19 = 0x19, |
203 UIMSG_1B = 0x1B, | |
204 UIMSG_1C = 0x1C, | |
0 | 205 UIMSG_PlayArcomage = 0x1D, |
151 | 206 UIMSG_33 = 0x33, |
0 | 207 UIMSG_MainMenu_ShowPartyCreationWnd = 0x36, |
208 UIMSG_MainMenu_ShowLoadWindow = 0x37, | |
209 UIMSG_ShowCredits = 0x38, | |
210 UIMSG_ExitToWindows = 0x39, | |
3 | 211 UIMSG_3A = 0x3A, |
212 UIMSG_PlayerCreationChangeName = 0x3C, | |
0 | 213 UIMSG_PlayerCreationClickPlus = 0x3E, |
214 UIMSG_PlayerCreationClickMinus = 0x3F, | |
215 UIMSG_PlayerCreationSelectActiveSkill = 0x40, | |
216 UIMSG_PlayerCreationSelectClass = 0x41, | |
217 UIMSG_PlayerCreationClickOK = 0x42, | |
218 UIMSG_PlayerCreationClickReset = 0x43, | |
151 | 219 UIMSG_45 = 0x45, |
220 UIMSG_46 = 0x46, | |
221 UIMSG_AutonotesBook = 0x47, | |
0 | 222 UIMSG_PlayerCreationRemoveUpSkill = 0x4A, |
223 UIMSG_PlayerCreationRemoveDownSkill = 0x4B, | |
151 | 224 UIMSG_4E = 0x4E, |
370 | 225 UIMSG_SPellbook_ShowHightlightedSpellInfo = 0x4F, |
151 | 226 UIMSG_51 = 0x51, |
0 | 227 UIMSG_LoadGame = 0x52, |
228 UIMSG_SaveGame = 0x53, | |
151 | 229 UIMSG_54 = 0x54, |
230 UIMSG_55 = 0x55, | |
437 | 231 UIMSG_SelectSpell = 0x56, |
151 | 232 UIMSG_57 = 0x57, |
233 UIMSG_58 = 0x58, | |
234 UIMSG_5A = 0x5A, | |
235 UIMSG_5B = 0x5B, | |
0 | 236 UIMSG_ShowStatus_DateTime = 0x5C, |
237 UIMSG_ShowStatus_ManaHP = 0x5D, | |
238 UIMSG_ShowStatus_Player = 0x5E, | |
151 | 239 UIMSG_Wait5Minutes = 0x5F, |
240 UIMSG_Wait1Hour = 0x60, | |
241 UIMSG_61 = 0x61, | |
0 | 242 UIMSG_ShowStatus_Food = 0x64, |
243 UIMSG_ShowStatus_Funds = 0x65, | |
151 | 244 UIMSG_68 = 0x68, |
245 UIMSG_69 = 0x69, | |
11 | 246 UIMSG_QuickReference = 0x6A, |
358 | 247 UIMSG_GameMenuButton = 0x6B, |
151 | 248 UIMSG_AlreadyResting = 0x6D, |
0 | 249 UIMSG_SelectCharacter = 0x6E, |
250 UIMSG_ChangeSoundVolume = 0x6F, | |
251 UIMSG_ChangeMusicVolume = 0x70, | |
3 | 252 UIMSG_Escape = 0x71, |
151 | 253 UIMSG_72 = 0x72, |
254 UIMSG_73 = 0x73, | |
255 UIMSG_74 = 0x74, | |
256 UIMSG_75 = 0x75, | |
187 | 257 UIMSG_PlayerCreation_SelectAttribute = 0x76, |
151 | 258 UIMSG_InventoryLeftClick = 0x78, |
0 | 259 UIMSG_SkillUp = 0x79, |
151 | 260 UIMSG_7A = 0x7A, |
369 | 261 UIMSG_GameMenu_ReturnToGame = 0x7B, |
0 | 262 UIMSG_StartNewGame = 0x7C, |
263 UIMSG_Game_OpenLoadGameDialog = 0x7D, | |
151 | 264 UIMSG_Game_OpenSaveGameDialog = 0x7E, |
0 | 265 UIMSG_Game_OpenOptionsDialog = 0x7F, |
151 | 266 UIMSG_80 = 0x80, |
0 | 267 UIMSG_SetGraphicsMode = 0x83, |
268 UIMSG_Quit = 0x84, | |
151 | 269 UIMSG_85 = 0x85, |
199 | 270 UIMSG_StartHireling1Dialogue = 0x86, |
271 UIMSG_StartHireling2Dialogue = 0x87, | |
248 | 272 UIMSG_SelectDialogueOption = 0x88, |
151 | 273 UIMSG_8C = 0x8C, |
274 UIMSG_8D = 0x8D, | |
370 | 275 UIMSG_CastSpellFromBook = 0x8E, |
151 | 276 UIMSG_8F = 0x8F, |
187 | 277 UIMSG_PlayerCreation_VoicePrev = 0x90, |
278 UIMSG_PlayerCreation_VoiceNext = 0x91, | |
151 | 279 UIMSG_92 = 0x92, |
0 | 280 UIMSG_StartNPCDialogue = 0xA1, |
2 | 281 UIMSG_ArrowUp = 0xA2, |
282 UIMSG_DownArrow = 0xA3, | |
283 UIMSG_LoadSlot = 0xA4, | |
3 | 284 UIMSG_SelectLoadSlot = 0xA5, |
2 | 285 UIMSG_Cancel = 0xA6, |
151 | 286 UIMSG_ExitRest = 0xA7, |
0 | 287 UIMSG_A8 = 0xA8, |
288 UIMSG_A9 = 0xA9, | |
289 UIMSG_AA = 0xAA, | |
187 | 290 UIMSG_PlayerCreation_FacePrev = 0xAB, |
291 UIMSG_PlayerCreation_FaceNext = 0xAC, | |
0 | 292 UIMSG_AD = 0xAD, |
293 UIMSG_AE = 0xAE, | |
467 | 294 UIMSG_ClickNPCTopic = 0xAF, |
0 | 295 UIMSG_CycleCharacters = 0xB0, |
296 UIMSG_B1 = 0xB1, | |
297 UIMSG_B2 = 0xB2, | |
298 UIMSG_B3 = 0xB3, | |
299 UIMSG_B4 = 0xB4, | |
300 UIMSG_B5 = 0xB5, | |
301 UIMSG_B6 = 0xB6, | |
302 UIMSG_B7 = 0xB7, | |
303 UIMSG_SetTurnSpeed = 0xB8, | |
304 UIMSG_ToggleWalkSound = 0xB9, | |
305 UIMSG_ChangeVoiceVolume = 0xBA, | |
306 UIMSG_ToggleShowDamage = 0xBB, | |
111 | 307 UIMSG_ScrollNPCPanel = 0xBC, |
0 | 308 UIMSG_BD = 0xBD, |
309 UIMSG_BE = 0xBE, | |
310 UIMSG_BF = 0xBF, | |
311 UIMSG_C0 = 0xC0, | |
312 UIMSG_C1 = 0xC1, | |
313 UIMSG_C2 = 0xC2, | |
314 UIMSG_C3 = 0xC3, | |
315 UIMSG_C4 = 0xC4, | |
316 UIMSG_ShowFinalWindow = 0xC5, | |
317 UIMSG_C6 = 0xC6, | |
318 UIMSG_C7 = 0xC7, | |
319 UIMSG_OpenQuestBook = 0xC8, | |
320 UIMSG_OpenAutonotes = 0xC9, | |
321 UIMSG_OpenMapBook = 0xCA, | |
322 UIMSG_OpenCalendar = 0xCB, | |
323 UIMSG_CC = 0xCC, | |
324 UIMSG_CD = 0xCD, | |
325 UIMSG_CE = 0xCE, | |
326 UIMSG_CF = 0xCF, | |
327 UIMSG_D0 = 0xD0, | |
328 UIMSG_D1 = 0xD1, | |
329 UIMSG_D2 = 0xD2, | |
330 UIMSG_D3 = 0xD3, | |
331 UIMSG_D4 = 0xD4, | |
332 UIMSG_D5 = 0xD5, | |
333 UIMSG_D6 = 0xD6, | |
151 | 334 UIMSG_DD = 0xDD, |
0 | 335 UIMSG_OpenHistoryBook = 0xE0, |
336 UIMSG_ToggleAlwaysRun = 0xE1, | |
337 UIMSG_ToggleFlipOnExit = 0xE2, | |
151 | 338 UIMSG_16F = 0x16F, |
339 UIMSG_170 = 0x170, | |
201 | 340 UIMSG_Game_Action = 0x194, |
467 | 341 UIMSG_ClickLearnSkillDialog = 0x195, |
0 | 342 UIMSG_OpenRestUI = 0x199, |
151 | 343 UIMSG_19A = 0x19A, |
434 | 344 UIMSG_TransitionUI_Confirm = 0x19B, |
151 | 345 UIMSG_19C = 0x19C, |
0 | 346 UIMSG_OpenKeyMappingOptions = 0x19F, |
362 | 347 UIMSG_SelectKeyPage1 = 0x1A0, |
348 UIMSG_SelectKeyPage2 = 0x1A1, | |
0 | 349 UIMSG_ResetKeyMapping = 0x1A2, |
362 | 350 UIMSG_ChangeKeyButton = 0x1A3, |
0 | 351 UIMSG_OpenVideoOptions = 0x1A5, |
352 UIMSG_ToggleBloodsplats = 0x1A6, | |
353 UIMSG_ToggleColoredLights = 0x1A7, | |
354 UIMSG_ToggleTint = 0x1A8, | |
151 | 355 UIMSG_1A9 = 0x1A9, |
0 | 356 }; |
357 | |
151 | 358 enum CURRENT_SCREEN |
359 { | |
360 SCREEN_GAME = 0x0, | |
361 SCREEN_MENU = 0x1, | |
362 SCREEN_OPTIONS = 0x2, | |
363 SCREEN_BOOKS = 0x3, | |
364 SCREEN_NPC_DIALOGUE = 0x4, | |
365 SCREEN_REST = 0x5, | |
366 SCREEN_CHARACTERS = 0x7, | |
367 SCREEN_SPELL_BOOK = 0x8, | |
368 SCREEN_CREATORS = 0x9, | |
369 SCREEN_CHEST = 0xA, | |
370 SCREEN_SAVEGAME = 0xB, | |
371 SCREEN_LOADGAME = 0xC, | |
372 SCREEN_HOUSE = 0xD, | |
373 SCREEN_E = 0xE, | |
374 SCREEN_F = 0xF, | |
375 SCREEN_VIDEO = 0x10, | |
376 SCREEN_CHANGE_LOCATION = 0x11, | |
377 SCREEN_INPUT_BLV = 0x12, | |
378 SCREEN_BRANCHLESS_NPC_DIALOG = 0x13, | |
379 SCREEN_PARTY_CREATION = 0x15, | |
380 SCREEN_PRESS_ESCAPE_MESSAGE = 0x16, | |
381 SCREEN_CASTING = 0x17, | |
382 SCREEN_19 = 0x19, | |
383 SCREEN_KEYBOARD_OPTIONS = 0x1A, | |
384 SCREEN_1B = 0x1B, | |
385 SCREEN_VIDEO_OPTIONS = 0x1C, | |
386 SCREEN_63 = 0x63, | |
387 SCREEN_64 = 0x64, | |
388 SCREEN_67 = 0x67, | |
389 SCREEN_QUICK_REFERENCE = 0x68, | |
390 }; | |
0 | 391 |
392 | |
393 | |
394 | |
395 /* 249 */ | |
396 #pragma pack(push, 1) | |
397 struct GUIMessage | |
398 { | |
399 enum UIMessageType eType; | |
400 int param; | |
401 int field_8; | |
402 }; | |
403 #pragma pack(pop) | |
404 | |
405 | |
406 | |
407 | |
437 | 408 #define AddMessage(msg, param, a4) AddMessageImpl((msg), (param), (a4), __FILE__, __LINE__) |
0 | 409 /* 250 */ |
410 #pragma pack(push, 1) | |
411 struct GUIMessageQueue | |
412 { | |
413 inline GUIMessageQueue(): | |
414 uNumMessages(0) | |
415 {} | |
416 | |
417 void PopMessage(UIMessageType *pMsg, int *pParam, int *a4); | |
437 | 418 void AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file = nullptr, int line = 0); |
0 | 419 |
420 unsigned int uNumMessages; | |
421 GUIMessage pMessages[40]; | |
437 | 422 |
423 const char *files[40]; | |
424 int lines[40]; | |
0 | 425 }; |
426 #pragma pack(pop) | |
427 | |
428 extern struct GUIMessageQueue *pMessageQueue_50CBD0; // idb | |
429 | |
430 | |
431 | |
432 | |
248 | 433 |
434 void OnSelectDialogueOption(DIALOGUE_TYPE newDialogueType); | |
435 | |
436 | |
437 | |
0 | 438 extern int pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[]; // idb |
439 extern struct GUIWindow *pWindow_MainMenu; | |
440 extern struct GUIWindow pWindowList[20]; |