From 71440760307dfb99e6194929fb0c8d3bf1a0df10 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 27 Aug 2011 09:05:32 +0200 Subject: CGE: Move IO classes to a separated source file --- engines/cge/general.h | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'engines/cge/general.h') diff --git a/engines/cge/general.h b/engines/cge/general.h index 37f492a538..fbb5fc4c45 100644 --- a/engines/cge/general.h +++ b/engines/cge/general.h @@ -64,43 +64,6 @@ T min(T A, T B) { return (A < B) ? A : B; } -class XFile { -public: - uint16 _error; - - XFile() : _error(0) { } - virtual ~XFile() { } - virtual uint16 read(void *buf, uint16 len) = 0; - virtual long mark() = 0; - virtual long size() = 0; - virtual long seek(long pos) = 0; -}; - - -template -inline uint16 XRead(XFile *xf, T *t) { - return xf->read((uint8 *) t, sizeof(*t)); -} - - -class IoHand : public XFile { -protected: - Common::File *_file; - uint16 _seed; - Crypt *_crypt; -public: - IoHand(const char *name, Crypt crypt = NULL); - IoHand(Crypt *crypt = NULL); - virtual ~IoHand(); - static bool exist(const char *name); - uint16 read(void *buf, uint16 len); - long mark(); - long size(); - long seek(long pos); -}; - -Crypt XCrypt; -Crypt RCrypt; uint16 atow(const char *a); uint16 xtow(const char *x); char *wtom(uint16 val, char *str, int radix, int len); @@ -112,9 +75,6 @@ char *forceExt(char *buf, const char *name, const char *ext); // MISSING FUNCTIONS const char *progName(const char *ext = NULL); -unsigned fastRand(); -unsigned fastRand(unsigned s); -uint16 rCrypt(void *buf, uint16 siz, uint16 seed); int newRandom(int range); } // End of namespace CGE -- cgit v1.2.3