diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-10 02:06:42 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-10 02:13:09 -0800 |
commit | 5e9e9773f748ab17c8298cd212c77bf5ea1b2051 (patch) | |
tree | b08649df9d56d86f99290ca09c0c3b38f3c40cda /crawl-ref/source/files.cc | |
parent | 2ebed5e396b655383be577ec55cfb756fcf328d4 (diff) | |
download | crawl-ref-5e9e9773f748ab17c8298cd212c77bf5ea1b2051.tar.gz crawl-ref-5e9e9773f748ab17c8298cd212c77bf5ea1b2051.zip |
tags: Store minorVersion in reader class
Store the minor version of a savefile being read into the reader class,
so that it doesn't need to be passed around as a method/function
parameter everywhere.
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 3bb45a6c55..cd63e9cd15 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -1818,7 +1818,7 @@ void restore_game(void) FILE *stashf = fopen(stashFile.c_str(), "rb"); if (stashf) { - reader inf(stashf); + reader inf(stashf, minorVersion); StashTrack.load(inf); fclose(stashf); } @@ -1832,7 +1832,7 @@ void restore_game(void) FILE *killf = fopen(killFile.c_str(), "rb"); if (killf) { - reader inf(killf); + reader inf(killf, minorVersion); you.kills->load(inf); fclose(killf); } @@ -1841,7 +1841,7 @@ void restore_game(void) FILE *travelf = fopen(travelCacheFile.c_str(), "rb"); if (travelf) { - reader inf(travelf); + reader inf(travelf, minorVersion); travel_cache.load(inf, minorVersion); fclose(travelf); } @@ -1850,7 +1850,7 @@ void restore_game(void) FILE *notesf = fopen(notesFile.c_str(), "rb"); if (notesf) { - reader inf(notesf); + reader inf(notesf, minorVersion); load_notes(inf); fclose(notesf); } @@ -1860,7 +1860,7 @@ void restore_game(void) FILE *tutorf = fopen(tutorFile.c_str(), "rb"); if (tutorf) { - reader inf(tutorf); + reader inf(tutorf, minorVersion); load_tutorial(inf); fclose(tutorf); } @@ -1870,7 +1870,7 @@ void restore_game(void) FILE *msgf = fopen(msgFile.c_str(), "rb"); if (msgf) { - reader inf(msgf); + reader inf(msgf, minorVersion); load_messages(inf); fclose(msgf); } @@ -2065,7 +2065,7 @@ static bool _determine_ghost_version( FILE *ghostFile, majorVersion = buf[0]; minorVersion = buf[1]; - reader inf(ghostFile); + reader inf(ghostFile, minorVersion); // Check for the DCSS ghost signature. if (unmarshallShort(inf) != GHOST_SIGNATURE) return (false); |