diff options
Diffstat (limited to 'engines/cge/general.h')
-rw-r--r-- | engines/cge/general.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/engines/cge/general.h b/engines/cge/general.h index 03c34d7058..75f754d0a3 100644 --- a/engines/cge/general.h +++ b/engines/cge/general.h @@ -35,10 +35,10 @@ #define SCR_WID_ 320 #define SCR_HIG_ 200 -#define SCR_WID ((word)SCR_WID_) -#define SCR_HIG ((word)SCR_HIG_) +#define SCR_WID ((uint16)SCR_WID_) +#define SCR_HIG ((uint16)SCR_HIG_) #define SCR_SEG 0xA000 -#define SCR_ADR ((byte *) MK_FP(SCR_SEG, 0)) +#define SCR_ADR ((uint8 *) MK_FP(SCR_SEG, 0)) @@ -48,10 +48,10 @@ enum ALLOC_MODE { FIRST_FIT, BEST_FIT, LAST_FIT }; enum IOMODE { REA, WRI, UPD }; typedef struct { - byte R, G, B; + uint8 R, G, B; } DAC; -typedef word CRYPT (void *buf, word siz, word seed); +typedef uint16 CRYPT (void *buf, uint16 siz, uint16 seed); @@ -86,7 +86,7 @@ protected: static void interrupt (* OldTimer) (...); static void interrupt NewTimer (...); public: - ENGINE (word tdiv); + ENGINE (uint16 tdiv); ~ENGINE (void); }; @@ -111,7 +111,7 @@ class EMM public: EMM::EMM (long size = 0); EMM::~EMM (void); - EMS * Alloc (word siz); + EMS * Alloc (uint16 siz); void Release (void); }; @@ -124,12 +124,12 @@ class EMS friend EMM; EMM * Emm; long Ptr; - word Siz; + uint16 Siz; EMS * Nxt; public: EMS (void); void * operator & () const; - word Size (void); + uint16 Size (void); }; @@ -181,11 +181,11 @@ class XFILE { public: IOMODE Mode; - word Error; + uint16 Error; XFILE (void) : Mode(REA), Error(0) { } XFILE (IOMODE mode) : Mode(mode), Error(0) { } - virtual word Read (void * buf, word len) = 0; - virtual word Write (void * buf, word len) = 0; + virtual uint16 Read (void * buf, uint16 len) = 0; + virtual uint16 Write (void * buf, uint16 len) = 0; virtual long Mark (void) = 0; virtual long Size (void) = 0; virtual long Seek (long pos) = 0; @@ -196,9 +196,9 @@ public: template <class T> -inline word XRead (XFILE * xf, T * t) +inline uint16 XRead (XFILE * xf, T * t) { - return xf->Read((byte *) t, sizeof(*t)); + return xf->Read((uint8 *) t, sizeof(*t)); }; @@ -209,15 +209,15 @@ class IOHAND : public XFILE { protected: int Handle; - word Seed; + uint16 Seed; CRYPT * Crypt; public: IOHAND (const char * name, IOMODE mode = REA, CRYPT crypt = NULL); IOHAND (IOMODE mode = REA, CRYPT * crpt = NULL); virtual ~IOHAND (void); static bool Exist (const char * name); - word Read (void * buf, word len); - word Write (void * buf, word len); + uint16 Read (void * buf, uint16 len); + uint16 Write (void * buf, uint16 len); long Mark (void); long Size (void); long Seek (long pos); @@ -238,18 +238,18 @@ unsigned FastRand (void); unsigned FastRand (unsigned s); CPU Cpu (void); ALLOC_MODE SetAllocMode (ALLOC_MODE am); -word atow (const char * a); -word xtow (const char * x); -char * wtom (word val, char * str, int radix, int len); -char * dwtom (dword val, char * str, int radix, int len); +uint16 atow (const char * a); +uint16 xtow (const char * x); +char * wtom (uint16 val, char * str, int radix, int len); +char * dwtom (uint32 val, char * str, int radix, int len); char * DateTimeString (void); void StdLog (const char *msg, const char *nam = NULL); -void StdLog (const char *msg, word w); -void StdLog (const char *msg, dword d); +void StdLog (const char *msg, uint16 w); +void StdLog (const char *msg, uint32 d); int TakeEnum (const char ** tab, const char * txt); -word ChkSum (void *m, word n); +uint16 ChkSum (void *m, uint16 n); long Timer (void); -long TimerLimit (word t); +long TimerLimit (uint16 t); bool TimerLimitGone (long t); char * MergeExt (char * buf, const char * nam, const char * ext); char * ForceExt (char * buf, const char * nam, const char * ext); @@ -260,7 +260,7 @@ int DriveRemote (unsigned drv); int DriveCD (unsigned drv); bool IsVga (void); -EC void _fqsort (void *base, word nelem, word width, +EC void _fqsort (void *base, uint16 nelem, uint16 width, int (*fcmp)(const void*, const void*)); |