comparison mm7_2.cpp @ 106:1e18102bd4d0

5.11.12
author Ritor1
date Mon, 05 Nov 2012 09:15:53 +0600
parents e633cde38d64
children ccc0cf95706a
comparison
equal deleted inserted replaced
105:e633cde38d64 106:1e18102bd4d0
143 _this.uFrameX = 483; 143 _this.uFrameX = 483;
144 _this.uFrameWidth = 148; 144 _this.uFrameWidth = 148;
145 _this.uFrameZ = 334; 145 _this.uFrameZ = 334;
146 v28 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 146 v28 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
147 v30 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 147 v30 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
148 sprintfex(pTmpBuf, "%s: %d", pGlobalTXT_LocalizationStrings[605], pParty->uFine); 148 sprintf(pTmpBuf, "%s: %d", pGlobalTXT_LocalizationStrings[605], pParty->uFine);
149 _this.DrawText2(pFontArrus, 0, 0x104u, v30, pTmpBuf, 3u); 149 _this.DrawText2(pFontArrus, 0, 0x104u, v30, pTmpBuf, 3u);
150 if ( dword_F8B19C == 1 ) 150 if ( dword_F8B19C == 1 )
151 { 151 {
152 v11 = 1; 152 v11 = 1;
153 pOutString = 0; 153 pOutString = 0;
204 if ( dword_F8B19C != 100 ) 204 if ( dword_F8B19C != 100 )
205 return; 205 return;
206 v0 = ptr_507BC0; 206 v0 = ptr_507BC0;
207 if ( ptr_507BC0->field_40 == 1 ) 207 if ( ptr_507BC0->field_40 == 1 )
208 { 208 {
209 sprintfex(pTmpBuf, "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]); 209 sprintf(pTmpBuf, "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]);
210 _this.DrawText2(pFontArrus, 0, 0x92u, v30, pTmpBuf, 3u); 210 _this.DrawText2(pFontArrus, 0, 0x92u, v30, pTmpBuf, 3u);
211 _this.DrawText2(pFontArrus, 0, 0xBAu, v28, (const char *)pKeyActionMap->pPressedKeysBuffer, 3u); 211 _this.DrawText2(pFontArrus, 0, 0xBAu, v28, (const char *)pKeyActionMap->pPressedKeysBuffer, 3u);
212 v3 = pFontArrus; 212 v3 = pFontArrus;
213 v4 = pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer); 213 v4 = pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer);
214 _this.DrawFlashingInputCursor(v4 / 2 + 80, 185, v3); 214 _this.DrawFlashingInputCursor(v4 / 2 + 80, 185, v3);
255 } 255 }
256 v5 = &pMonsterStats->pInfos[word_F8B1A0]; 256 v5 = &pMonsterStats->pInfos[word_F8B1A0];
257 v6 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 257 v6 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
258 v7 = v5->pName; 258 v7 = v5->pName;
259 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 259 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
260 sprintfex(pTmpBuf, &byte_4F0F98, v8, v7, v6); 260 sprintf(pTmpBuf, &byte_4F0F98, v8, v7, v6);
261 sprintfex(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * v5->uLevel); 261 sprintf(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * v5->uLevel);
262 ptr_F8B1E8 = pTmpBuf2; 262 ptr_F8B1E8 = pTmpBuf2;
263 memcpy(&a1, pDialogueWindow, sizeof(a1)); 263 memcpy(&a1, pDialogueWindow, sizeof(a1));
264 w.uFrameWidth = 458; 264 w.uFrameWidth = 458;
265 w.uFrameZ = 457; 265 w.uFrameZ = 457;
266 pOutString = pFontArrus; 266 pOutString = pFontArrus;
308 _this.uFrameX = 483; 308 _this.uFrameX = 483;
309 _this.uFrameWidth = 148; 309 _this.uFrameWidth = 148;
310 _this.uFrameZ = 334; 310 _this.uFrameZ = 334;
311 *(int *)v13 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 311 *(int *)v13 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
312 *(int *)v14 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 312 *(int *)v14 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
313 sprintfex(pTmpBuf, "%s: %d", pGlobalTXT_LocalizationStrings[25], pParty->uNumGoldInBank); 313 sprintf(pTmpBuf, "%s: %d", pGlobalTXT_LocalizationStrings[25], pParty->uNumGoldInBank);
314 _this.DrawText2(pFontArrus, 0, 0xDCu, v14[0], pTmpBuf, 3u); 314 _this.DrawText2(pFontArrus, 0, 0xDCu, v14[0], pTmpBuf, 3u);
315 if ( dword_F8B19C != 1 ) 315 if ( dword_F8B19C != 1 )
316 { 316 {
317 if ( dword_F8B19C == 7 ) 317 if ( dword_F8B19C == 7 )
318 { 318 {
392 goto LABEL_15; 392 goto LABEL_15;
393 } 393 }
394 v11 = pGlobalTXT_LocalizationStrings[112]; 394 v11 = pGlobalTXT_LocalizationStrings[112];
395 v10 = pGlobalTXT_LocalizationStrings[244]; 395 v10 = pGlobalTXT_LocalizationStrings[244];
396 } 396 }
397 sprintfex(pTmpBuf, "%s\n%s", v10, v11); 397 sprintf(pTmpBuf, "%s\n%s", v10, v11);
398 _this.DrawText2(pFontArrus, 0, 0x92u, v14[0], pTmpBuf, 3u); 398 _this.DrawText2(pFontArrus, 0, 0x92u, v14[0], pTmpBuf, 3u);
399 _this.DrawText2(pFontArrus, 0, 0xBAu, v13[0], (const char *)pKeyActionMap->pPressedKeysBuffer, 3u); 399 _this.DrawText2(pFontArrus, 0, 0xBAu, v13[0], (const char *)pKeyActionMap->pPressedKeysBuffer, 3u);
400 v4 = pFontArrus; 400 v4 = pFontArrus;
401 v5 = pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer); 401 v5 = pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer);
402 _this.DrawFlashingInputCursor(v5 / 2 + 80, 185, v4); 402 _this.DrawFlashingInputCursor(v5 / 2 + 80, 185, v4);
679 ++v10; 679 ++v10;
680 } 680 }
681 while ( (signed int)v10 < v8->pStartingPosActiveItem + v8->pNumPresenceButton ); 681 while ( (signed int)v10 < v8->pStartingPosActiveItem + v8->pNumPresenceButton );
682 if ( v86 ) 682 if ( v86 )
683 { 683 {
684 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], pOutString); 684 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], pOutString);
685 v79.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); 685 v79.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
686 pOutString = (GUIFont *)((149 - v89) / v86); 686 pOutString = (GUIFont *)((149 - v89) / v86);
687 if ( (149 - v89) / v86 > 32 ) 687 if ( (149 - v89) / v86 > 32 )
688 pOutString = (GUIFont *)32; 688 pOutString = (GUIFont *)32;
689 v14 = (149 - v86 * (signed int)pOutString - v89) / 2 - (signed int)pOutString / 2 + 162; 689 v14 = (149 - v86 * (signed int)pOutString - v89) / 2 - (signed int)pOutString / 2 + 162;
729 } 729 }
730 return; 730 return;
731 } 731 }
732 } 732 }
733 v26 = pTmpBuf; 733 v26 = pTmpBuf;
734 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v85->pName, pClassNames[v85->uClass]); 734 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v85->pName, pClassNames[v85->uClass]);
735 strcat(pTmpBuf, "\n \n"); 735 strcat(pTmpBuf, "\n \n");
736 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); 736 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);
737 goto LABEL_97; 737 goto LABEL_97;
738 } 738 }
739 *(_QWORD *)Str = pParty->uNumFoodRations; 739 *(_QWORD *)Str = pParty->uNumFoodRations;
768 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) 768 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
769 return; 769 return;
770 v28 = *(int *)v84; 770 v28 = *(int *)v84;
771 if ( pDialogueWindow->pCurrentPosActiveItem != 2 ) 771 if ( pDialogueWindow->pCurrentPosActiveItem != 2 )
772 v28 = v81; 772 v28 = v81;
773 sprintfex(&Dest, format_4E2DC8, v28); 773 sprintf(&Dest, format_4E2DC8, v28);
774 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[178], pOutString); 774 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[178], pOutString);
775 strcat(&Dest, pTmpBuf2); 775 strcat(&Dest, pTmpBuf2);
776 v90 = pFontArrus->CalcTextHeight(&Dest, &v79, 0, 0); 776 v90 = pFontArrus->CalcTextHeight(&Dest, &v79, 0, 0);
777 strcat(&Dest, "\n \n"); 777 strcat(&Dest, "\n \n");
778 v29 = *(int *)v84; 778 v29 = *(int *)v84;
779 if ( pDialogueWindow->pCurrentPosActiveItem != 3 ) 779 if ( pDialogueWindow->pCurrentPosActiveItem != 3 )
780 v29 = v81; 780 v29 = v81;
781 sprintfex(&a1, format_4E2DC8, v29); 781 sprintf(&a1, format_4E2DC8, v29);
782 sprintfex(pTmpBuf2, 782 sprintf(pTmpBuf2,
783 pGlobalTXT_LocalizationStrings[86], 783 pGlobalTXT_LocalizationStrings[86],
784 //(signed __int64)p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C], 784 //(signed __int64)p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C],
785 (signed __int64)p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier, 785 (signed __int64)p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier,
786 v83); 786 v83);
787 strcat(&a1, pTmpBuf2); 787 strcat(&a1, pTmpBuf2);
788 v88 = pFontArrus->CalcTextHeight(&a1, &v79, 0, 0); 788 v88 = pFontArrus->CalcTextHeight(&a1, &v79, 0, 0);
789 strcat(&a1, "\n \n"); 789 strcat(&a1, "\n \n");
790 v30 = *(int *)v84; 790 v30 = *(int *)v84;
791 if ( pDialogueWindow->pCurrentPosActiveItem != 4 ) 791 if ( pDialogueWindow->pCurrentPosActiveItem != 4 )
792 v30 = v81; 792 v30 = v81;
793 sprintfex(&v77, format_4E2DC8, v30); 793 sprintf(&v77, format_4E2DC8, v30);
794 strcat(&v77, pGlobalTXT_LocalizationStrings[160]); 794 strcat(&v77, pGlobalTXT_LocalizationStrings[160]);
795 v82 = pFontArrus->CalcTextHeight(&v77, &v79, 0, 0); 795 v82 = pFontArrus->CalcTextHeight(&v77, &v79, 0, 0);
796 strcat(&v77, "\n \n"); 796 strcat(&v77, "\n \n");
797 v75 = 0; 797 v75 = 0;
798 v87 = 0; 798 v87 = 0;
800 if ( v31 >= 108 && v31 <= 120 ) 800 if ( v31 >= 108 && v31 <= 120 )
801 { 801 {
802 v32 = *(int *)v84; 802 v32 = *(int *)v84;
803 if ( pDialogueWindow->pCurrentPosActiveItem != 5 ) 803 if ( pDialogueWindow->pCurrentPosActiveItem != 5 )
804 v32 = v81; 804 v32 = v81;
805 sprintfex(&v75, format_4E2DC8, v32); 805 sprintf(&v75, format_4E2DC8, v32);
806 strcat(&v75, pGlobalTXT_LocalizationStrings[611]); 806 strcat(&v75, pGlobalTXT_LocalizationStrings[611]);
807 v87 = pFontArrus->CalcTextHeight(&v75, &v79, 0, 0); 807 v87 = pFontArrus->CalcTextHeight(&v75, &v79, 0, 0);
808 } 808 }
809 v33 = pDialogueWindow; 809 v33 = pDialogueWindow;
810 Str[1] = (char *)pDialogueWindow; 810 Str[1] = (char *)pDialogueWindow;
814 v37 = -pDialogueWindow->pNumPresenceButton < 0; 814 v37 = -pDialogueWindow->pNumPresenceButton < 0;
815 pOutString = (GUIFont *)pDialogueWindow->pStartingPosActiveItem; 815 pOutString = (GUIFont *)pDialogueWindow->pStartingPosActiveItem;
816 if ( !(v37 ^ __OFSUB__(v34, v35)) ) 816 if ( !(v37 ^ __OFSUB__(v34, v35)) )
817 { 817 {
818 LABEL_75: 818 LABEL_75:
819 sprintfex(pTmpBuf, "%s%s%s%s", &Dest, &a1, &v77, &v75); 819 sprintf(pTmpBuf, "%s%s%s%s", &Dest, &a1, &v77, &v75);
820 v71 = 3; 820 v71 = 3;
821 v69 = pTmpBuf; 821 v69 = pTmpBuf;
822 v67 = 0; 822 v67 = 0;
823 v66 = 146; 823 v66 = 146;
824 LABEL_98: 824 LABEL_98:
1213 } 1213 }
1214 while ( (signed int)v33 < v30->pNumPresenceButton + v30->pStartingPosActiveItem ); 1214 while ( (signed int)v33 < v30->pNumPresenceButton + v30->pStartingPosActiveItem );
1215 if ( !v109 ) 1215 if ( !v109 )
1216 { 1216 {
1217 LABEL_105: 1217 LABEL_105:
1218 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]); 1218 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]);
1219 strcat(pTmpBuf, "\n \n"); 1219 strcat(pTmpBuf, "\n \n");
1220 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); 1220 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);
1221 v7 = pTmpBuf; 1221 v7 = pTmpBuf;
1222 v86 = 3; 1222 v86 = 3;
1223 v84 = pTmpBuf; 1223 v84 = pTmpBuf;
1225 v80 = 0; 1225 v80 = 0;
1226 v78 = 0; 1226 v78 = 0;
1227 v77 = &v101; 1227 v77 = &v101;
1228 goto LABEL_15; 1228 goto LABEL_15;
1229 } 1229 }
1230 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v108); 1230 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v108);
1231 v101.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); 1231 v101.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
1232 v108 = (149 - v106.y) / (signed int)v109; 1232 v108 = (149 - v106.y) / (signed int)v109;
1233 if ( (149 - v106.y) / (signed int)v109 > 32 ) 1233 if ( (149 - v106.y) / (signed int)v109 > 32 )
1234 v108 = 32; 1234 v108 = 32;
1235 result = (char *)v30->pStartingPosActiveItem; 1235 result = (char *)v30->pStartingPosActiveItem;
1952 ++v6; 1952 ++v6;
1953 } 1953 }
1954 while ( (signed int)v6 < v2->pNumPresenceButton + v2->pStartingPosActiveItem ); 1954 while ( (signed int)v6 < v2->pNumPresenceButton + v2->pStartingPosActiveItem );
1955 if ( v114 ) 1955 if ( v114 )
1956 { 1956 {
1957 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v111); 1957 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v111);
1958 v104.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); 1958 v104.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
1959 v111 = (const char **)((signed int)(149 - v112) / v114); 1959 v111 = (const char **)((signed int)(149 - v112) / v114);
1960 if ( (signed int)(149 - v112) / v114 > 32 ) 1960 if ( (signed int)(149 - v112) / v114 > 32 )
1961 v111 = (const char **)32; 1961 v111 = (const char **)32;
1962 result = (POINT *)v2->pStartingPosActiveItem; 1962 result = (POINT *)v2->pStartingPosActiveItem;
2002 while ( (signed int)v112 < (signed int)result ); 2002 while ( (signed int)v112 < (signed int)result );
2003 } 2003 }
2004 return result; 2004 return result;
2005 } 2005 }
2006 } 2006 }
2007 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]); 2007 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]);
2008 strcat(pTmpBuf, "\n \n"); 2008 strcat(pTmpBuf, "\n \n");
2009 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); 2009 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);
2010 v21 = pTmpBuf; 2010 v21 = pTmpBuf;
2011 v92 = 3; 2011 v92 = 3;
2012 v90 = pTmpBuf; 2012 v90 = pTmpBuf;
2546 ++v39; 2546 ++v39;
2547 } 2547 }
2548 while ( (signed int)v39 < v37->pNumPresenceButton + v37->pStartingPosActiveItem ); 2548 while ( (signed int)v39 < v37->pNumPresenceButton + v37->pStartingPosActiveItem );
2549 if ( v153 ) 2549 if ( v153 )
2550 { 2550 {
2551 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], _this); 2551 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], _this);
2552 v144.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); 2552 v144.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
2553 _this = (Player *)((149 - v152) / v153); 2553 _this = (Player *)((149 - v152) / v153);
2554 if ( (149 - v152) / v153 > 32 ) 2554 if ( (149 - v152) / v153 > 32 )
2555 _this = (Player *)32; 2555 _this = (Player *)32;
2556 v43 = (149 - v153 * (signed int)_this - v152) / 2 - (signed int)_this / 2 + 162; 2556 v43 = (149 - v153 * (signed int)_this - v152) / 2 - (signed int)_this / 2 + 162;
2595 while ( v152 < v54 ); 2595 while ( v152 < v54 );
2596 } 2596 }
2597 return; 2597 return;
2598 } 2598 }
2599 } 2599 }
2600 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->uClass]); 2600 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->uClass]);
2601 strcat(pTmpBuf, "\n \n"); 2601 strcat(pTmpBuf, "\n \n");
2602 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); 2602 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);
2603 v11 = 0; 2603 v11 = 0;
2604 v36 = pTmpBuf; 2604 v36 = pTmpBuf;
2605 v123 = 3; 2605 v123 = 3;
5152 v20 = 0; 5152 v20 = 0;
5153 for ( i = (int)pParty->pPlayers[0].pName; ; v3 = (char *)i ) 5153 for ( i = (int)pParty->pPlayers[0].pName; ; v3 = (char *)i )
5154 { 5154 {
5155 v4 = pClassNames[(unsigned __int8)v3[17]]; 5155 v4 = pClassNames[(unsigned __int8)v3[17]];
5156 v5 = ((Player *)(v3 - 168))->GetBaseLevel(); 5156 v5 = ((Player *)(v3 - 168))->GetBaseLevel();
5157 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[129], i, v5, v4); 5157 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[129], i, v5, v4);
5158 pWindow.DrawText2( 5158 pWindow.DrawText2(
5159 pFont, 5159 pFont,
5160 1u, 5160 1u,
5161 v20 * (LOBYTE(pFont->uFontHeight) - 2) + LOBYTE(pFont->uFontHeight) + 46, 5161 v20 * (LOBYTE(pFont->uFontHeight) - 2) + LOBYTE(pFont->uFontHeight) + 46,
5162 1u, 5162 1u,
5179 if ( v18 != 1 ) 5179 if ( v18 != 1 )
5180 v8 = pGlobalTXT_LocalizationStrings[148]; 5180 v8 = pGlobalTXT_LocalizationStrings[148];
5181 v9 = pGlobalTXT_LocalizationStrings[245]; 5181 v9 = pGlobalTXT_LocalizationStrings[245];
5182 if ( v14 != 1 ) 5182 if ( v14 != 1 )
5183 v9 = pGlobalTXT_LocalizationStrings[132]; 5183 v9 = pGlobalTXT_LocalizationStrings[132];
5184 sprintfex(pTmpBuf2, " %lu %s, %lu %s, %lu %s ", v14, v9, v18, v8, v17, v7); 5184 sprintf(pTmpBuf2, " %lu %s, %lu %s, %lu %s ", v14, v9, v18, v8, v17, v7);
5185 strcat(pTmpBuf, pTmpBuf2); 5185 strcat(pTmpBuf, pTmpBuf2);
5186 pWindow.DrawText2(pFont, 1u, pWindow.uFrameHeight - 2 * LOBYTE(pFont->uFontHeight) - 5, 1u, pTmpBuf, 3u); 5186 pWindow.DrawText2(pFont, 1u, pWindow.uFrameHeight - 2 * LOBYTE(pFont->uFontHeight) - 5, 1u, pTmpBuf, 3u);
5187 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[94], v23); 5187 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[94], v23);
5188 pWindow.DrawText2(pFont, 1u, pWindow.uFrameHeight, 1u, pTmpBuf, 3u); 5188 pWindow.DrawText2(pFont, 1u, pWindow.uFrameHeight, 1u, pTmpBuf, 3u);
5189 BYTE1(dword_6BE364_game_settings_1) |= 0x40u; 5189 BYTE1(dword_6BE364_game_settings_1) |= 0x40u;
5190 pRenderer->EndScene(); 5190 pRenderer->EndScene();
5191 pRenderer->Present(); 5191 pRenderer->Present();
5192 if ( pRenderer->pRenderD3D ) 5192 if ( pRenderer->pRenderD3D )
7638 case 0xBu: 7638 case 0xBu:
7639 v45 = pMapInfo->pEncounterMonster3Texture; 7639 v45 = pMapInfo->pEncounterMonster3Texture;
7640 LABEL_24: 7640 LABEL_24:
7641 v44 = "%s C"; 7641 v44 = "%s C";
7642 LABEL_25: 7642 LABEL_25:
7643 result = (void *)sprintfex(&Source, v44, v45); 7643 result = (void *)sprintf(&Source, v44, v45);
7644 LABEL_26: 7644 LABEL_26:
7645 if ( Source == 48 ) 7645 if ( Source == 48 )
7646 return result; 7646 return result;
7647 v57 += a3; 7647 v57 += a3;
7648 if ( v57 > 4 ) 7648 if ( v57 > 4 )
7708 goto LABEL_58; 7708 goto LABEL_58;
7709 v45 = &Source; 7709 v45 = &Source;
7710 v44 = "%s C"; 7710 v44 = "%s C";
7711 } 7711 }
7712 } 7712 }
7713 sprintfex(&Str2, v44, v45); 7713 sprintf(&Str2, v44, v45);
7714 } 7714 }
7715 v26 = pMonsterList->GetMonsterByName(&Str2); 7715 v26 = pMonsterList->GetMonsterByName(&Str2);
7716 v50 = (signed __int16)v26; 7716 v50 = (signed __int16)v26;
7717 v45 = &Str2; 7717 v45 = &Str2;
7718 if ( (signed __int16)v26 == -1 ) 7718 if ( (signed __int16)v26 == -1 )
7719 { 7719 {
7720 sprintfex(&Str, "Can't create random monster: '%s'! See MapStats.txt and Monsters.txt!", v45); 7720 sprintf(&Str, "Can't create random monster: '%s'! See MapStats.txt and Monsters.txt!", v45);
7721 MessageBoxA(nullptr, &Str, nullptr, 0); 7721 MessageBoxA(nullptr, &Str, nullptr, 0);
7722 ExitProcess(0); 7722 ExitProcess(0);
7723 } 7723 }
7724 v27 = &pMonsterList->pMonsters[(signed __int16)v26]; 7724 v27 = &pMonsterList->pMonsters[(signed __int16)v26];
7725 v28 = pMonsterStats->_4563FF(v45); 7725 v28 = pMonsterStats->_4563FF(v45);
10328 v7 = 65; 10328 v7 = 65;
10329 goto LABEL_71; 10329 goto LABEL_71;
10330 } 10330 }
10331 if ( _strcmpi(*(const char **)(v2 + 4), "Hammerhands") ) 10331 if ( _strcmpi(*(const char **)(v2 + 4), "Hammerhands") )
10332 { 10332 {
10333 sprintfex(pTmpBuf, "Unknown monster spell %s", *(int *)(v2 + 4)); 10333 sprintf(pTmpBuf, "Unknown monster spell %s", *(int *)(v2 + 4));
10334 MessageBoxA(nullptr, pTmpBuf, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:1562", 0); 10334 MessageBoxA(nullptr, pTmpBuf, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:1562", 0);
10335 result = 0; 10335 result = 0;
10336 goto LABEL_76; 10336 goto LABEL_76;
10337 } 10337 }
10338 v7 = 73; 10338 v7 = 73;
13530 srand(GetTickCount()); 13530 srand(GetTickCount());
13531 /*GetDiskFreeSpaceA(0, &SectorsPerCluster, &BytesPerSector, &hdc, &TotalNumberOfClusters); 13531 /*GetDiskFreeSpaceA(0, &SectorsPerCluster, &BytesPerSector, &hdc, &TotalNumberOfClusters);
13532 v4 = hdc * BytesPerSector * SectorsPerCluster; 13532 v4 = hdc * BytesPerSector * SectorsPerCluster;
13533 if ( (unsigned int)v4 < 0x1E00000 ) 13533 if ( (unsigned int)v4 < 0x1E00000 )
13534 { 13534 {
13535 sprintfex( 13535 sprintf(
13536 pTmpBuf, 13536 pTmpBuf,
13537 "Due to Window Virtual Memory requirements Might and MagicŪ VII\nrequires 30MB of free hard drive space to operate properly.\n\nAvailable on Current Drive = %luk", 13537 "Due to Window Virtual Memory requirements Might and MagicŪ VII\nrequires 30MB of free hard drive space to operate properly.\n\nAvailable on Current Drive = %luk",
13538 (unsigned int)v4 / 1024i64); 13538 (unsigned int)v4 / 1024i64);
13539 v41 = 48; 13539 v41 = 48;
13540 v40 = "More Hard Drive Space Required"; 13540 v40 = "More Hard Drive Space Required";
14015 /*do 14015 /*do
14016 { 14016 {
14017 v11 = 1; 14017 v11 = 1;
14018 do 14018 do
14019 { 14019 {
14020 sprintfex(pTmpBuf, "data\\lloyd%d%d.pcx", v10, v11); 14020 sprintf(pTmpBuf, "data\\lloyd%d%d.pcx", v10, v11);
14021 remove(pTmpBuf); 14021 remove(pTmpBuf);
14022 ++v11; 14022 ++v11;
14023 } 14023 }
14024 while ( v11 < 6 ); 14024 while ( v11 < 6 );
14025 ++v10; 14025 ++v10;
14298 char pDefaultGroundTexture[16]; // [sp+FCh] [bp-8Ch]@32 14298 char pDefaultGroundTexture[16]; // [sp+FCh] [bp-8Ch]@32
14299 //char pIniFilename[120]; // [sp+10Ch] [bp-7Ch]@1 14299 //char pIniFilename[120]; // [sp+10Ch] [bp-7Ch]@1
14300 unsigned int v9; // [sp+184h] [bp-4h]@28 14300 unsigned int v9; // [sp+184h] [bp-4h]@28
14301 14301
14302 //_getcwd(v5, 120); 14302 //_getcwd(v5, 120);
14303 //sprintfex(pIniFilename, "%s\\mm6.ini", v5); 14303 //sprintf(pIniFilename, "%s\\mm6.ini", v5);
14304 viewparams = new ViewingParams; 14304 viewparams = new ViewingParams;
14305 viewparams->uScreenX = GetPrivateProfileIntW(L"screen", L"vx1", 8, pIniFilename); 14305 viewparams->uScreenX = GetPrivateProfileIntW(L"screen", L"vx1", 8, pIniFilename);
14306 viewparams->uScreenY = GetPrivateProfileIntW(L"screen", L"vy1", 8, pIniFilename); 14306 viewparams->uScreenY = GetPrivateProfileIntW(L"screen", L"vy1", 8, pIniFilename);
14307 viewparams->uScreenZ = GetPrivateProfileIntW(L"screen", L"vx2", 468, pIniFilename); 14307 viewparams->uScreenZ = GetPrivateProfileIntW(L"screen", L"vx2", 468, pIniFilename);
14308 viewparams->uScreenW = GetPrivateProfileIntW(L"screen", L"vy2", 351, pIniFilename); 14308 viewparams->uScreenW = GetPrivateProfileIntW(L"screen", L"vy2", 351, pIniFilename);
14970 v5 = 1; 14970 v5 = 1;
14971 goto LABEL_176; 14971 goto LABEL_176;
14972 } 14972 }
14973 } 14973 }
14974 LABEL_174: 14974 LABEL_174:
14975 sprintfex(&Src, "Unknown DirectDraw/Direct3D error number %X", v4); 14975 sprintf(&Src, "Unknown DirectDraw/Direct3D error number %X", v4);
14976 v13 = strlen(&Src); 14976 v13 = strlen(&Src);
14977 v12 = &Src; 14977 v12 = &Src;
14978 goto LABEL_175; 14978 goto LABEL_175;
14979 } 14979 }
14980 if ( v4 > -2005532492 ) 14980 if ( v4 > -2005532492 )
15163 a1.uFrameHeight -= 12; 15163 a1.uFrameHeight -= 12;
15164 a1.uFrameZ = a1.uFrameWidth + a1.uFrameX - 1; 15164 a1.uFrameZ = a1.uFrameWidth + a1.uFrameX - 1;
15165 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; 15165 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
15166 v1 = pItemsTable->pItems[(unsigned int)ptr_507BC4->ptr_1C + 700].pName; 15166 v1 = pItemsTable->pItems[(unsigned int)ptr_507BC4->ptr_1C + 700].pName;
15167 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 15167 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
15168 sprintfex(pTmpBuf, format_4E2D80, v2, v1); 15168 sprintf(pTmpBuf, format_4E2D80, v2, v1);
15169 a1.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u); 15169 a1.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
15170 return a1.DrawText( 15170 return a1.DrawText(
15171 pFontSmallnum, 15171 pFontSmallnum,
15172 1, 15172 1,
15173 LOBYTE(pFontCreate->uFontHeight) - 3, 15173 LOBYTE(pFontCreate->uFontHeight) - 3,
15859 else 15859 else
15860 { 15860 {
15861 if ( pParty->pPickedItem.uItemID ) 15861 if ( pParty->pPickedItem.uItemID )
15862 return 1; 15862 return 1;
15863 v24 = (int)pItemsTable->pItems[v20].pUnidentifiedName; 15863 v24 = (int)pItemsTable->pItems[v20].pUnidentifiedName;
15864 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[471], v24); 15864 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[471], v24);
15865 ShowStatusBarString(pTmpBuf2, 2u); 15865 ShowStatusBarString(pTmpBuf2, 2u);
15866 if ( v19->uItemID == 506 ) 15866 if ( v19->uItemID == 506 )
15867 _449B7E_toggle_bit(pParty->_award_bits, 184, 1u); 15867 _449B7E_toggle_bit(pParty->_award_bits, 184, 1u);
15868 if ( v19->uItemID == 455 ) 15868 if ( v19->uItemID == 455 )
15869 _449B7E_toggle_bit(pParty->_award_bits, 185, 1u); 15869 _449B7E_toggle_bit(pParty->_award_bits, 185, 1u);