diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-21 13:03:29 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-21 13:03:29 +0000 |
commit | 61d4458f71a2ce6edf32343b80ca56fbed1c6d6c (patch) | |
tree | 8b1d07d578052b46082034c80374ed77cecc8d22 /crawl-ref | |
parent | 27c70daeafaf510904d08bf720527c16521da345 (diff) | |
download | crawl-ref-61d4458f71a2ce6edf32343b80ca56fbed1c6d6c.tar.gz crawl-ref-61d4458f71a2ce6edf32343b80ca56fbed1c6d6c.zip |
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
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn.txt | 16 | ||||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.png | bin | 1092 -> 1366 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png | bin | 0 -> 656 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png | bin | 0 -> 739 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png | bin | 0 -> 734 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png | bin | 0 -> 608 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png | bin | 0 -> 847 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png | bin | 0 -> 758 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png | bin | 0 -> 809 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png | bin | 0 -> 764 bytes | |||
-rw-r--r-- | crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png | bin | 0 -> 616 bytes | |||
-rw-r--r-- | crawl-ref/source/tilepick.cc | 45 |
12 files changed, 57 insertions, 4 deletions
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 Binary files differindex 934592e00f..8018eaf621 100644 --- a/crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.png +++ b/crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png Binary files differnew file mode 100644 index 0000000000..f2bb5422cc --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png Binary files differnew file mode 100644 index 0000000000..ac81b8e5e5 --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png Binary files differnew file mode 100644 index 0000000000..cfd3fc08bb --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png Binary files differnew file mode 100644 index 0000000000..33cc00fa1c --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png Binary files differnew file mode 100644 index 0000000000..63c84903a1 --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png Binary files differnew file mode 100644 index 0000000000..5ebefadb15 --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png Binary files differnew file mode 100644 index 0000000000..825c114d7a --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png Binary files differnew file mode 100644 index 0000000000..33d32ae530 --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png diff --git a/crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png b/crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png Binary files differnew file mode 100644 index 0000000000..f0b555cff0 --- /dev/null +++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png 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: |