mis-named routine to get the pixmap for a particular glyph
| 202 | |
| 203 | // mis-named routine to get the pixmap for a particular glyph |
| 204 | QPixmap |
| 205 | NetHackQtGlyphs::glyph( |
| 206 | int glyphindx UNUSED, |
| 207 | int tileidx) |
| 208 | { |
| 209 | #if 0 |
| 210 | int tile = glyph2tile[glyphindx]; |
| 211 | #else |
| 212 | int tile = tileidx; |
| 213 | #endif |
| 214 | int px = (tile % tiles_per_row) * tilefile_tile_W; |
| 215 | int py = tile / tiles_per_row * tilefile_tile_H; |
| 216 | |
| 217 | return QPixmap::fromImage(img.copy(px, py, |
| 218 | tilefile_tile_W, tilefile_tile_H)); |
| 219 | } |
| 220 | |
| 221 | // transpose a glyph's tile horizontally, scaled for use in paper doll |
| 222 | QPixmap |
no outgoing calls
no test coverage detected