Merged from revision: 7295

- fix: bug with static structures display shifted when viewing top left corner of map in certain resolutions (1440x900, 1600x900, possibly others) (by anv & Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7296 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-06-27 06:43:57 +00:00
parent 75ddf38ece
commit b083314318
+2 -2
View File
@@ -535,8 +535,8 @@ void FromCellToScreenCoordinates( INT16 sCellX, INT16 sCellY, INT16 *psScreenX,
void FromScreenToCellCoordinates( INT16 sScreenX, INT16 sScreenY, INT16 *psCellX, INT16 *psCellY )
{
*psCellX = ( ( sScreenX + ( 2 * sScreenY ) ) / 4 );
*psCellY = ( ( 2 * sScreenY ) - sScreenX ) / 4;
*psCellX = ( ( sScreenX + ( 2 * sScreenY ) + 2 ) / 4 );
*psCellY = ( ( 2 * sScreenY ) - sScreenX + 2 ) / 4;
}
// These two functions take into account that our world is projected and attached