Mercurial > might-and-magic-trilogy
comparison mm7_4.cpp @ 55:663d5bf032d9
Слияние
author | Ritor1 |
---|---|
date | Wed, 24 Oct 2012 17:55:45 +0600 |
parents | c28452924144 4211cceb3813 |
children | 30ec77bbd018 5ec98919c8fd |
comparison
equal
deleted
inserted
replaced
54:c28452924144 | 55:663d5bf032d9 |
---|---|
7286 pRenderer->pCurrentlyLockedSoftSurface = pRenderer->pTargetSurface; | 7286 pRenderer->pCurrentlyLockedSoftSurface = pRenderer->pTargetSurface; |
7287 pRenderer->uCurrentlyLockedSurfacePitch = Dst.lPitch; | 7287 pRenderer->uCurrentlyLockedSurfacePitch = Dst.lPitch; |
7288 v1 = pRenderer->pTargetSurface; | 7288 v1 = pRenderer->pTargetSurface; |
7289 v2 = Dst.lpSurface; | 7289 v2 = Dst.lpSurface; |
7290 | 7290 |
7291 | |
7291 for (uint y = 0; y < 480; ++y) | 7292 for (uint y = 0; y < 480; ++y) |
7292 { | 7293 { |
7293 auto pDst = (unsigned short *)((char *)Dst.lpSurface + y * Dst.lPitch); | 7294 auto pDst = (unsigned short *)((char *)Dst.lpSurface + y * Dst.lPitch); |
7294 for (uint x = 0; x < 640; ++x) | 7295 for (uint x = 0; x < 640; ++x) |
7295 pDst[x] = pRenderer->uTargetGMask | pRenderer->uTargetBMask; | 7296 pDst[x] = pRenderer->uTargetRMask | pRenderer->uTargetBMask; |
7296 } | 7297 } |
7297 | 7298 |
7298 auto pSrc = pRenderer->pTargetSurface; | 7299 auto pSrc = pRenderer->pTargetSurface; |
7299 auto pDst = (__int16 *)Dst.lpSurface; | 7300 auto pDst = (__int16 *)Dst.lpSurface; |
7300 | 7301 |
15064 int v8; // eax@10 | 15065 int v8; // eax@10 |
15065 SpriteFrame *v9; // eax@16 | 15066 SpriteFrame *v9; // eax@16 |
15066 SpriteFrame *v10; // ebx@18 | 15067 SpriteFrame *v10; // ebx@18 |
15067 int *v11; // eax@18 | 15068 int *v11; // eax@18 |
15068 int v12; // ecx@28 | 15069 int v12; // ecx@28 |
15069 IndoorCameraD3D **v14; // eax@36 | 15070 //IndoorCameraD3D **v14; // eax@36 |
15070 double v15; // st7@36 | 15071 double v15; // st7@36 |
15071 float v16; // eax@36 | 15072 float v16; // eax@36 |
15072 double v17; // ST30_8@36 | 15073 //double v17; // ST30_8@36 |
15073 signed __int64 v18; // qtt@36 | 15074 signed __int64 v18; // qtt@36 |
15074 int v19; // ST5C_4@36 | 15075 int v19; // ST5C_4@36 |
15075 signed __int64 v20; // qtt@37 | 15076 signed __int64 v20; // qtt@37 |
15076 int v21; // ST5C_4@37 | 15077 int v21; // ST5C_4@37 |
15077 signed __int16 v22; // cx@39 | 15078 signed __int16 v22; // cx@39 |
15078 int v23; // ST50_4@40 | 15079 int v23; // ST50_4@40 |
15079 signed int v24; // ecx@40 | 15080 signed int v24; // ecx@40 |
15080 int v25; // edx@44 | 15081 int v25; // edx@44 |
15081 __int16 v26; // ax@44 | 15082 __int16 v26; // ax@44 |
15082 MonsterDesc *v27; // edx@44 | 15083 //MonsterDesc *v27; // edx@44 |
15083 int v28; // ecx@44 | 15084 //int v28; // ecx@44 |
15084 unsigned __int8 v29; // zf@44 | 15085 unsigned __int8 v29; // zf@44 |
15085 unsigned __int8 v30; // sf@44 | 15086 unsigned __int8 v30; // sf@44 |
15086 unsigned int v31; // [sp-8h] [bp-5Ch]@15 | 15087 unsigned int v31; // [sp-8h] [bp-5Ch]@15 |
15087 int v32; // [sp+1Ch] [bp-38h]@5 | 15088 int v32; // [sp+1Ch] [bp-38h]@5 |
15088 int a3; // [sp+20h] [bp-34h]@5 | 15089 int a3; // [sp+20h] [bp-34h]@5 |
15136 v8 = p->uCurrentActionTime; | 15137 v8 = p->uCurrentActionTime; |
15137 LABEL_12: | 15138 LABEL_12: |
15138 if (p->pActorBuffs[5].uExpireTime > 0i64 || p->pActorBuffs[6].uExpireTime > 0i64 ) | 15139 if (p->pActorBuffs[5].uExpireTime > 0i64 || p->pActorBuffs[6].uExpireTime > 0i64 ) |
15139 v8 = 0; | 15140 v8 = 0; |
15140 v31 = p->pSpriteIDs[v5]; | 15141 v31 = p->pSpriteIDs[v5]; |
15141 if (p->uAIState == 16 ) | 15142 if (p->uAIState == Resurrected) |
15142 v9 = pSpriteFrameTable->GetFrameBy_x(v31, v8); | 15143 v9 = pSpriteFrameTable->GetFrameBy_x(v31, v8); |
15143 else | 15144 else |
15144 v9 = pSpriteFrameTable->GetFrame(v31, v8); | 15145 v9 = pSpriteFrameTable->GetFrame(v31, v8); |
15145 v41 = 0; | 15146 v41 = 0; |
15146 v10 = v9; | 15147 v10 = v9; |
15167 0xFFu, | 15168 0xFFu, |
15168 0xFFu, | 15169 0xFFu, |
15169 v11); | 15170 v11); |
15170 } | 15171 } |
15171 v12 = 0; | 15172 v12 = 0; |
15172 if ( pStru170->field_53730 <= 0 ) | 15173 if ( pStru170->uNumVisibleNotEmptySectors <= 0 ) |
15173 continue; | 15174 continue; |
15174 while (pStru170->pSectorIDs_toDrawDecorationsFrom[v12] != p->uSectorID) | 15175 while (pStru170->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v12] != p->uSectorID) |
15175 { | 15176 { |
15176 ++v12; | 15177 ++v12; |
15177 if ( v12 >= pStru170->field_53730 ) | 15178 if ( v12 >= pStru170->uNumVisibleNotEmptySectors ) |
15178 continue; | 15179 goto _continue; |
15179 } | 15180 } |
15180 if ( !pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(a1a, a2, a3, &x, &y, &z, 1) | 15181 if ( !pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(a1a, a2, a3, &x, &y, &z, 1) |
15181 || (v0 = (RenderBillboard *)abs(x), (signed int)v0 < abs(y)) ) | 15182 || (v0 = (RenderBillboard *)abs(x), (signed int)v0 < abs(y)) ) |
15182 continue; | 15183 continue; |
15183 pGame->pIndoorCameraD3D->Project(x, y, z, &v43, &a6); | 15184 pGame->pIndoorCameraD3D->Project(x, y, z, &v43, &a6); |
15200 v0->field_0 = (unsigned __int64)(v10->scale * v20 / x) >> 16; | 15201 v0->field_0 = (unsigned __int64)(v10->scale * v20 / x) >> 16; |
15201 a5a = (unsigned __int64)(v10->scale * (signed __int64)v21) >> 16; | 15202 a5a = (unsigned __int64)(v10->scale * (signed __int64)v21) >> 16; |
15202 } | 15203 } |
15203 else | 15204 else |
15204 { | 15205 { |
15205 v14 = &pGame->pIndoorCameraD3D; | 15206 //v14 = &pGame->pIndoorCameraD3D; |
15206 v0->flt_8 = pGame->pIndoorCameraD3D->flt_D0; | 15207 v0->flt_8 = pGame->pIndoorCameraD3D->flt_D0; |
15207 v15 = (*v14)->flt_D4; | 15208 v15 = pGame->pIndoorCameraD3D->flt_D4; |
15208 v16 = v0->flt_8; | 15209 v16 = v0->flt_8; |
15209 v0->flt_C = v15; | 15210 v0->flt_C = v15; |
15210 v17 = v16 + 6.7553994e15; | 15211 //v17 = v16 + 6.7553994e15; |
15211 LODWORD(v18) = 0; | 15212 LODWORD(v18) = 0; |
15212 HIDWORD(v18) = SLOWORD(v17); | 15213 HIDWORD(v18) = floorf(v16 + 0.5f); |
15213 v19 = v18 / x; | 15214 v19 = v18 / x; |
15214 v0->field_0 = (unsigned __int64)(v10->scale * v18 / x) >> 16; | 15215 v0->field_0 = (unsigned __int64)(v10->scale * v18 / x) >> 16; |
15215 a5a = (unsigned __int64)(v10->scale * (signed __int64)v19) >> 16; | 15216 a5a = (unsigned __int64)(v10->scale * (signed __int64)v19) >> 16; |
15216 } | 15217 } |
15217 v0->field_4 = a5a; | 15218 v0->field_4 = a5a; |
15245 v0->uScreenSpaceX = v43; | 15246 v0->uScreenSpaceX = v43; |
15246 v0->uScreenSpaceY = a6; | 15247 v0->uScreenSpaceY = a6; |
15247 LOWORD(v25) = 0; | 15248 LOWORD(v25) = 0; |
15248 LOBYTE(v26) = v41; | 15249 LOBYTE(v26) = v41; |
15249 v0->sZValue = v25 + (8 * i | 3); | 15250 v0->sZValue = v25 + (8 * i | 3); |
15250 v27 = pMonsterList->pMonsters; | 15251 //v27 = pMonsterList->pMonsters; |
15251 v28 = p->pMonsterInfo.uID; | 15252 //v28 = p->pMonsterInfo.uID; |
15252 v29 = HIDWORD(p->pActorBuffs[5].uExpireTime) == 0; | 15253 v29 = HIDWORD(p->pActorBuffs[5].uExpireTime) == 0; |
15253 v30 = HIDWORD(p->pActorBuffs[5].uExpireTime) < 0; | 15254 v30 = HIDWORD(p->pActorBuffs[5].uExpireTime) < 0; |
15254 v0->field_1E = v41; | 15255 v0->field_1E = v41; |
15255 v0->pSpriteFrame = v10; | 15256 v0->pSpriteFrame = v10; |
15256 v0->uTintColor = *((_DWORD *)&v27[v28] - 36); | 15257 v0->uTintColor = pMonsterList->pMonsters[p->pMonsterInfo.uID - 1].uTintColor; |
15257 if ( !v30 && (!(v30 | v29) || LODWORD(p->pActorBuffs[5].uExpireTime)) ) | 15258 if ( !v30 && (!(v30 | v29) || LODWORD(p->pActorBuffs[5].uExpireTime)) ) |
15258 { | 15259 { |
15259 HIBYTE(v26) = HIBYTE(v41) | 1; | 15260 HIBYTE(v26) = HIBYTE(v41) | 1; |
15260 v0->field_1E = v26; | 15261 v0->field_1E = v26; |
15261 } | 15262 } |
15263 | |
15264 _continue: | |
15265 ; | |
15262 } | 15266 } |
15263 } | 15267 } |
15264 | 15268 |
15265 | 15269 |
15266 | 15270 |