summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-21 13:03:29 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-21 13:03:29 +0000
commit61d4458f71a2ce6edf32343b80ca56fbed1c6d6c (patch)
tree8b1d07d578052b46082034c80374ed77cecc8d22 /crawl-ref/source
parent27c70daeafaf510904d08bf720527c16521da345 (diff)
downloadcrawl-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/source')
-rw-r--r--crawl-ref/source/rltiles/dc-dngn.txt16
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/dngn_enter_shop.pngbin1092 -> 1366 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.pngbin0 -> 656 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_books.pngbin0 -> 739 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_food.pngbin0 -> 734 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_general.pngbin0 -> 608 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.pngbin0 -> 847 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.pngbin0 -> 758 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.pngbin0 -> 809 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.pngbin0 -> 764 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.pngbin0 -> 616 bytes
-rw-r--r--crawl-ref/source/tilepick.cc45
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
index 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
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_armour.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_books.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_food.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_general.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_jewellery.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_potions.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_scrolls.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_wands.png
Binary files 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
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/shops/shop_weapon.png
Binary files 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: