comparison UIRest.cpp @ 1231:182b910c528d

Слияние
author Ritor1
date Sun, 09 Jun 2013 10:18:51 +0600
parents 8c02e6f74b29
children fac7751b2dc9
comparison
equal deleted inserted replaced
1230:513a7893aa29 1231:182b910c528d
89 uRestUI_FoodRequiredToRest -= 2; 89 uRestUI_FoodRequiredToRest -= 2;
90 if ( CheckHiredNPCSpeciality(Gypsy) ) 90 if ( CheckHiredNPCSpeciality(Gypsy) )
91 --uRestUI_FoodRequiredToRest; 91 --uRestUI_FoodRequiredToRest;
92 if ( uRestUI_FoodRequiredToRest < 1 ) 92 if ( uRestUI_FoodRequiredToRest < 1 )
93 uRestUI_FoodRequiredToRest = 1; 93 uRestUI_FoodRequiredToRest = 1;
94 if ( !_stricmp(pCurrentMapName, "d29.blv") && _449B57_test_bit(pParty->_quest_bits, 98) ) 94 if ( !_stricmp(pCurrentMapName.data(), "d29.blv") && _449B57_test_bit(pParty->_quest_bits, 98) )
95 uRestUI_FoodRequiredToRest = 0; 95 uRestUI_FoodRequiredToRest = 0;
96 96
97 ++pIcons_LOD->uTexturePacksCount; 97 ++pIcons_LOD->uTexturePacksCount;
98 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 98 if ( !pIcons_LOD->uNumPrevLoadedFiles )
99 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 99 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
173 hourglass_icon_idx = (int)floorf(v8 + 0.5f) % 256 + 1;//LOBYTE(v7) + 1; 173 hourglass_icon_idx = (int)floorf(v8 + 0.5f) % 256 + 1;//LOBYTE(v7) + 1;
174 //hourglass_icon_idx = v4; 174 //hourglass_icon_idx = v4;
175 if (hourglass_icon_idx >= 120 ) 175 if (hourglass_icon_idx >= 120 )
176 hourglass_icon_idx = 1; 176 hourglass_icon_idx = 1;
177 177
178 sprintf(pTmpBuf, "hglas%03d", hourglass_icon_idx); 178 sprintf(pTmpBuf.data(), "hglas%03d", hourglass_icon_idx);
179 pTexture_RestUI_CurrentHourglassFrame = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); 179 pTexture_RestUI_CurrentHourglassFrame = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE);
180 pRenderer->DrawTextureIndexed(267, 159, pTexture_RestUI_CurrentHourglassFrame); 180 pRenderer->DrawTextureIndexed(267, 159, pTexture_RestUI_CurrentHourglassFrame);
181 memset(&tmp_button, 0, sizeof(GUIButton)); 181 memset(&tmp_button, 0, sizeof(GUIButton));
182 tmp_button.uX = 24; 182 tmp_button.uX = 24;
183 tmp_button.uY = 154; 183 tmp_button.uY = 154;
184 184
189 tmp_button.uHeight = 37; 189 tmp_button.uHeight = 37;
190 190
191 tmp_button.pParent = pButton_RestUI_WaitUntilDawn->pParent; 191 tmp_button.pParent = pButton_RestUI_WaitUntilDawn->pParent;
192 tmp_button.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, text_color, shadow_color); 192 tmp_button.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, text_color, shadow_color);
193 tmp_button.pParent = 0; 193 tmp_button.pParent = 0;
194 sprintf(pTmpBuf, "\r408%d", uRestUI_FoodRequiredToRest); 194 sprintf(pTmpBuf.data(), "\r408%d", uRestUI_FoodRequiredToRest);
195 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 0, 164, text_color, pTmpBuf, 0, 0, shadow_color); 195 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 0, 164, text_color, pTmpBuf.data(), 0, 0, shadow_color);
196 pButton_RestUI_WaitUntilDawn->DrawLabel(pGlobalTXT_LocalizationStrings[237], pFontCreate, text_color, shadow_color); 196 pButton_RestUI_WaitUntilDawn->DrawLabel(pGlobalTXT_LocalizationStrings[237], pFontCreate, text_color, shadow_color);
197 pButton_RestUI_Wait1Hour->DrawLabel(pGlobalTXT_LocalizationStrings[239], pFontCreate, text_color, shadow_color); 197 pButton_RestUI_Wait1Hour->DrawLabel(pGlobalTXT_LocalizationStrings[239], pFontCreate, text_color, shadow_color);
198 pButton_RestUI_Wait5Minutes->DrawLabel(pGlobalTXT_LocalizationStrings[238], pFontCreate, text_color, shadow_color); 198 pButton_RestUI_Wait5Minutes->DrawLabel(pGlobalTXT_LocalizationStrings[238], pFontCreate, text_color, shadow_color);
199 pButton_RestUI_Exit->DrawLabel(pGlobalTXT_LocalizationStrings[81], pFontCreate, text_color, shadow_color); 199 pButton_RestUI_Exit->DrawLabel(pGlobalTXT_LocalizationStrings[81], pFontCreate, text_color, shadow_color);
200 memset(&tmp_button, 0, sizeof(GUIButton)); 200 memset(&tmp_button, 0, sizeof(GUIButton));
209 209
210 tmp_button.pParent = pButton_RestUI_WaitUntilDawn->pParent; 210 tmp_button.pParent = pButton_RestUI_WaitUntilDawn->pParent;
211 tmp_button.DrawLabel(pGlobalTXT_LocalizationStrings[236], pFontCreate, text_color, shadow_color); 211 tmp_button.DrawLabel(pGlobalTXT_LocalizationStrings[236], pFontCreate, text_color, shadow_color);
212 tmp_button.pParent = 0; 212 tmp_button.pParent = 0;
213 v5 = (pParty->uCurrentHour >= 12 && pParty->uCurrentHour < 24)? 1:0; 213 v5 = (pParty->uCurrentHour >= 12 && pParty->uCurrentHour < 24)? 1:0;
214 sprintf(pTmpBuf, "%d:%02d %s", am_pm_hours, pParty->uCurrentMinute, aAMPMNames[v5]); 214 sprintf(pTmpBuf.data(), "%d:%02d %s", am_pm_hours, pParty->uCurrentMinute, aAMPMNames[v5]);
215 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 368, 168, text_color, pTmpBuf, 0, 0, shadow_color); 215 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 368, 168, text_color, pTmpBuf.data(), 0, 0, shadow_color);
216 sprintf(pTmpBuf, "%s\r190%d", pGlobalTXT_LocalizationStrings[56], pParty->uDaysPlayed + 1); 216 sprintf(pTmpBuf.data(), "%s\r190%d", pGlobalTXT_LocalizationStrings[56], pParty->uDaysPlayed + 1);
217 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 190, text_color, pTmpBuf, 0, 0, shadow_color); 217 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 190, text_color, pTmpBuf.data(), 0, 0, shadow_color);
218 sprintf(pTmpBuf, "%s\r190%d", pGlobalTXT_LocalizationStrings[146], pParty->uCurrentMonth + 1); 218 sprintf(pTmpBuf.data(), "%s\r190%d", pGlobalTXT_LocalizationStrings[146], pParty->uCurrentMonth + 1);
219 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 222, text_color, pTmpBuf, 0, 0, shadow_color); 219 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 222, text_color, pTmpBuf.data(), 0, 0, shadow_color);
220 sprintf(pTmpBuf, "%s\r190%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear); 220 sprintf(pTmpBuf.data(), "%s\r190%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear);
221 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 254, text_color, pTmpBuf, 0, 0, shadow_color); 221 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 350, 254, text_color, pTmpBuf.data(), 0, 0, shadow_color);
222 if ( dword_506F14 ) 222 if ( dword_506F14 )
223 Sleep6Hours(); 223 Sleep6Hours();
224 } 224 }
225 else 225 else
226 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]); // "Exit Rest" 226 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]); // "Exit Rest"