Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0005050Dwarf FortressTechnical -- Renderingpublic2012-02-14 03:572012-02-23 15:02
Greendogo 
Baughn 
lowminoralways
resolvedfixed 
0.34.01 
0.34.03 
0005050: Adv Mode "get" menu not refreshing properly with TrueType
When you open the Get/Ground menu changing the page using / or * will leave an image of the previous page's text behind the newly brought up page. This makes it slightly difficult to view and distinguish menu items as all the text is running together.

This isn't a problem in corners of rooms or other times when you don't have the option of changing "Get/Ground" menu pages.

This may affect other menus that float over the game world view, meaning that menus like the inventory and interact menus don't have this issue.
Create an adventurer and push the "g" button to open the "Get/Ground" menu in place where the menu would have multiple pages and then use "/" or "*" to change the page. You should notice the ghosting of the previous page "under" or behind the new page's contents.
I tested this with multiple character in DF version 0.34.01
No tags attached.
Issue History
2012-02-14 03:57GreendogoNew Issue
2012-02-14 04:15GreendogoNote Added: 0019498
2012-02-14 04:19GreendogoNote Edited: 0019498bug_revision_view_page.php?bugnote_id=0019498#r7312
2012-02-14 04:20GreendogoNote Edited: 0019498bug_revision_view_page.php?bugnote_id=0019498#r7313
2012-02-14 05:08FootkerchiefNote Added: 0019502
2012-02-14 13:54GreendogoNote Added: 0019552
2012-02-14 14:45FootkerchiefNote Added: 0019555
2012-02-14 17:06FootkerchiefTag Attached: AWAITING UPDATE
2012-02-14 21:35GreendogoNote Added: 0019597
2012-02-14 21:53GreendogoNote Edited: 0019597bug_revision_view_page.php?bugnote_id=0019597#r7345
2012-02-16 07:29FootkerchiefNote Added: 0019791
2012-02-16 13:58GreendogoNote Added: 0019843
2012-02-16 14:16FootkerchiefSummaryOld Menu Items Sticking In Adventure Mode Get/Ground Menu => Adv Mode "get" menu not refreshing properly with TrueType
2012-02-16 14:16FootkerchiefIssue Monitored: Baughn
2012-02-16 14:16FootkerchiefNote Added: 0019844
2012-02-16 14:16FootkerchiefStatusnew => assigned
2012-02-16 14:16FootkerchiefAssigned To => Baughn
2012-02-16 22:42GreendogoIssue Monitored: Greendogo
2012-02-17 06:10FootkerchiefTag Detached: AWAITING UPDATE
2012-02-18 21:26GreendogoNote Added: 0020088
2012-02-22 16:11BaughnNote Added: 0020505
2012-02-23 15:02BaughnNote Added: 0020569
2012-02-23 15:02BaughnStatusassigned => resolved
2012-02-23 15:02BaughnFixed in Version => Next Version
2012-02-23 15:02BaughnResolutionopen => fixed

Notes
(0019498)
Greendogo   
2012-02-14 04:15   
(edited on: 2012-02-14 04:20)
I discovered new information. When you change the zoom using the mouse wheel so that the "Get/Ground" menu appears in the upper left instead of the lower left portion of the screen the visual error described above happens.
However, zooming out so that you can see more of your surroundings and so that the g menu switches to the lower portion of the screen seems to prevent the "ghosting" effect.

(0019502)
Footkerchief   
2012-02-14 05:08   
Reminder sent to: Greendogo

What rendering mode are you using? Is TrueType enabled?
(0019552)
Greendogo   
2012-02-14 13:54   
TrueType was set to the default of 24.
(0019555)
Footkerchief   
2012-02-14 14:45   
Reminder sent to: Greendogo

What PRINT_MODE are you using in init.txt?
(0019597)
Greendogo   
2012-02-14 21:35   
(edited on: 2012-02-14 21:53)
PRINT_MODE is set to 2D

Edit: Here's a link to a picture of what is going on-
http://i43.photobucket.com/albums/e358/Greendogo/textghosting.jpg [^]

(0019791)
Footkerchief   
2012-02-16 07:29   
Reminder sent to: Greendogo

Does disabling TrueType fix the problem?
(0019843)
Greendogo   
2012-02-16 13:58   
Yes. Though, I wouldn't really say the problem is fixed if TrueType has to be turned off.
(0019844)
Footkerchief   
2012-02-16 14:16   
Reminder sent to: Baughn

Another TrueType bug.
(0020088)
Greendogo   
2012-02-18 21:26   
Still happening in 0.34.02
(0020505)
Baughn   
2012-02-22 16:11   
Pressing F10 fixes it for that screenful, right?

What's happening is that adventure-mode is occasionally optimized to not overwrite text that needs no overwriting, 2D-mode always updates only screen areas that have changed, and neither piece of code accounts for TTF text becoming horizontally smaller than tiles.

I suppose I'll have it also refresh the tiles that "should" have been overwritten.
(0020569)
Baughn   
2012-02-23 15:02   
The actual bug was a bit more complicated.

Toady first draws eighty blank spaces to clear out the line, then draws the text on top of that. As an optimization, the TTF code only cares about the first tile of the text (it's "anchored" there), and when that's overwritten those eighty spaces never actually get drawn.

I changed the rendering to *always* draw spaces, which may then get overwritten by the actual text.