Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 3, 2012, 16:51   #1
PowerWyrm
Veteran
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,406
PowerWyrm is on a distinguished road
Minor glitch with item selection

When you use a tileset with tile height greater than 1 (32x32 tileset for example), the portion containing item selection choices is not "rectangular".

The problem comes from this code in Term_erase():

Code:
        /* Fast access */
        scr_aa = Term->scr->a[y];
        scr_cc = Term->scr->c[y];

        scr_taa = Term->scr->ta[y];
        scr_tcc = Term->scr->tc[y];

        if ((n > 0) && (scr_aa[x] == 255))
        {
            x--;
            n++;
        }
Removing the "if" block fixes the problem (and I don't really see the purpose of that "if" block -- but I could be wrong).
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 9, 2012, 09:50   #2
PowerWyrm
Veteran
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,406
PowerWyrm is on a distinguished road
Browsing spells using 32x32 tileset in "nice graphics" mode (6x3 tiles) produces the same effect, in a worse way (description is not properly updated when moving the cursor). See attached screenshot.
Attached Images
 
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 10, 2012, 17:26   #3
PowerWyrm
Veteran
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,406
PowerWyrm is on a distinguished road
There are two problems here:

1) The irregular display of the left border is due to the code in Term_erase() which only works if tile width is 2 (the code has not been changed since bigtile mode -- double tile width -- was removed in favor of variable tile width/height.

This is fixed by adapting the code above to start on the x axis at the beginning of a tile:

Code:
        /* Hack -- Always start at the beginning of a tile in bigtile mode */
        if ((n > 0) && (scr_aa[x] == 255))
        {
            int x0 = ((x - COL_MAP) / tile_width) * tile_width + COL_MAP;

            x = x0;
            n = n + x - x0;
        }
2) The problem with spell description not properly updated when switching to another spell is the same, but this time on the y axis. I tried to fix it in the same function, but gave up after failing miserably (seems *really* tricky to fix). A proposed workaround is to fix the problem directly in the spell menu browser (spell_menu_browser method) by putting more empty lines under spell descriptions until the end of a tile is reached:

Code:
    /* XXX */
    text_out_pad = 0;
    text_out_indent = 0;

    Term_locate(&x, &y);

    /* Hack -- Always finish at the end of a tile in bigtile mode */
    if (tile_height > 1)
    {
        int ymax = ((y - ROW_MAP) / tile_height) * tile_height + ROW_MAP + tile_height - 1;

        while (++y <= ymax) Term_erase(x - 1, y, 255);
    }
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rogue spell selection Derakon Vanilla 8 March 28, 2018 12:41
Bug: 3.2.0 movement glitch (minor) Chud Vanilla 3 March 3, 2011 22:35
"Master" option & variant selection..? Lord Fell Vanilla 15 November 13, 2010 20:45
Graphics glitch in OSX version willpax Vanilla 5 January 15, 2009 15:07
Minor display glitch in 3.0.9 Dragonboneman Vanilla 17 October 26, 2007 19:04


All times are GMT +1. The time now is 12:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.