summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-04 10:04:17 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-04 16:50:18 +0100
commit6f10cd2574eeb8a1417eff84718edd309287ac0d (patch)
tree69a45fe0e35cb559a3285b08697c96c230fc0c0f /crawl-ref/source/tags.h
parent9ad85435681ad82c7ef07d2083e40e525e2b0f55 (diff)
downloadcrawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.tar.gz
crawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.zip
Get rid of multiple-meaning "int object" in env.show.
env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects.
Diffstat (limited to 'crawl-ref/source/tags.h')
-rw-r--r--crawl-ref/source/tags.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
index 3bb38318fd..ce2ec65a68 100644
--- a/crawl-ref/source/tags.h
+++ b/crawl-ref/source/tags.h
@@ -11,6 +11,8 @@
#include <stdint.h>
#include "externs.h"
+struct show_type;
+
enum tag_type // used during save/load process to identify data blocks
{
TAG_NO_TAG = 0, // should NEVER be read in!
@@ -92,6 +94,7 @@ void marshallString (writer &, const std::string &, int maxSize = 0);
void marshallString4 (writer &, const std::string &);
void marshallCoord (writer &, const coord_def &);
void marshallItem (writer &, const item_def &);
+void marshallShowtype (writer &, const show_type &);
/* ***********************************************************************
* reader API
@@ -124,6 +127,7 @@ std::string unmarshallString (reader &, int maxSize = 1000);
void unmarshallString4 (reader &, std::string&);
void unmarshallCoord (reader &, coord_def &c);
void unmarshallItem (reader &, item_def &item);
+show_type unmarshallShowtype (reader &);
/* ***********************************************************************
* Tag interface