From aa88fdd8c6ad2da5eb5bd933e2d53d56cd8c176f Mon Sep 17 00:00:00 2001 From: nlanza Date: Sun, 13 Aug 2006 02:19:00 +0000 Subject: Clean up a mistake in the SVN import. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/files.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 crawl-ref/source/files.h (limited to 'crawl-ref/source/files.h') diff --git a/crawl-ref/source/files.h b/crawl-ref/source/files.h new file mode 100644 index 0000000000..a2d357cac8 --- /dev/null +++ b/crawl-ref/source/files.h @@ -0,0 +1,92 @@ +/* + * File: files.cc + * Summary: Functions used to save and load levels/games. + * Written by: Linley Henzell and Alexey Guzeev + * + * Change History (most recent first): + * + * <1> -/--/-- LRH Created + */ + + +#ifndef FILES_H +#define FILES_H + +#include "FixAry.h" +#include +#include + +// referenced in files - newgame - ouch - overmap: +#define MAX_LEVELS 50 +// referenced in files - newgame - ouch - overmap: +#define MAX_BRANCHES 30 // there must be a way this can be extracted from other data + + +// referenced in files - newgame - ouch: +extern FixedArray tmp_file_pairs; + +// last updated 12may2000 {dlb} +/* *********************************************************************** + * called from: acr - misc + * *********************************************************************** */ +#if 0 +void load( unsigned char stair_taken, bool moving_level, + bool was_a_labyrinth, char old_level, bool want_followers, + bool is_new_game, char where_were_you2 ); +#endif + +bool travel_load_map( char branch, int absdepth ); + +std::string get_savedir_filename(const char *pre, const char *suf, + const char *ext); + +std::string get_prefs_filename(); + +void load( unsigned char stair_taken, int load_mode, bool was_a_labyrinth, + char old_level, char where_were_you2 ); + +// last updated 12may2000 {dlb} +/* *********************************************************************** + * called from: acr - libmac - misc + * *********************************************************************** */ +void save_game(bool leave_game); + + +// last updated 12may2000 {dlb} +/* *********************************************************************** + * called from: acr + * *********************************************************************** */ +void restore_game(void); + + +// last updated 12may2000 {dlb} +/* *********************************************************************** + * called from: ouch + * *********************************************************************** */ +void save_ghost( bool force = false ); + +// last updated 12may2000 {dlb} +/* *********************************************************************** + * called from: files hiscores + * *********************************************************************** */ +void make_filename( char *buf, const char *prefix, int level, int where, + bool isLabyrinth, bool isGhost ); + + +void writeShort(FILE *file, short s); + +short readShort(FILE *file); + +void writeByte(FILE *file, unsigned char byte); + +unsigned char readByte(FILE *file); + +void writeString(FILE* file, const std::string &s); + +std::string readString(FILE *file); + +void writeLong(FILE* file, long num); + +long readLong(FILE *file); + +#endif -- cgit v1.2.3-54-g00ecf