aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/vga13h.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cge/vga13h.cpp')
-rw-r--r--engines/cge/vga13h.cpp54
1 files changed, 29 insertions, 25 deletions
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 349f412ca0..d7c6946e87 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -233,14 +233,16 @@ extern "C" void TimerProc (void)
// decrement external timer uint16
if (Heart->XTimer)
- if (*Heart->XTimer) -- *Heart->XTimer;
- else Heart->XTimer = NULL;
+ if (*Heart->XTimer)
+ *Heart->XTimer--;
+ else
+ Heart->XTimer = NULL;
if (! run && Heart->Enable) // check overrun flag
{
static uint16 oldSP, oldSS;
- ++ run; // disable 2nd call until current lasts
+ run++; // disable 2nd call until current lasts
asm mov ax,ds
asm mov oldSS,ss
asm mov oldSP,sp
@@ -256,7 +258,7 @@ extern "C" void TimerProc (void)
}
asm mov ss,oldSS
asm mov sp,oldSP
- -- run;
+ run--;
}
}
*/
@@ -297,14 +299,16 @@ void ENGINE::NewTimer(...) {
// decrement external timer uint16
if (Heart->XTimer)
- if (*Heart->XTimer) -- *Heart->XTimer;
- else Heart->XTimer = NULL;
+ if (*Heart->XTimer)
+ *Heart->XTimer--;
+ else
+ Heart->XTimer = NULL;
if (! run && Heart->Enable) // check overrun flag
{
static uint16 oldSP, oldSS;
- ++ run; // disable 2nd call until current lasts
+ run++; // disable 2nd call until current lasts
asm mov ax,ds
asm mov oldSS,ss
asm mov oldSP,sp
@@ -320,7 +324,7 @@ void ENGINE::NewTimer(...) {
}
asm mov ss,oldSS
asm mov sp,oldSP
- -- run;
+ run--;
}
*/
@@ -402,7 +406,7 @@ BMP_PTR *SPRITE::SetShapeList(BMP_PTR *shp) {
void SPRITE::MoveShapes(uint8 *buf) {
BMP_PTR *p;
- for (p = Ext->ShpList; *p; p ++) {
+ for (p = Ext->ShpList; *p; p++) {
buf += (*p)->MoveVmap(buf);
}
}
@@ -507,14 +511,14 @@ SPRITE *SPRITE::Expand(void) {
break;
}
case 1 : { // Phase
- shplist[shpcnt ++] = new BITMAP(strtok(NULL, " \t,;/"));
+ shplist[shpcnt++] = new BITMAP(strtok(NULL, " \t,;/"));
break;
}
case 2 : { // Seq
seq = (SEQ *) realloc(seq, (seqcnt + 1) * sizeof(*seq));
if (seq == NULL)
error("No core [%s]", fname);
- SEQ *s = &seq[seqcnt ++];
+ SEQ *s = &seq[seqcnt++];
s->Now = atoi(strtok(NULL, " \t,;/"));
if (s->Now > maxnow)
maxnow = s->Now;
@@ -540,7 +544,7 @@ SPRITE *SPRITE::Expand(void) {
if (nea == NULL)
error("No core [%s]", fname);
else {
- SNAIL::COM *c = &nea[neacnt ++];
+ SNAIL::COM *c = &nea[neacnt++];
if ((c->Com = (SNCOM) TakeEnum(SNAIL::ComTxt, strtok(NULL, " \t,;/"))) < 0)
error("%s [%s]", NumStr("Bad NEAR in ######", lcnt), fname);
c->Ref = atoi(strtok(NULL, " \t,;/"));
@@ -556,7 +560,7 @@ SPRITE *SPRITE::Expand(void) {
if (tak == NULL)
error("No core [%s]", fname);
else {
- SNAIL::COM *c = &tak[takcnt ++];
+ SNAIL::COM *c = &tak[takcnt++];
if ((c->Com = (SNCOM) TakeEnum(SNAIL::ComTxt, strtok(NULL, " \t,;/"))) < 0)
error("%s [%s]", NumStr("Bad NEAR in ######", lcnt), fname);
c->Ref = atoi(strtok(NULL, " \t,;/"));
@@ -569,7 +573,7 @@ SPRITE *SPRITE::Expand(void) {
}
}
} else { // no sprite description: try to read immediately from .BMP
- shplist[shpcnt ++] = new BITMAP(File);
+ shplist[shpcnt++] = new BITMAP(File);
}
shplist[shpcnt] = NULL;
if (seq) {
@@ -606,7 +610,7 @@ SPRITE *SPRITE::Contract(void) {
delete[] e->Name;
if (Flags.BDel && e->ShpList) {
int i;
- for (i = 0; e->ShpList[i]; i ++)
+ for (i = 0; e->ShpList[i]; i++)
delete e->ShpList[i];
if (MemType(e->ShpList) == NEAR_MEM)
delete[] e->ShpList;
@@ -662,7 +666,7 @@ void SPRITE::MakeXlat(uint8 *x) {
if (Flags.Xlat)
KillXlat();
- for (b = Ext->ShpList; *b; b ++)
+ for (b = Ext->ShpList; *b; b++)
(*b)->M = x;
Flags.Xlat = true;
}
@@ -682,7 +686,7 @@ void SPRITE::KillXlat(void) {
free(m);
break;
}
- for (b = Ext->ShpList; *b; b ++)
+ for (b = Ext->ShpList; *b; b++)
(*b)->M = NULL;
Flags.Xlat = false;
}
@@ -908,7 +912,7 @@ VGA::VGA(int mode)
bool std = true;
int i;
- for (i = 10; i < 20; i ++) {
+ for (i = 10; i < 20; i++) {
char *txt = Text->getText(i);
if (txt) {
// puts(txt);
@@ -1293,9 +1297,9 @@ void BITMAP::XShow(int x, int y) {
/*
uint8 rmsk = x % 4,
mask = 1 << rmsk,
- * scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4;
- uint8 * m = (char *) M;
- uint8 * v = V;
+ *scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4;
+ uint8 *m = (char *) M;
+ uint8 *v = V;
asm push bx
asm push si
@@ -1374,8 +1378,8 @@ void BITMAP::XShow(int x, int y) {
void BITMAP::Show(int x, int y) {
/*
uint8 mask = 1 << (x & 3),
- * scr = VGA::Page[1] + y * (SCR_WID >> 2) + (x >> 2);
- uint8 * v = V;
+ *scr = VGA::Page[1] + y * (SCR_WID >> 2) + (x >> 2);
+ uint8 *v = V;
asm push ds // preserve DS
@@ -1443,9 +1447,9 @@ void BITMAP::Show(int x, int y) {
void BITMAP::Hide(int x, int y) {
/*
- uint8 * scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4;
+ uint8 *scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4;
uint16 d = FP_OFF(VGA::Page[2]) - FP_OFF(VGA::Page[1]);
- HideDesc * b = B;
+ HideDesc *b = B;
uint16 extra = ((x & 3) != 0);
uint16 h = H;