summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.h
diff options
context:
space:
mode:
authornlanza <nlanza@c06c8d41-db1a-0410-9941-cceddc491573>2006-08-13 02:19:00 +0000
committernlanza <nlanza@c06c8d41-db1a-0410-9941-cceddc491573>2006-08-13 02:19:00 +0000
commitaa88fdd8c6ad2da5eb5bd933e2d53d56cd8c176f (patch)
treed0551b96eaebb5b55694579fb8dae4abc7a38407 /crawl-ref/source/files.h
parent2b32f164e6ca1c4b3d587789f6cf46f46fe02fe8 (diff)
downloadcrawl-ref-aa88fdd8c6ad2da5eb5bd933e2d53d56cd8c176f.tar.gz
crawl-ref-aa88fdd8c6ad2da5eb5bd933e2d53d56cd8c176f.zip
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
Diffstat (limited to 'crawl-ref/source/files.h')
-rw-r--r--crawl-ref/source/files.h92
1 files changed, 92 insertions, 0 deletions
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 <stdio.h>
+#include <string>
+
+// 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<bool, MAX_LEVELS, MAX_BRANCHES> 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