Mercurial > mm7
changeset 207:f96601c7e503
m
author | Ritor1 |
---|---|
date | Sat, 16 Feb 2013 08:42:43 +0600 |
parents | f9cfc1867efd |
children | 07eb7d649bd5 |
files | AudioPlayer.cpp LayingItem.cpp Outdoor.cpp Vis.cpp |
diffstat | 4 files changed, 24 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/AudioPlayer.cpp Fri Feb 15 22:58:53 2013 +0600 +++ b/AudioPlayer.cpp Sat Feb 16 08:42:43 2013 +0600 @@ -737,7 +737,6 @@ int v102; // [sp+90h] [bp+1Ch]@60 int v103; // [sp+90h] [bp+1Ch]@68 - //uVolume = 120; //Ritor1:It's temporary pAudioPlayer = this; v35 = this->bPlayerReady == 0; //pAudioPlayer = this;
--- a/LayingItem.cpp Fri Feb 15 22:58:53 2013 +0600 +++ b/LayingItem.cpp Sat Feb 16 08:42:43 2013 +0600 @@ -114,7 +114,7 @@ unsigned __int16 *pAttributes; // ecx@2 unsigned __int16 v3; // ax@2 - __debugbreak(); // find out what's going on + //__debugbreak(); // find out what's going on v1 = uLayingItemID; pLayingItems[v1].uObjectDescID = 0; @@ -124,7 +124,7 @@ v3 = *pAttributes; if ( *pAttributes & 4 ) { - LOBYTE(v3) = v3 & 0xFB; + v3 = v3 & 0xFB; --pTurnEngine->field_1C; *pAttributes = v3; }
--- a/Outdoor.cpp Fri Feb 15 22:58:53 2013 +0600 +++ b/Outdoor.cpp Sat Feb 16 08:42:43 2013 +0600 @@ -2408,20 +2408,6 @@ int v3; // esi@5 unsigned int result; // eax@9 - -/* v3 = *(&this->pTerrain.pTilemap[128 * uZ] + uX); - if ( v3 < 198 ) - { - if ( v3 >= 90 ) - v3 = v3 + this->pTileTypes[(v3 - 90) / 36].uTileID - 36 * (v3 - 90) / 36 - 90; - } - else - { - v3 = v3 + this->pTileTypes[3].uTileID - 198; - } - result = pTileTable->pTiles[v3].uBitmapID; - } - return result;*/ if ( uX < 0 || uX > 127 || uY < 0 || uY > 127) return 0; @@ -2453,20 +2439,7 @@ int OutdoorLocation::ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY) { int v3; // esi@5 - //int result; // eax@7 -/* if ( (uX & 0x80000000u) != 0 || (signed int)uX > 127 || (uY & 0x80000000u) != 0 || (signed int)uY > 127 ) - { - result = 0; - } - else - { - v3 = *(&this->pTerrain.pTilemap[128 * uY] + uX); - if ( v3 >= 90 ) - v3 = v3 + this->pTileTypes[(v3 - 90) / 36].uTileID - 36 * (v3 - 90) / 36 - 90; - result = pTileTable->pTiles[v3].uAttributes; - } - return result;*/ if (uX < 0 || uX > 127 || uY < 0 || uY > 127) return 0; else
--- a/Vis.cpp Fri Feb 15 22:58:53 2013 +0600 +++ b/Vis.cpp Sat Feb 16 08:42:43 2013 +0600 @@ -238,12 +238,12 @@ void Vis::PickBillboards(float fPickDepth, float fX, float fY, Vis_stru1 *a4, stru157 *a2) { int v6; // ST1C_4@6 - Vis_stru1_stru0 *v7; // edi@6 - Vis *thisa; // [sp+20h] [bp-Ch]@1 - RenderBillboardD3D *v9; // [sp+24h] [bp-8h]@2 - unsigned int uD3DBillboardIdx; // [sp+28h] [bp-4h]@1 + //Vis_stru1_stru0 *v7; // edi@6 + //Vis *thisa; // [sp+20h] [bp-Ch]@1 + int v9; // [sp+24h] [bp-8h]@2 + //unsigned int uD3DBillboardIdx; // [sp+28h] [bp-4h]@1 - uD3DBillboardIdx = 0; + /*uD3DBillboardIdx = 0; thisa = this; if ( (signed int)pRenderer->uNumBillboardsToDraw > 0 ) { @@ -268,7 +268,22 @@ ++v9; } while ( (signed int)uD3DBillboardIdx < (signed int)pRenderer->uNumBillboardsToDraw ); - } + }*/ + for (unsigned int i = 0; i < pRenderer->uNumBillboardsToDraw; ++i) + { + v9 = (int)&pRenderer->pBillboardRenderListD3D[i]; + + if (is_part_of_selection((BLVFace *)i, a2)) + if (IsPointInsideD3DBillboard(&pRenderer->pBillboardRenderListD3D[i], fX, fY)) + if (DoesRayIntersectBillboard(fPickDepth, i)) + { + v6 = pBillboardRenderList[pRenderer->pBillboardRenderListD3D[i].uParentBillboardID].sZValue; + + a4->array_0004[a4->uNumPointers].pObjectInfo = (void *)pRenderer->pBillboardRenderListD3D[i].uParentBillboardID; + a4->array_0004[a4->uNumPointers].sZValue = v6; + a4->array_0004[a4->uNumPointers++].uObjectType = 1; + } + } } //----- (004C1607) -------------------------------------------------------- @@ -1616,7 +1631,7 @@ stru1.uNumPointers = 0; CastPickRay(pMouseRay, fMouseX, fMouseY, fDepth); - //PickBillboards(fDepth, fMouseX, fMouseY, &stru1, a5);//Ritor1: do comment to test + PickBillboards(fDepth, fMouseX, fMouseY, &stru1, a5); if (uCurrentlyLoadedLevelType == LEVEL_Indoor) PickIndoor(fDepth, pMouseRay, &stru1, a6); else