summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index ad55283bfc..e774f3c08b 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1677,6 +1677,18 @@ long readLong(FILE *file)
(long) (unsigned short) readShort(file);
}
+void writeCoord(FILE *file, const coord_def &pos)
+{
+ writeShort(file, pos.x);
+ writeShort(file, pos.y);
+}
+
+void readCoord(FILE *file, coord_def &pos)
+{
+ pos.x = readShort(file);
+ pos.y = readShort(file);
+}
+
////////////////////////////////////////////////////////////////////////////
// Locking for multiuser systems