Mercurial > mm7
comparison UI/UISaveLoad.cpp @ 1713:e013b92030e3
UIRest cleared
author | Ritor1 |
---|---|
date | Tue, 24 Sep 2013 23:40:33 +0600 |
parents | afc1c3514dd5 |
children | 873ac151c38d |
comparison
equal
deleted
inserted
replaced
1712:c70d526669ec | 1713:e013b92030e3 |
---|---|
19 | 19 |
20 | 20 |
21 //----- (004601B7) -------------------------------------------------------- | 21 //----- (004601B7) -------------------------------------------------------- |
22 static void UI_DrawSaveLoad(bool save) | 22 static void UI_DrawSaveLoad(bool save) |
23 { | 23 { |
24 unsigned __int16 v1; // bx@1 | 24 //unsigned __int16 v1; // bx@1 |
25 unsigned int v2; // edi@4 | 25 unsigned int v2; // edi@4 |
26 unsigned int v3; // eax@4 | 26 unsigned int v3; // eax@4 |
27 unsigned int v4; // eax@8 | 27 unsigned int v4; // eax@8 |
28 int v5; // edi@8 | 28 int v5; // edi@8 |
29 unsigned int v6; // eax@8 | 29 unsigned int v6; // eax@8 |
36 unsigned __int64 v13; // qtt@10 | 36 unsigned __int64 v13; // qtt@10 |
37 unsigned int v14; // ecx@10 | 37 unsigned int v14; // ecx@10 |
38 __int64 pOurHour; // qax@10 | 38 __int64 pOurHour; // qax@10 |
39 int v16; // edi@10 | 39 int v16; // edi@10 |
40 signed int pHour; // ebx@22 | 40 signed int pHour; // ebx@22 |
41 //const char *v18; // ST14_4@32 | |
42 int v19; // eax@32 | 41 int v19; // eax@32 |
43 const char *v20; // ST18_4@32 | 42 const char *v20; // ST18_4@32 |
44 int v21; // eax@32 | 43 int v21; // eax@32 |
45 //const char *v22; // ST14_4@32 | |
46 int v23; // eax@32 | 44 int v23; // eax@32 |
47 const char *pSlotName; // edi@36 | 45 const char *pSlotName; // edi@36 |
48 int v25; // eax@43 | 46 int v25; // eax@43 |
49 GUIWindow pWindow; // [sp+Ch] [bp-78h]@8 | 47 GUIWindow pWindow; // [sp+Ch] [bp-78h]@8 |
50 /*unsigned int Dst; // [sp+Ch] [bp-78h]@8 | |
51 unsigned int v27; // [sp+10h] [bp-74h]@8 | |
52 int v28; // [sp+14h] [bp-70h]@8 | |
53 int v29; // [sp+18h] [bp-6Ch]@8 | |
54 unsigned int v30; // [sp+1Ch] [bp-68h]@8 | |
55 unsigned int v31; // [sp+20h] [bp-64h]@8*/ | |
56 int pMinutes; // [sp+60h] [bp-24h]@10 | 48 int pMinutes; // [sp+60h] [bp-24h]@10 |
57 int pMonthNum; // [sp+68h] [bp-1Ch]@10 | 49 int pMonthNum; // [sp+68h] [bp-1Ch]@10 |
58 unsigned int pSaveFiles; // [sp+70h] [bp-14h]@10 | 50 unsigned int pSaveFiles; // [sp+70h] [bp-14h]@10 |
59 __int64 pAMPM2; // [sp+74h] [bp-10h]@10 | 51 __int64 pAMPM2; // [sp+74h] [bp-10h]@10 |
60 int pYear; // [sp+7Ch] [bp-8h]@10 | 52 int pYear; // [sp+7Ch] [bp-8h]@10 |
61 //int a4; // [sp+80h] [bp-4h]@1 | |
62 int pFilesID; | 53 int pFilesID; |
63 | 54 |
64 v1 = 255; | 55 //v1 = 255; |
65 TargetColor(0xFF, 0xFF, 0xFF); | 56 //TargetColor(0xFF, 0xFF, 0xFF); |
66 TargetColor(0xFF, 0xFF, 0x9B); | 57 //TargetColor(0xFF, 0xFF, 0x9B); |
67 pRenderer->BeginScene(); | 58 pRenderer->BeginScene(); |
68 if ( GetCurrentMenuID() != MENU_SAVELOAD && GetCurrentMenuID() != MENU_LoadingProcInMainMenu ) | 59 if ( GetCurrentMenuID() != MENU_SAVELOAD && GetCurrentMenuID() != MENU_LoadingProcInMainMenu ) |
69 { | 60 { |
70 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); | 61 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); |
71 if (save) | 62 if (save) |
79 v3 = uTextureID_LS_loadU; | 70 v3 = uTextureID_LS_loadU; |
80 } | 71 } |
81 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(v3)); | 72 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(v3)); |
82 pRenderer->DrawTextureIndexed( 18, 139, pIcons_LOD->GetTexture(v2)); | 73 pRenderer->DrawTextureIndexed( 18, 139, pIcons_LOD->GetTexture(v2)); |
83 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); | 74 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); |
84 v1 = 255; | |
85 } | 75 } |
86 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] ) | 76 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] ) |
87 { | 77 { |
88 memset(&pWindow, 0, 0x54); | 78 memset(&pWindow, 0, 0x54); |
89 pWindow.uFrameX = pGUIWindow_CurrentMenu->uFrameX + 240; | 79 pWindow.uFrameX = pGUIWindow_CurrentMenu->uFrameX + 240; |
147 auto ampm = aAMPMNames[HIDWORD(pAMPM2)]; | 137 auto ampm = aAMPMNames[HIDWORD(pAMPM2)]; |
148 auto month = aMonthNames[pMonthNum]; | 138 auto month = aMonthNames[pMonthNum]; |
149 //sprintf(pTmpBuf.data(), "%s %d:%02d%s\n%d %s %d", _d, v17, (int)32, _a, 3, _m, pFilesID); | 139 //sprintf(pTmpBuf.data(), "%s %d:%02d%s\n%d %s %d", _d, v17, (int)32, _a, 3, _m, pFilesID); |
150 sprintfex(pTmpBuf.data(), "%s %d:%02d%s\n%d %s %d", day, pHour, pMinutes, ampm, 7 * v16 + HIDWORD(pOurHour) % 7 + 1, month, pYear); | 140 sprintfex(pTmpBuf.data(), "%s %d:%02d%s\n%d %s %d", day, pHour, pMinutes, ampm, 7 * v16 + HIDWORD(pOurHour) % 7 + 1, month, pYear); |
151 pWindow.DrawTitleText(pFontSmallnum, 0, 0, 0, pTmpBuf.data(), 3u); | 141 pWindow.DrawTitleText(pFontSmallnum, 0, 0, 0, pTmpBuf.data(), 3u); |
152 v1 = 255; | 142 //v1 = 255; |
153 } | 143 } |
154 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) | 144 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) |
155 { | 145 { |
156 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | 146 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; |
157 strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, (const char *)pKeyActionMap->pPressedKeysBuffer); | 147 strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, (const char *)pKeyActionMap->pPressedKeysBuffer); |
186 do | 176 do |
187 { | 177 { |
188 if ( pFilesID >= (signed int)pSaveFiles ) | 178 if ( pFilesID >= (signed int)pSaveFiles ) |
189 break; | 179 break; |
190 short clr; | 180 short clr; |
191 HIDWORD(pAMPM2) = clr = (pFilesID == uLoadGameUI_SelectedSlot ? TargetColor(v1, v1, 0x64) : 0); | 181 HIDWORD(pAMPM2) = clr = (pFilesID == uLoadGameUI_SelectedSlot ? TargetColor(0xFF, 0xFF, 0x64) : 0); |
192 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_IN_PROGRESS || pFilesID != uLoadGameUI_SelectedSlot ) | 182 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_IN_PROGRESS || pFilesID != uLoadGameUI_SelectedSlot ) |
193 { | 183 { |
194 pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, 0x1B, a4, clr, pSlotName, 185, 0); | 184 pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, 0x1B, a4, clr, pSlotName, 185, 0); |
195 } | 185 } |
196 else | 186 else |