summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-16 09:30:51 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-16 11:10:52 +0100
commit67c7f20af3961332b018ba2395484f569ded1f30 (patch)
tree844e5ea16d0c26e37bbfaa9d7958e2f048216636 /crawl-ref/source
parentf30792570c9dc333ac42760f56dc40244e8c95aa (diff)
downloadcrawl-ref-67c7f20af3961332b018ba2395484f569ded1f30.tar.gz
crawl-ref-67c7f20af3961332b018ba2395484f569ded1f30.zip
Remove map_cell::colour.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/map_knowledge.h5
-rw-r--r--crawl-ref/source/tags.cc4
-rw-r--r--crawl-ref/source/tags.h5
3 files changed, 6 insertions, 8 deletions
diff --git a/crawl-ref/source/map_knowledge.h b/crawl-ref/source/map_knowledge.h
index cff5132da3..80263826d5 100644
--- a/crawl-ref/source/map_knowledge.h
+++ b/crawl-ref/source/map_knowledge.h
@@ -11,10 +11,9 @@ struct map_cell
{
show_type object; // The object: monster, item, feature, or cloud.
unsigned short flags; // Flags describing the mappedness of this square.
- unsigned short colour;
- map_cell() : object(), flags(0), colour(0) { }
- void clear() { flags = colour = 0; object = show_type(); }
+ map_cell() : object(), flags(0) { }
+ void clear() { flags = 0; object = show_type(); }
unsigned glyph() const;
bool known() const;
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 4e1e75c8a1..0113bb50a6 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1803,7 +1803,6 @@ static void tag_construct_level(writer &th)
{
marshallByte(th, grd[count_x][count_y]);
marshallShowtype(th, env.map_knowledge[count_x][count_y].object);
- marshallShort(th, env.map_knowledge[count_x][count_y].colour);
marshallShort(th, env.map_knowledge[count_x][count_y].flags);
marshallLong(th, env.pgrid[count_x][count_y]);
marshallShort(th, env.cgrid[count_x][count_y]);
@@ -2186,7 +2185,8 @@ static void tag_read_level( reader &th, char minorVersion )
static_cast<unsigned char>(unmarshallByte(th)) );
env.map_knowledge[i][j].object = unmarshallShowtype(th);
- env.map_knowledge[i][j].colour = unmarshallShort(th);
+ if (minorVersion < TAG_MINOR_MAPCELL_NOCOLOUR)
+ unmarshallShort(th);
env.map_knowledge[i][j].flags = unmarshallShort(th);
env.pgrid[i][j] = unmarshallLong(th);
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
index 0b7bbdc4d4..101be56949 100644
--- a/crawl-ref/source/tags.h
+++ b/crawl-ref/source/tags.h
@@ -45,13 +45,12 @@ enum tag_major_version
};
// Minor version will be reset to zero when major version changes.
-// Tags are checked with >=, so a minor version of 11 would logically include
-// the dungeon Lua changes.
enum tag_minor_version
{
TAG_MINOR_RESET = 0, // Minor tags were reset
TAG_MINOR_DISEASE = 1, // you.disease changed to an integer
- TAG_MINOR_VERSION = 1 // Current version. (Keep equal to max.)
+ TAG_MINOR_MAPCELL_NOCOLOUR = 2, // map_cell::colour removed
+ TAG_MINOR_VERSION = 2 // Current version. (Keep equal to max.)
};
struct enum_info