]> granicus.if.org Git - nethack/commitdiff
Qt paper doll fix
authorPatR <rankin@nethack.org>
Sun, 19 Dec 2021 11:46:21 +0000 (03:46 -0800)
committerPatR <rankin@nethack.org>
Sun, 19 Dec 2021 11:46:21 +0000 (03:46 -0800)
This fixes the broken paper doll display.  Changes for new glyphs
added code to an 'if' but not to the corresponding 'else'.

Showing map column 0 as something other than blank is still a problem.

The splash window shows a red dragon and says "loading".  I'm pretty
sure that that used to be a crisp image but it is now a fuzzy one.
It doesn't use glyphs or their tiles so shouldn't have been affected
by changes to them.

doc/fixes37.0
win/Qt/qt_inv.cpp

index d8312ebd3e5b27ba11654f167903b64d1a1d70d0..7557dd1ff850c9e286f8cd3237e047335781b4b2 100644 (file)
@@ -947,6 +947,8 @@ Qt: at Xp levels above 20 with 'showexp' On, the combined status field
        "Level:NN/nnnnnnnn" was too big and truncated by a char at each end
 Qt: searching a text window for something that wasn't found and then searching
        for some other target could crash
+Qt: changes in glyph handling in the core introduced a bug in the "paper doll"
+       display for inventory subset
 tty: redraw unexplored locations as S_unexplored rather than <space> after
        map has been partially overwritten by popup menu or text display
 tty: previous change resulted in remnants of previous level being shown on
index 0a0022faad121527fc05580350ce1685ee9f9a89..ca9eda461e6bbe96fe6dac53f3ebea18e682d9c8 100644 (file)
@@ -113,8 +113,6 @@ void NetHackQtInvUsageWindow::drawWorn(QPainter &painter, obj *nhobj,
             tips[x][y] = dupstr(tipstr);
 #endif
         glyph = obj_to_glyph(nhobj, rn2_on_display_rng);
-       map_glyphinfo(0, 0, glyph, 0, &gi); /* this skirts the defined
-                                              interface unfortunately */
     } else {
         border = NO_BORDER;
 #ifdef ENHANCED_PAPERDOLL
@@ -136,7 +134,10 @@ void NetHackQtInvUsageWindow::drawWorn(QPainter &painter, obj *nhobj,
         // an empty slot is shown as floor tile unless it's always empty
         glyph = canbe ? cmap_to_glyph(S_room) : GLYPH_UNEXPLORED;
     }
-    qt_settings->glyphs().drawBorderedCell(painter, glyph, gi.gm.tileidx, x, y, border, rev);
+    map_glyphinfo(0, 0, glyph, 0, &gi); /* this skirts the defined
+                                         * interface unfortunately */
+    qt_settings->glyphs().drawBorderedCell(painter, glyph, gi.gm.tileidx,
+                                           x, y, border, rev);
 }
 
 // called to update the paper doll inventory subset