Mercurial > mm7
diff Outdoor.cpp @ 61:6c2cefdaea3e
Слияние
author | Ritor1 |
---|---|
date | Tue, 22 Jan 2013 18:41:17 +0600 |
parents | b9d70af644f3 63cfe63ac4c5 |
children | 80484cf3a683 |
line wrap: on
line diff
--- a/Outdoor.cpp Tue Jan 22 01:11:32 2013 +0600 +++ b/Outdoor.cpp Tue Jan 22 18:41:17 2013 +0600 @@ -235,6 +235,11 @@ //----- (00488F2E) -------------------------------------------------------- int OutdoorLocation::GetHeightOnTerrain(int sX, int sZ) + /* , . + ( Y) , . + X Z . + Terrain::getHeight; X Z , + , .*/ { int result; // eax@5 @@ -707,7 +712,7 @@ } //----- (0047C7C2) -------------------------------------------------------- -void OutdoorLocationTerrain::Release() +void OutdoorLocationTerrain::Release()// { if (pHeightmap) { @@ -736,7 +741,7 @@ //----- (0047C80A) -------------------------------------------------------- int OutdoorLocationTerrain::_47C80A(int a2, int a3, int a4, int a5) { - OutdoorLocationTerrain *v5; // ebx@1 + OutdoorLocationTerrain *pOutLocTerrain; // ebx@1 double v6; // st7@1 double v7; // st7@2 double v8; // st7@2 @@ -747,7 +752,7 @@ int v13; // edi@7 int v14; // edx@9 int v15; // eax@15 - unsigned __int8 *v16; // ebx@15 + unsigned __int8 *pMapHeight; // ebx@15 int v17; // eax@15 int v18; // ecx@15 int v19; // esi@15 @@ -774,7 +779,7 @@ int v40; // [sp+18h] [bp-30h]@15 int v41; // [sp+1Ch] [bp-2Ch]@15 int v42; // [sp+20h] [bp-28h]@15 - OutdoorLocationTerrain *v43; // [sp+24h] [bp-24h]@1 + OutdoorLocationTerrain *pOutLocTerrain2; // [sp+24h] [bp-24h]@1 int v44; // [sp+28h] [bp-20h]@21 float v45; // [sp+2Ch] [bp-1Ch]@1 float v46; // [sp+30h] [bp-18h]@1 @@ -792,9 +797,9 @@ v46 = -64.0; v47 = -64.0; - v5 = this; + pOutLocTerrain = this; v45 = 64.0; - v43 = this; + pOutLocTerrain2 = this; v6 = sqrt(12288.0); if ( v6 != 0.0 ) { @@ -835,17 +840,17 @@ { if ( v13 >= 0 && result >= -32256 && v13 <= 127 && result <= 32768 ) { - v15 = v5->field_10; + v15 = pOutLocTerrain->field_10; v55 = v15; - v16 = v5->pHeightmap; - v17 = (int)(&v16[v13 * v15] + v14); + pMapHeight = pOutLocTerrain->pHeightmap; + v17 = (int)(&pMapHeight[v13 * v15] + v14); v18 = -v13; v19 = (64 - v13) << 9; v20 = 32 * *(char *)v17; v21 = 32 * *(char *)(v17 + 1); v22 = (v18 + 63) << 9; v41 = v22; - v23 = (int)(&v16[v55 * (v48 + 1)] + v50); + v23 = (int)(&pMapHeight[v55 * (v48 + 1)] + v50); v24 = v22 - v19; v40 = 32 * *(char *)v23; v42 = 32 * *(char *)(v23 + 1); @@ -869,9 +874,9 @@ v31 = 0.0; if ( v31 > 31.0 ) v31 = 31.0; - v44 = 2 * (v50 + v48 * v43->field_10); - v5 = v43; - *((char *)v43->ptr_C + v44 + 1) = (signed __int64)v31; + v44 = 2 * (v50 + v48 * pOutLocTerrain2->field_10); + pOutLocTerrain = pOutLocTerrain2; + *((char *)pOutLocTerrain2->ptr_C + v44 + 1) = (signed __int64)v31; v32 = v49 - (v49 - 512); v33 = (double)-((v42 - v40) * (v19 - v41)); v52 = v33; @@ -893,7 +898,7 @@ if ( v38 > 31.0 ) v38 = 31.0; v13 = v48; - *((char *)v43->ptr_C + v44) = (signed __int64)v38; + *((char *)pOutLocTerrain2->ptr_C + v44) = (signed __int64)v38; v14 = v50; result = v49; } @@ -1038,12 +1043,12 @@ void *v6; // eax@5 v1 = this; - v2 = pAllocator->AllocNamedChunk(this->pHeightmap, 0x4000u, "HMAP"); + v2 = pAllocator->AllocNamedChunk(this->pHeightmap, 0x4000u, "HMAP");// v1->pHeightmap = (unsigned __int8 *)v2; if ( v2 - && (v4 = pAllocator->AllocNamedChunk(v1->pTilemap, 0x4000u, "TMAP"), + && (v4 = pAllocator->AllocNamedChunk(v1->pTilemap, 0x4000u, "TMAP"),// (v1->pTilemap = (unsigned __int8 *)v4) != 0) - && (v5 = pAllocator->AllocNamedChunk(v1->pAttributemap, 0x4000u, "AMAP"), + && (v5 = pAllocator->AllocNamedChunk(v1->pAttributemap, 0x4000u, "AMAP"),// (v1->pAttributemap = (unsigned __int8 *)v5) != 0) ) { v6 = pAllocator->AllocNamedChunk(v1->ptr_C, 0x8000u, "DMAP"); @@ -1177,7 +1182,7 @@ } //----- (0047D0A6) -------------------------------------------------------- -bool OutdoorLocation::Load(char *pFilename, ODMFace *File, size_t pNumItems, int thisa) +bool OutdoorLocation::Load(char *pFilename, ODMFace *File, size_t pNumItems, int thisa)// { //OutdoorLocation *pOutdoorLocation; // esi@1 /*bool result; // eax@9 @@ -2447,7 +2452,7 @@ { int result; // eax@5 - if ( (uX & 0x80000000u) != 0 || (signed int)uX > 127 || (uZ & 0x80000000u) != 0 || (signed int)uZ > 127 ) + if ( (signed int)uX < 0 || (signed int)uX > 127 || (signed int)uZ < 0 || (signed int)uZ > 127 ) result = 0; else result = 32 * *(&this->pTerrain.pHeightmap[128 * uZ] + uX);