summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.h
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-23 09:42:58 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-23 09:42:58 +0000
commit7a5387cbd6aa4682c7f2845bde065a9e0b828e23 (patch)
tree995b883e6d67e8c9011bb02133b83ce65dcfa47a /crawl-ref/source/mapdef.h
parent922cba628d3d6377574a90c7a817c10d84ed7f85 (diff)
downloadcrawl-ref-7a5387cbd6aa4682c7f2845bde065a9e0b828e23.tar.gz
crawl-ref-7a5387cbd6aa4682c7f2845bde065a9e0b828e23.zip
This was originally going to be a small refactor of stash.cc before
getting into stash/item finding, but it ended up big. Removed the read/writeThing API in favor of the marshall/unmarshallThing API. It was slightly awkward in a couple spots where the format of writeThing and marshallThing differed slightly (strings, level_id, level_pos). Doesn't affect savegames. When it's is okay to break savegames (maybe just before releasing 0.4?) it would be nice to remove the few remaining redundancies listed above. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3828 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.h')
-rw-r--r--crawl-ref/source/mapdef.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h
index 154f2ffa90..822b811b5c 100644
--- a/crawl-ref/source/mapdef.h
+++ b/crawl-ref/source/mapdef.h
@@ -70,8 +70,8 @@ public:
bool matches(const level_id &) const;
bool matches(int depth) const;
- void write(FILE *) const;
- void read(FILE *);
+ void write(writer&) const;
+ void read(reader&);
bool valid() const;
int span() const;
@@ -642,11 +642,11 @@ public:
coord_def find_first_glyph(int glyph) const;
coord_def find_first_glyph(const std::string &glyphs) const;
- void write_index(FILE *) const;
- void write_full(FILE *);
+ void write_index(writer&) const;
+ void write_full(writer&);
- void read_index(FILE *);
- void read_full(FILE *);
+ void read_index(reader&);
+ void read_full(reader&);
void set_file(const std::string &s);
std::string run_lua(bool skip_main);
@@ -725,8 +725,8 @@ public:
};
private:
- void write_depth_ranges(FILE *) const;
- void read_depth_ranges(FILE *);
+ void write_depth_ranges(writer&) const;
+ void read_depth_ranges(reader&);
bool test_lua_boolchunk(dlua_chunk &, bool def = false, bool croak = false);
std::string rewrite_chunk_errors(const std::string &s) const;