comparison GUIWindow.cpp @ 471:c43f156a95c9

ArmorShopDialog crash fixed. All shops show its items
author Gloval
date Mon, 25 Feb 2013 23:33:15 +0400
parents e5cf03a3d98e
children 7f1b00901cf7
comparison
equal deleted inserted replaced
470:fcdaa804074f 471:c43f156a95c9
1231 } 1231 }
1232 } 1232 }
1233 1233
1234 1234
1235 //----- (004B1854) -------------------------------------------------------- 1235 //----- (004B1854) --------------------------------------------------------
1236 char *GUIWindow::_4B1854(__int64 a2) 1236 void GUIWindow::DrawCurrentTime( __int64 a2 )
1237 { 1237 {
1238 unsigned int v2; // edi@1 1238 unsigned int v2; // edi@1
1239 unsigned int v3; // esi@1 1239 unsigned int v3; // esi@1
1240 unsigned int v4; // ebp@1 1240 unsigned int v4; // ebp@1
1241 unsigned int v5; // ebx@1 1241 unsigned int v5; // ebx@1
1242 signed __int64 v6; // ST2C_8@1 1242 signed __int64 v6; // ST2C_8@1
1261 v18 = (unsigned int)v6 / 0x18; 1261 v18 = (unsigned int)v6 / 0x18;
1262 v17 = (signed __int64)__PAIR__(v2, v3) % 60; 1262 v17 = (signed __int64)__PAIR__(v2, v3) % 60;
1263 v16 = (signed __int64)__PAIR__(v4, v5) % 60; 1263 v16 = (signed __int64)__PAIR__(v4, v5) % 60;
1264 v7 = v6 % 24; 1264 v7 = v6 % 24;
1265 strcpy(pTmpBuf, pGlobalTXT_LocalizationStrings[532]); 1265 strcpy(pTmpBuf, pGlobalTXT_LocalizationStrings[532]);
1266 if ( (unsigned int)v6 / 0x18 ) 1266 if ( (unsigned int)v6 /24 )
1267 { 1267 {
1268 v8 = pGlobalTXT_LocalizationStrings[57]; 1268 v8 = pGlobalTXT_LocalizationStrings[57];
1269 if ( v18 <= 1 ) 1269 if ( v18 <= 1 )
1270 v8 = pGlobalTXT_LocalizationStrings[56]; 1270 v8 = pGlobalTXT_LocalizationStrings[56];
1271 sprintf(pTmpBuf2, "%d %s ", v18, v8); 1271 sprintf(pTmpBuf2, "%d %s ", v18, v8);
1281 strcat(pTmpBuf, pTmpBuf2); 1281 strcat(pTmpBuf, pTmpBuf2);
1282 } 1282 }
1283 if ( v16 && !v18 ) 1283 if ( v16 && !v18 )
1284 { 1284 {
1285 if ( v16 <= 1 ) 1285 if ( v16 <= 1 )
1286 v10 = pGlobalTXT_LocalizationStrings[437]; 1286 v10 = pGlobalTXT_LocalizationStrings[437];//"Minute"
1287 else 1287 else
1288 v10 = pGlobalTXT_LocalizationStrings[436]; 1288 v10 = pGlobalTXT_LocalizationStrings[436]; //"Minutes"
1289 sprintf(pTmpBuf2, "%d %s ", v16, v10); 1289 sprintf(pTmpBuf2, "%d %s ", v16, v10);
1290 strcat(pTmpBuf, pTmpBuf2); 1290 strcat(pTmpBuf, pTmpBuf2);
1291 } 1291 }
1292 if ( v17 && !v7 ) 1292 if ( v17 && !v7 )
1293 { 1293 {
1294 if ( v17 <= 1 ) 1294 if ( v17 <= 1 )
1295 v11 = pGlobalTXT_LocalizationStrings[439]; 1295 v11 = pGlobalTXT_LocalizationStrings[439]; //"Second"
1296 else 1296 else
1297 v11 = pGlobalTXT_LocalizationStrings[438]; 1297 v11 = pGlobalTXT_LocalizationStrings[438]; //"Seconds"
1298 sprintf(pTmpBuf2, "%d %s ", v17, v11); 1298 sprintf(pTmpBuf2, "%d %s ", v17, v11);
1299 strcat(pTmpBuf, pTmpBuf2); 1299 strcat(pTmpBuf, pTmpBuf2);
1300 } 1300 }
1301 v12 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 1301 v12 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
1302 v13 = pFontArrus->CalcTextHeight(pTmpBuf, v15, 0, 0); 1302 v13 = pFontArrus->CalcTextHeight(pTmpBuf, v15, 0, 0);
1303 return v15->DrawTitleText(pFontArrus, 0, (212 - v13) / 2 + 101, v12, pTmpBuf, 3u); 1303 v15->DrawTitleText(pFontArrus, 0, (212 - v13) / 2 + 101, v12, pTmpBuf, 3u);
1304 } 1304 }
1305 1305
1306 1306
1307 1307
1308 //----- (0044D406) -------------------------------------------------------- 1308 //----- (0044D406) --------------------------------------------------------