display a map tile somewhere other than the map; used for paper doll and also role/race selection
| 106 | // display a map tile somewhere other than the map; |
| 107 | // used for paper doll and also role/race selection |
| 108 | void |
| 109 | NetHackQtGlyphs::drawGlyph( |
| 110 | QPainter& painter, |
| 111 | int glyph, int tileidx, |
| 112 | int x, int y, |
| 113 | bool reversed) |
| 114 | { |
| 115 | if (!reversed) { |
| 116 | #if 0 |
| 117 | int tile = glyph2tile[glyph]; |
| 118 | #else |
| 119 | int tile = tileidx; |
| 120 | #endif |
| 121 | int px = (tile % tiles_per_row) * width(); |
| 122 | int py = tile / tiles_per_row * height(); |
| 123 | |
| 124 | painter.drawPixmap(x, y, pm, px, py, width(), height()); |
| 125 | } else { |
| 126 | // for paper doll; mirrored image for left side of two-handed weapon |
| 127 | painter.drawPixmap(x, y, reversed_pixmap(glyph, tileidx), |
| 128 | 0, 0, width(), height()); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | // draw a tile into the paper doll |
| 133 | void |