mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user