aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2011-06-10 13:06:03 +0200
committerStrangerke2011-06-10 13:06:03 +0200
commit68f7ff111536c2d7f5a8869252ba8ad31507a380 (patch)
tree67d397572233ad9963cd0e96cbf049620d8a9e47 /engines
parenta5c569eff2c4e2f30ef0523169ab22ed92f9894a (diff)
downloadscummvm-rg350-68f7ff111536c2d7f5a8869252ba8ad31507a380.tar.gz
scummvm-rg350-68f7ff111536c2d7f5a8869252ba8ad31507a380.tar.bz2
scummvm-rg350-68f7ff111536c2d7f5a8869252ba8ad31507a380.zip
CGE: Replace Boolean, TRUE and FALSE by bool, true, false
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/bitmap.cpp26
-rw-r--r--engines/cge/bitmap.h10
-rw-r--r--engines/cge/boot.h2
-rw-r--r--engines/cge/cfile.cpp2
-rw-r--r--engines/cge/cge_main.cpp128
-rw-r--r--engines/cge/cge_main.h4
-rw-r--r--engines/cge/general.h12
-rw-r--r--engines/cge/gettext.cpp4
-rw-r--r--engines/cge/jbw.h7
-rw-r--r--engines/cge/mixer.cpp22
-rw-r--r--engines/cge/mixer.h2
-rw-r--r--engines/cge/mouse.cpp4
-rw-r--r--engines/cge/mouse.h2
-rw-r--r--engines/cge/snail.cpp98
-rw-r--r--engines/cge/snail.h14
-rw-r--r--engines/cge/sound.cpp2
-rw-r--r--engines/cge/sound.h2
-rw-r--r--engines/cge/startup.cpp14
-rw-r--r--engines/cge/startup.h2
-rw-r--r--engines/cge/talk.cpp6
-rw-r--r--engines/cge/text.cpp18
-rw-r--r--engines/cge/vga13h.cpp40
-rw-r--r--engines/cge/vga13h.h20
-rw-r--r--engines/cge/vmenu.cpp14
-rw-r--r--engines/cge/vol.cpp2
-rw-r--r--engines/cge/vol.h8
-rw-r--r--engines/cge/wav.h6
27 files changed, 234 insertions, 237 deletions
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 697eb4a9e3..a9ded67e45 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -53,7 +53,7 @@ DAC * BITMAP::Pal = NULL;
#pragma argsused
-BITMAP::BITMAP (const char * fname, Boolean rem)
+BITMAP::BITMAP (const char * fname, bool rem)
: M(NULL), V(NULL)
{
char pat[MAXPATH];
@@ -238,7 +238,7 @@ BMP_PTR BITMAP::Code (void)
V = NULL;
}
- while (TRUE) // at most 2 times: for (V == NULL) & for allocated block;
+ while (true) // at most 2 times: for (V == NULL) & for allocated block;
{
byte * im = V+2;
word * cp = (word *) V;
@@ -255,7 +255,7 @@ BMP_PTR BITMAP::Code (void)
for (bpl = 0; bpl < 4; bpl ++) // once per each bitplane
{
byte * bm = M;
- Boolean skip = (bm[bpl] == TRANS);
+ bool skip = (bm[bpl] == TRANS);
word j;
cnt = 0;
@@ -306,7 +306,7 @@ BMP_PTR BITMAP::Code (void)
}
cp = (word *) im;
im += 2;
- skip = TRUE;
+ skip = true;
cnt = (SCR_WID - j + 3) / 4;
}
}
@@ -360,12 +360,12 @@ BMP_PTR BITMAP::Code (void)
-Boolean BITMAP::SolidAt (int x, int y)
+bool BITMAP::SolidAt (int x, int y)
{
byte * m;
word r, n, n0;
- if (x >= W || y >= H) return FALSE;
+ if (x >= W || y >= H) return false;
m = V;
r = x % 4;
@@ -389,7 +389,7 @@ Boolean BITMAP::SolidAt (int x, int y)
m += w;
}
- while (TRUE)
+ while (true)
{
word w, t;
@@ -398,14 +398,14 @@ Boolean BITMAP::SolidAt (int x, int y)
t = w & 0xC000;
w &= 0x3FFF;
- if (n > n0) return FALSE;
+ if (n > n0) return false;
n += w;
switch (t)
{
- case EOI : return FALSE;
+ case EOI : return false;
case SKP : w = 0; break;
case REP :
- case CPY : if (n-w <= n0 && n > n0) return TRUE; break;
+ case CPY : if (n-w <= n0 && n > n0) return true; break;
}
m += (t == REP) ? 1 : w;
}
@@ -416,7 +416,7 @@ Boolean BITMAP::SolidAt (int x, int y)
-Boolean BITMAP::VBMSave (XFILE * f)
+bool BITMAP::VBMSave (XFILE * f)
{
word p = (Pal != NULL),
n = ((word) (((byte *)B) - V)) + H * sizeof(HideDesc);
@@ -433,7 +433,7 @@ Boolean BITMAP::VBMSave (XFILE * f)
-Boolean BITMAP::VBMLoad (XFILE * f)
+bool BITMAP::VBMLoad (XFILE * f)
{
word p, n;
if (f->Error == 0) f->Read((byte *)&p, sizeof(p));
@@ -448,7 +448,7 @@ Boolean BITMAP::VBMLoad (XFILE * f)
else f->Seek(f->Mark() + 256 * sizeof(DAC));
}
}
- if ((V = farnew(byte, n)) == NULL) return FALSE;
+ if ((V = farnew(byte, n)) == NULL) return false;
if (f->Error == 0) f->Read(V, n);
B = (HideDesc *) (V + n - H * sizeof(HideDesc));
return (f->Error == 0);
diff --git a/engines/cge/bitmap.h b/engines/cge/bitmap.h
index 738b3ab4ef..de2214fd63 100644
--- a/engines/cge/bitmap.h
+++ b/engines/cge/bitmap.h
@@ -55,13 +55,13 @@ typedef struct { word skip; word hide; } HideDesc;
class BITMAP
{
- Boolean BMPLoad (XFILE * f);
- Boolean VBMLoad (XFILE * f);
+ bool BMPLoad (XFILE * f);
+ bool VBMLoad (XFILE * f);
public:
static DAC * Pal;
word W, H;
byte * M, * V; HideDesc * B;
- BITMAP (const char * fname, Boolean rem = TRUE);
+ BITMAP (const char * fname, bool rem = true);
BITMAP (word w, word h, byte * map);
BITMAP (word w, word h, byte fill);
BITMAP (const BITMAP& bmp);
@@ -72,8 +72,8 @@ public:
void Hide (int x, int y);
void Show (int x, int y);
void XShow (int x, int y);
- Boolean SolidAt (int x, int y);
- Boolean VBMSave (XFILE * f);
+ bool SolidAt (int x, int y);
+ bool VBMSave (XFILE * f);
word MoveVmap (byte * buf);
};
diff --git a/engines/cge/boot.h b/engines/cge/boot.h
index 6b9b2c88ec..1715fd02ec 100644
--- a/engines/cge/boot.h
+++ b/engines/cge/boot.h
@@ -70,7 +70,7 @@ typedef struct {
EC Boot * ReadBoot (int drive);
EC byte CheckBoot (Boot * boot);
-EC Boolean WriteBoot (int drive, Boot * boot);
+EC bool WriteBoot (int drive, Boot * boot);
#endif \ No newline at end of file
diff --git a/engines/cge/cfile.cpp b/engines/cge/cfile.cpp
index 0aa7c20a89..7d222d101d 100644
--- a/engines/cge/cfile.cpp
+++ b/engines/cge/cfile.cpp
@@ -349,7 +349,7 @@ void CFILE::Append (CFILE& f)
Seek(Size());
if (f.Error == 0)
{
- while (TRUE)
+ while (true)
{
if ((Lim = f.IOHAND::Read(Buff, IOBUF_SIZE)) == IOBUF_SIZE) WriteBuff();
else break;
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 2bb7ac5c65..1f621948c2 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -117,7 +117,7 @@ static int DemoText = DEMO_TEXT;
//--------------------------------------------------------------------------
- Boolean JBW = FALSE;
+ bool JBW = false;
DAC *SysPal = farnew(DAC, PAL_CNT);
//-------------------------------------------------------------------------
@@ -141,10 +141,10 @@ static EMS * Mini = MiniEmm.Alloc((word)MINI_EMM_SIZE);
static BMP_PTR * MiniShpList = NULL;
static BMP_PTR MiniShp[] = { NULL, NULL };
static KEYBOARD Keyboard;
-static Boolean Finis = FALSE;
+static bool Finis = false;
static int Startup = 1;
static int OffUseCount = atoi(Text[OFF_USE_COUNT]);
- word * intStackPtr = FALSE;
+ word *intStackPtr = false;
HXY HeroXY[CAVE_MAX] = {{0,0}};
@@ -184,9 +184,9 @@ byte & CLUSTER::Cell (void)
-Boolean CLUSTER::Protected (void)
+bool CLUSTER::Protected (void)
{
- if (A == Barriers[Now].Vert || B == Barriers[Now].Horz) return TRUE;
+ if (A == Barriers[Now].Vert || B == Barriers[Now].Horz) return true;
_DX = (MAP_ZCNT << 8) + MAP_XCNT;
_BX = (word) this;
@@ -202,7 +202,7 @@ Boolean CLUSTER::Protected (void)
asm cmp ch,dh
asm jge xit
-// if (A < 0 || A >= MAP_XCNT || B < 0 || B >= MAP_ZCNT) return TRUE;
+// if (A < 0 || A >= MAP_XCNT || B < 0 || B >= MAP_ZCNT) return true;
asm mov al,dl
asm mul ch
@@ -276,7 +276,7 @@ CLUSTER XZ (COUPLE xy)
-static void LoadGame (XFILE& file, Boolean tiny = FALSE)
+static void LoadGame (XFILE& file, bool tiny = false)
{
SAVTAB * st;
SPRITE * spr;
@@ -290,7 +290,7 @@ static void LoadGame (XFILE& file, Boolean tiny = FALSE)
file.Read((byte *) &i, sizeof(i));
if (i != SVGCHKSUM) VGA::Exit(BADSVG_TEXT);
- if (STARTUP::Core < CORE_HIG) Music = FALSE;
+ if (STARTUP::Core < CORE_HIG) Music = false;
if (STARTUP::SoundOk == 1 && STARTUP::Mode == 0)
{
SNDDrvInfo.VOL2.D = volume[0];
@@ -483,10 +483,10 @@ void WALK::Tick (void)
if (! spr->Flags.Near)
{
FeedSnail(spr, NEAR);
- spr->Flags.Near = TRUE;
+ spr->Flags.Near = true;
}
}
- else spr->Flags.Near = FALSE;
+ else spr->Flags.Near = false;
}
}
@@ -578,7 +578,7 @@ void WALK::Park (void)
void WALK::FindWay (CLUSTER c)
{
- Boolean Find1Way(void);
+ bool Find1Way(void);
extern word Target;
if (c != Here)
@@ -621,7 +621,7 @@ void WALK::FindWay (SPRITE * spr)
-Boolean WALK::Lower (SPRITE * spr)
+bool WALK::Lower (SPRITE * spr)
{
return (spr->Y > Y + (H * 3) / 5);
}
@@ -681,8 +681,8 @@ public:
SQUARE::SQUARE (void)
: SPRITE(MB)
{
- Flags.Kill = TRUE;
- Flags.BDel = FALSE;
+ Flags.Kill = true;
+ Flags.BDel = false;
}
@@ -816,13 +816,13 @@ static void AltCtrlDel (void)
static void MiniStep (int stp)
{
- if (stp < 0) MiniCave->Flags.Hide = TRUE;
+ if (stp < 0) MiniCave->Flags.Hide = true;
else
{
&*Mini;
*MiniShp[0] = *MiniShpList[stp];
if (Fx.Current) &*(Fx.Current->EAddr());
- MiniCave->Flags.Hide = FALSE;
+ MiniCave->Flags.Hide = false;
}
}
@@ -927,7 +927,7 @@ static void CaveUp (void)
// following 2 lines trims Hero's Z position!
Hero->Tick();
Hero->Time = 1;
- Hero->Flags.Hide = FALSE;
+ Hero->Flags.Hide = false;
}
if (! Dark) Vga.Sunset();
@@ -946,9 +946,9 @@ static void CaveUp (void)
Vga.CopyPage(1, 0);
Vga.Show();
Vga.Sunrise(SysPal);
- Dark = FALSE;
+ Dark = false;
if (! Startup) Mouse.On();
- HEART::Enable = TRUE;
+ HEART::Enable = true;
}
@@ -993,7 +993,7 @@ static void QGame (void)
SaveSound();
SaveGame(CFILE(UsrPath(UsrFnam), WRI, RCrypt));
Vga.Sunset();
- Finis = TRUE;
+ Finis = true;
}
@@ -1003,7 +1003,7 @@ void SwitchCave (int cav)
{
if (cav != Now)
{
- HEART::Enable = FALSE;
+ HEART::Enable = false;
if (cav < 0)
{
SNPOST(SNLABEL, -1, 0, NULL); // wait for repaint
@@ -1087,7 +1087,7 @@ void SYSTEM::Touch (word mask, int x, int y)
case F7 : Hero->Step(TSEQ + 2); break;
case F8 : Hero->Step(TSEQ + 3); break;
case F9 : SYSTEM::FunDel = 1; break;
- case 'X' : if (KEYBOARD::Key[ALT]) Finis = TRUE; break;
+ case 'X' : if (KEYBOARD::Key[ALT]) Finis = true; break;
case '0' :
case '1' :
case '2' :
@@ -1268,7 +1268,7 @@ static void SwitchMusic (void)
if (VMENU::Addr) SNPOST_(SNKILL, -1, 0, VMENU::Addr);
else
{
- SNPOST_(SNSEQ, 122, (Music = FALSE), NULL);
+ SNPOST_(SNSEQ, 122, (Music = false), NULL);
SNPOST(SNEXEC, -1, 0, (void *) SelectSound);
}
}
@@ -1355,8 +1355,8 @@ static void SwitchMapping (void)
static void KillSprite (void)
{
- Sprite->Flags.Kill = TRUE;
- Sprite->Flags.BDel = TRUE;
+ Sprite->Flags.Kill = true;
+ Sprite->Flags.BDel = true;
SNPOST_(SNKILL, -1, 0, Sprite);
Sprite = NULL;
}
@@ -1382,7 +1382,7 @@ static void PushSprite (void)
static void PullSprite (void)
{
- Boolean ok = FALSE;
+ bool ok = false;
SPRITE * spr = Sprite->Next;
if (spr)
{
@@ -1554,7 +1554,7 @@ static void OptionTouch (int opt, word mask)
if (mask & R_UP)
if (! MIXER::Appear)
{
- MIXER::Appear = TRUE;
+ MIXER::Appear = true;
new MIXER(BUTTON_X, BUTTON_Y);
}
break;
@@ -1611,7 +1611,7 @@ void SPRITE::Touch (word mask, int x, int y)
{
SNPOST(SNREACH, -1, -1, this);
SNPOST(SNKEEP, -1, -1, this);
- Flags.Port = FALSE;
+ Flags.Port = false;
}
}
else
@@ -1674,9 +1674,9 @@ static void LoadSprite (const char *fname, int ref, int cav, int col = 0, int ro
int shpcnt = 0;
int type = 0; // DEAD
- Boolean east = FALSE;
- Boolean port = FALSE;
- Boolean tran = FALSE;
+ bool east = false;
+ bool port = false;
+ bool tran = false;
int i, lcnt = 0;
word len;
@@ -1807,8 +1807,8 @@ static void LoadSprite (const char *fname, int ref, int cav, int col = 0, int ro
Sprite->Flags.East = east;
Sprite->Flags.Port = port;
Sprite->Flags.Tran = tran;
- Sprite->Flags.Kill = TRUE;
- Sprite->Flags.BDel = TRUE;
+ Sprite->Flags.Kill = true;
+ Sprite->Flags.BDel = true;
fnsplit(fname, NULL, NULL, Sprite->File, NULL);
Sprite->ShpCnt = shpcnt;
VGA::SpareQ.Append(Sprite);
@@ -1825,10 +1825,10 @@ static void LoadScript (const char *fname)
char line[LINE_MAX];
char * SpN;
int SpI, SpA, SpX, SpY, SpZ;
- Boolean BkG = FALSE;
+ bool BkG = false;
INI_FILE scrf(fname);
int lcnt = 0;
- Boolean ok = TRUE;
+ bool ok = true;
if (scrf.Error) return;
@@ -1839,7 +1839,7 @@ static void LoadScript (const char *fname)
++ lcnt;
if (*line == 0 || *line == '\n' || *line == '.') continue;
- ok = FALSE; // not OK if break
+ ok = false; // not OK if break
// sprite ident number
if ((p = strtok(line, " \t\n")) == NULL) break;
SpI = atoi(p);
@@ -1861,11 +1861,11 @@ static void LoadScript (const char *fname)
if ((p = strtok(NULL, " ,;/\t\n")) == NULL) break;
BkG = atoi(p) == 0;
- ok = TRUE; // no break: OK
+ ok = true; // no break: OK
Sprite = NULL;
LoadSprite(SpN, SpI, SpA, SpX, SpY, SpZ);
- if (Sprite && BkG) Sprite->Flags.Back = TRUE;
+ if (Sprite && BkG) Sprite->Flags.Back = true;
}
if (! ok)
{
@@ -1947,7 +1947,7 @@ void LoadUser (void)
else
{
LoadScript(ProgName(INI_EXT));
- Music = TRUE;
+ Music = true;
SaveGame(CFILE(SVG0NAME, WRI));
VGA::Exit("Ok", SVG0NAME);
}
@@ -1965,9 +1965,9 @@ static void RunGame (void)
Text.Preload(100, 1000);
LoadHeroXY();
- CavLight.Flags.Tran = TRUE;
+ CavLight.Flags.Tran = true;
VGA::ShowQ.Append(&CavLight);
- CavLight.Flags.Hide = TRUE;
+ CavLight.Flags.Hide = true;
static SEQ PocSeq[] = { { 0, 0, 0, 0, 20 },
{ 1, 2, 0, 0, 4 },
@@ -1978,7 +1978,7 @@ static void RunGame (void)
{ 0, 1, 0, 0, 16 },
};
PocLight.SetSeq(PocSeq);
- PocLight.Flags.Tran = TRUE;
+ PocLight.Flags.Tran = true;
PocLight.Time = 1;
PocLight.Z = 120;
VGA::ShowQ.Append(&PocLight);
@@ -2005,7 +2005,7 @@ static void RunGame (void)
ExpandSprite(MiniCave = Sprite); // NULL is ok
if (MiniCave)
{
- MiniCave->Flags.Hide = TRUE;
+ MiniCave->Flags.Hide = true;
MiniCave->MoveShapes(ptr);
MiniShp[0] = new BITMAP(*MiniCave->Shp());
MiniShpList = MiniCave->SetShapeList(MiniShp);
@@ -2024,15 +2024,15 @@ static void RunGame (void)
if ((Shadow = Sprite) != NULL)
{
Shadow->Ref = 2;
- Shadow->Flags.Tran = TRUE;
- Hero->Flags.Shad = TRUE;
+ Shadow->Flags.Tran = true;
+ Hero->Flags.Shad = true;
VGA::ShowQ.Insert(VGA::SpareQ.Remove(Shadow), Hero);
}
}
}
InfoLine.Goto(INFO_X, INFO_Y);
- InfoLine.Flags.Tran = TRUE;
+ InfoLine.Flags.Tran = true;
InfoLine.Update(NULL);
VGA::ShowQ.Insert(&InfoLine);
@@ -2064,7 +2064,7 @@ static void RunGame (void)
}
KEYBOARD::SetClient(NULL);
- HEART::Enable = FALSE;
+ HEART::Enable = false;
SNPOST(SNCLEAR, -1, 0, NULL);
SNPOST_(SNCLEAR, -1, 0, NULL);
Mouse.Off();
@@ -2086,14 +2086,14 @@ void Movie (const char * ext)
ExpandSprite(VGA::SpareQ.Locate(999));
FeedSnail(VGA::ShowQ.Locate(999), TAKE);
VGA::ShowQ.Append(&Mouse);
- HEART::Enable = TRUE;
+ HEART::Enable = true;
KEYBOARD::SetClient(Sys);
while (! Snail.Idle())
{
MainLoop();
}
KEYBOARD::SetClient(NULL);
- HEART::Enable = FALSE;
+ HEART::Enable = false;
SNPOST(SNCLEAR, -1, 0, NULL);
SNPOST_(SNCLEAR, -1, 0, NULL);
VGA::ShowQ.Clear();
@@ -2106,16 +2106,16 @@ void Movie (const char * ext)
-Boolean ShowTitle (const char * name)
+bool ShowTitle (const char * name)
{
BITMAP::Pal = SysPal;
BMP_PTR LB[] = { new BITMAP(name), NULL };
BITMAP::Pal = NULL;
- Boolean usr_ok = FALSE;
+ bool usr_ok = false;
SPRITE D(LB);
- D.Flags.Kill = TRUE;
- D.Flags.BDel = TRUE;
+ D.Flags.Kill = true;
+ D.Flags.BDel = true;
D.Center();
D.Show(2);
@@ -2136,11 +2136,11 @@ Boolean ShowTitle (const char * name)
VGA::CopyPage(1, 2);
VGA::CopyPage(0, 1);
VGA::ShowQ.Append(&Mouse);
- HEART::Enable = TRUE;
+ HEART::Enable = true;
Mouse.On();
for (SelectSound(); ! Snail.Idle() || VMENU::Addr; ) MainLoop();
Mouse.Off();
- HEART::Enable = FALSE;
+ HEART::Enable = false;
VGA::ShowQ.Clear();
VGA::CopyPage(0, 2);
STARTUP::SoundOk = 2;
@@ -2151,7 +2151,7 @@ Boolean ShowTitle (const char * name)
{
#ifdef DEMO
strcpy(UsrFnam, ProgName(SVG_EXT));
- usr_ok = TRUE;
+ usr_ok = true;
#else
//-----------------------------------------
#ifndef EVA
@@ -2171,10 +2171,10 @@ Boolean ShowTitle (const char * name)
VGA::CopyPage(0, 1);
VGA::ShowQ.Append(&Mouse);
//Mouse.On();
- HEART::Enable = TRUE;
+ HEART::Enable = true;
for (TakeName(); GET_TEXT::Ptr; ) MainLoop();
- HEART::Enable = FALSE;
- if (KEYBOARD::Last() == Enter && *UsrFnam) usr_ok = TRUE;
+ HEART::Enable = false;
+ if (KEYBOARD::Last() == Enter && *UsrFnam) usr_ok = true;
if (usr_ok) strcat(UsrFnam, SVG_EXT);
//Mouse.Off();
VGA::ShowQ.Clear();
@@ -2185,13 +2185,13 @@ Boolean ShowTitle (const char * name)
const char *n = UsrPath(UsrFnam);
if (CFILE::Exist(n))
{
- LoadGame(CFILE(n, REA, RCrypt), TRUE); // only system vars
+ LoadGame(CFILE(n, REA, RCrypt), true); // only system vars
VGA::SetColors(SysPal, 64);
Vga.Update();
if (FINIS)
{
++ STARTUP::Mode;
- FINIS = FALSE;
+ FINIS = false;
}
}
else ++ STARTUP::Mode;
@@ -2203,7 +2203,7 @@ Boolean ShowTitle (const char * name)
VGA::CopyPage(0, 2);
#ifdef DEMO
- return TRUE;
+ return true;
#else
return (STARTUP::Mode == 2 || usr_ok);
#endif
@@ -2237,8 +2237,8 @@ void cge_main (void)
if (! Mouse.Exist) VGA::Exit(NO_MOUSE_TEXT);
if (! SVG0FILE::Exist(SVG0NAME)) STARTUP::Mode = 2;
- Debug( DebugLine.Flags.Hide = TRUE; )
- Debug( HorzLine.Flags.Hide = TRUE; )
+ Debug( DebugLine.Flags.Hide = true; )
+ Debug( HorzLine.Flags.Hide = true; )
srand((word) Timer());
Sys = new SYSTEM;
diff --git a/engines/cge/cge_main.h b/engines/cge/cge_main.h
index 7a213429b1..4f610897b1 100644
--- a/engines/cge/cge_main.h
+++ b/engines/cge/cge_main.h
@@ -167,7 +167,7 @@ public:
byte &Cell (void);
CLUSTER (void) : COUPLE () { }
CLUSTER (int a, int b) : COUPLE (a, b) { }
- Boolean Protected (void);
+ bool Protected (void);
};
@@ -186,7 +186,7 @@ public:
int Distance (SPRITE * spr);
void Turn (DIR d);
void Park (void);
- Boolean Lower (SPRITE * spr);
+ bool Lower (SPRITE * spr);
void Reach (SPRITE * spr, int mode = -1);
};
diff --git a/engines/cge/general.h b/engines/cge/general.h
index 0a73de98a2..03c34d7058 100644
--- a/engines/cge/general.h
+++ b/engines/cge/general.h
@@ -70,8 +70,8 @@ public:
void operator += (COUPLE c) { A += c.A; B += c.B; }
COUPLE operator - (COUPLE c) { return COUPLE(A-c.A, B-c.B); }
void operator -= (COUPLE c) { A -= c.A; B -= c.B; }
- Boolean operator == (COUPLE c) { return ((A - c.A) | (B - c.B)) == 0; }
- Boolean operator != (COUPLE c) { return ! (operator == (c)); }
+ bool operator == (COUPLE c) { return ((A - c.A) | (B - c.B)) == 0; }
+ bool operator != (COUPLE c) { return ! (operator == (c)); }
void Split (signed char& a, signed char& b) { a = A; b = B; }
};
@@ -103,7 +103,7 @@ class EMS;
class EMM
{
friend EMS;
- Boolean Test (void);
+ bool Test (void);
long Top, Lim;
EMS * List;
int Han;
@@ -215,7 +215,7 @@ public:
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);
+ static bool Exist (const char * name);
word Read (void * buf, word len);
word Write (void * buf, word len);
long Mark (void);
@@ -250,7 +250,7 @@ int TakeEnum (const char ** tab, const char * txt);
word ChkSum (void *m, word n);
long Timer (void);
long TimerLimit (word t);
-Boolean TimerLimitGone (long 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);
inline const char * ProgPath (void);
@@ -258,7 +258,7 @@ const char * ProgName (const char * ext = NULL);
int DriveFixed (unsigned drv);
int DriveRemote (unsigned drv);
int DriveCD (unsigned drv);
-Boolean IsVga (void);
+bool IsVga (void);
EC void _fqsort (void *base, word nelem, word width,
int (*fcmp)(const void*, const void*));
diff --git a/engines/cge/gettext.cpp b/engines/cge/gettext.cpp
index 5d6c8ce1bf..ad9f885bb9 100644
--- a/engines/cge/gettext.cpp
+++ b/engines/cge/gettext.cpp
@@ -47,8 +47,8 @@ GET_TEXT::GET_TEXT (const char * info, char * text, int size, void (*click)(void
Mode = RECT;
TS[0] = Box((i + 3) & ~3, 2 * TEXT_VM + 2 * FONT_HIG + TEXT_LS);
SetShapeList(TS);
- Flags.BDel = TRUE;
- Flags.Kill = TRUE;
+ Flags.BDel = true;
+ Flags.Kill = true;
memcpy(Buff, text, Len);
Buff[Len] = ' ';
Buff[Len+1] = '\0';
diff --git a/engines/cge/jbw.h b/engines/cge/jbw.h
index 99e87a3820..22110bc832 100644
--- a/engines/cge/jbw.h
+++ b/engines/cge/jbw.h
@@ -36,10 +36,8 @@
#define CR 13
#define NULL 0
-#define TRUE (1==1)
-#define FALSE (!TRUE)
-#define OFF FALSE
-#define ON TRUE
+#define OFF false
+#define ON true
#define IsWhite(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
#define IsUpper(c) ((c) >= 'A' && (c) <= 'Z')
@@ -57,7 +55,6 @@ typedef unsigned char BYTE;
typedef unsigned int WORD;
typedef unsigned long DWORD;
-typedef int Boolean;
typedef unsigned char byte;
typedef unsigned int word;
typedef unsigned long dword;
diff --git a/engines/cge/mixer.cpp b/engines/cge/mixer.cpp
index 1e7aa7a181..56a8c5f335 100644
--- a/engines/cge/mixer.cpp
+++ b/engines/cge/mixer.cpp
@@ -29,7 +29,7 @@
#include "cge/text.h"
#include "cge/snail.h"
#include "cge/mouse.h"
-#include <snddrv.h>
+#include "cge/snddrv.h"
#include <string.h>
#include <alloc.h>
@@ -38,7 +38,7 @@
extern MOUSE Mouse;
- Boolean MIXER::Appear = FALSE;
+ bool MIXER::Appear = false;
@@ -46,14 +46,14 @@ MIXER::MIXER (int x, int y)
: SPRITE(NULL), Fall(MIX_FALL)
{
int i;
- Appear = TRUE;
+ Appear = true;
mb[0] = new BITMAP("VOLUME");
mb[1] = NULL;
SetShapeList(mb);
SetName(Text[MIX_NAME]);
- Flags.Syst = TRUE;
- Flags.Kill = TRUE;
- Flags.BDel = TRUE;
+ Flags.Syst = true;
+ Flags.Kill = true;
+ Flags.BDel = true;
Goto(x, y);
Z = MIX_Z;
@@ -74,13 +74,13 @@ MIXER::MIXER (int x, int y)
register SPRITE * spr = new SPRITE(lb);
spr->SetSeq(ls);
spr->Goto(x+2+12*i, y+8);
- spr->Flags.Tran = TRUE;
- spr->Flags.Kill = TRUE;
- spr->Flags.BDel = FALSE;
+ spr->Flags.Tran = true;
+ spr->Flags.Kill = true;
+ spr->Flags.BDel = false;
spr->Z = MIX_Z;
Led[i] = spr;
}
- Led[ArrayCount(Led)-1]->Flags.BDel = TRUE;
+ Led[ArrayCount(Led)-1]->Flags.BDel = true;
VGA::ShowQ.Insert(this);
for (i = 0; i < ArrayCount(Led); i ++) VGA::ShowQ.Insert(Led[i]);
@@ -101,7 +101,7 @@ MIXER::MIXER (int x, int y)
MIXER::~MIXER (void)
{
- Appear = FALSE;
+ Appear = false;
}
diff --git a/engines/cge/mixer.h b/engines/cge/mixer.h
index bf5d79b67f..e2377ff781 100644
--- a/engines/cge/mixer.h
+++ b/engines/cge/mixer.h
@@ -46,7 +46,7 @@ class MIXER : public SPRITE
int Fall;
void Update (void);
public:
- static Boolean Appear;
+ static bool Appear;
MIXER (int x, int y);
~MIXER (void);
void Touch (word mask, int x, int y);
diff --git a/engines/cge/mouse.cpp b/engines/cge/mouse.cpp
index b9a0386801..5fdaf08995 100644
--- a/engines/cge/mouse.cpp
+++ b/engines/cge/mouse.cpp
@@ -195,7 +195,7 @@ void MOUSE::Tick (void)
Hold = e.Ptr;
if (Hold)
{
- Hold->Flags.Hold = TRUE;
+ Hold->Flags.Hold = true;
#ifndef DEBUG
if (Hold->Flags.Drag)
#endif
@@ -210,7 +210,7 @@ void MOUSE::Tick (void)
{
if (Hold)
{
- Hold->Flags.Hold = FALSE;
+ Hold->Flags.Hold = false;
Hold = NULL;
}
}
diff --git a/engines/cge/mouse.h b/engines/cge/mouse.h
index 8e69232c5c..e30abcaa94 100644
--- a/engines/cge/mouse.h
+++ b/engines/cge/mouse.h
@@ -67,7 +67,7 @@ class MOUSE : public SPRITE
//void SetFun (void);
//void ResetFun (void);
public:
- Boolean Exist;
+ bool Exist;
int Buttons;
SPRITE * Busy;
//SPRITE * Touched;
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index 4c041653a4..06824c5b12 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -44,13 +44,13 @@
int MaxCave = 0;
SCB Scb = { NULL, 0, NULL };
- Boolean Flag[4];
- Boolean Dark = FALSE;
- Boolean Game = FALSE;
+ bool Flag[4];
+ bool Dark = false;
+ bool Game = false;
int Now = 1;
int Lev = -1;
- SNAIL Snail = FALSE;
- SNAIL Snail_ = TRUE;
+ SNAIL Snail = false;
+ SNAIL Snail_ = true;
extern SPRITE PocLight;
@@ -176,7 +176,7 @@ static void SNGame (SPRITE * spr, int num)
if (! Game)
{
SNPOST(SNSAY, buref, 16008, NULL); // zgadnij!
- Game = TRUE;
+ Game = true;
}
#undef STEPS
#undef DRESSED
@@ -186,7 +186,7 @@ static void SNGame (SPRITE * spr, int num)
{
static SPRITE * k = NULL, * k1, * k2, * k3;
static int count = 0;
- Boolean hit;
+ bool hit;
if (k == NULL)
{
@@ -199,7 +199,7 @@ static void SNGame (SPRITE * spr, int num)
if (! Game) // init
{
SNPOST(SNGAME, 20002, 2, NULL);
- Game = TRUE;
+ Game = true;
}
else // cont
{
@@ -233,7 +233,7 @@ static void SNGame (SPRITE * spr, int num)
SNPOST(SNSEND, 20010, 20, NULL); // papier
SNPOST(SNSOUND,20010, 20003, NULL); // papier!
SNPOST(SNSAY, 20001, 20005, NULL);
- Game = FALSE;
+ Game = false;
return;
}
else k3->Step(random(5));
@@ -414,11 +414,11 @@ void FeedSnail (SPRITE * spr, SNLIST snq)
if (p->Ptr) break;
}
}
- while (TRUE)
+ while (true)
{
if (c->Com == SNTALK)
{
- if ((Snail.TalkEnable = (c->Val != 0)) == FALSE) KillText();
+ if ((Snail.TalkEnable = (c->Val != 0)) == false) KillText();
}
if (c->Com == SNNEXT)
{
@@ -487,9 +487,9 @@ char * SNAIL::ComTxt[] = { "LABEL", "PAUSE", "WAIT", "LEVEL",
-SNAIL::SNAIL (Boolean turbo)
-: Turbo(turbo), Busy(FALSE), TextDelay(FALSE),
- Pause(0), TalkEnable(TRUE),
+SNAIL::SNAIL (bool turbo)
+: Turbo(turbo), Busy(false), TextDelay(false),
+ Pause(0), TalkEnable(true),
Head(0), Tail(0), SNList(farnew(COM, 256))
{
}
@@ -604,9 +604,9 @@ static void SNZTrim (SPRITE * spr)
{
if (spr) if (spr->Active())
{
- Boolean en = HEART::Enable;
+ bool en = HEART::Enable;
SPRITE * s;
- HEART::Enable = FALSE;
+ HEART::Enable = false;
s = (spr->Flags.Shad) ? spr->Prev : NULL;
VGA::ShowQ.Insert(VGA::ShowQ.Remove(spr));
if (s)
@@ -681,8 +681,8 @@ void SNSend (SPRITE * spr, int val)
if (spr)
{
int was = spr->Cave;
- Boolean was1 = (was == 0 || was == Now);
- Boolean val1 = (val == 0 || val == Now);
+ bool was1 = (was == 0 || was == Now);
+ bool val1 = (val == 0 || val == Now);
spr->Cave = val;
if (val1 != was1)
{
@@ -695,12 +695,12 @@ void SNSend (SPRITE * spr, int val)
}
Hide1(spr);
ContractSprite(spr);
- spr->Flags.Slav = FALSE;
+ spr->Flags.Slav = false;
}
else
{
if (spr->Ref % 1000 == 0) BITMAP::Pal = SysPal;
- if (spr->Flags.Back) spr->BackShow(TRUE);
+ if (spr->Flags.Back) spr->BackShow(true);
else ExpandSprite(spr);
BITMAP::Pal = NULL;
}
@@ -719,8 +719,8 @@ void SNSwap (SPRITE * spr, int xref)
{
int was = spr->Cave;
int xwas = xspr->Cave;
- Boolean was1 = (was == 0 || was == Now);
- Boolean xwas1 = (xwas == 0 || xwas == Now);
+ bool was1 = (was == 0 || was == Now);
+ bool xwas1 = (xwas == 0 || xwas == Now);
Swap(spr->Cave, xspr->Cave);
Swap(spr->X, xspr->X);
@@ -730,8 +730,8 @@ void SNSwap (SPRITE * spr, int xref)
{
int n = FindPocket(spr);
if (n >= 0) Pocket[n] = xspr;
- xspr->Flags.Kept = TRUE;
- xspr->Flags.Port = FALSE;
+ xspr->Flags.Kept = true;
+ xspr->Flags.Port = false;
}
if (xwas1 != was1)
{
@@ -760,15 +760,15 @@ void SNCover (SPRITE * spr, int xref)
SPRITE * xspr = Locate(xref);
if (spr && xspr)
{
- spr->Flags.Hide = TRUE;
+ spr->Flags.Hide = true;
xspr->Z = spr->Z;
xspr->Cave = spr->Cave;
xspr->Goto(spr->X, spr->Y);
ExpandSprite(xspr);
- if ((xspr->Flags.Shad = spr->Flags.Shad) == TRUE)
+ if ((xspr->Flags.Shad = spr->Flags.Shad) == true)
{
VGA::ShowQ.Insert(VGA::ShowQ.Remove(spr->Prev), xspr);
- spr->Flags.Shad = FALSE;
+ spr->Flags.Shad = false;
}
FeedSnail(xspr, NEAR);
}
@@ -782,13 +782,13 @@ void SNUncover (SPRITE * spr, SPRITE * xspr)
{
if (spr && xspr)
{
- spr->Flags.Hide = FALSE;
+ spr->Flags.Hide = false;
spr->Cave = xspr->Cave;
spr->Goto(xspr->X, xspr->Y);
- if ((spr->Flags.Shad = xspr->Flags.Shad) == TRUE)
+ if ((spr->Flags.Shad = xspr->Flags.Shad) == true)
{
VGA::ShowQ.Insert(VGA::ShowQ.Remove(xspr->Prev), spr);
- xspr->Flags.Shad = FALSE;
+ xspr->Flags.Shad = false;
}
spr->Z = xspr->Z;
SNSend(xspr, -1);
@@ -913,7 +913,7 @@ void SNSlave (SPRITE * spr, int ref)
if (spr->Active())
{
SNSend(slv, spr->Cave);
- slv->Flags.Slav = TRUE;
+ slv->Flags.Slav = true;
slv->Z = spr->Z;
VGA::ShowQ.Insert(VGA::ShowQ.Remove(slv), spr->Next);
}
@@ -997,7 +997,7 @@ void SNKeep (SPRITE * spr, int stp)
SNSound(spr, 3, 1);
Pocket[PocPtr] = spr;
spr->Cave = 0;
- spr->Flags.Kept = TRUE;
+ spr->Flags.Kept = true;
spr->Goto(POCKET_X + POCKET_DX*PocPtr + POCKET_DX/2 - spr->W/2,
POCKET_Y + POCKET_DY/2 - spr->H/2);
if (stp >= 0) spr->Step(stp);
@@ -1019,7 +1019,7 @@ void SNGive (SPRITE * spr, int stp)
{
Pocket[p] = NULL;
spr->Cave = Now;
- spr->Flags.Kept = FALSE;
+ spr->Flags.Kept = false;
if (stp >= 0) spr->Step(stp);
}
}
@@ -1034,7 +1034,7 @@ static void SNBackPt (SPRITE * spr, int stp)
if (spr)
{
if (stp >= 0) spr->Step(stp);
- spr->BackShow(TRUE);
+ spr->BackShow(true);
}
}
@@ -1056,12 +1056,12 @@ static void SNLevel (SPRITE * spr, int lev)
spr = VGA::SpareQ.Locate(100+Lev);
if (spr)
{
- spr->BackShow(TRUE);
+ spr->BackShow(true);
spr->Cave = 0;
}
}
MaxCave = maxcav[Lev];
- if (spr) spr->Flags.Hide = FALSE;
+ if (spr) spr->Flags.Hide = false;
}
@@ -1069,7 +1069,7 @@ static void SNLevel (SPRITE * spr, int lev)
-static void SNFlag (int fn, Boolean v)
+static void SNFlag (int fn, bool v)
{
Flag[fn] = v;
}
@@ -1090,7 +1090,7 @@ static void SNSetRef (SPRITE * spr, int nr)
-void SNFlash (Boolean on)
+void SNFlash (bool on)
{
if (on)
{
@@ -1110,14 +1110,14 @@ void SNFlash (Boolean on)
}
}
else VGA::SetColors(SysPal, 64);
- Dark = FALSE;
+ Dark = false;
}
-static void SNLight (Boolean in)
+static void SNLight (bool in)
{
if (in) VGA::Sunrise(SysPal);
else VGA::Sunset();
@@ -1128,7 +1128,7 @@ static void SNLight (Boolean in)
-static void SNBarrier (int cav, int bar, Boolean horz)
+static void SNBarrier (int cav, int bar, bool horz)
{
((byte *) (Barriers + ((cav > 0) ? cav : Now)))[horz] = bar;
}
@@ -1160,7 +1160,7 @@ static void SNReach (SPRITE * spr, int mode)
-static void SNMouse (Boolean on)
+static void SNMouse (bool on)
{
if (on) Mouse.On();
else Mouse.Off();
@@ -1177,7 +1177,7 @@ void SNAIL::RunCom (void)
extern void SwitchCave(int);
if (! Busy)
{
- Busy = TRUE;
+ Busy = true;
byte tmphea = Head;
while (Tail != tmphea)
{
@@ -1191,7 +1191,7 @@ void SNAIL::RunCom (void)
if (TextDelay)
{
KillText();
- TextDelay = FALSE;
+ TextDelay = false;
}
}
if (Talk && snc->Com != SNPAUSE) break;
@@ -1203,7 +1203,7 @@ void SNAIL::RunCom (void)
{
case SNLABEL : break;
case SNPAUSE : HEART::SetXTimer(&Pause, snc->Val);
- if (Talk) TextDelay = TRUE; break;
+ if (Talk) TextDelay = true; break;
case SNWAIT : if (sprel)
{
if (sprel->SeqTest(snc->Val) &&
@@ -1277,8 +1277,8 @@ void SNAIL::RunCom (void)
case SNBACKPT : SNBackPt(sprel, snc->Val); break;
case SNFLASH : SNFlash(snc->Val != 0); break;
case SNLIGHT : SNLight(snc->Val != 0); break;
- case SNSETHB : SNBarrier(snc->Ref, snc->Val, TRUE); break;
- case SNSETVB : SNBarrier(snc->Ref, snc->Val, FALSE); break;
+ case SNSETHB : SNBarrier(snc->Ref, snc->Val, true); break;
+ case SNSETVB : SNBarrier(snc->Ref, snc->Val, false); break;
case SNWALK : SNWalk(sprel, snc->Ref, snc->Val); break;
case SNREACH : SNReach(sprel, snc->Val); break;
case SNSOUND : SNSound(sprel, snc->Val, count); count = 1; break;
@@ -1293,7 +1293,7 @@ void SNAIL::RunCom (void)
if (! Turbo) break;
}
xit:
- Busy = FALSE;
+ Busy = false;
}
}
@@ -1301,7 +1301,7 @@ void SNAIL::RunCom (void)
-Boolean SNAIL::Idle (void)
+bool SNAIL::Idle (void)
{
return (Head == Tail);
}
diff --git a/engines/cge/snail.h b/engines/cge/snail.h
index 309f9b5a29..f7e19290e6 100644
--- a/engines/cge/snail.h
+++ b/engines/cge/snail.h
@@ -83,17 +83,17 @@ class SNAIL
{
struct COM { SNCOM Com; int Ref; int Val; void * Ptr; } * SNList;
byte Head, Tail;
- Boolean Turbo, Busy, TextDelay;
+ bool Turbo, Busy, TextDelay;
word Pause;
public:
static char * ComTxt[];
- Boolean TalkEnable;
- SNAIL (Boolean turbo = FALSE);
+ bool TalkEnable;
+ SNAIL (bool turbo = false);
~SNAIL (void);
void RunCom (void);
void AddCom (SNCOM com, int ref = 0, int val = 0, void * ptr = NULL);
void InsCom (SNCOM com, int ref = 0, int val = 0, void * ptr = NULL);
- Boolean Idle (void);
+ bool Idle (void);
};
@@ -110,9 +110,9 @@ void PocFul (void);
extern SCB Scb;
-extern Boolean Flag[4];
-extern Boolean Game;
-extern Boolean Dark;
+extern bool Flag[4];
+extern bool Game;
+extern bool Dark;
extern SNAIL Snail;
extern SNAIL Snail_;
extern int Now;
diff --git a/engines/cge/sound.cpp b/engines/cge/sound.cpp
index e8b2a8f4cf..b3c13a0211 100644
--- a/engines/cge/sound.cpp
+++ b/engines/cge/sound.cpp
@@ -43,7 +43,7 @@
#include <alloc.h>
- Boolean Music = TRUE;
+ bool Music = true;
FX Fx = 16; // must precede SOUND!!
SOUND Sound;
diff --git a/engines/cge/sound.h b/engines/cge/sound.h
index b43a85dd41..993bd05fca 100644
--- a/engines/cge/sound.h
+++ b/engines/cge/sound.h
@@ -75,7 +75,7 @@ public:
-extern Boolean Music;
+extern bool Music;
extern SOUND Sound;
extern FX Fx;
diff --git a/engines/cge/startup.cpp b/engines/cge/startup.cpp
index a92e899ee2..5555c12b16 100644
--- a/engines/cge/startup.cpp
+++ b/engines/cge/startup.cpp
@@ -67,7 +67,7 @@ void quit_now (int ref)
-Boolean STARTUP::get_parms (void)
+bool STARTUP::get_parms (void)
{
int i = _argc;
while (i > 1)
@@ -89,7 +89,7 @@ Boolean STARTUP::get_parms (void)
case 8 : SNDDrvInfo.DIRQ = p; break;
case 9 : SNDDrvInfo.MBASE = p;
SNDDrvInfo.MDEV = DEV_GM; break;
- default: return FALSE;
+ default: return false;
}
if (n >= 2) SoundOk = 2;
}
@@ -112,7 +112,7 @@ Boolean STARTUP::get_parms (void)
#endif
#endif
if (SNDDrvInfo.MDEV != DEV_GM) SNDDrvInfo.MDEV = SNDDrvInfo.DDEV;
- return TRUE;
+ return true;
}
@@ -132,7 +132,7 @@ STARTUP::STARTUP (void)
if (Core < CORE_HIG)
{
SNDDrvInfo.MDEV = DEV_QUIET;
- Music = FALSE;
+ Music = false;
}
#endif
if (! get_parms()) quit_now(BAD_ARG_TEXT);
@@ -160,7 +160,7 @@ const char *UsrPath (const char *nam)
#if defined(CD)
if (DriveCD(0))
{
- Boolean ok = FALSE;
+ bool ok = false;
CFILE ini = Text[CDINI_FNAME];
if (!ini.Error)
{
@@ -170,7 +170,7 @@ const char *UsrPath (const char *nam)
{
int j = strlen(buf);
if (j) if (buf[--j] == '\n') buf[j] = '\0';
- if (memicmp(buf, key, i) == 0) ok = TRUE;
+ if (memicmp(buf, key, i) == 0) ok = true;
}
if (ok)
{
@@ -179,7 +179,7 @@ const char *UsrPath (const char *nam)
if (*(p-1) != '\\') *(p++) = '\\';
strcpy(p, "NUL");
if (_dos_open(buf, 0, &i) == 0) _dos_close(i);
- else ok = FALSE;
+ else ok = false;
}
}
if (!ok) quit_now(BADCD_TEXT);
diff --git a/engines/cge/startup.h b/engines/cge/startup.h
index bdb2647ab1..27507a7122 100644
--- a/engines/cge/startup.h
+++ b/engines/cge/startup.h
@@ -59,7 +59,7 @@
class STARTUP
{
- static Boolean get_parms (void);
+ static bool get_parms (void);
public:
static int Mode;
static int Core;
diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp
index 2e247336ab..d941dba274 100644
--- a/engines/cge/talk.cpp
+++ b/engines/cge/talk.cpp
@@ -138,7 +138,7 @@ TALK::TALK (const char * tx, TBOX_STYLE mode)
: SPRITE(NULL), Mode(mode)
{
TS[0] = TS[1] = NULL;
- Flags.Syst = TRUE;
+ Flags.Syst = true;
Update(tx);
}
@@ -150,7 +150,7 @@ TALK::TALK (void)
: SPRITE(NULL), Mode(PURE)
{
TS[0] = TS[1] = NULL;
- Flags.Syst = TRUE;
+ Flags.Syst = true;
}
@@ -163,7 +163,7 @@ TALK::~TALK (void)
word i;
for (i = 0; i < ShpCnt; i ++)
{
- if (FP_SEG(ShpList[i]) != _DS) // small model: always FALSE
+ if (FP_SEG(ShpList[i]) != _DS) // small model: always false
{
delete ShpList[i];
ShpList[i] = NULL;
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp
index b4b6e9b23c..34b99ac7eb 100644
--- a/engines/cge/text.cpp
+++ b/engines/cge/text.cpp
@@ -221,7 +221,7 @@ void Say (const char * txt, SPRITE * spr)
Talk = new TALK(txt, ROUND);
if (Talk)
{
- Boolean east = spr->Flags.East;
+ bool east = spr->Flags.East;
int x = (east) ? (spr->X+spr->W-2) : (spr->X+2);
int y = spr->Y+2;
SPRITE * spike = new SPRITE(SP);
@@ -229,17 +229,17 @@ void Say (const char * txt, SPRITE * spr)
if (east)
{
- if (x + sw + TEXT_RD + 5 >= SCR_WID) east = FALSE;
+ if (x + sw + TEXT_RD + 5 >= SCR_WID) east = false;
}
else
{
- if (x <= 5 + TEXT_RD + sw) east = TRUE;
+ if (x <= 5 + TEXT_RD + sw) east = true;
}
x = (east) ? (spr->X+spr->W-2) : (spr->X+2-sw);
if (spr->Ref == 1) x += (east) ? -10 : 10; // Hero
- Talk->Flags.Kill = TRUE;
- Talk->Flags.BDel = TRUE;
+ Talk->Flags.Kill = true;
+ Talk->Flags.BDel = true;
Talk->SetName(Text[SAY_NAME]);
Talk->Goto(x - (Talk->W - sw) / 2 - 3 + 6 * east, y - spike->H - Talk->H+1);
Talk->Z = 125;
@@ -247,8 +247,8 @@ void Say (const char * txt, SPRITE * spr)
spike->Goto(x, Talk->Y + Talk->H - 1);
spike->Z = 126;
- spike->Flags.Slav = TRUE;
- spike->Flags.Kill = TRUE;
+ spike->Flags.Slav = true;
+ spike->Flags.Kill = true;
spike->SetName(Text[SAY_NAME]);
spike->Step(east);
spike->Ref = SAY_REF;
@@ -270,8 +270,8 @@ void Inf (const char * txt)
Talk = new TALK(txt, RECT);
if (Talk)
{
- Talk->Flags.Kill = TRUE;
- Talk->Flags.BDel = TRUE;
+ Talk->Flags.Kill = true;
+ Talk->Flags.BDel = true;
Talk->SetName(Text[INF_NAME]);
Talk->Center();
Talk->Goto(Talk->X, Talk->Y - 20);
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 84dbd802fd..386ccca140 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -85,7 +85,7 @@ static VgaRegBlk VideoMode[] = {
{ 0x00 } };
- Boolean SpeedTest = FALSE;
+ bool SpeedTest = false;
SEQ Seq1[] = { { 0, 0, 0, 0, 0 } };
SEQ Seq2[] = { { 0, 1, 0, 0, 0 }, { 1, 0, 0, 0, 0 } };
SPRITE * Sys = NULL;
@@ -267,7 +267,7 @@ SPRITE * Locate (int ref)
//--------------------------------------------------------------------------
-Boolean HEART::Enable = FALSE;
+bool HEART::Enable = false;
word * HEART::XTimer = NULL;
@@ -499,7 +499,7 @@ void SPRITE::MoveShapes (byte * buf)
-Boolean SPRITE::Works (SPRITE * spr)
+bool SPRITE::Works (SPRITE * spr)
{
if (spr) if (spr->Ext)
{
@@ -509,10 +509,10 @@ Boolean SPRITE::Works (SPRITE * spr)
c += spr->TakePtr;
if (c->Ref == Ref)
if (c->Com != SNLABEL || (c->Val == 0 || c->Val == Now))
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -535,11 +535,11 @@ SEQ * SPRITE::SetSeq (SEQ * seq)
-Boolean SPRITE::SeqTest (int n)
+bool SPRITE::SeqTest (int n)
{
if (n >= 0) return (SeqPtr == n);
if (Ext) return (Ext->Seq[SeqPtr].Next == SeqPtr);
- return TRUE;
+ return true;
}
@@ -584,8 +584,8 @@ SPRITE * SPRITE::Expand (void)
{
if (! Ext)
{
- Boolean enbl = HEART::Enable;
- HEART::Enable = FALSE;
+ bool enbl = HEART::Enable;
+ HEART::Enable = false;
if ((Ext = new SPREXT) == NULL) DROP("No core", NULL);
if (*File)
{
@@ -732,7 +732,7 @@ SPRITE * SPRITE::Contract (void)
-SPRITE * SPRITE::BackShow (Boolean fast)
+SPRITE * SPRITE::BackShow (bool fast)
{
Expand();
Show(2);
@@ -787,7 +787,7 @@ void SPRITE::MakeXlat (byte * x)
if (Flags.Xlat) KillXlat();
for (b = Ext->ShpList; *b; b ++) (*b)->M = x;
- Flags.Xlat = TRUE;
+ Flags.Xlat = true;
}
}
@@ -808,7 +808,7 @@ void SPRITE::KillXlat (void)
case FAR_MEM : farfree(m); break;
}
for (b = Ext->ShpList; *b; b ++) (*b)->M = NULL;
- Flags.Xlat = FALSE;
+ Flags.Xlat = false;
}
}
@@ -953,7 +953,7 @@ SPRITE * SpriteAt (int x, int y)
-QUEUE::QUEUE (Boolean show)
+QUEUE::QUEUE (bool show)
: Head(NULL), Tail(NULL), Show(show)
{
}
@@ -1090,9 +1090,9 @@ const char * VGA::Msg = NULL;
const char * VGA::Nam = NULL;
DAC * VGA::OldColors = NULL;
DAC * VGA::NewColors = NULL;
-Boolean VGA::SetPal = FALSE;
+bool VGA::SetPal = false;
int VGA::Mono = 0;
-QUEUE VGA::ShowQ = TRUE, VGA::SpareQ = FALSE;
+QUEUE VGA::ShowQ = true, VGA::SpareQ = false;
byte * VGA::Page[4] = { (byte *) MK_FP(SCR_SEG, 0x0000),
(byte *) MK_FP(SCR_SEG, 0x4000),
(byte *) MK_FP(SCR_SEG, 0x8000),
@@ -1105,7 +1105,7 @@ VGA::VGA (int mode)
: FrmCnt(0)
{
extern const char Copr[];
- Boolean std = TRUE;
+ bool std = true;
int i;
for (i = 10; i < 20; i ++)
{
@@ -1114,7 +1114,7 @@ VGA::VGA (int mode)
{
puts(txt);
#ifndef DEBUG
- std = FALSE;
+ std = false;
#endif
}
}
@@ -1187,7 +1187,7 @@ void VGA::SetStatAdr (void)
#pragma argsused
-void VGA::WaitVR (Boolean on)
+void VGA::WaitVR (bool on)
{
_DX = StatAdr;
_AH = (on) ? 0x00 : 0x08;
@@ -1348,7 +1348,7 @@ void VGA::SetColors (DAC * tab, int lum)
asm cmp di,cx
asm jb mono
}
- SetPal = TRUE;
+ SetPal = true;
}
@@ -1470,7 +1470,7 @@ void VGA::Update (void)
if (SetPal)
{
UpdateColors();
- SetPal = FALSE;
+ SetPal = false;
}
}
diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h
index 4f172cb3ea..d7ef11f36d 100644
--- a/engines/cge/vga13h.h
+++ b/engines/cge/vga13h.h
@@ -126,7 +126,7 @@ class HEART : public ENGINE
{
friend ENGINE;
public:
- static Boolean Enable;
+ static bool Enable;
static word * XTimer;
static void SetXTimer (word * ptr);
static void SetXTimer (word * ptr, word time);
@@ -192,9 +192,9 @@ public:
int ShpCnt;
char File[MAXFILE];
SPRITE * Prev, * Next;
- Boolean Works (SPRITE * spr);
- Boolean SeqTest (int n);
- inline Boolean Active (void) { return Ext != NULL; }
+ bool Works (SPRITE * spr);
+ bool SeqTest (int n);
+ inline bool Active (void) { return Ext != NULL; }
SPRITE (BMP_PTR * shp);
virtual ~SPRITE (void);
BMP_PTR Shp (void);
@@ -202,7 +202,7 @@ public:
void MoveShapes (byte * buf);
SPRITE * Expand (void);
SPRITE * Contract (void);
- SPRITE * BackShow (Boolean fast = FALSE);
+ SPRITE * BackShow (bool fast = false);
void SetName(char * n);
inline char * Name(void) { return (Ext) ? Ext->Name : NULL; }
void Goto (int x, int y);
@@ -229,8 +229,8 @@ class QUEUE
{
SPRITE * Head, * Tail;
public:
- Boolean Show;
- QUEUE (Boolean show = FALSE);
+ bool Show;
+ QUEUE (bool show = false);
~QUEUE (void);
void Append (SPRITE * spr);
void Insert (SPRITE * spr, SPRITE * nxt);
@@ -253,7 +253,7 @@ class VGA
static word OldMode;
static word * OldScreen;
static word StatAdr;
- static Boolean SetPal;
+ static bool SetPal;
static DAC * OldColors, * NewColors;
static int SetMode (int mode);
static void UpdateColors (void);
@@ -261,7 +261,7 @@ class VGA
static const char * Msg;
static const char * Nam;
static void SetStatAdr (void);
- static void WaitVR (Boolean on = TRUE);
+ static void WaitVR (bool on = true);
public:
dword FrmCnt;
static QUEUE ShowQ, SpareQ;
@@ -330,7 +330,7 @@ byte Closest (CBLK * pal, CBLK x)
SPRITE * SpriteAt (int x, int y);
SPRITE * Locate (int ref);
-extern Boolean SpeedTest;
+extern bool SpeedTest;
#endif
diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp
index 4ca3708eac..f7314e18ea 100644
--- a/engines/cge/vmenu.cpp
+++ b/engines/cge/vmenu.cpp
@@ -64,10 +64,10 @@ MENU_BAR::MENU_BAR (word w)
}
TS[0] = new BITMAP(w, h, p);
SetShapeList(TS);
- Flags.Slav = TRUE;
- Flags.Tran = TRUE;
- Flags.Kill = TRUE;
- Flags.BDel = TRUE;
+ Flags.Slav = true;
+ Flags.Tran = true;
+ Flags.Kill = true;
+ Flags.BDel = true;
}
@@ -120,8 +120,8 @@ VMENU::VMENU (CHOICE * list, int x, int y)
delete[] vmgt;
Items = 0;
for (cp = list; cp->Text; cp ++) ++ Items;
- Flags.BDel = TRUE;
- Flags.Kill = TRUE;
+ Flags.BDel = true;
+ Flags.Kill = true;
if (x < 0 || y < 0) Center();
else Goto(x - W / 2, y - (TEXT_VM + FONT_HIG / 2));
VGA::ShowQ.Insert(this, VGA::ShowQ.Last());
@@ -145,7 +145,7 @@ void VMENU::Touch (word mask, int x, int y)
{
#define h (FONT_HIG+TEXT_LS)
int n = 0;
- Boolean ok = FALSE;
+ bool ok = false;
if (Items)
{
diff --git a/engines/cge/vol.cpp b/engines/cge/vol.cpp
index f0365867ee..503c6cab91 100644
--- a/engines/cge/vol.cpp
+++ b/engines/cge/vol.cpp
@@ -83,7 +83,7 @@ VFILE::~VFILE (void)
-Boolean VFILE::Exist (const char * name)
+bool VFILE::Exist (const char * name)
{
return _fstricmp(Cat.Find(name)->Key, name) == 0;
}
diff --git a/engines/cge/vol.h b/engines/cge/vol.h
index 74b4a2b648..1357c24814 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 * buf, word len);
- static Boolean Write (CFILE& f);
- static Boolean Read (long org, word len, byte * buf);
+ static bool Append (byte * buf, word len);
+ static bool Write (CFILE& f);
+ static bool Read (long org, word len, byte * buf);
};
@@ -78,7 +78,7 @@ class VFILE : public IOBUF
public:
VFILE (const char * name, IOMODE mode = REA);
~VFILE (void);
- static Boolean Exist (const char * name);
+ static bool Exist (const char * name);
static const char * Next (void);
long Mark (void) { return (BufMark+Ptr) - BegMark; }
long Size (void) { return EndMark - BegMark; }
diff --git a/engines/cge/wav.h b/engines/cge/wav.h
index 3266af95d5..1998672bed 100644
--- a/engines/cge/wav.h
+++ b/engines/cge/wav.h
@@ -51,8 +51,8 @@ public:
CKID (FOURCC t) { memcpy(Tx, t, sizeof(Tx)); }
CKID (dword d) { Id = d; }
CKID (XFILE * xf) { (ckFile = xf)->Read(Tx, sizeof(Tx)); }
- Boolean operator !=(CKID& X) { return Id != X.Id; }
- Boolean operator ==(CKID& X) { return Id == X.Id; }
+ bool operator !=(CKID& X) { return Id != X.Id; }
+ bool operator ==(CKID& X) { return Id == X.Id; }
const char * Name (void);
};
@@ -107,7 +107,7 @@ public:
class DATACK : public CKHEA
{
- Boolean e;
+ bool e;
union
{
byte * Buf;