From 7a5387cbd6aa4682c7f2845bde065a9e0b828e23 Mon Sep 17 00:00:00 2001 From: pauldubois Date: Sun, 23 Mar 2008 09:42:58 +0000 Subject: 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 --- crawl-ref/source/luadgn.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/luadgn.h') diff --git a/crawl-ref/source/luadgn.h b/crawl-ref/source/luadgn.h index 87737d61fa..8dd447c175 100644 --- a/crawl-ref/source/luadgn.h +++ b/crawl-ref/source/luadgn.h @@ -18,6 +18,9 @@ extern CLua dlua; // Lua chunks cannot exceed 512K. Which is plenty! const int LUA_CHUNK_MAX_SIZE = 512 * 1024; +class reader; +class writer; + class dlua_chunk { private: @@ -65,8 +68,8 @@ public: const std::string &compiled_chunk() const { return compiled; } - void write(FILE *) const; - void read(FILE *); + void write(writer&) const; + void read(reader&); }; void init_dungeon_lua(); -- cgit v1.2.3-54-g00ecf