diff options
-rw-r--r-- | crawl-ref/source/tilepick.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 615c8eb27f..808ac84644 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -2083,15 +2083,19 @@ int tileidx_item(const item_def &item) } case OBJ_BOOKS: - type= special % 10; - if (type < 2) + switch (special % 10) + { + default: + case 0: + case 1: return TILE_BOOK_PAPER_OFFSET + colour; - if (type == 2) + case 2: return TILE_BOOK_LEATHER_OFFSET + special/10; - if (type == 3) + case 3: return TILE_BOOK_METAL_OFFSET + special/10; - if (type == 4) + case 4: return TILE_BOOK_PAPYRUS; + } case OBJ_STAVES: if (item_is_rod(item)) |