annotate GUI/UI/UIRest.cpp @ 2502:a77c34acdbc9

Media folder
author Ritor1
date Fri, 19 Sep 2014 05:13:32 +0600
parents 0ff6a9e9bf7f
children a902abdfc7f2
rev   line source
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
1 #define _CRTDBG_MAP_ALLOC
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
2 #include <stdlib.h>
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
3 #include <crtdbg.h>
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
4
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
2502
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
6 #include "..\../GUI/GUIWindow.h"
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
7 #include "..\../GUI/GUIFont.h"
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
8 #include "..\../Engine/Party.h"
2502
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
9 #include "..\../Media/Audio/AudioPlayer.h"
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
10 #include "..\../Engine/Graphics/Outdoor.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
11 #include "..\../Engine/LOD.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
12 #include "..\../Engine/Graphics/Viewport.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
13 #include "..\../Engine/Timer.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
14 #include "..\../Engine/texts.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
15
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
16 #include "..\../Engine/mm7_data.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
17
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
18
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
19
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
20 //----- (0041F6C1) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
21 void RestUI_Load()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
22 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
23 if ( !dword_506F14 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
24 pAudioPlayer->StopChannels(-1, -1);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
25 if ( pCurrentScreen != SCREEN_GAME)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
26 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
27 pGUIWindow_CurrentMenu->Release();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
28 pCurrentScreen = SCREEN_GAME;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
29 viewparams->bRedrawGameUI = true;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
30 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
31 pEventTimer->Pause();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
32 if ( dword_506F14 != 2 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
33 GUIWindow::Create(518, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_Rest, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
34 _506F18_num_minutes_to_sleep = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
35 dword_506F14 = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
36 uRestUI_FoodRequiredToRest = 2;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
37 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
38 uRestUI_FoodRequiredToRest = pOutdoor->GetNumFoodRequiredToRestInCurrentPos(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
39 if ( PartyHasDragon() )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
40 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
41 for ( uint i = 0; i < 4; ++i )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
42 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
43 if (pParty->pPlayers[i].classType == PLAYER_CLASS_WARLOCK)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
44 ++uRestUI_FoodRequiredToRest;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
45 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
46 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
47 if ( CheckHiredNPCSpeciality(Porter) )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
48 --uRestUI_FoodRequiredToRest;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
49 if ( CheckHiredNPCSpeciality(QuarterMaster) )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
50 uRestUI_FoodRequiredToRest -= 2;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
51 if ( CheckHiredNPCSpeciality(Gypsy) )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
52 --uRestUI_FoodRequiredToRest;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
53 if ( uRestUI_FoodRequiredToRest < 1 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
54 uRestUI_FoodRequiredToRest = 1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
55 if ( !_stricmp(pCurrentMapName, "d29.blv") && _449B57_test_bit(pParty->_quest_bits, 98) )//Замок Хармондейл
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
56 uRestUI_FoodRequiredToRest = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
57
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
58 ++pIcons_LOD->uTexturePacksCount;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
59 if ( !pIcons_LOD->uNumPrevLoadedFiles )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
60 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
61
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
62 pCurrentScreen = SCREEN_REST;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
63 _507CD4_RestUI_hourglass_anim_controller = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
64 uTextureID_RestUI_restmain = pIcons_LOD->LoadTexture("restmain", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
65 uTextureID_RestUI_restb1 = pIcons_LOD->LoadTexture("restb1", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
66 uTextureID_RestUI_restb2 = pIcons_LOD->LoadTexture("restb2", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
67 uTextureID_RestUI_restb3 = pIcons_LOD->LoadTexture("restb3", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
68 uTextureID_RestUI_restb4 = pIcons_LOD->LoadTexture("restb4", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
69 uTextureID_RestUI_restexit = pIcons_LOD->LoadTexture("restexit", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
70 OutdoorLocation::LoadActualSkyFrame();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
71 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Rest, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
72 pButton_RestUI_Exit = pGUIWindow_CurrentMenu->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
73 pButton_RestUI_Main = pGUIWindow_CurrentMenu->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 'R', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
74 pButton_RestUI_WaitUntilDawn = pGUIWindow_CurrentMenu->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 'D', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
75 pButton_RestUI_Wait1Hour = pGUIWindow_CurrentMenu->CreateButton( 61, 264, 154, 33, 1, 0, UIMSG_Wait1Hour, 0, 'H', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb2), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
76 pButton_RestUI_Wait5Minutes = pGUIWindow_CurrentMenu->CreateButton( 61, 296, 154, 33, 1, 0, UIMSG_Wait5Minutes, 0, 'M', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb3), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
77 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
78
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
79 //----- (0041FA01) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
80 void RestUI_Draw()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
81 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
82 int live_characters; // esi@1
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
83 unsigned int v3; // eax@15
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
84 GUIButton tmp_button; // [sp+8h] [bp-DCh]@19
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
85 unsigned int am_pm_hours; // [sp+D8h] [bp-Ch]@9
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
86
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
87 live_characters = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
88 for( int i = 1; i < 5; ++i )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
89 if ( !pPlayers[i]->IsDead() && !pPlayers[i]->IsEradicated() && pPlayers[i]->sHealth > 0 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
90 ++live_characters;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
91
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
92 if ( live_characters )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
93 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
94 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_RestUI_restmain));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
95 am_pm_hours = pParty->uCurrentHour;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
96 dword_506F1C = pGUIWindow_CurrentMenu->pCurrentPosActiveItem;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
97 if ( (signed int)pParty->uCurrentHour <= 12 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
98 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
99 if ( !am_pm_hours )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
100 am_pm_hours = 12;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
101 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
102 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
103 am_pm_hours -= 12;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
104 pRenderer->DrawTextureIndexed(16, 26, pTexture_RestUI_CurrentSkyFrame);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
105 if ( pTexture_RestUI_CurrentHourglassFrame )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
106 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
107 pTexture_RestUI_CurrentHourglassFrame->Release();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
108 pIcons_LOD->SyncLoadedFilesCount();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
109 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
110 v3 = pEventTimer->uTimeElapsed + _507CD4_RestUI_hourglass_anim_controller;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
111 _507CD4_RestUI_hourglass_anim_controller += pEventTimer->uTimeElapsed;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
112 if ( (unsigned int)_507CD4_RestUI_hourglass_anim_controller >= 512 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
113 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
114 v3 = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
115 _507CD4_RestUI_hourglass_anim_controller = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
116 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
117 hourglass_icon_idx = (int)floorf(((double)v3 / 512.0 * 120.0) + 0.5f) % 256 + 1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
118 if (hourglass_icon_idx >= 120 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
119 hourglass_icon_idx = 1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
120
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
121 sprintf(pTmpBuf.data(), "hglas%03d", hourglass_icon_idx);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
122 pTexture_RestUI_CurrentHourglassFrame = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
123 pRenderer->DrawTextureIndexed(267, 159, pTexture_RestUI_CurrentHourglassFrame);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
124 memset(&tmp_button, 0, sizeof(GUIButton));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
125 tmp_button.uX = 24;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
126 tmp_button.uY = 154;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
127 tmp_button.uZ = 194;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
128 tmp_button.uW = 190;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
129 tmp_button.uWidth = 171;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
130 tmp_button.uHeight = 37;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
131 tmp_button.pParent = pButton_RestUI_WaitUntilDawn->pParent;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
132 tmp_button.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, Color16(10, 0, 0), Color16(230, 214, 193));//Отдых и лечение 8 часов
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
133 tmp_button.pParent = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
134
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
135 sprintf(pTmpBuf.data(), "\r408%d", uRestUI_FoodRequiredToRest);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
136 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 0, 164, Color16(10, 0, 0), pTmpBuf.data(), 0, 0, Color16(230, 214, 193));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
137
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
138 pButton_RestUI_WaitUntilDawn->DrawLabel(pGlobalTXT_LocalizationStrings[237], pFontCreate, Color16(10, 0, 0), Color16(230, 214, 193));//Ждать до рассвета
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
139 pButton_RestUI_Wait1Hour->DrawLabel(pGlobalTXT_LocalizationStrings[239], pFontCreate, Color16(10, 0, 0), Color16(230, 214, 193));//Ждать 1 час
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
140 pButton_RestUI_Wait5Minutes->DrawLabel(pGlobalTXT_LocalizationStrings[238], pFontCreate, Color16(10, 0, 0), Color16(230, 214, 193));//Ждать 5 минут
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
141 pButton_RestUI_Exit->DrawLabel(pGlobalTXT_LocalizationStrings[81], pFontCreate, Color16(10, 0, 0), Color16(230, 214, 193));//Закончить отдыхать
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
142 memset(&tmp_button, 0, sizeof(GUIButton));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
143 tmp_button.uX = 45;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
144 tmp_button.uY = 199;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
145
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
146 tmp_button.uZ = 229;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
147 tmp_button.uW = 228;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
148
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
149 tmp_button.uWidth = 185;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
150 tmp_button.uHeight = 30;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
151
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
152 tmp_button.pParent = pButton_RestUI_WaitUntilDawn->pParent;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
153 tmp_button.DrawLabel(pGlobalTXT_LocalizationStrings[236], pFontCreate, Color16(10, 0, 0), Color16(230, 214, 193));//Ждать без лечения
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
154 tmp_button.pParent = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
155 sprintf(pTmpBuf.data(), "%d:%02d %s", am_pm_hours, pParty->uCurrentMinute, aAMPMNames[(pParty->uCurrentHour >= 12 && pParty->uCurrentHour < 24)? 1:0]);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
156 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 368, 168, Color16(10, 0, 0), pTmpBuf.data(), 0, 0, Color16(230, 214, 193));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
157 sprintf(pTmpBuf.data(), "%s\r190%d", pGlobalTXT_LocalizationStrings[56], pParty->uDaysPlayed + 1);//День
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
158 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 190, Color16(10, 0, 0), pTmpBuf.data(), 0, 0, Color16(230, 214, 193));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
159 sprintf(pTmpBuf.data(), "%s\r190%d", pGlobalTXT_LocalizationStrings[146], pParty->uCurrentMonth + 1);//Месяц
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
160 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 222, Color16(10, 0, 0), pTmpBuf.data(), 0, 0, Color16(230, 214, 193));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
161 sprintf(pTmpBuf.data(), "%s\r190%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear);//Год
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
162 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 254, Color16(10, 0, 0), pTmpBuf.data(), 0, 0, Color16(230, 214, 193));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
163 if ( dword_506F14 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
164 Party::Sleep6Hours();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
165 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
166 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
167 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn,
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
168 (int)pButton_RestUI_Exit, pGlobalTXT_LocalizationStrings[81]); // "Exit Rest"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
169 }