summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.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/tags.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/tags.h')
-rw-r--r--crawl-ref/source/tags.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
new file mode 100644
index 0000000000..7c84709ebf
--- /dev/null
+++ b/crawl-ref/source/tags.h
@@ -0,0 +1,97 @@
+/*
+ * File: tags.h
+ * Summary: Auxilary functions to make savefile versioning simpler.
+ * Written by: Gordon Lipford
+ *
+ * Change History (most recent first):
+ *
+ * <1> 27 Jan 2001 GDL Created
+ */
+
+#ifndef TAGS_H
+#define TAGS_H
+
+#include <stdio.h>
+#include "externs.h"
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files tags
+ * *********************************************************************** */
+int write2(FILE * file, const char *buffer, unsigned int count);
+
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files tags
+ * *********************************************************************** */
+int read2(FILE * file, char *buffer, unsigned int count);
+
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files tags
+ * *********************************************************************** */
+void marshallByte(struct tagHeader &th, char data);
+void marshallShort(struct tagHeader &th, short data);
+void marshallLong(struct tagHeader &th, long data);
+void marshallFloat(struct tagHeader &th, float data);
+void marshallBoolean(struct tagHeader &th, bool data);
+void marshallString(struct tagHeader &th, char *data, int maxSize = 0);
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: tags files
+ * *********************************************************************** */
+char unmarshallByte(struct tagHeader &th);
+short unmarshallShort(struct tagHeader &th);
+long unmarshallLong(struct tagHeader &th);
+float unmarshallFloat(struct tagHeader &th);
+bool unmarshallBoolean(struct tagHeader &th);
+void unmarshallString(struct tagHeader &th, char *data, int maxSize);
+
+void make_date_string( time_t in_date, char buff[20] );
+time_t parse_date_string( char[20] );
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void tag_init(long largest_tag = 50000);
+
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files
+ * *********************************************************************** */
+void tag_construct(struct tagHeader &th, int i);
+
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files
+ * *********************************************************************** */
+void tag_write(struct tagHeader &th, FILE *saveFile);
+
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files
+ * *********************************************************************** */
+void tag_set_expected(char tags[], int fileType);
+
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files
+ * *********************************************************************** */
+void tag_missing(int tag, char minorVersion);
+
+
+// last updated 22jan2001 {gdl}
+/* ***********************************************************************
+ * called from: files
+ * *********************************************************************** */
+int tag_read(FILE *fp, char minorVersion);
+
+#endif // TAGS_H