Mercurial > mm7
diff UISaveLoad.cpp @ 1048:d36681a9e4f8
Слияние
author | Ritor1 |
---|---|
date | Thu, 23 May 2013 11:17:01 +0600 |
parents | 39f42990698f |
children | 5d5c78088274 |
line wrap: on
line diff
--- a/UISaveLoad.cpp Thu May 23 11:16:46 2013 +0600 +++ b/UISaveLoad.cpp Thu May 23 11:17:01 2013 +0600 @@ -48,7 +48,7 @@ //----- (004601B7) -------------------------------------------------------- -void GameUI_MainMenu_DoDrawLoad(int a1) +static void UI_DrawSaveLoad(bool save) { unsigned __int16 v1; // bx@1 unsigned int v2; // edi@4 @@ -87,18 +87,17 @@ unsigned int pSaveFiles; // [sp+70h] [bp-14h]@10 __int64 pAMPM2; // [sp+74h] [bp-10h]@10 int pYear; // [sp+7Ch] [bp-8h]@10 - int a4; // [sp+80h] [bp-4h]@1 + //int a4; // [sp+80h] [bp-4h]@1 int pFilesID; v1 = 255; - a4 = a1; TargetColor(0xFF, 0xFF, 0xFF); TargetColor(0xFF, 0xFF, 0x9B); pRenderer->BeginScene(); if ( GetCurrentMenuID() != MENU_SAVELOAD && GetCurrentMenuID() != MENU_LoadingProcInMainMenu ) { pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); - if ( a4 ) + if (save) { v2 = uTextureID_save_up; v3 = uTextureID_LS_saveU; @@ -181,23 +180,16 @@ pWindow.DrawTitleText(pFontSmallnum, 0, 0, 0, pTmpBuf, 3u); v1 = 255; } - if ( pGUIWindow_CurrentMenu->field_40 == 2 ) + if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) { - pGUIWindow_CurrentMenu->field_40 = 0; + pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, (const char *)pKeyActionMap->pPressedKeysBuffer); - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_SaveGame; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ pMessageQueue_50CBD0->AddMessage(UIMSG_SaveGame, 0, 0); } else { - if ( pGUIWindow_CurrentMenu->field_40 == 3 ) - pGUIWindow_CurrentMenu->field_40 = 0; + if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) + pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; } if (GetCurrentMenuID() == MENU_LoadingProcInMainMenu) { @@ -213,11 +205,11 @@ } else { - if ( a4 ) + if ( save ) pSaveFiles = 40; else pSaveFiles = uNumSavegameFiles; - a4 = 199; + int a4 = 199; pFilesID = pSaveListPosition; pSlotName = (const char *)(&pSavegameHeader[pSaveListPosition]);//draw name for save slot do @@ -226,7 +218,7 @@ break; short clr; HIDWORD(pAMPM2) = clr = (pFilesID == uLoadGameUI_SelectedSlot ? TargetColor(v1, v1, 0x64) : 0); - if ( pGUIWindow_CurrentMenu->field_40 != 1 || pFilesID != uLoadGameUI_SelectedSlot ) + if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_IN_PROGRESS || pFilesID != uLoadGameUI_SelectedSlot ) { pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, 0x1B, a4, clr, pSlotName, 185, 0); } @@ -246,27 +238,20 @@ // 6A0C9C: using guessed type int dword_6A0C9C; //----- (004606F7) -------------------------------------------------------- -void __cdecl GameUI_MainMenu_DrawLoad() +void LoadUI_Draw() { - GameUI_MainMenu_DoDrawLoad(0); + UI_DrawSaveLoad(false); } //----- (004606FE) -------------------------------------------------------- -void __cdecl sub_4606FE() +void SaveUI_Draw() { - GameUI_MainMenu_DoDrawLoad(1); + UI_DrawSaveLoad(true); } -void __cdecl FreeSavegameThumbnails() - { - for (int i = 0; i < 40; ++i) - //pAllocator->FreeChunk(pSavegameThumbnails[i].pPixels); - pSavegameThumbnails[i].Release(); - } - //----- (0045E361) -------------------------------------------------------- -void __fastcall GameUI_DrawLoadMenu(unsigned int uDialogueType) +void LoadUI_Load(unsigned int uDialogueType) { unsigned int v1; // ebp@5 unsigned int v2; // eax@5 @@ -389,7 +374,7 @@ } //----- (0045E93E) -------------------------------------------------------- -void GameUI_DrawSaveMenu() +void SaveUI_Load() { unsigned int v0; // ebp@4 unsigned int v1; // eax@4