diff options
author | Strangerke | 2011-06-10 09:14:43 +0200 |
---|---|---|
committer | Strangerke | 2011-06-10 09:14:43 +0200 |
commit | a5c569eff2c4e2f30ef0523169ab22ed92f9894a (patch) | |
tree | 98aae16ee8c0c8e5c57cfe55672bb054d88125b5 /engines | |
parent | 03c540abffe39a7ea32173c2cf8f5e70d371588b (diff) | |
download | scummvm-rg350-a5c569eff2c4e2f30ef0523169ab22ed92f9894a.tar.gz scummvm-rg350-a5c569eff2c4e2f30ef0523169ab22ed92f9894a.tar.bz2 scummvm-rg350-a5c569eff2c4e2f30ef0523169ab22ed92f9894a.zip |
CGE: Remove far and near keywords
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/bitmap.cpp | 66 | ||||
-rw-r--r-- | engines/cge/bitmap.h | 8 | ||||
-rw-r--r-- | engines/cge/cfile.cpp | 22 | ||||
-rw-r--r-- | engines/cge/cfile.h | 14 | ||||
-rw-r--r-- | engines/cge/cge_main.cpp | 24 | ||||
-rw-r--r-- | engines/cge/game.cpp | 4 | ||||
-rw-r--r-- | engines/cge/game.h | 4 | ||||
-rw-r--r-- | engines/cge/general.h | 18 | ||||
-rw-r--r-- | engines/cge/jbw.h | 12 | ||||
-rw-r--r-- | engines/cge/keybd.cpp | 2 | ||||
-rw-r--r-- | engines/cge/keybd.h | 2 | ||||
-rw-r--r-- | engines/cge/mouse.h | 2 | ||||
-rw-r--r-- | engines/cge/snail.cpp | 10 | ||||
-rw-r--r-- | engines/cge/snail.h | 4 | ||||
-rw-r--r-- | engines/cge/snddrv.h | 4 | ||||
-rw-r--r-- | engines/cge/sound.cpp | 12 | ||||
-rw-r--r-- | engines/cge/talk.cpp | 18 | ||||
-rw-r--r-- | engines/cge/talk.h | 6 | ||||
-rw-r--r-- | engines/cge/vga13h.cpp | 66 | ||||
-rw-r--r-- | engines/cge/vga13h.h | 22 | ||||
-rw-r--r-- | engines/cge/vmenu.cpp | 2 | ||||
-rw-r--r-- | engines/cge/vol.cpp | 2 | ||||
-rw-r--r-- | engines/cge/vol.h | 4 | ||||
-rw-r--r-- | engines/cge/wav.h | 4 |
24 files changed, 166 insertions, 166 deletions
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index d493f29f56..697eb4a9e3 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -48,7 +48,7 @@ -DAC far * BITMAP::Pal = NULL; +DAC * BITMAP::Pal = NULL; @@ -97,7 +97,7 @@ BITMAP::BITMAP (const char * fname, Boolean rem) -BITMAP::BITMAP (word w, word h, byte far * map) +BITMAP::BITMAP (word w, word h, byte * map) : W(w), H(h), M(map), V(NULL) { if (map) Code(); @@ -147,15 +147,15 @@ BITMAP::BITMAP (const BITMAP& bmp) : W(bmp.W), H(bmp.H), M(NULL), V(NULL) { - byte far * v0 = bmp.V; + byte * v0 = bmp.V; if (v0) { word vsiz = FP_OFF(bmp.B) - FP_OFF(v0); word siz = vsiz + H * sizeof(HideDesc); - byte far * v1 = farnew(byte, siz); + byte * v1 = farnew(byte, siz); if (v1 == NULL) DROP("No core", NULL); _fmemcpy(v1, v0, siz); - B = (HideDesc far *) ((V = v1) + vsiz); + B = (HideDesc *) ((V = v1) + vsiz); } } @@ -180,7 +180,7 @@ BITMAP::~BITMAP (void) BITMAP& BITMAP::operator = (const BITMAP& bmp) { - byte far * v0 = bmp.V; + byte * v0 = bmp.V; W = bmp.W; H = bmp.H; M = NULL; @@ -190,10 +190,10 @@ BITMAP& BITMAP::operator = (const BITMAP& bmp) { word vsiz = FP_OFF(bmp.B) - FP_OFF(v0); word siz = vsiz + H * sizeof(HideDesc); - byte far * v1 = farnew(byte, siz); + byte * v1 = farnew(byte, siz); if (v1 == NULL) DROP("No core", NULL); _fmemcpy(v1, v0, siz); - B = (HideDesc far *) ((V = v1) + vsiz); + B = (HideDesc *) ((V = v1) + vsiz); } return *this; } @@ -202,7 +202,7 @@ BITMAP& BITMAP::operator = (const BITMAP& bmp) -word BITMAP::MoveVmap (byte far * buf) +word BITMAP::MoveVmap (byte * buf) { if (V) { @@ -210,7 +210,7 @@ word BITMAP::MoveVmap (byte far * buf) word siz = vsiz + H * sizeof(HideDesc); _fmemcpy(buf, V, siz); if (MemType(V) == FAR_MEM) farfree(V); - B = (HideDesc far *) ((V = buf) + vsiz); + B = (HideDesc *) ((V = buf) + vsiz); return siz; } return 0; @@ -240,8 +240,8 @@ BMP_PTR BITMAP::Code (void) while (TRUE) // at most 2 times: for (V == NULL) & for allocated block; { - byte far * im = V+2; - word far * cp = (word far *) V; + byte * im = V+2; + word * cp = (word *) V; int bpl; if (V) // 2nd pass - fill the hide table @@ -254,7 +254,7 @@ BMP_PTR BITMAP::Code (void) } for (bpl = 0; bpl < 4; bpl ++) // once per each bitplane { - byte far * bm = M; + byte * bm = M; Boolean skip = (bm[bpl] == TRANS); word j; @@ -277,7 +277,7 @@ BMP_PTR BITMAP::Code (void) { *cp = cnt; // store block description word } - cp = (word far *) im; + cp = (word *) im; im += 2; skip = (pix == TRANS); cnt = 0; @@ -304,7 +304,7 @@ BMP_PTR BITMAP::Code (void) { *cp = cnt; } - cp = (word far *) im; + cp = (word *) im; im += 2; skip = TRUE; cnt = (SCR_WID - j + 3) / 4; @@ -318,11 +318,11 @@ BMP_PTR BITMAP::Code (void) { *cp = cnt; } - cp = (word far *) im; + cp = (word *) im; im += 2; } if (V) *cp = EOI; - cp = (word far *) im; + cp = (word *) im; im += 2; } if (V) break; @@ -332,7 +332,7 @@ BMP_PTR BITMAP::Code (void) { DROP("No core", NULL); } - B = (HideDesc far *) (V + sizV); + B = (HideDesc *) (V + sizV); } cnt = 0; for (i = 0; i < H; i ++) @@ -362,7 +362,7 @@ BMP_PTR BITMAP::Code (void) Boolean BITMAP::SolidAt (int x, int y) { - byte far * m; + byte * m; word r, n, n0; if (x >= W || y >= H) return FALSE; @@ -375,7 +375,7 @@ Boolean BITMAP::SolidAt (int x, int y) { word w, t; - w = * (word far *) m; + w = * (word *) m; m += 2; t = w & 0xC000; w &= 0x3FFF; @@ -393,7 +393,7 @@ Boolean BITMAP::SolidAt (int x, int y) { word w, t; - w = * (word far *) m; + w = * (word *) m; m += 2; t = w & 0xC000; w &= 0x3FFF; @@ -419,12 +419,12 @@ Boolean BITMAP::SolidAt (int x, int y) Boolean BITMAP::VBMSave (XFILE * f) { word p = (Pal != NULL), - n = ((word) (((byte far *)B) - V)) + H * sizeof(HideDesc); - if (f->Error == 0) f->Write((byte far *)&p, sizeof(p)); - if (f->Error == 0) f->Write((byte far *)&n, sizeof(n)); - if (f->Error == 0) f->Write((byte far *)&W, sizeof(W)); - if (f->Error == 0) f->Write((byte far *)&H, sizeof(H)); - if (f->Error == 0) if (p) f->Write((byte far *)Pal, 256 * sizeof(DAC)); + n = ((word) (((byte *)B) - V)) + H * sizeof(HideDesc); + if (f->Error == 0) f->Write((byte *)&p, sizeof(p)); + if (f->Error == 0) f->Write((byte *)&n, sizeof(n)); + if (f->Error == 0) f->Write((byte *)&W, sizeof(W)); + if (f->Error == 0) f->Write((byte *)&H, sizeof(H)); + if (f->Error == 0) if (p) f->Write((byte *)Pal, 256 * sizeof(DAC)); if (f->Error == 0) f->Write(V, n); return (f->Error == 0); } @@ -436,21 +436,21 @@ Boolean BITMAP::VBMSave (XFILE * f) Boolean BITMAP::VBMLoad (XFILE * f) { word p, n; - if (f->Error == 0) f->Read((byte far *)&p, sizeof(p)); - if (f->Error == 0) f->Read((byte far *)&n, sizeof(n)); - if (f->Error == 0) f->Read((byte far *)&W, sizeof(W)); - if (f->Error == 0) f->Read((byte far *)&H, sizeof(H)); + if (f->Error == 0) f->Read((byte *)&p, sizeof(p)); + if (f->Error == 0) f->Read((byte *)&n, sizeof(n)); + if (f->Error == 0) f->Read((byte *)&W, sizeof(W)); + if (f->Error == 0) f->Read((byte *)&H, sizeof(H)); if (f->Error == 0) { if (p) { - if (Pal) f->Read((byte far *)Pal, 256 * sizeof(DAC)); + if (Pal) f->Read((byte *)Pal, 256 * sizeof(DAC)); else f->Seek(f->Mark() + 256 * sizeof(DAC)); } } if ((V = farnew(byte, n)) == NULL) return FALSE; if (f->Error == 0) f->Read(V, n); - B = (HideDesc far *) (V + n - H * sizeof(HideDesc)); + B = (HideDesc *) (V + n - H * sizeof(HideDesc)); return (f->Error == 0); } diff --git a/engines/cge/bitmap.h b/engines/cge/bitmap.h index a6a3dc7539..738b3ab4ef 100644 --- a/engines/cge/bitmap.h +++ b/engines/cge/bitmap.h @@ -58,11 +58,11 @@ class BITMAP Boolean BMPLoad (XFILE * f); Boolean VBMLoad (XFILE * f); public: - static DAC far * Pal; + static DAC * Pal; word W, H; - byte far * M, far * V; HideDesc far * B; + byte * M, * V; HideDesc * B; BITMAP (const char * fname, Boolean rem = TRUE); - BITMAP (word w, word h, byte far * map); + BITMAP (word w, word h, byte * map); BITMAP (word w, word h, byte fill); BITMAP (const BITMAP& bmp); ~BITMAP (void); @@ -74,7 +74,7 @@ public: void XShow (int x, int y); Boolean SolidAt (int x, int y); Boolean VBMSave (XFILE * f); - word MoveVmap (byte far * buf); + word MoveVmap (byte * buf); }; diff --git a/engines/cge/cfile.cpp b/engines/cge/cfile.cpp index 03df303245..0aa7c20a89 100644 --- a/engines/cge/cfile.cpp +++ b/engines/cge/cfile.cpp @@ -114,7 +114,7 @@ void IOBUF::WriteBuff (void) -word IOBUF::Read (void far * buf, word len) +word IOBUF::Read (void *buf, word len) { word total = 0; while (len) @@ -125,7 +125,7 @@ word IOBUF::Read (void far * buf, word len) { if (len < n) n = len; _fmemcpy(buf, Buff+Ptr, n); - (byte far *) buf += n; + (byte *) buf += n; len -= n; total += n; Ptr += n; @@ -140,21 +140,21 @@ word IOBUF::Read (void far * buf, word len) -word IOBUF::Read (byte far * buf) +word IOBUF::Read (byte * buf) { word total = 0; while (total < LINE_MAX-2) { if (Ptr >= Lim) ReadBuff(); - byte far * p = Buff + Ptr; + byte * p = Buff + Ptr; word n = Lim - Ptr; if (n) { if (total + n >= LINE_MAX-2) n = LINE_MAX-2 - total; - byte far * eol = (byte far *) _fmemchr(p, '\r', n); + byte * eol = (byte *) _fmemchr(p, '\r', n); if (eol) n = (word) (eol - p); - byte far * eof = (byte far *) _fmemchr(p, '\32', n); + byte * eof = (byte *) _fmemchr(p, '\32', n); if (eof) // end-of-file { n = (word) (eof - p); @@ -187,7 +187,7 @@ word IOBUF::Read (byte far * buf) -word IOBUF::Write (void far * buf, word len) +word IOBUF::Write (void * buf, word len) { word tot = 0; while (len) @@ -199,7 +199,7 @@ word IOBUF::Write (void far * buf, word len) _fmemcpy(Buff+Lim, buf, n); Lim += n; len -= n; - (byte far *) buf += n; + (byte *) buf += n; tot += n; } else WriteBuff(); @@ -212,12 +212,12 @@ word IOBUF::Write (void far * buf, word len) -word IOBUF::Write (byte far * buf) +word IOBUF::Write (byte * buf) { word len = 0; if (buf) { - len = _fstrlen((const char far *) buf); + len = _fstrlen((const char *) buf); if (len) if (buf[len-1] == '\n') -- len; len = Write(buf, len); if (len) @@ -273,7 +273,7 @@ void IOBUF::Write (byte b) -CFILE::CFILE (const char near * name, IOMODE mode, CRYPT * crpt) +CFILE::CFILE (const char * name, IOMODE mode, CRYPT * crpt) : IOBUF(name, mode, crpt) { } diff --git a/engines/cge/cfile.h b/engines/cge/cfile.h index 56a249d9c0..5903d605ed 100644 --- a/engines/cge/cfile.h +++ b/engines/cge/cfile.h @@ -38,7 +38,7 @@ #define IOBUF_SIZE K(2) #endif -#define CFREAD(x) Read((byte far *)(x),sizeof(*(x))) +#define CFREAD(x) Read((byte *)(x),sizeof(*(x))) @@ -46,7 +46,7 @@ class IOBUF : public IOHAND { protected: - byte far * Buff; + byte * Buff; word Ptr, Lim; long BufMark; word Seed; @@ -57,11 +57,11 @@ public: IOBUF (IOMODE mode, CRYPT * crpt = NULL); IOBUF (const char * name, IOMODE mode, CRYPT * crpt = NULL); virtual ~IOBUF (void); - word Read (void far * buf, word len); - word Read (char far * buf); + word Read (void * buf, word len); + word Read (char * buf); int Read (void); - word Write (void far * buf, word len); - word Write (byte far * buf); + word Write (void * buf, word len); + word Write (byte * buf); void Write (byte b); }; @@ -71,7 +71,7 @@ class CFILE : public IOBUF { public: static word MaxLineLen; - CFILE (const char near * name, IOMODE mode = REA, CRYPT * crpt = NULL); + CFILE (const char * name, IOMODE mode = REA, CRYPT * crpt = NULL); virtual ~CFILE (void); void Flush (void); long Mark (void); diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index bc19156ad5..2bb7ac5c65 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -285,10 +285,10 @@ static void LoadGame (XFILE& file, Boolean tiny = FALSE) for (st = SavTab; st->Ptr; st ++) { if (file.Error) VGA::Exit("Bad SVG"); - file.Read((byte far *) ((tiny || st->Flg) ? st->Ptr : &i), st->Len); + file.Read((byte *) ((tiny || st->Flg) ? st->Ptr : &i), st->Len); } - file.Read((byte far *) &i, sizeof(i)); + file.Read((byte *) &i, sizeof(i)); if (i != SVGCHKSUM) VGA::Exit(BADSVG_TEXT); if (STARTUP::Core < CORE_HIG) Music = FALSE; if (STARTUP::SoundOk == 1 && STARTUP::Mode == 0) @@ -303,7 +303,7 @@ static void LoadGame (XFILE& file, Boolean tiny = FALSE) while (! file.Error) { SPRITE S(NULL); - word n = file.Read((byte far *) &S, sizeof(S)); + word n = file.Read((byte *) &S, sizeof(S)); if (n != sizeof(S)) break; S.Prev = S.Next = NULL; @@ -354,14 +354,14 @@ static void SaveGame (XFILE& file) for (st = SavTab; st->Ptr; st ++) { if (file.Error) VGA::Exit("Bad SVG"); - file.Write((byte far *) st->Ptr, st->Len); + file.Write((byte *) st->Ptr, st->Len); } - file.Write((byte far *) &(i = SVGCHKSUM), sizeof(i)); + file.Write((byte *) &(i = SVGCHKSUM), sizeof(i)); for (spr = VGA::SpareQ.First(); spr; spr = spr->Next) if (spr->Ref >= 1000) - if (!file.Error) file.Write((byte far *)spr, sizeof(*spr)); + if (!file.Error) file.Write((byte *)spr, sizeof(*spr)); } @@ -435,7 +435,7 @@ static void LoadMapping (void) { memset(CLUSTER::Map, 0, sizeof(CLUSTER::Map)); cf.Seek((Now - 1) * sizeof(CLUSTER::Map)); - cf.Read((byte far *) CLUSTER::Map, sizeof(CLUSTER::Map)); + cf.Read((byte *) CLUSTER::Map, sizeof(CLUSTER::Map)); } } } @@ -850,7 +850,7 @@ int SYSTEM::FunDel = HEROFUN0; void SYSTEM::SetPal (void) { int i; - DAC far * p = SysPal + 256-ArrayCount(StdPal); + DAC * p = SysPal + 256-ArrayCount(StdPal); for (i = 0; i < ArrayCount(StdPal); i ++) { p[i].R = StdPal[i].R >> 2; @@ -1426,7 +1426,7 @@ static void SaveMapping (void) if (! cf.Error) { cf.Seek((Now-1) * sizeof(CLUSTER::Map)); - cf.Write((byte far *) CLUSTER::Map, sizeof(CLUSTER::Map)); + cf.Write((byte *) CLUSTER::Map, sizeof(CLUSTER::Map)); } } { @@ -1435,7 +1435,7 @@ static void SaveMapping (void) { HeroXY[Now-1].X = Hero->X; HeroXY[Now-1].Y = Hero->Y; - cf.Write((byte far *) HeroXY, sizeof(HeroXY)); + cf.Write((byte *) HeroXY, sizeof(HeroXY)); } } } @@ -1998,7 +1998,7 @@ static void RunGame (void) if (Mini && INI_FILE::Exist("MINI.SPR")) { - byte far * ptr = (byte far *) &*Mini; + byte * ptr = (byte *) &*Mini; if (ptr != NULL) { LoadSprite("MINI", -1, 0, MINI_X, MINI_Y); @@ -2217,7 +2217,7 @@ Boolean ShowTitle (const char * name) void StkDump (void) { CFILE f("!STACK.DMP", BFW); - f.Write((byte far *) (intStackPtr-STACK_SIZ/2), STACK_SIZ*2); + f.Write((byte *) (intStackPtr-STACK_SIZ/2), STACK_SIZ*2); } #endif */ diff --git a/engines/cge/game.cpp b/engines/cge/game.cpp index bf7bd850f5..620e988c36 100644 --- a/engines/cge/game.cpp +++ b/engines/cge/game.cpp @@ -34,7 +34,7 @@ -byte * Glass (DAC far * pal, byte r, byte g, byte b) +byte * Glass (DAC * pal, byte r, byte g, byte b) { byte * x = new byte[256]; if (x) @@ -54,7 +54,7 @@ byte * Glass (DAC far * pal, byte r, byte g, byte b) -byte * Mark (DAC far * pal) +byte * Mark (DAC * pal) { #define f(c) (c ^ 63) byte * x = new byte[256]; diff --git a/engines/cge/game.h b/engines/cge/game.h index e675d15a7c..7a5efd9844 100644 --- a/engines/cge/game.h +++ b/engines/cge/game.h @@ -44,8 +44,8 @@ extern SPRITE * Sys; int Sinus (long x); -byte * Glass (DAC far * pal, byte r, byte g, byte b); -byte * Mark (DAC far * pal); +byte * Glass (DAC * pal, byte r, byte g, byte b); +byte * Mark (DAC * pal); diff --git a/engines/cge/general.h b/engines/cge/general.h index 71d9d96bdf..0a73de98a2 100644 --- a/engines/cge/general.h +++ b/engines/cge/general.h @@ -38,7 +38,7 @@ #define SCR_WID ((word)SCR_WID_) #define SCR_HIG ((word)SCR_HIG_) #define SCR_SEG 0xA000 -#define SCR_ADR ((byte far *) MK_FP(SCR_SEG, 0)) +#define SCR_ADR ((byte *) MK_FP(SCR_SEG, 0)) @@ -83,7 +83,7 @@ public: class ENGINE { protected: - static void interrupt (far * OldTimer) (...); + static void interrupt (* OldTimer) (...); static void interrupt NewTimer (...); public: ENGINE (word tdiv); @@ -128,7 +128,7 @@ class EMS EMS * Nxt; public: EMS (void); - void far * operator & () const; + void * operator & () const; word Size (void); }; @@ -184,8 +184,8 @@ public: word Error; XFILE (void) : Mode(REA), Error(0) { } XFILE (IOMODE mode) : Mode(mode), Error(0) { } - virtual word Read (void far * buf, word len) = 0; - virtual word Write (void far * buf, word len) = 0; + virtual word Read (void * buf, word len) = 0; + virtual word Write (void * buf, word len) = 0; virtual long Mark (void) = 0; virtual long Size (void) = 0; virtual long Seek (long pos) = 0; @@ -198,7 +198,7 @@ public: template <class T> inline word XRead (XFILE * xf, T * t) { - return xf->Read((byte far *) t, sizeof(*t)); + return xf->Read((byte *) t, sizeof(*t)); }; @@ -212,12 +212,12 @@ protected: word Seed; CRYPT * Crypt; public: - IOHAND (const char near * name, IOMODE mode = REA, CRYPT crypt = NULL); + IOHAND (const char * name, IOMODE mode = REA, CRYPT crypt = NULL); IOHAND (IOMODE mode = REA, CRYPT * crpt = NULL); virtual ~IOHAND (void); static Boolean Exist (const char * name); - word Read (void far * buf, word len); - word Write (void far * buf, word len); + word Read (void * buf, word len); + word Write (void * buf, word len); long Mark (void); long Size (void); long Seek (long pos); diff --git a/engines/cge/jbw.h b/engines/cge/jbw.h index cb2cb54fec..99e87a3820 100644 --- a/engines/cge/jbw.h +++ b/engines/cge/jbw.h @@ -49,7 +49,7 @@ #define IsAlNum(c) (IsAlpha(c) || IsDigit(c)) #define IsHxDig(c) (IsDigit(c) || ((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f')) -#define farnew(t,n) ((t far *) farmalloc(sizeof(t) * (n))) +#define farnew(t,n) ((t *) farmalloc(sizeof(t) * (n))) #define ArrayCount(a) (sizeof(a)/sizeof((a)[0])) #define MAX_TIMER 0x1800B0L @@ -138,11 +138,11 @@ struct KeyStatStruct #define CGA_Cursor 0x0607 #define OFF_Cursor 0x2000 -#define TimerCount (* ((volatile long far *) ((void _seg *) 0x40 + (void near *) 0x6C))) -#define KeyStat (* ((volatile struct KeyStatStruct far *) ((void _seg *) 0x40 + (void near *) 0x17))) -#define BreakFlag (* ((volatile byte far *) ((void _seg *) 0x40 + (void near *) 0x71))) -#define PostFlag (* ((volatile word far *) ((void _seg *) 0x40 + (void near *) 0x72))) -#define POST ((void far (*)(void)) ((void _seg *) 0xF000 + (void near *) 0xFFF0)) +#define TimerCount (* ((volatile long *) ((void _seg *) 0x40 + (void *) 0x6C))) +#define KeyStat (* ((volatile struct KeyStatStruct *) ((void _seg *) 0x40 + (void *) 0x17))) +#define BreakFlag (* ((volatile byte *) ((void _seg *) 0x40 + (void *) 0x71))) +#define PostFlag (* ((volatile word *) ((void _seg *) 0x40 + (void *) 0x72))) +#define POST ((void (*)(void)) ((void _seg *) 0xF000 + (void *) 0xFFF0)) #define SLIF if (KeyStat.ScrollLock) #define FOR(i,n) for(i=0;i<(n);i++) diff --git a/engines/cge/keybd.cpp b/engines/cge/keybd.cpp index 37a1e1d798..63a37a348e 100644 --- a/engines/cge/keybd.cpp +++ b/engines/cge/keybd.cpp @@ -45,7 +45,7 @@ word KEYBOARD::Code[0x60] = { 0,Esc,'1','2','3','4','5','6','7','8','9','0', 0*0x54,0*0x55,0*0x56,F11,F12,0*0x59,0*0x5A, 0*0x5B,0*0x5C,0*0x5D,0*0x5E,0*0x5F }; -void interrupt (far * KEYBOARD::OldKeyboard) (...); +void interrupt (* KEYBOARD::OldKeyboard) (...); diff --git a/engines/cge/keybd.h b/engines/cge/keybd.h index 42c80f88e1..7aa93b232f 100644 --- a/engines/cge/keybd.h +++ b/engines/cge/keybd.h @@ -41,7 +41,7 @@ class KEYBOARD { - static void interrupt (far * OldKeyboard) (...); + static void interrupt (* OldKeyboard) (...); static void interrupt NewKeyboard (...); static word Code[0x60]; static word Current; diff --git a/engines/cge/mouse.h b/engines/cge/mouse.h index f3b83f3f2e..8e69232c5c 100644 --- a/engines/cge/mouse.h +++ b/engines/cge/mouse.h @@ -51,7 +51,7 @@ struct EVENT { word Msk; }; extern EVENT Evt[EVT_MAX]; extern word EvtHead, EvtTail; -typedef void (far MOUSE_FUN) (void); +typedef void (MOUSE_FUN) (void); diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp index 82f9416af7..4c041653a4 100644 --- a/engines/cge/snail.cpp +++ b/engines/cge/snail.cpp @@ -63,7 +63,7 @@ extern SPRITE * Pocket[]; extern int PocPtr; //------------------------------------------------------------------------- -extern DAC far * SysPal; +extern DAC * SysPal; extern MOUSE Mouse; @@ -512,7 +512,7 @@ SNAIL::~SNAIL (void) void SNAIL::AddCom (SNCOM com, int ref, int val, void * ptr) { _disable(); - COM far * snc = &SNList[Head ++]; + COM * snc = &SNList[Head ++]; snc->Com = com; snc->Ref = ref; snc->Val = val; @@ -531,7 +531,7 @@ void SNAIL::AddCom (SNCOM com, int ref, int val, void * ptr) void SNAIL::InsCom (SNCOM com, int ref, int val, void * ptr) { - COM far * snc; + COM * snc; _disable(); if (Busy) @@ -1094,7 +1094,7 @@ void SNFlash (Boolean on) { if (on) { - DAC far * pal = farnew(DAC, PAL_CNT); + DAC * pal = farnew(DAC, PAL_CNT); if (pal) { int i; @@ -1181,7 +1181,7 @@ void SNAIL::RunCom (void) byte tmphea = Head; while (Tail != tmphea) { - COM far * snc = &SNList[Tail]; + COM * snc = &SNList[Tail]; if (! Turbo) // only for the slower one { diff --git a/engines/cge/snail.h b/engines/cge/snail.h index 66a40e8382..309f9b5a29 100644 --- a/engines/cge/snail.h +++ b/engines/cge/snail.h @@ -52,7 +52,7 @@ typedef struct { byte Horz, Vert; } BAR; struct SCB { - byte far * Ptr; + byte * Ptr; word Siz; SCB * Nxt; }; @@ -81,7 +81,7 @@ enum SNLIST { NEAR, TAKE }; class SNAIL { - struct COM { SNCOM Com; int Ref; int Val; void * Ptr; } far * SNList; + struct COM { SNCOM Com; int Ref; int Val; void * Ptr; } * SNList; byte Head, Tail; Boolean Turbo, Busy, TextDelay; word Pause; diff --git a/engines/cge/snddrv.h b/engines/cge/snddrv.h index 910148c71e..a445465dc8 100644 --- a/engines/cge/snddrv.h +++ b/engines/cge/snddrv.h @@ -82,7 +82,7 @@ struct DRVINFO // sample info struct SMPINFO { - BYTE far * saddr; // address + BYTE * saddr; // address WORD slen; // length WORD span; // left/right pan (0-15) int sflag; // flag @@ -119,7 +119,7 @@ EC void SNDDigiStart (SMPINFO *PSmpInfo); EC void SNDDigiStop (SMPINFO *PSmpInfo); // Start MIDI File -EC void SNDMIDIStart (BYTE far *MIDFile); +EC void SNDMIDIStart (BYTE *MIDFile); // Stop MIDI File EC void SNDMIDIStop (void); diff --git a/engines/cge/sound.cpp b/engines/cge/sound.cpp index cd0101204d..e8b2a8f4cf 100644 --- a/engines/cge/sound.cpp +++ b/engines/cge/sound.cpp @@ -90,7 +90,7 @@ void SOUND::Play (DATACK * wav, int pan, int cnt) if (wav) { Stop(); - smpinf.saddr = (char far *) &*(wav->EAddr()); + smpinf.saddr = (char *) &*(wav->EAddr()); smpinf.slen = (word)wav->Size(); smpinf.span = pan; smpinf.sflag = cnt; @@ -246,7 +246,7 @@ DATACK * FX::operator [] (int ref) //------------------------------------------------------------------------- -static byte far * midi = NULL; +static byte * midi = NULL; @@ -275,7 +275,7 @@ void LoadMIDI (int ref) if (mid.Error == 0) { word siz = (word) mid.Size(); - midi = new far byte[siz]; + midi = new byte[siz]; if (midi) { mid.Read(midi, siz); @@ -294,9 +294,9 @@ void LoadMIDI (int ref) -EC void far * Patch (int pat) +EC void * Patch (int pat) { - void far * p = NULL; + void * p = NULL; static char fn[] = "PATCH000.SND"; wtom(pat, fn+5, 10, 3); @@ -304,7 +304,7 @@ EC void far * Patch (int pat) if (! snd.Error) { word siz = (word) snd.Size(); - p = (byte far *) farmalloc(siz); + p = (byte *) farmalloc(siz); if (p) { snd.Read(p, siz); diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp index 3a4ea5bbc2..2e247336ab 100644 --- a/engines/cge/talk.cpp +++ b/engines/cge/talk.cpp @@ -180,7 +180,7 @@ void TALK::Update (const char * tx) word hmarg = (Mode) ? TEXT_HM : 0; word mw, mh, ln = vmarg; const char * p; - byte far * m; + byte * m; if (! TS[0]) { @@ -210,10 +210,10 @@ void TALK::Update (const char * tx) else { int cw = Font.Wid[*tx], i; - char far * f = Font.Map + Font.Pos[*tx]; + char * f = Font.Map + Font.Pos[*tx]; for (i = 0; i < cw; i ++) { - char far * p = m; + char * p = m; word n; register word b = * (f ++); for (n = 0; n < FONT_HIG; n ++) @@ -236,7 +236,7 @@ void TALK::Update (const char * tx) BITMAP * TALK::Box (word w, word h) { - byte far * b, far * p, far * q; + byte * b, * p, * q; word n, r = (Mode == ROUND) ? TEXT_RD : 0; int i; @@ -287,7 +287,7 @@ void TALK::PutLine (int line, const char * text) // Note: (TS[0].W % 4) have to be 0 { word w = TS[0]->W, h = TS[0]->H; - byte far * v = TS[0]->V, far * p; + byte * v = TS[0]->V, * p; word dsiz = w >> 2; // data size (1 plane line size) word lsiz = 2 + dsiz + 2; // word for line header, word for gap word psiz = h * lsiz; // - last gap, but + plane trailer @@ -307,14 +307,14 @@ void TALK::PutLine (int line, const char * text) // paint text line if (text) { - byte far * q; + byte * q; p = v + 2 + TEXT_HM/4 + (TEXT_HM%4)*psiz; q = v + size; while (* text) { word cw = Font.Wid[*text], i; - byte far * fp = Font.Map + Font.Pos[*text]; + byte * fp = Font.Map + Font.Pos[*text]; for (i = 0; i < cw; i ++) { @@ -361,7 +361,7 @@ void INFO_LINE::Update (const char * tx) if (tx != OldTxt) { word w = TS[0]->W, h = TS[0]->H; - byte * v = (byte near *) TS[0]->V; + byte * v = (byte *) TS[0]->V; word dsiz = w >> 2; // data size (1 plane line size) word lsiz = 2 + dsiz + 2; // word for line header, word for gap word psiz = h * lsiz; // - last gape, but + plane trailer @@ -381,7 +381,7 @@ void INFO_LINE::Update (const char * tx) while (* tx) { word cw = Font.Wid[*tx], i; - byte far * fp = Font.Map + Font.Pos[*tx]; + byte * fp = Font.Map + Font.Pos[*tx]; for (i = 0; i < cw; i ++) { diff --git a/engines/cge/talk.h b/engines/cge/talk.h index 8129b01bd9..c84891f7a0 100644 --- a/engines/cge/talk.h +++ b/engines/cge/talk.h @@ -55,9 +55,9 @@ public: // static byte Wid[256]; // static word Pos[256]; // static byte Map[256*8]; - byte far * Wid; - word far * Pos; - byte far * Map; + byte * Wid; + word * Pos; + byte * Map; FONT (const char * name); ~FONT (void); word Width (const char * text); diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 404b4f8bf8..84dbd802fd 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -136,9 +136,9 @@ static void Video (void) -word far * SaveScreen (void) +word * SaveScreen (void) { - word cxy, cur, siz, far * scr = NULL, far * sav; + word cxy, cur, siz, * scr = NULL, * sav; // horizontal size of text mode screen asm mov ah,0x0F // get current video mode @@ -194,9 +194,9 @@ word far * SaveScreen (void) -void RestoreScreen (word far * &sav) +void RestoreScreen (word * &sav) { - word far * scr = NULL; + word * scr = NULL; asm mov ax,0x40 // system data segment asm mov es,ax @@ -486,7 +486,7 @@ BMP_PTR * SPRITE::SetShapeList (BMP_PTR * shp) -void SPRITE::MoveShapes (byte far * buf) +void SPRITE::MoveShapes (byte * buf) { BMP_PTR * p; for (p = Ext->ShpList; *p; p ++) @@ -779,7 +779,7 @@ void SPRITE::Tick (void) -void SPRITE::MakeXlat (byte far * x) +void SPRITE::MakeXlat (byte * x) { if (Ext) { @@ -800,7 +800,7 @@ void SPRITE::KillXlat (void) if (Flags.Xlat && Ext) { BMP_PTR * b; - byte far * m = (*Ext->ShpList)->M; + byte * m = (*Ext->ShpList)->M; switch (MemType(m)) { @@ -885,7 +885,7 @@ void SPRITE::Show (void) void SPRITE::Show (word pg) { - byte far * a = VGA::Page[1]; + byte * a = VGA::Page[1]; VGA::Page[1] = VGA::Page[pg & 3]; Shp()->Show(X, Y); VGA::Page[1] = a; @@ -912,13 +912,13 @@ BMP_PTR SPRITE::Ghost (void) register SPREXT * e = Ext; if (e->b1) { - BMP_PTR bmp = new BITMAP(0, 0, (byte far *)NULL); + BMP_PTR bmp = new BITMAP(0, 0, (byte *)NULL); if (bmp == NULL) VGA::Exit("No core"); bmp->W = e->b1->W; bmp->H = e->b1->H; if ((bmp->B = farnew(HideDesc, bmp->H)) == NULL) VGA::Exit("No Core"); - bmp->V = (byte far *) _fmemcpy(bmp->B, e->b1->B, sizeof(HideDesc) * bmp->H); - bmp->M = (byte far *) MK_FP(e->y1, e->x1); + bmp->V = (byte *) _fmemcpy(bmp->B, e->b1->B, sizeof(HideDesc) * bmp->H); + bmp->M = (byte *) MK_FP(e->y1, e->x1); return bmp; } return NULL; @@ -1085,18 +1085,18 @@ SPRITE * QUEUE::Locate (int ref) word VGA::StatAdr = VGAST1_; word VGA::OldMode = 0; -word far * VGA::OldScreen = NULL; +word * VGA::OldScreen = NULL; const char * VGA::Msg = NULL; const char * VGA::Nam = NULL; -DAC far * VGA::OldColors = NULL; -DAC far * VGA::NewColors = NULL; +DAC * VGA::OldColors = NULL; +DAC * VGA::NewColors = NULL; Boolean VGA::SetPal = FALSE; int VGA::Mono = 0; QUEUE VGA::ShowQ = TRUE, VGA::SpareQ = FALSE; -byte far * VGA::Page[4] = { (byte far *) MK_FP(SCR_SEG, 0x0000), - (byte far *) MK_FP(SCR_SEG, 0x4000), - (byte far *) MK_FP(SCR_SEG, 0x8000), - (byte far *) MK_FP(SCR_SEG, 0xC000) }; +byte * VGA::Page[4] = { (byte *) MK_FP(SCR_SEG, 0x0000), + (byte *) MK_FP(SCR_SEG, 0x4000), + (byte *) MK_FP(SCR_SEG, 0x8000), + (byte *) MK_FP(SCR_SEG, 0xC000) }; @@ -1280,7 +1280,7 @@ int VGA::SetMode (int mode) -void VGA::GetColors (DAC far * tab) +void VGA::GetColors (DAC * tab) { asm cld asm les di,tab // color table @@ -1303,9 +1303,9 @@ void VGA::GetColors (DAC far * tab) -void VGA::SetColors (DAC far * tab, int lum) +void VGA::SetColors (DAC * tab, int lum) { - DAC far * des = NewColors; + DAC * des = NewColors; asm push ds asm les di,des @@ -1367,7 +1367,7 @@ void VGA::SetColors (void) -void VGA::Sunrise (DAC far * tab) +void VGA::Sunrise (DAC * tab) { int i; for (i = 0; i <= 64; i += FADE_STEP) @@ -1420,7 +1420,7 @@ void VGA::Show (void) void VGA::UpdateColors (void) { - DAC far * tab = NewColors; + DAC * tab = NewColors; asm push ds asm cld @@ -1453,7 +1453,7 @@ void VGA::UpdateColors (void) void VGA::Update (void) { - byte far * p = Page[1]; + byte * p = Page[1]; Page[1] = Page[0]; Page[0] = p; @@ -1483,7 +1483,7 @@ void VGA::Update (void) void VGA::Clear (byte color) { - byte far * a = (byte far *) MK_FP(SCR_SEG, 0); + byte * a = (byte *) MK_FP(SCR_SEG, 0); asm mov dx,VGASEQ_ asm mov ax,0x0F02 // map mask register - enable all planes @@ -1504,7 +1504,7 @@ void VGA::Clear (byte color) void VGA::CopyPage (word d, word s) { - byte far * S = Page[s & 3], far * D = Page[d & 3]; + byte * S = Page[s & 3], * D = Page[d & 3]; asm mov dx,VGAGRA_ asm mov al,0x05 // R/W mode @@ -1573,9 +1573,9 @@ void BITMAP::XShow (int x, int y) { byte rmsk = x % 4, mask = 1 << rmsk, - far * scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4; - byte near * m = (char *) M; - byte far * v = V; + * scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4; + byte * m = (char *) M; + byte * v = V; asm push bx asm push si @@ -1658,8 +1658,8 @@ void BITMAP::XShow (int x, int y) void BITMAP::Show (int x, int y) { byte mask = 1 << (x & 3), - far * scr = VGA::Page[1] + y * (SCR_WID >> 2) + (x >> 2); - byte far * v = V; + * scr = VGA::Page[1] + y * (SCR_WID >> 2) + (x >> 2); + byte * v = V; asm push ds // preserve DS @@ -1728,9 +1728,9 @@ void BITMAP::Show (int x, int y) void BITMAP::Hide (int x, int y) { - byte far * scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4; + byte * scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4; word d = FP_OFF(VGA::Page[2]) - FP_OFF(VGA::Page[1]); - HideDesc far * b = B; + HideDesc * b = B; word extra = ((x & 3) != 0); word h = H; diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h index a749b482b7..4f172cb3ea 100644 --- a/engines/cge/vga13h.h +++ b/engines/cge/vga13h.h @@ -199,7 +199,7 @@ public: virtual ~SPRITE (void); BMP_PTR Shp (void); BMP_PTR * SetShapeList (BMP_PTR * shp); - void MoveShapes (byte far * buf); + void MoveShapes (byte * buf); SPRITE * Expand (void); SPRITE * Contract (void); SPRITE * BackShow (Boolean fast = FALSE); @@ -211,7 +211,7 @@ public: void Hide (void); BMP_PTR Ghost (void); void Show (word pg); - void MakeXlat (byte far * x); + void MakeXlat (byte * x); void KillXlat (void); void Step (int nr = -1); SEQ * SetSeq (SEQ * seq); @@ -251,10 +251,10 @@ public: class VGA { static word OldMode; - static word far * OldScreen; + static word * OldScreen; static word StatAdr; static Boolean SetPal; - static DAC far * OldColors, far * NewColors; + static DAC * OldColors, * NewColors; static int SetMode (int mode); static void UpdateColors (void); static void SetColors (void); @@ -266,17 +266,17 @@ public: dword FrmCnt; static QUEUE ShowQ, SpareQ; static int Mono; - static byte far * Page[4]; + static byte * Page[4]; VGA (int mode = M13H); ~VGA (void); void Setup (VgaRegBlk * vrb); - static void GetColors (DAC far * tab); - static void SetColors (DAC far * tab, int lum); + static void GetColors (DAC * tab); + static void SetColors (DAC * tab, int lum); static void Clear (byte color = 0); static void Exit (const char * txt = NULL, const char * name = NULL); static void Exit (int tref, const char * name = NULL); static void CopyPage (word d, word s = 3); - static void Sunrise (DAC far * tab); + static void Sunrise (DAC * tab); static void Sunset (void); void Show (void); void Update (void); @@ -291,7 +291,7 @@ RGB MkRGB (byte r, byte g, byte b); template <class CBLK> -byte Closest (CBLK far * pal, CBLK x) +byte Closest (CBLK * pal, CBLK x) { #define f(col,lum) ((((word)(col))<<8)/lum) word i, dif = 0xFFFF, found; @@ -325,8 +325,8 @@ byte Closest (CBLK far * pal, CBLK x) char * NumStr (char * str, int num); void Video (void); - word far * SaveScreen (void); - void RestoreScreen (word far * &sav); + word * SaveScreen (void); + void RestoreScreen (word * &sav); SPRITE * SpriteAt (int x, int y); SPRITE * Locate (int ref); diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp index ccfe273923..4ca3708eac 100644 --- a/engines/cge/vmenu.cpp +++ b/engines/cge/vmenu.cpp @@ -48,7 +48,7 @@ MENU_BAR::MENU_BAR (word w) { int h = FONT_HIG + 2 * MB_VM, i = (w += 2 * MB_HM) * h; - byte far * p = farnew(byte, i), far * p1, far * p2; + byte * p = farnew(byte, i), * p1, * p2; _fmemset(p+w, TRANS, i-2*w); _fmemset(p, MB_LT, w); diff --git a/engines/cge/vol.cpp b/engines/cge/vol.cpp index 6816f2de90..f0365867ee 100644 --- a/engines/cge/vol.cpp +++ b/engines/cge/vol.cpp @@ -61,7 +61,7 @@ VFILE::VFILE (const char * name, IOMODE mode) if (mode == REA) { if (Dat.File.Error || Cat.Error) DROP("Bad volume data", NULL); - BT_KEYPACK far * kp = Cat.Find(name); + BT_KEYPACK * kp = Cat.Find(name); if (_fstricmp(kp->Key, name) != 0) Error = ENOFILE; EndMark = (BufMark = BegMark = kp->Mark) + kp->Size; } diff --git a/engines/cge/vol.h b/engines/cge/vol.h index 80cd759a47..74b4a2b648 100644 --- a/engines/cge/vol.h +++ b/engines/cge/vol.h @@ -55,9 +55,9 @@ class DAT friend VFILE; static VOLBASE File; public: - static Boolean Append (byte far * buf, word len); + static Boolean Append (byte * buf, word len); static Boolean Write (CFILE& f); - static Boolean Read (long org, word len, byte far * buf); + static Boolean Read (long org, word len, byte * buf); }; diff --git a/engines/cge/wav.h b/engines/cge/wav.h index 22dd79c4f5..3266af95d5 100644 --- a/engines/cge/wav.h +++ b/engines/cge/wav.h @@ -110,7 +110,7 @@ class DATACK : public CKHEA Boolean e; union { - byte far * Buf; + byte * Buf; EMS * EBuf; }; public: @@ -118,7 +118,7 @@ public: DATACK (CKHEA& hea, EMM * emm); DATACK (int first, int last); ~DATACK (void); - inline byte far * Addr (void) { return Buf; } + inline byte * Addr (void) { return Buf; } inline EMS * EAddr (void) { return EBuf; } }; |