From eed727c61b51f46f6d172c56ecd26a3b1752d449 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 15 Nov 2011 19:58:36 +0200 Subject: Completely generalized mesh generation; ContentFeatures serialization --- src/utility.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/utility.h') diff --git a/src/utility.h b/src/utility.h index ed368b208..7c1fde6f0 100644 --- a/src/utility.h +++ b/src/utility.h @@ -235,6 +235,19 @@ inline u32 readU32(std::istream &is) return readU32((u8*)buf); } +inline void writeS32(std::ostream &os, u32 p) +{ + char buf[4]; + writeS32((u8*)buf, p); + os.write(buf, 4); +} +inline u32 readS32(std::istream &is) +{ + char buf[4]; + is.read(buf, 4); + return readS32((u8*)buf); +} + inline void writeF1000(std::ostream &os, f32 p) { char buf[4]; -- cgit v1.2.3