Mercurial > mm7
diff mm7_5.cpp @ 970:e3123a1dea82
PlayerCreationUI_Draw little clean
author | Ritor1 |
---|---|
date | Wed, 08 May 2013 16:30:37 +0600 |
parents | 4d1259ef6ab2 |
children | 35f2e900618e |
line wrap: on
line diff
--- a/mm7_5.cpp Wed May 08 09:45:57 2013 +0600 +++ b/mm7_5.cpp Wed May 08 16:30:37 2013 +0600 @@ -10182,52 +10182,22 @@ //----- (004156F0) -------------------------------------------------------- -void __cdecl GUI_UpdateWindows() // Нужно всё преобразовать в кейсы +void __cdecl GUI_UpdateWindows() { GUIWindow *pWindow; // esi@4 unsigned int pWindowType; // eax@4 - int v2; // eax@10 - int v3; // eax@11 - int v4; // eax@12 - int v5; // eax@20 - int v6; // eax@21 - int v7; // eax@29 - int v8; // eax@30 - int v9; // eax@31 - void *v10; // eax@41 - int v11; // ecx@42 - int v12; // eax@48 - int v13; // eax@49 - int v14; // eax@57 - int v15; // eax@58 - int v16; // eax@59 - int v17; // eax@60 - int v18; // eax@61 - int v19; // eax@62 - void *v20; // ebp@66 char *pHint; // edx@66 GUIButton *pButtonPtr_1C; // ebp@79 char *pHint1; // edx@80 - char v24; // zf@81 - //unsigned int v25; // eax@91 int v26; // eax@98 unsigned int v27; // ebp@106 GUIWindow *pGUIWindow2; // ecx@109 - unsigned int v29; // eax@111 GUIFont *pGUIFont; // ST1C_4@115 int v31; // eax@115 GUIButton *pButton; // ebp@118 - int v33; // eax@119 - int v34; // eax@120 - int v35; // eax@121 - int v36; // eax@122 - int v37; // eax@123 - int v38; // eax@124 int v39; // eax@129 - //char *v40; // edx@138 unsigned int pNumMessages; // eax@142 GUIButton *pGUIButton; // ebp@146 - //char *v43; // edx@146 unsigned int pX; // [sp-1Ch] [bp-124h]@17 unsigned int pY; // [sp-18h] [bp-120h]@17 Texture *pTexture; // [sp-14h] [bp-11Ch]@17 @@ -10241,12 +10211,11 @@ sub_41CD4F(34); for ( i = 1; i <= uNumVisibleWindows; ++i ) { - //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]]; pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1]; pWindowType = pWindow->eWindowType; switch (pWindow->eWindowType) { - case WINDOW_OptionsButtons://3 + case WINDOW_OptionsButtons: { pTexture = (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0); pY = pViewport->uViewportTL_Y; @@ -10255,52 +10224,52 @@ viewparams->bRedrawGameUI = 1; continue; } - case WINDOW_CharacterRecord://4 + case WINDOW_CharacterRecord: { CharacterUI_CharacterScreen_Draw(uActiveCharacter); continue; } - case WINDOW_Options://6 + case WINDOW_Options: { DrawGameOptions(); continue; } - case WINDOW_Book://9 + case WINDOW_Book: { DrawCurrentBook((unsigned int)pWindow->ptr_1C); continue; } - case WINDOW_Dialogue://10 + case WINDOW_Dialogue: { DrawDialogueUI(); continue; } - case WINDOW_QuickReference://12 + case WINDOW_QuickReference: { QuickRefDraw(); continue; } - case WINDOW_Rest://16 + case WINDOW_Rest: { RestUI_Draw(); continue; } - case WINDOW_ChangeLocation://17 + case WINDOW_ChangeLocation: { TravelUI_Draw(); continue; } - case WINDOW_SpellBook://18 + case WINDOW_SpellBook: { DrawSpellBookContent(); continue; } - case WINDOW_GreetingNPC://19 + case WINDOW_GreetingNPC: { DrawBranchlessDialogueUI(); continue; } - case WINDOW_Chest://20 + case WINDOW_Chest: { if ( pCurrentScreen == SCREEN_CHEST ) { @@ -10316,29 +10285,28 @@ } continue; } - case WINDOW_SaveLoadButtons://23 + case WINDOW_SaveLoadButtons: { sub_4606FE(); continue; } - case WINDOW_MainMenu_Load://24 + case WINDOW_MainMenu_Load: { GameUI_MainMenu_DrawLoad(); continue; } - case WINDOW_HouseInterior://25 + case WINDOW_HouseInterior: { pWindowList[pVisibleWindowsIdxs[i] - 1].HouseDialogManager(); if ( !window_SpeakInHouse ) continue; - v10 = window_SpeakInHouse->ptr_1C; - if ( (signed int)v10 >= 53 ) - continue; - if ( pParty->field_3C._shop_ban_times[(signed int)v10] <=pParty->uTimePlayed ) + if ( (signed int)window_SpeakInHouse->ptr_1C >= 53 ) + continue; + if ( pParty->field_3C._shop_ban_times[(signed int)window_SpeakInHouse->ptr_1C] <=pParty->uTimePlayed ) { - if ( (signed int)v10 < 53 ) - { - pParty->field_3C._shop_ban_times[(signed int)v10] = 0; + if ( (signed int)window_SpeakInHouse->ptr_1C < 53 ) + { + pParty->field_3C._shop_ban_times[(signed int)window_SpeakInHouse->ptr_1C] = 0; } continue; } @@ -10346,17 +10314,17 @@ pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); continue; } - case WINDOW_Transition://26 + case WINDOW_Transition: { TransitionUI_Draw(); continue; } - case WINDOW_Scroll://30 + case WINDOW_Scroll: { CreateScrollWindow(); continue; } - case WINDOW_CastSpell_InInventory://31 + case WINDOW_CastSpell_InInventory: { pRenderer->ClearZBuffer(0, 479); draw_leather(); @@ -10366,12 +10334,12 @@ (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); continue; } - case WINDOW_FinalWindow://70 + case WINDOW_FinalWindow: { sub_41420D_press_esc(); continue; } - case WINDOW_50://80 + case WINDOW_50: { v27 = TargetColor(255, 255, 255); if ( ptr_507BD0->field_40 == 1 ) @@ -10384,15 +10352,7 @@ } if ( ptr_507BD0->field_40 == 2 ) { - //v29 = pMessageQueue_50CBD0->uNumMessages; pWindow->field_40 = 0; - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ pMessageQueue_50CBD0->AddMessage((UIMessageType)(int)ptr_507BD0->ptr_1C, 0, 0); pEventTimer->Resume(); ptr_507BD0->Release(); @@ -10408,7 +10368,7 @@ continue; } } - case WINDOW_59://89 + case WINDOW_59: { pWindow->DrawMessageBox(0); pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); @@ -10444,7 +10404,7 @@ } continue; } - case WINDOW_PressedButton2://90 + case WINDOW_PressedButton2: { if ( pWindow->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); @@ -10457,8 +10417,7 @@ viewparams->bRedrawGameUI = 1; if ( pWindow->Hint ) { - v24 = pWindow->Hint == (char *)1; - if ( !v24 ) + if ( pWindow->Hint != (char *)1 ) pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); } pWindow->Release(); @@ -10468,14 +10427,13 @@ viewparams->bRedrawGameUI = 1; if ( pWindow->Hint ) { - v24 = pWindow->Hint == (char *)1; - if ( !v24 ) + if ( pWindow->Hint != (char *)1 ) pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); } pWindow->Release(); continue; } - case WINDOW_CharactersPressedButton://91 + case WINDOW_CharactersPressedButton: { if ( pWindow->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); @@ -10484,14 +10442,13 @@ viewparams->bRedrawGameUI = 1; if ( pWindow->Hint ) { - v24 = pWindow->Hint == (char *)1; - if ( !v24 ) + if ( pWindow->Hint != (char *)1 ) pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); } pWindow->Release(); continue; } - case WINDOW_PressedButton://92 + case WINDOW_PressedButton: { if ( pWindow->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); @@ -10500,14 +10457,13 @@ viewparams->bRedrawGameUI = 1; if ( pWindow->Hint ) { - v24 = pWindow->Hint == (char *)1; - if ( !v24 ) + if ( pWindow->Hint != (char *)1 ) pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); } pWindow->Release(); continue; } - case WINDOW_5D://93 + case WINDOW_5D: { if ( pWindow->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); @@ -10517,7 +10473,7 @@ pWindow->Release(); continue; } - case WINDOW_SaveLoadBtn://94 + case WINDOW_SaveLoadBtn: { if (pWindow->Hint != (char *)1) pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); @@ -10534,7 +10490,7 @@ pMessageQueue_50CBD0->AddMessage(UIMSG_LoadGame, 0, 0); continue; } - case WINDOW_LoadGame_CancelBtn://95 + case WINDOW_LoadGame_CancelBtn: { if ( pWindow->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); @@ -10544,18 +10500,10 @@ if ( pWindow->Hint && pWindow->Hint != (char *)1 ) pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); pWindow->Release(); - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - continue; - }*/ pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); continue; } - case WINDOW_CloseRestWindowBtn://96 + case WINDOW_CloseRestWindowBtn: { if ( pWindow->Hint != (char *)1 ) pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); @@ -10569,7 +10517,7 @@ pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); continue; } - case WINDOW_ExitCharacterWindow://97 + case WINDOW_ExitCharacterWindow: { if ( pWindow->Hint != (char *)1 ) pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); @@ -10584,7 +10532,7 @@ pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); continue; } - case WINDOW_RestWindow://98 + case WINDOW_RestWindow: { memset(&GUIButton2, 0, 0xBCu); GUIButton2.uZ = 197; @@ -10603,7 +10551,7 @@ pGUIWindow2->Release(); continue; } - case WINDOW_BooksWindow://99 + case WINDOW_BooksWindow: { pButton = (GUIButton *)pWindow->ptr_1C; pY = pWindow->uFrameY; @@ -10612,7 +10560,7 @@ viewparams->bRedrawGameUI = 1; continue; } - case WINDOW_CharacterWindow_Inventory://103 + case WINDOW_CharacterWindow_Inventory: { pWindow->DrawMessageBox(0); pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); @@ -10633,12 +10581,12 @@ } continue; } - case WINDOW_KeyMappingOptions://105 + case WINDOW_KeyMappingOptions: { GameMenuUI_DrawKeyBindings(); continue; } - case WINDOW_VideoOptions://106 + case WINDOW_VideoOptions: { GameMenuUI_DrawVideoOptions(); continue;