Mercurial > mm7
comparison mm7_3.cpp @ 424:afad358dc684
Merge
author | Gloval |
---|---|
date | Sat, 23 Feb 2013 23:15:31 +0400 |
parents | 88c30918eef7 ad1e9c0bf6da |
children | 24936a5ff8ca 58b71c1af7d8 |
comparison
equal
deleted
inserted
replaced
423:88c30918eef7 | 424:afad358dc684 |
---|---|
14621 | 14621 |
14622 memcpy(&v8, pPrimaryWindow, sizeof(v8)); | 14622 memcpy(&v8, pPrimaryWindow, sizeof(v8)); |
14623 v10 = pMapStats->GetMapInfo(pCurrentMapName); | 14623 v10 = pMapStats->GetMapInfo(pCurrentMapName); |
14624 v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); | 14624 v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); |
14625 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); | 14625 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); |
14626 pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4, (Texture *)(uTextureID_50795C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50795C] : 0)); | 14626 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); |
14627 pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pTexture_outside); | 14627 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); |
14628 uTextureID_507B04 = uTextureID_right_panel; | 14628 uTextureID_507B04 = uTextureID_right_panel; |
14629 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel] : 0)); | 14629 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel] : 0)); |
14630 pRenderer->DrawTextureIndexed(556, 451, (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); | 14630 pRenderer->DrawTextureIndexed(556, 451, (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); |
14631 pRenderer->DrawTextureIndexed(476, 451, (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); | 14631 pRenderer->DrawTextureIndexed(476, 451, (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); |
14632 if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != 48 ) | 14632 if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != 48 ) |
14748 memcpy(&v7, pPrimaryWindow, sizeof(v7)); | 14748 memcpy(&v7, pPrimaryWindow, sizeof(v7)); |
14749 v9 = pMapStats->GetMapInfo(pCurrentMapName); | 14749 v9 = pMapStats->GetMapInfo(pCurrentMapName); |
14750 pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pDestinationMapName, 20); | 14750 pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pDestinationMapName, 20); |
14751 v0 = pMapStats->GetMapInfo(pDestinationMapName); | 14751 v0 = pMapStats->GetMapInfo(pDestinationMapName); |
14752 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); | 14752 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); |
14753 pRenderer->DrawTextureTransparent(0x1D4u, 0, | 14753 pRenderer->DrawTextureTransparent(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_507B04]); |
14754 (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0)); | 14754 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); |
14755 pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pTexture_outside); | 14755 pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, &pIcons_LOD->pTextures[uTextureID_x_x_u]); |
14756 pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, | |
14757 (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); | |
14758 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C3u, | 14756 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C3u, |
14759 (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); | 14757 (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); |
14760 if ( v0 ) | 14758 if ( v0 ) |
14761 { | 14759 { |
14762 v1 = &pMapStats->pInfos[v0]; | 14760 v1 = &pMapStats->pInfos[v0]; |
14976 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 14974 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
14977 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); | 14975 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); |
14978 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u); | 14976 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u); |
14979 pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); | 14977 pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); |
14980 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0)); | 14978 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0)); |
14981 pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); | 14979 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); |
14982 pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pDialogueNPCPortraits[0]); | 14980 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[0]); |
14983 | 14981 |
14984 if (pNPC->uProfession) | 14982 if (pNPC->uProfession) |
14985 { | 14983 { |
14986 assert(pNPC->uProfession < sizeof(aNPCProfessionNames) / sizeof(*aNPCProfessionNames)); // sometimes buffer overflows; errors emerge both here and in dialogue text | 14984 assert(pNPC->uProfession < sizeof(aNPCProfessionNames) / sizeof(*aNPCProfessionNames)); // sometimes buffer overflows; errors emerge both here and in dialogue text |
14987 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s | 14985 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s |
17680 //unsigned int v15; // edi@67 | 17678 //unsigned int v15; // edi@67 |
17681 //char *v16; // eax@67 | 17679 //char *v16; // eax@67 |
17682 //unsigned int v17; // edx@67 | 17680 //unsigned int v17; // edx@67 |
17683 //unsigned int v18; // ecx@67 | 17681 //unsigned int v18; // ecx@67 |
17684 //unsigned __int16 v19; // ax@72 | 17682 //unsigned __int16 v19; // ax@72 |
17685 int *v20; // esi@80 | 17683 //int *v20; // esi@80 |
17686 Actor *v21; // ebx@80 | 17684 Actor *v21; // ebx@80 |
17687 unsigned __int16 v22; // ax@86 | 17685 unsigned __int16 v22; // ax@86 |
17688 signed int v23; // eax@94 | 17686 signed int v23; // eax@94 |
17689 unsigned int v24; // eax@102 | 17687 unsigned int v24; // eax@102 |
17690 signed int v25; // edi@102 | 17688 signed int v25; // edi@102 |
17837 //do | 17835 //do |
17838 //{ | 17836 //{ |
17839 //pActor = (Actor *)(LODWORD(v80) - 176); | 17837 //pActor = (Actor *)(LODWORD(v80) - 176); |
17840 //v11 = *(unsigned int *)LODWORD(v80); | 17838 //v11 = *(unsigned int *)LODWORD(v80); |
17841 //v49 = *(unsigned int *)LODWORD(v80) == 5; | 17839 //v49 = *(unsigned int *)LODWORD(v80) == 5; |
17842 dword_4F6E08[i] = 4; | 17840 ai_near_actors_targets_pid[i] = OBJECT_Player; |
17843 if (actor->uAIState == Dead || actor->uAIState == Removed || actor->uAIState == Disabled || actor->uAttributes & 0x0400) | 17841 if (actor->uAIState == Dead || actor->uAIState == Removed || actor->uAIState == Disabled || actor->uAttributes & 0x0400) |
17844 continue; | 17842 continue; |
17845 | 17843 |
17846 if (!actor->sCurrentHP && actor->uAIState != Dying) | 17844 if (!actor->sCurrentHP && actor->uAIState != Dying) |
17847 Actor::Die(i); | 17845 Actor::Die(i); |
17926 while ( 1 ) | 17924 while ( 1 ) |
17927 { | 17925 { |
17928 actor_id = ai_near_actors_ids[v78]; | 17926 actor_id = ai_near_actors_ids[v78]; |
17929 assert(actor_id < uNumActors); | 17927 assert(actor_id < uNumActors); |
17930 | 17928 |
17931 v20 = &dword_4F6E08[actor_id]; | 17929 //v20 = &ai_near_actors_targets_pid[actor_id]; |
17932 v21 = &pActors[actor_id]; | 17930 v21 = &pActors[actor_id]; |
17933 Actor::_401221(actor_id, &dword_4F6E08[actor_id], 1u); | 17931 Actor::_SelectTarget(actor_id, &ai_near_actors_targets_pid[actor_id], true); |
17934 if ( v21->pMonsterInfo.uHostilityType && !*v20 ) | 17932 if (v21->pMonsterInfo.uHostilityType && !ai_near_actors_targets_pid[actor_id]) |
17935 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; | 17933 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; |
17936 a2 = *v20; | 17934 a2 = ai_near_actors_targets_pid[actor_id]; |
17937 v76 = a2 & 7; | 17935 v76 = a2 & 7; |
17938 if ( (a2 & 7) == OBJECT_Actor) | 17936 if ( (a2 & 7) == OBJECT_Actor) |
17939 v80 = 0.5; | 17937 v80 = 0.5; |
17940 else | 17938 else |
17941 v80 = 1.0; | 17939 v80 = 1.0; |
18685 if ( pActors[v37].CanAct() ) | 18683 if ( pActors[v37].CanAct() ) |
18686 { | 18684 { |
18687 v7 = v6->uAttributes; | 18685 v7 = v6->uAttributes; |
18688 if ( v7 & 0x8000 < 0 ) | 18686 if ( v7 & 0x8000 < 0 ) |
18689 { | 18687 { |
18690 v8 = dword_4F6E08[v5]; | 18688 v8 = ai_near_actors_targets_pid[v5]; |
18691 LOBYTE(v7) = v7 | 0x80; | 18689 LOBYTE(v7) = v7 | 0x80; |
18692 v6->uAttributes = v7; | 18690 v6->uAttributes = v7; |
18693 v33 = 8 * v5 | OBJECT_Actor; | 18691 v33 = 8 * v5 | OBJECT_Actor; |
18694 memcpy(&v31, Actor::GetDirectionInfo(8 * v5 | OBJECT_Actor, v8, &a3, 0), sizeof(v31)); | 18692 memcpy(&v31, Actor::GetDirectionInfo(8 * v5 | OBJECT_Actor, v8, &a3, 0), sizeof(v31)); |
18695 memcpy(&v30, &v31, sizeof(v30)); | 18693 memcpy(&v30, &v31, sizeof(v30)); |