changeset 2003:72af4d93bdfb

DoGetHeightOnTerrain -1 signed fix
author zipi
date Tue, 05 Nov 2013 23:59:54 +0000
parents 2e6c63bdcfa9
children 8fa26b63244a
files Outdoor.cpp Outdoor.h
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Outdoor.cpp	Tue Nov 05 23:35:21 2013 +0000
+++ b/Outdoor.cpp	Tue Nov 05 23:59:54 2013 +0000
@@ -239,11 +239,11 @@
 // 47F458: using guessed type int __stdcall WorldPosToGridCellZ(int);
 
 //----- (00488EEF) --------------------------------------------------------
-unsigned int OutdoorLocation::GetTileTexture(int sX, int sY)
+unsigned int OutdoorLocation::GetTileTexture(signed int sX, signed int sY)
 {
   //OutdoorLocation *v3; // esi@1
-  unsigned int v4; // edi@1
-  unsigned int v5; // eax@1
+  signed int v4; // edi@1
+  signed int v5; // eax@1
 //  unsigned int result; // eax@5
 
   /*v3 = this;
@@ -2502,11 +2502,11 @@
 }
 
 //----- (0047EE16) --------------------------------------------------------
-int OutdoorLocation::DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ)
+int OutdoorLocation::DoGetHeightOnTerrain(signed int sX, signed int sZ)
 {
-  assert(uX < 128 && uZ < 128);
+  assert(sX < 128 && sZ < 128);
 
-  return 32 * pTerrain.pHeightmap[uZ * 128 + uX];
+  return 32 * pTerrain.pHeightmap[sZ * 128 + sX];
 }
 
 //----- (0047EE49) --------------------------------------------------------
--- a/Outdoor.h	Tue Nov 05 23:35:21 2013 +0000
+++ b/Outdoor.h	Tue Nov 05 23:59:54 2013 +0000
@@ -140,7 +140,7 @@
   unsigned int DoGetTileTexture(unsigned int uX, unsigned int uZ);
   int _47ED83(signed int a2, signed int a3);
   int ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY);
-  int DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ);
+  int DoGetHeightOnTerrain(signed int sX, signed int sZ);
   int GetSoundIdByPosition(signed int X_pos, signed int Y_pos, int a4);
   int UpdateDiscoveredArea(int a2, int a3, int a4);
   bool _47F04C(signed int a2, signed int a3);