diff Outdoor.cpp @ 86:ec84db4c8f9d

4.01.13
author Ritor1
date Mon, 04 Feb 2013 09:17:35 +0600
parents d56c13146285
children 170259c8c71f
line wrap: on
line diff
--- a/Outdoor.cpp	Tue Jan 29 10:03:07 2013 +0600
+++ b/Outdoor.cpp	Mon Feb 04 09:17:35 2013 +0600
@@ -58,9 +58,7 @@
     v1 = 2;
   pIndoorCamera->sRotationX = pParty->sRotationX;
   pIndoorCamera->sRotationY = pParty->sRotationY;
-  pIndoorCamera->pos.x = pParty->vPosition.x
-                      - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY)
-                                          * (signed __int64)pParty->field_18) >> 16);
+  pIndoorCamera->pos.x = pParty->vPosition.x - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) * (signed __int64)pParty->field_18) >> 16);
   v3 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi);
   pIndoorCamera->field_4C = v1;
   pIndoorCamera->pos.y = pParty->vPosition.y - pParty->field_18 * ((stru_5C6E00->SinCos(pParty->sRotationY)) >> 16);
@@ -92,7 +90,7 @@
       goto LABEL_16;
     }
     //goto LABEL_14;
-	pRenderer->DrawSkyD3D();
+    pRenderer->DrawSkyD3D();
     pRenderer->DrawBuildingsD3D();
     pRenderer->DrawBezierTerrain();
     goto LABEL_16;
@@ -219,7 +217,7 @@
 // 47F458: using guessed type int __stdcall WorldPosToGridCellZ(int);
 
 //----- (00488EEF) --------------------------------------------------------
-unsigned int OutdoorLocation::GetTileTexture(int sX, int sY)
+unsigned int OutdoorLocation::GetTileTexture(int sX, int sZ)
 {
   //OutdoorLocation *v3; // esi@1
   unsigned int v4; // edi@1
@@ -234,7 +232,7 @@
   else
     result = DoGetTileTexture(v5, v4);
   return result;*/
-  v4 = WorldPosToGridCellZ(sY);
+  v4 = WorldPosToGridCellZ(sZ);
   v5 = WorldPosToGridCellX(sX);
   if ( v5 < 0 || v5 > 127 || v4 < 0 || v4 > 127 )
     return -1;
@@ -2399,9 +2397,9 @@
 }
 
 //----- (0047ED08) --------------------------------------------------------
-unsigned int OutdoorLocation::DoGetTileTexture(unsigned int uX, unsigned int uY)
+unsigned int OutdoorLocation::DoGetTileTexture(unsigned int uX, unsigned int uZ)
 {
-  int v3; // esi@5
+  int uTileID; // esi@5
   unsigned int result; // eax@9
 
 
@@ -2418,19 +2416,19 @@
     result = pTileTable->pTiles[v3].uBitmapID;
   }
   return result;*/
-   if (uX > 127 || uY > 127)
+   if (uX > 127 || uZ > 127)
    return 0;
 
- v3 = this->pTerrain.pTilemap[uY * 128 + uX];
- if (v3 < 198)
+ uTileID = this->pTerrain.pTilemap[uZ * 128 + uX];
+ if (uTileID < 198)
  {
-  if (v3 >= 90)
-    v3 = v3 + this->pTileTypes[(v3 - 90) / 18].uTileID - 36 * (v3 - 90) / 36 - 90;
+  if (uTileID >= 90)
+    uTileID = uTileID + this->pTileTypes[(uTileID - 90) / 18].uTileID - 36 * (uTileID - 90) / 36 - 90;
  }
  else
-   v3 = v3 + this->pTileTypes[3].uTileID - 198;
+   uTileID = uTileID + this->pTileTypes[3].uTileID - 198;
 
- return pTileTable->pTiles[v3].uBitmapID;
+ return pTileTable->pTiles[uTileID].uBitmapID;
 }
 
 //----- (0047ED83) --------------------------------------------------------