From 61d4458f71a2ce6edf32343b80ca56fbed1c6d6c Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 21 Nov 2008 13:03:29 +0000 Subject: Modify shop entry tile to show the shop type. Ignoring antique for now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7528 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/rltiles/dc-dngn.txt | 16 +++++++- .../source/rltiles/dc-dngn/dngn_enter_shop.png | Bin 1092 -> 1366 bytes .../source/rltiles/dc-dngn/shops/shop_armour.png | Bin 0 -> 656 bytes .../source/rltiles/dc-dngn/shops/shop_books.png | Bin 0 -> 739 bytes .../source/rltiles/dc-dngn/shops/shop_food.png | Bin 0 -> 734 bytes .../source/rltiles/dc-dngn/shops/shop_general.png | Bin 0 -> 608 bytes .../rltiles/dc-dngn/shops/shop_jewellery.png | Bin 0 -> 847 bytes .../source/rltiles/dc-dngn/shops/shop_potions.png | Bin 0 -> 758 bytes .../source/rltiles/dc-dngn/shops/shop_scrolls.png | Bin 0 -> 809 bytes .../source/rltiles/dc-dngn/shops/shop_wands.png | Bin 0 -> 764 bytes .../source/rltiles/dc-dngn/shops/shop_weapon.png | Bin 0 -> 616 bytes crawl-ref/source/tilepick.cc | 45 +++++++++++++++++++-- 12 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png (limited to 'crawl-ref') diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt index 0527cea7d0..d65cd6e1e2 100644 --- a/crawl-ref/source/rltiles/dc-dngn.txt +++ b/crawl-ref/source/rltiles/dc-dngn.txt @@ -375,7 +375,21 @@ rock_stairs_down DNGN_ROCK_STAIRS_DOWN stone_stairs_up DNGN_STONE_STAIRS_UP rock_stairs_up DNGN_ROCK_STAIRS_UP -dngn_enter_shop DNGN_ENTER_SHOP +##dngn_enter_shop DNGN_ENTER_SHOP +%shrink 0 +%back dngn_enter_shop +shops/shop_general SHOP_GENERAL +shops/shop_weapon SHOP_WEAPONS +shops/shop_armour SHOP_ARMOUR +shops/shop_food SHOP_FOOD +shops/shop_books SHOP_BOOKS +shops/shop_scrolls SHOP_SCROLLS +shops/shop_wands SHOP_WANDS +shops/shop_jewellery SHOP_JEWELLERY +shops/shop_potions SHOP_POTIONS +%back none +%shrink 1 + dngn_enter_labyrinth DNGN_ENTER_LABYRINTH dngn_enter_dis DNGN_ENTER_DIS dngn_enter_gehenna DNGN_ENTER_GEHENNA diff --git a/crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.png b/crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.png index 934592e00f..8018eaf621 100644 Binary files a/crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.png and b/crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png new file mode 100644 index 0000000000..f2bb5422cc Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png new file mode 100644 index 0000000000..ac81b8e5e5 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png new file mode 100644 index 0000000000..cfd3fc08bb Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png new file mode 100644 index 0000000000..33cc00fa1c Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png new file mode 100644 index 0000000000..63c84903a1 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png new file mode 100644 index 0000000000..5ebefadb15 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png new file mode 100644 index 0000000000..825c114d7a Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png new file mode 100644 index 0000000000..33d32ae530 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png new file mode 100644 index 0000000000..f0b555cff0 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png differ diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 0288eba6ed..65e58998f0 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -20,6 +20,7 @@ #include "mon-util.h" #include "player.h" #include "randart.h" +#include "shopping.h" #include "spells3.h" // for the halo #include "stuff.h" #include "terrain.h" @@ -2081,6 +2082,38 @@ static int _tileidx_trap(trap_type type) } } +static int _tileidx_shop(coord_def where) +{ + const shop_struct *shop = get_shop(where); + + switch (shop->type) + { + case SHOP_WEAPON: + case SHOP_WEAPON_ANTIQUE: + return TILE_SHOP_WEAPONS; + case SHOP_ARMOUR: + case SHOP_ARMOUR_ANTIQUE: + return TILE_SHOP_ARMOUR; + case SHOP_JEWELLERY: + return TILE_SHOP_JEWELLERY; + case SHOP_WAND: + return TILE_SHOP_WANDS; + case SHOP_FOOD: + return TILE_SHOP_FOOD; + case SHOP_BOOK: + return TILE_SHOP_BOOKS; + case SHOP_SCROLL: + return TILE_SHOP_SCROLLS; + case SHOP_DISTILLERY: + return TILE_SHOP_POTIONS; + case SHOP_GENERAL: + case SHOP_GENERAL_ANTIQUE: + return TILE_SHOP_GENERAL; + default: + return TILE_ERROR; + } +} + int tileidx_feature(int object, int gx, int gy) { switch (object) @@ -2114,12 +2147,18 @@ int tileidx_feature(int object, int gx, int gy) case DNGN_LAVA: return TILE_DNGN_LAVA; case DNGN_DEEP_WATER: - if (_is_sewers()) + if (_is_sewers() || env.grid_colours[gx][gy] == GREEN + || env.grid_colours[gx][gy] == LIGHTGREEN) + { return TILE_DNGN_DEEP_WATER_MURKY; + } return TILE_DNGN_DEEP_WATER; case DNGN_SHALLOW_WATER: - if (_is_sewers()) + if (_is_sewers() || env.grid_colours[gx][gy] == GREEN + || env.grid_colours[gx][gy] == LIGHTGREEN) + { return TILE_DNGN_SHALLOW_WATER_MURKY; + } return TILE_DNGN_SHALLOW_WATER; case DNGN_FLOOR: case DNGN_UNDISCOVERED_TRAP: @@ -2133,7 +2172,7 @@ int tileidx_feature(int object, int gx, int gy) case DNGN_TRAP_NATURAL: return _tileidx_trap(get_trap_type(coord_def(gx, gy))); case DNGN_ENTER_SHOP: - return TILE_DNGN_ENTER_SHOP; + return _tileidx_shop(coord_def(gx,gy)); case DNGN_ENTER_LABYRINTH: return TILE_DNGN_ENTER_LABYRINTH; case DNGN_STONE_STAIRS_DOWN_I: -- cgit v1.2.3-54-g00ecf