comparison mm7_3.cpp @ 602:628694cd5744

Margaret working
author zipi
date Wed, 06 Mar 2013 23:26:46 +0000
parents d59398528e4f
children 5bf285f56fa8 f234b67a9caf
comparison
equal deleted inserted replaced
601:d59398528e4f 602:628694cd5744
14120 char *pInString=NULL; // [sp+110h] [bp-4h]@32 14120 char *pInString=NULL; // [sp+110h] [bp-4h]@32
14121 14121
14122 if ( !pDialogueWindow ) 14122 if ( !pDialogueWindow )
14123 return; 14123 return;
14124 memcpy(&v51, pDialogueWindow, sizeof(v51)); 14124 memcpy(&v51, pDialogueWindow, sizeof(v51));
14125 pNPC = GetNPCData(uDialogue_SpeakingActorNPC_ID); 14125 pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID);
14126 v1 = sub_445C8B(uDialogue_SpeakingActorNPC_ID); 14126 v1 = sub_445C8B(sDialogue_SpeakingActorNPC_ID);
14127 v51.uFrameWidth -= 10; 14127 v51.uFrameWidth -= 10;
14128 v51.uFrameZ -= 10; 14128 v51.uFrameZ -= 10;
14129 //v54 = v1; 14129 //v54 = v1;
14130 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 14130 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
14131 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); 14131 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
14421 } 14421 }
14422 pRenderer->DrawTextureIndexed(471, 445, (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); 14422 pRenderer->DrawTextureIndexed(471, 445, (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0));
14423 } 14423 }
14424 14424
14425 //----- (004459F9) -------------------------------------------------------- 14425 //----- (004459F9) --------------------------------------------------------
14426 NPCData *__fastcall GetNPCData(unsigned int npcid) 14426 NPCData *__fastcall GetNPCData(signed int npcid)
14427 { 14427 {
14428 unsigned int v1; // esi@1 14428 unsigned int v1; // esi@1
14429 NPCData *result; // eax@5 14429 NPCData *result; // eax@5
14430 int v3; // esi@9 14430 int v3; // esi@9
14431 int v4; // ecx@9 14431 int v4; // ecx@9
14458 } 14458 }
14459 return &pNPCStats->array_13EF4[npcid - 5000]; 14459 return &pNPCStats->array_13EF4[npcid - 5000];
14460 } 14460 }
14461 if ( (signed int)npcid >= 5000 ) 14461 if ( (signed int)npcid >= 5000 )
14462 return &pNPCStats->array_13EF4[npcid - 5000]; 14462 return &pNPCStats->array_13EF4[npcid - 5000];
14463 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) 14463 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
14464 { 14464 {
14465 result = 0; 14465 result = 0;
14466 } 14466 }
14467 else 14467 else
14468 { 14468 {
14469 v3 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1; 14469 v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
14470 v4 = 0; 14470 v4 = 0;
14471 v5 = 0; 14471 v5 = 0;
14472 v6 = pParty->pHirelings; 14472 v6 = pParty->pHirelings;
14473 do 14473 do
14474 { 14474 {
14516 } 14516 }
14517 14517
14518 14518
14519 if ( npcid >= 5000 ) 14519 if ( npcid >= 5000 )
14520 return &pNPCStats->pAdditionalNPC[npcid - 5000]; 14520 return &pNPCStats->pAdditionalNPC[npcid - 5000];
14521 if (uDialogue_SpeakingActorNPC_ID >= 0) 14521 if (sDialogue_SpeakingActorNPC_ID >= 0)
14522 { 14522 {
14523 result = 0; 14523 result = 0;
14524 } 14524 }
14525 else 14525 else
14526 { 14526 {
14527 v3 = uDialogue_SpeakingActorNPC_ID - 1; 14527 v3 = abs(sDialogue_SpeakingActorNPC_ID) - 1;
14528 v4 = 0; 14528 v4 = 0;
14529 14529
14530 for (i = 0; i < 4; ++i) 14530 for (i = 0; i < 2; ++i)
14531 { 14531 {
14532 if (pParty->pHirelings[i].pName) 14532 if (pParty->pHirelings[i].pName)
14533 pTmpBuf[v4++] = i; 14533 pTmpBuf[v4++] = i;
14534 } 14534 }
14535 14535
14595 *(int *)a2 = npcid - 5000; 14595 *(int *)a2 = npcid - 5000;
14596 return &pNPCStats->pAdditionalNPC[npcid - 5000]; 14596 return &pNPCStats->pAdditionalNPC[npcid - 5000];
14597 } 14597 }
14598 if ( npcid >= 5000 ) 14598 if ( npcid >= 5000 )
14599 goto LABEL_7; 14599 goto LABEL_7;
14600 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) 14600 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
14601 { 14601 {
14602 *(int *)a2 = 0; 14602 *(int *)a2 = 0;
14603 result = 0; 14603 result = 0;
14604 } 14604 }
14605 else 14605 else
14606 { 14606 {
14607 v5 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1; 14607 v5 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
14608 v6 = 0; 14608 v6 = 0;
14609 v7 = 0; 14609 v7 = 0;
14610 v8 = pParty->pHirelings; 14610 v8 = pParty->pHirelings;
14611 do 14611 do
14612 { 14612 {
14669 return 1; 14669 return 1;
14670 return 2; 14670 return 2;
14671 } 14671 }
14672 if ( a1 >= 5000 ) 14672 if ( a1 >= 5000 )
14673 return 2; 14673 return 2;
14674 v3 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1; 14674 v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
14675 v4 = 0; 14675 v4 = 0;
14676 v5 = 0; 14676 v5 = 0;
14677 v6 = pParty->pHirelings; 14677 v6 = pParty->pHirelings;
14678 do 14678 do
14679 { 14679 {
14704 14704
14705 14705
14706 //----- (0044603D) -------------------------------------------------------- 14706 //----- (0044603D) --------------------------------------------------------
14707 void __cdecl sub_44603D() 14707 void __cdecl sub_44603D()
14708 { 14708 {
14709 uDialogue_SpeakingActorNPC_ID = 0; 14709 sDialogue_SpeakingActorNPC_ID = 0;
14710 pDialogueWindow->Release(); 14710 pDialogueWindow->Release();
14711 pDialogueWindow = 0; 14711 pDialogueWindow = 0;
14712 pMiscTimer->Resume(); 14712 pMiscTimer->Resume();
14713 pEventTimer->Resume(); 14713 pEventTimer->Resume();
14714 } 14714 }