From 49414c2dc37b9868dfbd7fcafdc8443fcbeab9eb Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 3 Jan 2009 03:33:06 +0000 Subject: Fixing issue where some randart books had incorrect tiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8157 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tilepick.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/tilepick.cc') 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)) -- cgit v1.2.3-54-g00ecf