[3.4RC - Win32 client] Map not displayed properly when number of columns is too high

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2986

    [3.4RC - Win32 client] Map not displayed properly when number of columns is too high

    If you expand your Win32 client so that the number of columns displayed is high enough and you select Options/Map, the map is not properly displayed. This comes from the fact that Term_wipe_win() doesn't check for td->map_active like all other functions and erases an incorrect part of the window when displaying the full map.

    To fix the problem, copy/paste the code from Term_curs_win():

    replace

    Code:
    	/* Rectangle to erase in client coords */
    	rc.left = x * td->tile_wid + td->size_ow1;
    	rc.right = rc.left + n * td->tile_wid;
    	rc.top = y * td->tile_hgt + td->size_oh1;
    	rc.bottom = rc.top + td->tile_hgt;
    by

    Code:
    	int tile_wid, tile_hgt;
    
    	if (td->map_active)
    	{
    		tile_wid = td->map_tile_wid;
    		tile_hgt = td->map_tile_hgt;
    	}
    	else
    	{
    		tile_wid = td->tile_wid;
    		tile_hgt = td->tile_hgt;
    	}
    
    	/* Rectangle to erase in client coords */
    	rc.left = x * tile_wid + td->size_ow1;
    	rc.right = rc.left + n * tile_wid;
    	rc.top = y * tile_hgt + td->size_oh1;
    	rc.bottom = rc.top + tile_hgt;
    Note that the client completely screws up displaying tiles when the number of columns reaches 255 due to the fact that this number is stored on a byte (see another post about the subject). So the problem is probably masked by another bug in the current code. A workaround would simply be to limit the number of columns to 255, it should give a large enough display.
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎