comparison mm7_4.cpp @ 949:c0d0656aa662

Awards
author Nomad
date Wed, 01 May 2013 20:04:24 +0200
parents 5a2dbb00c399
children e9292c58644a cbf623f00e6c
comparison
equal deleted inserted replaced
948:5a2dbb00c399 949:c0d0656aa662
3483 if ( IsBadStringPtrA(lpsz, 1u) ) 3483 if ( IsBadStringPtrA(lpsz, 1u) )
3484 return "Invalid String Passed"; 3484 return "Invalid String Passed";
3485 3485
3486 a1[0] = 0; 3486 a1[0] = 0;
3487 pPlayer = &pParty->pPlayers[v6]; 3487 pPlayer = &pParty->pPlayers[v6];
3488 v59 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 155); 3488 v59 = TargetColor(255, 255, 155);
3489 //v61 = pPlayer; 3489 //v61 = pPlayer;
3490 memset(pTmpBuf2, 0, sizeof(pTmpBuf2)); 3490 memset(pTmpBuf2, 0, sizeof(pTmpBuf2));
3491 3491
3492 NPCData *npc = nullptr; 3492 NPCData *npc = nullptr;
3493 if ( dword_5C35D4 ) 3493 if ( dword_5C35D4 )
6216 a1.uFrameWidth -= 12; 6216 a1.uFrameWidth -= 12;
6217 a1.uFrameHeight -= 12; 6217 a1.uFrameHeight -= 12;
6218 v7 = pSpellStats->pInfos[v1].pName; 6218 v7 = pSpellStats->pInfos[v1].pName;
6219 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; 6219 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
6220 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; 6220 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
6221 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 6221 v8 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
6222 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); 6222 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u);
6223 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0); 6223 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0);
6224 a1.uFrameZ = a1.uFrameX + 107; 6224 a1.uFrameZ = a1.uFrameX + 107;
6225 a1.uFrameWidth = 108; 6225 a1.uFrameWidth = 108;
6226 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v11 / 4 + 12], 3u); 6226 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v11 / 4 + 12], 3u);
6251 v4.uFrameWidth = 148; 6251 v4.uFrameWidth = 148;
6252 v4.uFrameZ = 334; 6252 v4.uFrameZ = 334;
6253 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427], pPlayer->pName, pGlobalTXT_LocalizationStrings[562]);// 6253 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427], pPlayer->pName, pGlobalTXT_LocalizationStrings[562]);//
6254 // "%s is in no condition to %s" 6254 // "%s is in no condition to %s"
6255 // "do anything" 6255 // "do anything"
6256 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 0x9Bu); 6256 v2 = TargetColor(255, 255, 0x9Bu);
6257 v3 = pFontArrus->CalcTextHeight(pTmpBuf, &v4, 0, 0); 6257 v3 = pFontArrus->CalcTextHeight(pTmpBuf, &v4, 0, 0);
6258 v4.DrawTitleText(pFontArrus, 0, (212 - v3) / 2 + 101, v2, pTmpBuf, 3u); 6258 v4.DrawTitleText(pFontArrus, 0, (212 - v3) / 2 + 101, v2, pTmpBuf, 3u);
6259 result = 0; 6259 result = 0;
6260 } 6260 }
6261 return result; 6261 return result;
7284 } 7284 }
7285 a1.uFrameWidth -= 10; 7285 a1.uFrameWidth -= 10;
7286 a1.uFrameZ -= 10; 7286 a1.uFrameZ -= 10;
7287 v58 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)]; 7287 v58 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)];
7288 v6 = v58; 7288 v6 = v58;
7289 v55 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); 7289 v55 = TargetColor(0xE1u, 0xCDu, 0x23u);
7290 v7 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u); 7290 v7 = TargetColor(0x15u, 0x99u, 0xE9u);
7291 v8 = v6->uProfession; 7291 v8 = v6->uProfession;
7292 if ( v8 ) 7292 if ( v8 )
7293 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]); 7293 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]);
7294 else 7294 else
7295 strcpy(pTmpBuf, v6->pName); 7295 strcpy(pTmpBuf, v6->pName);
7364 } 7364 }
7365 v28 = v27 - 1; 7365 v28 = v27 - 1;
7366 if ( !v28 ) 7366 if ( !v28 )
7367 { 7367 {
7368 v29 = (char *)&pMonsterStats + 88 * word_F8B1A0; 7368 v29 = (char *)&pMonsterStats + 88 * word_F8B1A0;
7369 v30 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 7369 v30 = TargetColor(0xFFu, 0xFFu, 0xFFu);
7370 v31 = *(int *)v29; 7370 v31 = *(int *)v29;
7371 v32 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 7371 v32 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
7372 sprintf(pTmpBuf, &byte_4F0F98, v32, v31, v30); 7372 sprintf(pTmpBuf, &byte_4F0F98, v32, v31, v30);
7373 sprintf(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]); 7373 sprintf(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]);
7374 current_npc_text = pTmpBuf2; 7374 current_npc_text = pTmpBuf2;
7375 v15 = ""; 7375 v15 = "";
7376 goto LABEL_45; 7376 goto LABEL_45;
7449 break; 7449 break;
7450 } 7450 }
7451 } 7451 }
7452 } 7452 }
7453 v34 = 0; 7453 v34 = 0;
7454 v54 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 7454 v54 = TargetColor(0xFFu, 0xFFu, 0xFFu);
7455 v35 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); 7455 v35 = TargetColor(0xE1u, 0xCDu, 0x23u);
7456 v36 = v14->pStartingPosActiveItem; 7456 v36 = v14->pStartingPosActiveItem;
7457 v55 = v35; 7457 v55 = v35;
7458 for ( i = v36 + v14->pNumPresenceButton; (signed int)v36 < (signed int)i; i = pDialogueWindow->pNumPresenceButton 7458 for ( i = v36 + v14->pNumPresenceButton; (signed int)v36 < (signed int)i; i = pDialogueWindow->pNumPresenceButton
7459 + pDialogueWindow->pStartingPosActiveItem ) 7459 + pDialogueWindow->pStartingPosActiveItem )
7460 { 7460 {
8363 memcpy(&v28, window_SpeakInHouse, sizeof(v28)); 8363 memcpy(&v28, window_SpeakInHouse, sizeof(v28));
8364 v1 = pPlayers[uActiveCharacter]; 8364 v1 = pPlayers[uActiveCharacter];
8365 v28.uFrameX = 483; 8365 v28.uFrameX = 483;
8366 v28.uFrameWidth = 148; 8366 v28.uFrameWidth = 148;
8367 v28.uFrameZ = 334; 8367 v28.uFrameZ = 334;
8368 v30 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 8368 v30 = TargetColor(0xFFu, 0xFFu, 0xFFu);
8369 v31 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 8369 v31 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
8370 v2 = 52 * (unsigned int)v0->ptr_1C; 8370 v2 = 52 * (unsigned int)v0->ptr_1C;
8371 //v32 = (unsigned __int8)(((p2DEvents_minus1___00[v2 / 2] != 18) - 1) & 0x96) + 100; 8371 //v32 = (unsigned __int8)(((p2DEvents_minus1___00[v2 / 2] != 18) - 1) & 0x96) + 100;
8372 v32 = (unsigned __int8)(((p2DEvents[(unsigned int)v0->ptr_1C - 1].uType != 18) - 1) & 0x96) + 100; 8372 v32 = (unsigned __int8)(((p2DEvents[(unsigned int)v0->ptr_1C - 1].uType != 18) - 1) & 0x96) + 100;
8373 //v3 = (signed __int64)((double)v32 * p2DEvents_minus1__20[v2 / 4]); 8373 //v3 = (signed __int64)((double)v32 * p2DEvents_minus1__20[v2 / 4]);
8374 v3 = (signed __int64)((double)v32 * p2DEvents[(unsigned int)v0->ptr_1C - 1].fPriceMultiplier); 8374 v3 = (signed __int64)((double)v32 * p2DEvents[(unsigned int)v0->ptr_1C - 1].fPriceMultiplier);