summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/shopping.h
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-24 22:38:41 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-24 22:38:41 +0000
commit9304ae6cc3684377e50e6fcbc3d13e80fa092b6a (patch)
treeb0b15e708dbca7e6455bf0e6e3726b75037f937b /crawl-ref/source/shopping.h
parent56b6c4f46ec7516396c1473e9d5bfef7ea79765f (diff)
downloadcrawl-ref-9304ae6cc3684377e50e6fcbc3d13e80fa092b6a.tar.gz
crawl-ref-9304ae6cc3684377e50e6fcbc3d13e80fa092b6a.zip
Cleaned up shop-handling code considerably.
Instead of shops passing around global id_arr arrays, shops use the newly added third argument to item_def::name() which indicates whether to override item ID status. This means that the shop ID SIGHUP protection is now unnecessary; it's been removed. Hopefully I caught all the places where the stash tracker tries to get item names and fixed them, but I might have missed something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1359 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/shopping.h')
-rw-r--r--crawl-ref/source/shopping.h39
1 files changed, 3 insertions, 36 deletions
diff --git a/crawl-ref/source/shopping.h b/crawl-ref/source/shopping.h
index 39e9c48a4c..e04c841321 100644
--- a/crawl-ref/source/shopping.h
+++ b/crawl-ref/source/shopping.h
@@ -17,26 +17,12 @@
#include "externs.h"
#include "itemname.h"
-void shop_init_id_type(int shoptype, id_fix_arr &shop_id);
-void shop_uninit_id_type(int shoptype, const id_fix_arr &shop_id);
-
int randart_value( const item_def &item );
-// last updated 12may2000 {dlb}
-/* ***********************************************************************
- * called from: chardump - invent - ouch - religion - shopping
- * *********************************************************************** */
-
// ident == true overrides the item ident level and gives the price
// as if the item was fully id'd
-unsigned int item_value( item_def item, id_arr id, bool ident = false );
-
-
-// last updated 12may2000 {dlb}
-/* ***********************************************************************
- * called from: misc
- * *********************************************************************** */
-void shop(void);
+unsigned int item_value( item_def item, bool ident = false );
+void shop();
const shop_struct *get_shop(int sx, int sy);
@@ -46,25 +32,6 @@ const shop_struct *get_shop(int sx, int sy);
* *********************************************************************** */
const char *shop_name(int sx, int sy);
-// Protect the id array against being clobbered by a SIGHUP with the
-// character in a shop.
-extern id_arr shop_backup_id;
-class shopping_hup_protect
-{
-public:
- shopping_hup_protect() : shopping(crawl_state.shopping)
- {
- save_id(shop_backup_id);
- crawl_state.shopping = true;
- }
-
- ~shopping_hup_protect()
- {
- crawl_state.shopping = shopping;
- }
-
-private:
- bool shopping;
-};
+bool shoptype_identifies_stock(int shoptype);
#endif