Mercurial > mm7
comparison mm7_3.cpp @ 1412:182d58b2a34c
Harmondale falling under terrain fixed
author | Nomad |
---|---|
date | Sat, 27 Jul 2013 14:28:14 +0200 |
parents | 2423bc2af692 |
children | 3881d2f94eb1 |
comparison
equal
deleted
inserted
replaced
1411:2423bc2af692 | 1412:182d58b2a34c |
---|---|
5973 } | 5973 } |
5974 } | 5974 } |
5975 // 6BE3C4: using guessed type char bUnderwater; | 5975 // 6BE3C4: using guessed type char bUnderwater; |
5976 | 5976 |
5977 //----- (0047F44B) -------------------------------------------------------- | 5977 //----- (0047F44B) -------------------------------------------------------- |
5978 unsigned int __stdcall WorldPosToGridCellX(signed int sWorldPosX) | 5978 unsigned int WorldPosToGridCellX(int sWorldPosX) |
5979 { | 5979 { |
5980 return (sWorldPosX / 512) + 64; | 5980 return (sWorldPosX >> 9) + 64; // sar is in original exe, resulting -880 / 512 = -1 |
5981 } | 5981 // and -880 sar 9 = -2 |
5982 // 47F44B: using guessed type int __stdcall WorldPosToGridCellX(int); | 5982 } |
5983 | 5983 |
5984 //----- (0047F458) -------------------------------------------------------- | 5984 //----- (0047F458) -------------------------------------------------------- |
5985 unsigned int __stdcall WorldPosToGridCellZ(signed int sWorldPosZ) | 5985 unsigned int WorldPosToGridCellZ(int sWorldPosZ) |
5986 { | 5986 { |
5987 return 64 - (sWorldPosZ / 512); | 5987 return 64 - (sWorldPosZ >> 9); // sar is in original exe, resulting -880 / 512 = -1 |
5988 // and -880 sar 9 = -2 | |
5988 } | 5989 } |
5989 | 5990 |
5990 //----- (0047F469) -------------------------------------------------------- | 5991 //----- (0047F469) -------------------------------------------------------- |
5991 int __stdcall GridCellToWorldPosX(int a1) | 5992 int __stdcall GridCellToWorldPosX(int a1) |
5992 { | 5993 { |