Mercurial > mm7
comparison GUIWindow.cpp @ 1758:24e756a50073
DrawBuff_remaind_time_string and DrawShops_next_generation_time_string fix and cleared
author | Ritor1 |
---|---|
date | Mon, 30 Sep 2013 23:38:28 +0600 |
parents | cecb080929c4 |
children | 633f81bb3ae7 |
comparison
equal
deleted
inserted
replaced
1757:11f5c0ac170a | 1758:24e756a50073 |
---|---|
228 { | 228 { |
229 remaing_time = pParty->pPartyBuffs[i].uExpireTime- pParty->uTimePlayed;//!!! | 229 remaing_time = pParty->pPartyBuffs[i].uExpireTime- pParty->uTimePlayed;//!!! |
230 Y_pos = string_count * pFontComic->uFontHeight + 40; | 230 Y_pos = string_count * pFontComic->uFontHeight + 40; |
231 text_color = TargetColor(spell_tooltip_colors[i].R, spell_tooltip_colors[i].G, spell_tooltip_colors[i].B); | 231 text_color = TargetColor(spell_tooltip_colors[i].R, spell_tooltip_colors[i].G, spell_tooltip_colors[i].B); |
232 DrawText(pFontComic, 52, Y_pos, text_color, aSpellNames[i], 0, 0, 0); | 232 DrawText(pFontComic, 52, Y_pos, text_color, aSpellNames[i], 0, 0, 0); |
233 sub_41D20D_buff_remaining_time_string(Y_pos, this, remaing_time, pFontComic); | 233 DrawBuff_remaining_time_string(Y_pos, this, remaing_time, pFontComic); |
234 ++string_count; | 234 ++string_count; |
235 } | 235 } |
236 } | 236 } |
237 } | 237 } |
238 | 238 |
1061 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); | 1061 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); |
1062 } | 1062 } |
1063 } | 1063 } |
1064 | 1064 |
1065 //----- (004B1854) -------------------------------------------------------- | 1065 //----- (004B1854) -------------------------------------------------------- |
1066 void GUIWindow::DrawCurrentTime( __int64 a2 ) | 1066 void GUIWindow::DrawShops_next_generation_time_string( __int64 next_generation_time ) |
1067 { | 1067 { |
1068 unsigned int v2; // edi@1 | 1068 unsigned int full_time; // esi@1 |
1069 unsigned int v3; // esi@1 | 1069 signed __int64 hours; // kr00_8@1 |
1070 unsigned int v4; // ebp@1 | 1070 char *text; // eax@2 |
1071 unsigned int v5; // ebx@1 | 1071 signed __int64 minutes; // [sp+Ch] [bp-10h]@1 |
1072 signed __int64 v6; // ST2C_8@1 | 1072 signed __int64 seconds; // [sp+14h] [bp-8h]@1 |
1073 signed __int64 v7; // kr00_8@1 | 1073 unsigned int days; // [sp+20h] [bp+4h]@1 |
1074 char *v8; // eax@2 | 1074 |
1075 char *v9; // eax@7 | 1075 full_time = (signed __int64)((double)next_generation_time * 0.234375); |
1076 char *v10; // eax@13 | 1076 seconds = (signed __int64)full_time % 60; |
1077 char *v11; // eax@19 | 1077 minutes = (signed __int64)(full_time / 60) % 60; |
1078 unsigned __int16 v12; // ST0C_2@22 | 1078 hours = ((full_time / 60) / 60) % 24; |
1079 int v13; // eax@22 | 1079 days = (unsigned int)((full_time / 60) / 60) / 24; |
1080 GUIWindow *v15; // [sp+0h] [bp-1Ch]@1 | |
1081 signed __int64 v16; // [sp+Ch] [bp-10h]@1 | |
1082 signed __int64 v17; // [sp+14h] [bp-8h]@1 | |
1083 unsigned int v18; // [sp+20h] [bp+4h]@1 | |
1084 | |
1085 v15 = this; | |
1086 v2 = (unsigned __int64)(signed __int64)((double)a2 * 0.234375) >> 32; | |
1087 v3 = (signed __int64)((double)a2 * 0.234375); | |
1088 v4 = (unsigned __int64)((signed __int64)((double)a2 * 0.234375) / 60) >> 32; | |
1089 v5 = (signed __int64)((double)a2 * 0.234375) / 60; | |
1090 v6 = (signed __int64)((double)a2 * 0.234375) / 60 / 60; | |
1091 v18 = (unsigned int)v6 / 0x18; | |
1092 v17 = (signed __int64)__PAIR__(v2, v3) % 60; | |
1093 v16 = (signed __int64)__PAIR__(v4, v5) % 60; | |
1094 v7 = v6 % 24; | |
1095 strcpy(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[532]); | 1080 strcpy(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[532]); |
1096 if ( (unsigned int)v6 /24 ) | 1081 if ( days ) |
1097 { | 1082 { |
1098 v8 = pGlobalTXT_LocalizationStrings[57]; | 1083 text = pGlobalTXT_LocalizationStrings[57];//Days |
1099 if ( v18 <= 1 ) | 1084 if ( days <= 1 ) |
1100 v8 = pGlobalTXT_LocalizationStrings[56]; | 1085 text = pGlobalTXT_LocalizationStrings[56];//Day |
1101 sprintfex(pTmpBuf2.data(), "%d %s ", v18, v8); | 1086 sprintfex(pTmpBuf2.data(), "%d %s ", days, text); |
1102 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 1087 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
1103 } | 1088 } |
1104 if ( v7 ) | 1089 if ( hours ) |
1105 { | 1090 { |
1106 if ( v7 <= 1 ) | 1091 if ( hours <= 1 ) |
1107 v9 = pGlobalTXT_LocalizationStrings[109]; | 1092 text = pGlobalTXT_LocalizationStrings[109];//Hour |
1108 else | 1093 else |
1109 v9 = pGlobalTXT_LocalizationStrings[110]; | 1094 text = pGlobalTXT_LocalizationStrings[110];//Hours |
1110 sprintfex(pTmpBuf2.data(), "%d %s ", v7, v9); | 1095 sprintfex(pTmpBuf2.data(), "%d %s ", (int)hours, text); |
1111 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 1096 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
1112 } | 1097 } |
1113 if ( v16 && !v18 ) | 1098 if ( minutes && !days ) |
1114 { | 1099 { |
1115 if ( v16 <= 1 ) | 1100 if ( minutes <= 1 ) |
1116 v10 = pGlobalTXT_LocalizationStrings[437];//"Minute" | 1101 text = pGlobalTXT_LocalizationStrings[437];//"Minute" |
1117 else | 1102 else |
1118 v10 = pGlobalTXT_LocalizationStrings[436]; //"Minutes" | 1103 text = pGlobalTXT_LocalizationStrings[436]; //"Minutes" |
1119 sprintfex(pTmpBuf2.data(), "%d %s ", v16, v10); | 1104 sprintfex(pTmpBuf2.data(), "%d %s ", (int)minutes, text); |
1120 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 1105 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
1121 } | 1106 } |
1122 if ( v17 && !v7 ) | 1107 if ( seconds && !hours ) |
1123 { | 1108 { |
1124 if ( v17 <= 1 ) | 1109 if ( seconds <= 1 ) |
1125 v11 = pGlobalTXT_LocalizationStrings[439]; //"Second" | 1110 text = pGlobalTXT_LocalizationStrings[439]; //"Second" |
1126 else | 1111 else |
1127 v11 = pGlobalTXT_LocalizationStrings[438]; //"Seconds" | 1112 text = pGlobalTXT_LocalizationStrings[438]; //"Seconds" |
1128 sprintfex(pTmpBuf2.data(), "%d %s ", v17, v11); | 1113 sprintfex(pTmpBuf2.data(), "%d %s ", (int)seconds, text); |
1129 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 1114 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
1130 } | 1115 } |
1131 v12 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 1116 this->DrawTitleText(pFontArrus, 0, (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), this, 0, 0)) / 2 + 101, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
1132 v13 = pFontArrus->CalcTextHeight(pTmpBuf.data(), v15, 0, 0); | |
1133 v15->DrawTitleText(pFontArrus, 0, (212 - v13) / 2 + 101, v12, pTmpBuf.data(), 3u); | |
1134 } | 1117 } |
1135 | 1118 |
1136 | 1119 |
1137 | 1120 |
1138 //----- (0044D406) -------------------------------------------------------- | 1121 //----- (0044D406) -------------------------------------------------------- |