diff options
author | uruk | 2013-06-18 11:50:18 +0200 |
---|---|---|
committer | uruk | 2013-06-18 11:50:18 +0200 |
commit | f974bccbb0071c61521f072ecf803cb40910e8ab (patch) | |
tree | dc02d99c06d3b9c11e68f080de2c50b75f03f3ae /engines | |
parent | 38bc20a0763f0f83ea3c0a94a68a1edea0d08514 (diff) | |
download | scummvm-rg350-f974bccbb0071c61521f072ecf803cb40910e8ab.tar.gz scummvm-rg350-f974bccbb0071c61521f072ecf803cb40910e8ab.tar.bz2 scummvm-rg350-f974bccbb0071c61521f072ecf803cb40910e8ab.zip |
AVALANCHE: Remove empty lines with only ";" characters in them.
Diffstat (limited to 'engines')
150 files changed, 379 insertions, 2106 deletions
diff --git a/engines/avalanche/1stoff.cpp b/engines/avalanche/1stoff.cpp index 9748605503..31c87a894d 100644 --- a/engines/avalanche/1stoff.cpp +++ b/engines/avalanche/1stoff.cpp @@ -35,9 +35,7 @@ byte fv; void adjust() { registers r; - ; { - ; ax = 0x1012; bx = 1; cx = 2; @@ -51,7 +49,6 @@ void adjust() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 0; clrscr; @@ -66,7 +63,6 @@ int main(int argc, const char *argv[]) { output << "presents"; for (fv = 1; fv <= 77; fv ++) { - ; delay(77); if (fv < 64) fillchar(cols[1], 3, chr(fv)); if (fv > 14) fillchar(cols[2], 3, chr(fv - 14)); @@ -76,7 +72,6 @@ int main(int argc, const char *argv[]) { delay(100); for (fv = 63; fv >= 1; fv --) { - ; fillchar(cols, sizeof(cols), chr(fv)); delay(37); adjust(); diff --git a/engines/avalanche/access.cpp b/engines/avalanche/access.cpp index abc944f4dc..ba87cd64a4 100644 --- a/engines/avalanche/access.cpp +++ b/engines/avalanche/access.cpp @@ -52,19 +52,16 @@ void int_say(string filename, boolean bubble) /* Internal use ONLY! */ { untyped_file f; - ; /*$I-*/ assign(f, filename); reset(f, 1); if (ioresult != 0) { - ; int_say_went_ok = false; return; } bufsize = filesize(f); blockread(f, buffer, bufsize); if (bubble) { - ; bufsize += 1; buffer[bufsize] = '\2'; } @@ -77,7 +74,6 @@ void int_say(string filename, boolean bubble) } void dixi(char p, byte n) { - ; exit(153); int_say(string('s') + p + strf(n) + ".raw", false); } @@ -85,10 +81,8 @@ void dixi(char p, byte n) { void talkto(byte whom) { byte fv; boolean no_matches; - ; exit(153); if (person == pardon) { - ; person = chr(subjnumber); subjnumber = 0; } @@ -97,19 +91,16 @@ void talkto(byte whom) { case pspludwick: if ((dna.lustie_is_asleep) & (~ dna.obj[potion])) { - ; dixi('q', 68); dna.obj[potion] = true; objectlist; points(3); return; } else { - ; if (dna.talked_to_crapulus) switch (dna.given2spludwick) { /* Spludwick - what does he need? */ /* 0 - let it through to use normal routine. */ case RANGE_2(1, 2): { - ; display(string("Can you get me ") + get_better(spludwick_order[dna.given2spludwick]) + ", please?" + "\232\2"); @@ -117,7 +108,6 @@ void talkto(byte whom) { } break; case 3: { - ; dixi('q', 30); /* need any help with the game? */ return; } @@ -129,7 +119,6 @@ void talkto(byte whom) { case pibythneth: if (dna.givenbadgetoiby) { - ; dixi('q', 33); /* Thanks a lot! */ return; /* And leave the proc. */ } @@ -143,7 +132,6 @@ void talkto(byte whom) { break; case payles: if (~ dna.ayles_is_awake) { - ; dixi('q', 43); /* He's fast asleep! */ return; } @@ -152,7 +140,6 @@ void talkto(byte whom) { if (dna.geida_given_potion) dna.geida_follows = true; else { - ; dixi('u', 17); return; } @@ -164,7 +151,6 @@ void talkto(byte whom) { no_matches = true; for (fv = 1; fv <= numtr; fv ++) if (tr[fv].a.accinum == whom) { - ; display(string('\23') + chr(fv + 48) + '\4'); no_matches = false; flush(); @@ -175,7 +161,6 @@ void talkto(byte whom) { if (subjnumber == 0) /* For the moment... later we'll parse "say". */ int_say(string("ss") + strf(whom) + ".raw", true); else { - ; int_say(string("ss") + strf(whom) + '-' + strf(subjnumber) + ".raw", true); if (! int_say_went_ok) /* File not found! */ dixi('n', whom); diff --git a/engines/avalanche/also.cpp b/engines/avalanche/also.cpp index 3f3e32a09a..af3b6c325e 100644 --- a/engines/avalanche/also.cpp +++ b/engines/avalanche/also.cpp @@ -120,7 +120,6 @@ const graphcursmasktype tthand = { string strf(longint x) { string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; @@ -128,16 +127,13 @@ string strf(longint x) { void glimpse(byte ret) { /* glimpse of screen 3 */ char sink; - ; hidemousecursor; setvisualpage(3); setcrtpagenumber(3); showmousecursor; do { - ; } while (!(~ anymousekeypressed)); do { - ; } while (!anymousekeypressed); hidemousecursor; setvisualpage(ret); @@ -147,10 +143,8 @@ void glimpse(byte ret) { /* glimpse of screen 3 */ } void newline(byte t, integer p, integer q, integer r, integer s, byte c) { - ; { linetype &with = lines[t]; - ; x1 = p; y1 = q; x2 = r; @@ -160,7 +154,6 @@ void newline(byte t, integer p, integer q, integer r, integer s, byte c) { } void newfield(byte t, integer p, integer q, integer r, integer s) { - ; { fieldtype &with = fields[t]; ; with.x1 = p; @@ -171,11 +164,9 @@ void newfield(byte t, integer p, integer q, integer r, integer s) { } void drawped(byte p) { - ; { pedtype &with = peds[p]; if (with.dir < 177) { - ; setcolor(p); circle(with.x, with.y, 5); moveto(with.x, with.y); @@ -211,12 +202,10 @@ void drawped(byte p) { void drawup() { byte fv; - ; cleardevice(); for (fv = 1; fv <= numlines; fv ++) { linetype &with = lines[fv]; if (x1 != nay) { - ; setcolor(with.col); line(x1, y1, x2, y2); } @@ -224,7 +213,6 @@ void drawup() { for (fv = 1; fv <= numlines; fv ++) { fieldtype &with = fields[fv]; if (with.x1 != nay) { - ; setcolor(fv); rectangle(with.x1, with.y1, with.x2, with.y2); } @@ -234,7 +222,6 @@ void drawup() { void addped() { byte n, fv; - ; n = 0; do { n += 1; @@ -252,7 +239,6 @@ void addped() { hidemousecursor; { pedtype &with = peds[n]; - ; with.x = mousex; with.y = mousey; } @@ -301,12 +287,10 @@ void addped() { void addline(byte ccc) { byte fv; - ; do { for (fv = 1; fv <= numlines; fv ++) { linetype &with = lines[fv]; if (x1 == nay) { - ; x1 = fv * 17; x2 = x1; y1 = 200; @@ -321,20 +305,17 @@ void addline(byte ccc) { byte colour() { byte fv; byte colour_result; - ; setactivepage(0); setvisualpage(0); setcrtpagenumber(0); outtextxy(0, 0, "Select a colour, please..."); for (fv = 1; fv <= 15; fv ++) { - ; setfillstyle(1, fv); bar(fv * 40, 27, 39 + fv * 40, 200); } showmousecursor; do { if (rightmousekeypressed) { - ; hidemousecursor; return colour_result; } @@ -349,7 +330,6 @@ byte colour() { void addfield() { byte fv; boolean ok; - ; do { fv = colour(); ok = fields[fv].x1 == nay; @@ -357,7 +337,6 @@ void addfield() { } while (!ok); { fieldtype &with = fields[fv]; - ; with.x1 = 300 + fv * 17; with.x2 = with.x1 + 1; with.y1 = 200; @@ -368,7 +347,6 @@ void addfield() { byte checkline() { byte fv, ans; byte checkline_result; - ; setgraphicscursor(crosshairs); setcrtpagenumber(0); setactivepage(0); @@ -378,7 +356,6 @@ byte checkline() { showmousecursor; do { if (rightmousekeypressed) { - ; checkline_result = 255; return checkline_result; } @@ -388,11 +365,9 @@ byte checkline() { setactivepage(1); ans = 177; for (fv = 1; fv <= numlines; fv ++) { /* */ - ; { linetype &with = lines[fv]; if (x1 != nay) { - ; setcolor(9); line(x1, y1, x2, y2); if (getpixel(mousex, mousey) == 9) ans = fv; @@ -403,7 +378,6 @@ byte checkline() { { fieldtype &with = fields[fv]; if (with.x1 != nay) { - ; setcolor(9); rectangle(with.x1, with.y1, with.x2, with.y2); if (getpixel(mousex, mousey) == 9) ans = fv + 100; @@ -422,7 +396,6 @@ void chooseside(); static boolean itsaline; static void plotline() { - ; if (itsaline) { linetype &with = lines[gd]; if (do1) line(mousex, mousey, x2, y2); @@ -440,12 +413,10 @@ void chooseside() { byte clicol, savelcol; fieldtype current; integer temp; - ; do { gd = checkline(); itsaline = gd < 100; if (gd == 255) { - ; hidemousecursor; return; } @@ -456,12 +427,10 @@ void chooseside() { setgraphicscursor(tthand); setcrtpagenumber(2); if (itsaline) { - ; current = lines[gd]; savelcol = lines[gd].col; } else current = fields[gd]; { - ; setcolor(9); if (itsaline) line(current.x1, current.y1, current.x2, current.y2); else rectangle(current.x1, current.y1, current.x2, current.y2); @@ -471,19 +440,16 @@ void chooseside() { setfillstyle(1, green); bar(current.x2 - 3, current.y2 - 3, current.x2 + 3, current.y2 + 3); do { - ; } while (!(~ anymousekeypressed)); clicol = 177; showmousecursor; do { if (anymousekeypressed) { - ; hidemousecursor; clicol = getpixel(mousex, mousey); showmousecursor; } if (rightmousekeypressed) { - ; hidemousecursor; return; } @@ -507,14 +473,12 @@ void chooseside() { } setwritemode(xorput); while (~ anymousekeypressed) { - ; plotline(); showmousecursor; delay(1); hidemousecursor; plotline(); if (rightmousekeypressed) { - ; hidemousecursor; return; } @@ -522,24 +486,19 @@ void chooseside() { } /* update "current" rec */ if (do1) { - ; current.x1 = mousex; current.y1 = mousey; } else { - ; current.x2 = mousex; current.y2 = mousey; } if (! itsaline) { - ; if (current.x1 > current.x2) { - ; temp = current.x2; current.x2 = current.x1; current.x1 = temp; } if (current.y1 > current.y2) { - ; temp = current.y2; current.y2 = current.y1; current.y1 = temp; @@ -548,7 +507,6 @@ void chooseside() { /* copy "current" to line/field */ if (itsaline) { linetype &with1 = lines[gd]; - ; current.x1 = current.x1; current.x2 = current.x2; current.y1 = current.y1; @@ -561,7 +519,6 @@ void chooseside() { } void delped() { - ; setcrtpagenumber(0); setactivepage(0); setvisualpage(0); @@ -569,7 +526,6 @@ void delped() { setgraphicscursor(tthand); showmousecursor; do { - ; } while (!leftmousekeypressed); peds[colour()].dir = 177; } @@ -577,7 +533,6 @@ void delped() { byte menu(); static void say(byte y, string x) { - ; setfillstyle(1, y); bar(0, y * 17, 100, y * 17 + 15); outtextxy(123, y * 17, x); @@ -586,7 +541,6 @@ static void say(byte y, string x) { byte menu() { byte clicol; byte menu_result; - ; setcolor(15); settextstyle(0, 0, 2); clicol = 0; @@ -605,20 +559,17 @@ byte menu() { showmousecursor; do { if (leftmousekeypressed) { - ; hidemousecursor; clicol = getpixel(mousex, mousey); showmousecursor; } if (rightmousekeypressed) { - ; hidemousecursor; return menu_result; } if (keypressed()) glimpse(2); } while (!(clicol > 0)); do { - ; } while (!(~ anymousekeypressed)); hidemousecursor; menu_result = clicol; @@ -626,10 +577,8 @@ byte menu() { } void removeline() { - ; gd = checkline(); if (gd == 255) { - ; hidemousecursor; return; } @@ -641,7 +590,6 @@ void removeline() { } void lino() { - ; resetmouse; do { switch (menu()) { @@ -674,14 +622,12 @@ void loadscreen() { /* load2 */ byte a /*absolute $A000:246560*/; byte bit; untyped_file f; - ; setactivepage(3); setvisualpage(3); assign(f, string("c:\\avalot\\place") + n + ".avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -697,7 +643,6 @@ void loadscreen() { /* load2 */ void ctrlsout(string &x) { /* Replace real ctrls with caret codes */ byte fv; string xx; - ; xx = ""; for (fv = 1; fv <= length(x); fv ++) if (x[fv] > '\37') xx = xx + x[fv]; @@ -709,12 +654,10 @@ void ctrlsin(string &x) { /* Opposite of ctrlsout */ byte fv; string xx; boolean ctrlwas; - ; xx = ""; ctrlwas = false; for (fv = 1; fv <= length(x); fv ++) if (ctrlwas) { /* last char was a caret */ - ; xx = xx + chr(ord(upcase(x[fv])) - 64); ctrlwas = false; } else { @@ -728,7 +671,6 @@ void ctrlsin(string &x) { /* Opposite of ctrlsout */ void flipover() { /* temp view other screen */ char r; - ; setvisualpage(3); r = readkey(); setvisualpage(0); @@ -736,7 +678,6 @@ void flipover() { /* temp view other screen */ void plotchar(byte x, byte y, char n) { byte fv; - ; if (chars[x][y] == n) return; for (fv = 0; fv <= 15; fv ++) mem[0xa000 * y * 1200 + (fv + 3) * 80 + x] = skinny[ord(n)][fv]; @@ -745,7 +686,6 @@ void plotchar(byte x, byte y, char n) { void cursor() { byte fv; - ; cursorflash += 1; switch (cursorflash) { case 1: @@ -760,9 +700,7 @@ void cursor() { } void losecursor() { - ; if (cursorflash < 127) { - ; cursorflash = 126; cursor(); } @@ -771,13 +709,10 @@ void losecursor() { void gwrite(string x) { byte fv; - ; for (fv = 1; fv <= length(x); fv ++) { - ; plotchar(tx, ty, x[fv]); tx += 1; if (tx == 80) { - ; ty += 1; tx = 0; } @@ -789,7 +724,6 @@ string typein(string x) { byte p; char r; string typein_result; - ; setvisualpage(0); setactivepage(0); cleardevice(); @@ -812,7 +746,6 @@ string typein(string x) { tx = (p % 80); ty = (p / 80) + 6; while (! keypressed()) { - ; delay(1); cursor(); } @@ -821,7 +754,6 @@ string typein(string x) { switch (r) { case '\10': if (p > 0) { - ; x = copy(x, 1, p - 1) + copy(x, p + 1, 255); p -= 1; } @@ -830,7 +762,6 @@ string typein(string x) { flipover(); break; case '\40' ... '\377': { - ; x = copy(x, 1, p) + r + copy(x, p + 1, 255); p += 1; } @@ -873,7 +804,6 @@ byte typeno(string title) { integer e; word p; byte typeno_result; - ; cleardevice(); x = "000"; settextstyle(0, 0, 3); @@ -889,7 +819,6 @@ byte typeno(string title) { r = readkey(); } while (!(set::of(range('0', '9'), '\33', '\15', eos).has(r))); if (r == '\33') { - ; typeno_result = 255; return typeno_result; } @@ -904,7 +833,6 @@ void showallnames() { byte fv; varying_string<2> s; char r; - ; settextstyle(0, 0, 2); cleardevice(); setcolor(13); @@ -912,7 +840,6 @@ void showallnames() { settextstyle(0, 0, 1); setcolor(7); for (fv = 1; fv <= 29; fv ++) { - ; str(fv, 2, s); outtextxy((fv / 15) * 320, ((fv % 15) * 10) + 30, s + '=' + copy(names[fv][1], 0, 33)); } @@ -925,7 +852,6 @@ void showallassoc(); static void saascreen() { - ; settextstyle(0, 0, 2); cleardevice(); setcolor(10); @@ -940,15 +866,12 @@ void showallassoc() { varying_string<2> s; char r; - ; saascreen(); for (fv = 1; fv <= 30; fv ++) { - ; str(fv - 1, 2, s); outtextxy(0, (((fv - 1) % 10) * 10) + 30, s + ':' + copy(names[fv - 1][1], 1, 7) + ':' + copy(names[fv - 1][2], 1, 70)); if ((fv % 10) == 0) { - ; r = readkey(); saascreen(); } @@ -960,10 +883,8 @@ void showallassoc() { void clear() { byte fv; - ; fillchar(names , sizeof(names), '\0'); for (fv = 1; fv <= numlines; fv ++) { - ; lines[fv].x1 = nay; fields[fv].x1 = nay; } @@ -974,14 +895,12 @@ void scramble(); static void scram1(string &x) { byte fz; - ; for (fz = 1; fz <= length(x); fz ++) x[fz] = chr(ord(x[fz]) ^ 177); } void scramble() { /* Works both ways. */ byte fv, ff; - ; for (fv = 0; fv <= 29; fv ++) for (ff = 1; ff <= 2; ff ++) scram1(names[fv][ff]); @@ -993,7 +912,6 @@ void save() { string x; untyped_file f; byte minnames, minlines, minpeds, minfields, fv, ff; - ; minnames = 0; for (fv = 0; fv <= 29; fv ++) if (names[fv][1] != "") minnames = fv; minlines = 0; @@ -1036,7 +954,6 @@ static string nextstring() { byte l; string x; string nextstring_result; - ; x = ""; blockread(f, l, 1); blockread(f, x[1], l); @@ -1049,7 +966,6 @@ void load() { byte minnames, minlines, minpeds, minfields; byte ff, fv; - ; clear(); assign(f, string("c:\\avalot\\also") + n + ".avd"); /*$I-*/ reset(f, 1); /*$I+*/ if (ioresult != 0) return; /* no Also file */ @@ -1081,60 +997,50 @@ static integer y; static void display() { byte fv; - ; cleardevice(); settextstyle(0, 0, 2); setcolor(15); outtextxy(0, 0, "Magics."); settextstyle(0, 0, 1); for (fv = 1; fv <= 15; fv ++) { - ; y = 23 + fv * 10; setcolor(fv); outtextxy(100, y, string('$') + codes[fv - 1]); { magictype &with = magics[fv]; - ; switch (with.op) { case nix: { - ; setcolor(8); outtextxy(140, y, "Nix"); } break; case bounce: { - ; setcolor(10); outtextxy(143, y, "Bounce!"); } break; case exclaim: { - ; setcolor(14); outtextxy(143, y, string("Exclaim: ") + strf(with.data)); } break; case transport: { - ; setcolor(12); outtextxy(143, y, string("Transport to ") + strf(hi(with.data)) + ", ped " + strf(lo(with.data))); } break; case unfinished: { - ; setcolor(15); outtextxy(143, y, "*** UNFINISHED! ***"); } break; case special: { - ; setcolor(6); outtextxy(143, y, string("Special call no. ") + strf(with.data)); } break; case opendoor: { - ; setcolor(11); outtextxy(143, y, string("Opening door to ") + strf(hi(with.data)) + ", ped " + strf(lo(with.data))); @@ -1153,7 +1059,6 @@ static word ask(string x) { word thomaswashere; integer e; word ask_result; - ; cleardevice(); setcolor(10); settextstyle(0, 0, 3); @@ -1170,7 +1075,6 @@ void editmagics() { char r, rr; byte p; - ; do { display(); do { @@ -1199,13 +1103,11 @@ void editmagics() { with.op = bounce; break; case 'E': { - ; with.op = exclaim; with.data = ask("Which scroll?"); } break; case 'T': { - ; with.op = transport; with.data = ask("Ped no.?") + ask("Whither?") * 256; } @@ -1214,13 +1116,11 @@ void editmagics() { with.op = unfinished; break; case 'S': { - ; with.op = special; with.data = ask("Which call?"); } break; case 'O': { - ; with.op = opendoor; with.data = ask("Ped no.?") + ask("Whither?") * 256; } @@ -1238,54 +1138,45 @@ static integer y2; static void display1() { byte fv; - ; cleardevice(); settextstyle(0, 0, 2); setcolor(15); outtextxy(0, 0, "Portals."); settextstyle(0, 0, 1); for (fv = 9; fv <= 15; fv ++) { - ; y2 = fv * 10 - 53; setcolor(fv); outtextxy(100, y2, string('$') + codes1[fv - 1]); { magictype &with = portals[fv]; - ; switch (with.op) { case nix: { - ; setcolor(8); outtextxy(140, y2, "Nix"); } break; case exclaim: { - ; setcolor(14); outtextxy(143, y2, string("Exclaim: ") + strf(with.data)); } break; case transport: { - ; setcolor(12); outtextxy(143, y2, string("Transport to ") + strf(hi(with.data)) + ", ped " + strf(lo(with.data))); } break; case unfinished: { - ; setcolor(15); outtextxy(143, y2, "*** UNFINISHED! ***"); } break; case special: { - ; setcolor(6); outtextxy(143, y2, string("Special call no. ") + strf(with.data)); } break; case opendoor: { - ; setcolor(11); outtextxy(143, y2, string("Opening door to ") + strf(hi(with.data)) + ", ped " + strf(lo(with.data))); @@ -1304,7 +1195,6 @@ static word ask1(string x) { word thomaswashere; integer e; word ask1_result; - ; cleardevice(); setcolor(10); settextstyle(0, 0, 3); @@ -1321,7 +1211,6 @@ void editportals() { /* much t'same as editmagics */ char r, rr; byte p; - ; do { display1(); do { @@ -1348,13 +1237,11 @@ void editportals() { /* much t'same as editmagics */ with.op = nix; break; case 'E': { - ; with.op = exclaim; with.data = ask1("Which scroll?"); } break; case 'T': { - ; with.op = transport; with.data = ask1("Ped no.?") + ask1("Whither?") * 256; } @@ -1363,13 +1250,11 @@ void editportals() { /* much t'same as editmagics */ with.op = unfinished; break; case 'S': { - ; with.op = special; with.data = ask1("Which call?"); } break; case 'O': { - ; with.op = opendoor; with.data = ask1("Ped no.?") + ask1("Whither?") * 256; } @@ -1381,7 +1266,6 @@ void editportals() { /* much t'same as editmagics */ void editflags() { char r; - ; cleardevice(); settextstyle(0, 0, 2); setcolor(15); @@ -1400,7 +1284,6 @@ void editflags() { } while (!(set::of(range('A', 'Z'), '\33', '\15', '\11', eos).has(r))); switch (r) { case RANGE_26('A', 'Z'): { - ; if (pos(r, flags) > 0) { ; /* flag is on- switch it off */ Delete(flags, pos(r, flags), 1); @@ -1432,7 +1315,6 @@ void editflags() { void alsomenu() { char r; byte t; - ; do { setactivepage(0); setvisualpage(0); @@ -1463,7 +1345,6 @@ void alsomenu() { } while (!(set::of(range('1', '9'), 'S', 'L', '\0', eos).has(r))); switch (r) { case '1': { - ; do { t = typeno("Which object\? (0-30)"); } while (!((t < 30) || (t == 255))); @@ -1510,7 +1391,6 @@ void alsomenu() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; output << "*** ALSO ***" << NL; output << NL; output << "No. of screen to edit?"; diff --git a/engines/avalanche/andexor.cpp b/engines/avalanche/andexor.cpp index b57585d3c6..74b5967f1b 100644 --- a/engines/avalanche/andexor.cpp +++ b/engines/avalanche/andexor.cpp @@ -56,7 +56,6 @@ void load(string nam) { varying_string<40> xxx; string check; - ; assign(f, nam); reset(f, 1); blockread(f, xxx, 41); @@ -64,7 +63,6 @@ void load(string nam) { blockread(f, check, 31); s = imagesize(0, 0, getmaxx(), 75); for (z = 1; z <= 2; z ++) { - ; getmem(a[z], s); blockread(f, a[z], s); putimage(0, 15 + (z - 1) * 75, a[z], 0); @@ -75,7 +73,6 @@ void load(string nam) { void silhouette() { byte x, y, c; - ; setvisualpage(1); setactivepage(1); setfillstyle(1, 15); @@ -85,7 +82,6 @@ void silhouette() { /* bar((gm div 2)*320+gd*40,20+(gm mod 2)*40,(gm div 2)*320+gd*40+35,(gm mod 2)*40+60); */ for (y = 1; y <= adx.yl; y ++) for (x = 1; x <= adx.xl; x ++) { - ; setactivepage(0); c = getpixel((gm / 2) * 320 + gd * 40 + x, 20 + (gm % 2) * 40 + y); setactivepage(1); @@ -101,7 +97,6 @@ void silhouette() { void standard() { byte x, y, c; - ; setvisualpage(2); setactivepage(2); for (gm = 0; gm <= 3; gm ++) @@ -109,7 +104,6 @@ void standard() { ; /* 26,15 */ for (y = 1; y <= adx.yl; y ++) for (x = 1; x <= adx.xl; x ++) { - ; setactivepage(0); c = getpixel((gm / 2) * 320 + gd * 40 + x, 20 + (gm % 2) * 40 + y); setactivepage(2); @@ -124,7 +118,6 @@ void standard() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); @@ -133,7 +126,6 @@ int main(int argc, const char *argv[]) { /* getmem(adxpic[1,1,1],adx.size); getimage(40,20,75,60,adxpic[1,1,1]^); putimage(100,100,adxpic[1,1,1]^,0); */ { - ; adx.name = "Avalot"; adx.num = 24; adx.seq = 6; diff --git a/engines/avalanche/andexor2.cpp b/engines/avalanche/andexor2.cpp index 605a185343..27c62cf036 100644 --- a/engines/avalanche/andexor2.cpp +++ b/engines/avalanche/andexor2.cpp @@ -59,7 +59,6 @@ void load(string n) { varying_string<40> xxx; string check; - ; assign(f, n); reset(f, 1); blockread(f, xxx, 41); @@ -67,7 +66,6 @@ void load(string n) { blockread(f, check, 31); s = imagesize(0, 0, getmaxx(), 75); for (z = 1; z <= 2; z ++) { - ; getmem(a[z], s); blockread(f, a[z], s); putimage(0, 15 + (z - 1) * 75, a[z], 0); @@ -78,19 +76,16 @@ void load(string n) { void silhouette() { byte x, y, c; - ; setvisualpage(1); setactivepage(1); setfillstyle(1, 15); { - ; for (gm = 0; gm <= 3; gm ++) for (gd = 1; gd <= 6; gd ++) { ; /* 26,15 */ side2 = adx.xl * 6; for (y = 1; y <= adx.yl; y ++) for (x = 1; x <= adx.xl; x ++) { - ; setactivepage(0); c = getpixel((gm / 2) * 320 + gd * 40 + x, 20 + (gm % 2) * 40 + y); setactivepage(1); @@ -107,17 +102,14 @@ void silhouette() { void standard() { byte x, y, c; - ; setvisualpage(2); setactivepage(2); { - ; for (gm = 0; gm <= 3; gm ++) for (gd = 1; gd <= 6; gd ++) { ; /* 26,15 */ for (y = 1; y <= adx.yl; y ++) for (x = 1; x <= adx.xl; x ++) { - ; setactivepage(0); c = getpixel((gm / 2) * 320 + gd * 40 + x, 20 + (gm % 2) * 40 + y); setactivepage(2); @@ -137,14 +129,12 @@ void standard() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); fillchar(adxpic, sizeof(adxpic), '\261'); load("v:avalots.avd"); { - ; adx.name = "Avalot"; adx.num = 24; adx.seq = 6; @@ -164,7 +154,6 @@ int main(int argc, const char *argv[]) { blockwrite(f, adx, sizeof(adx)); blockwrite(f, bigsize, 2); for (gm = 0; gm <= 1; gm ++) { - ; putimage(0, 0, adxpic[gm], 0); blockwrite(f, adxpic[gm], bigsize); /* next image */ } diff --git a/engines/avalanche/andextst.cpp b/engines/avalanche/andextst.cpp index b5e1d9a5ba..39ba3df405 100644 --- a/engines/avalanche/andextst.cpp +++ b/engines/avalanche/andextst.cpp @@ -41,21 +41,18 @@ integer x; array<0, 1, integer> ox; void andex(integer x, integer y, byte n, byte num) { - ; putimage(x, y, adx[num][n][0], andput); putimage(x, y, adx[num][n][1], xorput); } void loadadx(byte num, string x) { byte n; - ; assign(f, x); reset(f, 1); seek(f, 59); blockread(f, n, 1); /* No. of images... */ for (gd = 1; gd <= n; gd ++) for (gm = 0; gm <= 1; gm ++) { - ; blockread(f, s, 2); /* size of next image... */ getmem(adx[num][gd][gm], s); blockread(f, adx[num][gd][gm], s); /* next image */ @@ -65,14 +62,12 @@ void loadadx(byte num, string x) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; loadadx(0, "d:sprite0.avd"); loadadx(1, "d:sprite0.avd"); gd = 3; gm = 0; initgraph(gd, gm, ""); for (gd = 0; gd <= 1; gd ++) { - ; setactivepage(gd); setfillstyle(6, 1); bar(0, 0, 640, 200); @@ -87,7 +82,6 @@ int main(int argc, const char *argv[]) { setactivepage(cp); setvisualpage(1 - cp); for (gm = 0; gm <= 1; gm ++) { - ; if (t > 0) t -= 1; else putimage(ox[cp], 77, back[cp], copyput); diff --git a/engines/avalanche/arch.cpp b/engines/avalanche/arch.cpp index 2172a574a0..1f0e1a4bde 100644 --- a/engines/avalanche/arch.cpp +++ b/engines/avalanche/arch.cpp @@ -97,13 +97,11 @@ void save(string name) { edhead eh; word groi; string groi2; - ; fillchar(eh, sizeof(eh), '\261'); /* Fill up the edhead */ dna.saves += 1; /* It's been saved one more time... */ { - ; /* Info about this program */ diff --git a/engines/avalanche/avbkgrnd.cpp b/engines/avalanche/avbkgrnd.cpp index 7ab263049b..2bb628828e 100644 --- a/engines/avalanche/avbkgrnd.cpp +++ b/engines/avalanche/avbkgrnd.cpp @@ -33,7 +33,6 @@ namespace Avalanche { integer gd, gm; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/avvyans.cpp b/engines/avalanche/avvyans.cpp index f91435fef2..8e0876061e 100644 --- a/engines/avalanche/avvyans.cpp +++ b/engines/avalanche/avvyans.cpp @@ -39,7 +39,6 @@ string x; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -63,18 +62,14 @@ int main(int argc, const char *argv[]) { */ for (gm = 0; gm <= 17; gm ++) for (gd = 0; gd <= 27; gd ++) { - ; gotoxy(gd + 1, gm + 1); if (cols[gd][2 * gm] == cols[gd][2 * gm + 1]) { - ; textattr = cols[gd][2 * gm]; output << 'Û'; } else if ((cols[gd][2 * gm] > 7) && (cols[gd][2 * gm + 1] < 8)) { - ; textattr = cols[gd][2 * gm] + cols[gd][2 * gm + 1] * 16; output << 'ß'; } else { - ; textattr = cols[gd][2 * gm] * 16 + cols[gd][2 * gm + 1]; if (textattr > blink) textattr -= blink; output << 'Ü'; diff --git a/engines/avalanche/avvyans2.cpp b/engines/avalanche/avvyans2.cpp index a4fb34aad6..fe238b309e 100644 --- a/engines/avalanche/avvyans2.cpp +++ b/engines/avalanche/avvyans2.cpp @@ -43,7 +43,6 @@ byte cfg, cbg; /* Current foreground & background. */ byte ofg, obg; /* Old fg & bg. */ void do_spaces() { - ; if (spaces == 0) return; along(spaces); spaces = 0; @@ -53,17 +52,14 @@ void finishline(); static byte wx, wy; static void jumpto(byte xx) { - ; along(xx - wx); } void finishline() { - ; wx = 29 - spaces; wy = gm + 1; switch (wy) { case 1: { - ; sgr(7); jumpto(35); output << "Back in good old A.D. "; @@ -75,20 +71,16 @@ void finishline() { } break; case RANGE_5(3, 7): { - ; t >> x >> NL; while (x[length(x)] == '\40') x[0] -= 1; if (x != "") { - ; jumpto(30); sgr(9); spaces = 0; while (x != "") { - ; if (x[1] == ' ') spaces += 1; else { - ; do_spaces(); output << x[1]; } @@ -100,7 +92,6 @@ void finishline() { } break; case 8: { - ; jumpto(67); sgr(9); output << "d'Argent" << NL; @@ -108,42 +99,36 @@ void finishline() { } break; case 11: { - ; jumpto(37); sgr(14); output << "He's back..." << NL; } break; case 13: { - ; jumpto(47); sgr(14); output << "And this time," << NL; } break; case 14: { - ; jumpto(52); sgr(14); output << "he's wearing tights..." << NL; } break; case 16: { - ; jumpto(35); sgr(4); output << "A Thorsoft of Letchworth game. * Requires EGA" << NL; } break; case 17: { - ; jumpto(37); sgr(4); output << "and HD. * By Mike, Mark and Thomas Thurman." << NL; } break; case 18: { - ; jumpto(39); sgr(4); output << "Sfx archive- "; @@ -162,7 +147,6 @@ void finishline() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -187,43 +171,34 @@ int main(int argc, const char *argv[]) { reset(t); for (gm = 0; gm <= 17; gm ++) { - ; spaces = 0; for (gd = 0; gd <= 27; gd ++) { - ; if ((gd == 22) && (gm == 4)) { - ; do_spaces(); sgr(red); output << 'ß'; } else { - ; if (cols[gd][2 * gm] == cols[gd][2 * gm + 1]) { - ; if (cols[gd][2 * gm] == 0) spaces += 1; /* a blank space */ else { - ; do_spaces(); if (cfg == cols[gd][2 * gm]) output << 'Û'; else if (cbg == cols[gd][2 * gm]) output << ' '; else { - ; sgr((cols[gd][2 * gm]) + (cbg * 16)); cfg = cols[gd][2 * gm]; output << 'Û'; } } } else if ((cols[gd][2 * gm] > 7) && (cols[gd][2 * gm + 1] < 8)) { - ; do_spaces(); sgr(cols[gd][2 * gm] + cols[gd][2 * gm + 1] * 16); cfg = cols[gd][2 * gm]; cbg = cols[gd][2 * gm + 1] * 16; output << 'ß'; } else { - ; do_spaces(); ofg = cfg; @@ -232,12 +207,10 @@ int main(int argc, const char *argv[]) { cfg = cols[gd][2 * gm + 1]; if ((cbg == ofg) && (cfg == obg)) { - ; n = cfg * 16 + cbg; if (n > 128) n -= 128; output << 'ß'; } else { - ; n = cbg * 16 + cfg; if (n > 128) n -= 128; if ((cfg != ofg) || (cbg != obg)) sgr(n); diff --git a/engines/avalanche/avvymonk.cpp b/engines/avalanche/avvymonk.cpp index 4f150e33d7..b29072f359 100644 --- a/engines/avalanche/avvymonk.cpp +++ b/engines/avalanche/avvymonk.cpp @@ -44,7 +44,6 @@ void savesc() { word s; varying_string<14> nam; varying_string<30> screenname; - ; nam = "v:avvymonk.avd"; adf = string("aved as a stuff file, so there! TJAT.") + '\15' + '\12' + '\32'; adf[0] = 'S'; @@ -56,7 +55,6 @@ void savesc() { blockwrite(f, screenname, 31); s = imagesize(0, 0, getmaxx(), 75); for (z = 1; z <= 2; z ++) { - ; getmem(c[z], s); getimage(0, 15 + (z - 1) * 75, getmaxx(), 15 + (z) * 75, c[z]); blockwrite(f, c[z], s); @@ -64,7 +62,6 @@ void savesc() { } } void loadscreen(string nam) { - ; assign(f, nam); reset(f, 1); blockread(f, check, 41); @@ -72,7 +69,6 @@ void loadscreen(string nam) { blockread(f, check, 31); s = imagesize(0, 0, getmaxx(), 75); for (z = 1; z <= 2; z ++) { - ; getmem(a[z], s); blockread(f, a[z], s); setactivepage(0); @@ -83,7 +79,6 @@ void loadscreen(string nam) { } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; x = 0; @@ -91,7 +86,6 @@ int main(int argc, const char *argv[]) { initgraph(gd, gm, "o:"); loadscreen("v:legion.avd"); while (y < 100) { - ; switch (getpixel(x, y)) { case 7: putpixel(x, y, 0); @@ -105,7 +99,6 @@ int main(int argc, const char *argv[]) { } x += 1; if (x > 640) { - ; y += 1; x = 0; } diff --git a/engines/avalanche/bootstrp.cpp b/engines/avalanche/bootstrp.cpp index 905944796a..add361327a 100644 --- a/engines/avalanche/bootstrp.cpp +++ b/engines/avalanche/bootstrp.cpp @@ -11,7 +11,7 @@ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License @@ -39,21 +39,23 @@ const integer run_dosshell = 2; const integer run_ghostroom = 3; const integer run_golden = 4; -const array<false,true,varying_string<2> > runcodes = {{"et","Go"}}; +const array<false, true, varying_string<2> > runcodes = {{"et", "Go"}}; const integer reset_ = 0; -const boolean jsb = true; const boolean no_jsb = false; -const boolean bflight = true; const boolean no_bflight = false; +const boolean jsb = true; +const boolean no_jsb = false; +const boolean bflight = true; +const boolean no_bflight = false; struct { - byte operation; - word skellern; - array<1,10000,byte> contents; + byte operation; + word skellern; + array<1, 10000, byte> contents; } storage; -string arguments,demo_args,args_with_no_filename; +string arguments, demo_args, args_with_no_filename; boolean first_time; @@ -64,314 +66,339 @@ string segofs; boolean zoomy; -longint soundcard,speed,baseaddr,irq,dma; +longint soundcard, speed, baseaddr, irq, dma; -void cursor_off() /*assembler; */ -{; -/* asm - mov ah,01; { Change cursor size. */ -/* mov cx,8224; { CH & CL are now 32. */ -/* int $10; { Call the Bios */ +void cursor_off() { /*assembler; */ + ; + /* asm + mov ah,01; { Change cursor size. */ + /* mov cx,8224; { CH & CL are now 32. */ + /* int $10; { Call the Bios */ } /* That's all. */ -void cursor_on() /*assembler; */ -{; -/* -asm - mov ah,01; { Change cursor size. */ -/* mov ch,5; { Top line is 5. */ -/* mov cl,7; { Bottom line is 7. */ -/* int $10; { Call the Bios. */ +void cursor_on() { /*assembler; */ + ; + /* + asm + mov ah,01; { Change cursor size. */ + /* mov ch,5; { Top line is 5. */ + /* mov cl,7; { Bottom line is 7. */ + /* int $10; { Call the Bios. */ } -void quit() -{ - cursor_on(); - exit(0); +void quit() { + cursor_on(); + exit(0); } -string strf(longint x) -{ - string q; -string strf_result; -; - str(x,q); strf_result=q; -return strf_result; +string strf(longint x) { + string q; + string strf_result; + ; + str(x, q); + strf_result = q; + return strf_result; } -string command_com() -{ - string temp; +string command_com() { + string temp; - string command_com_result; - temp=getenv("comspec"); - if (temp=="") - output << "avvy_bootstrap: COMSPEC not defined, => cannot run Dos shell." << NL; - command_com_result=temp; - return command_com_result; + string command_com_result; + temp = getenv("comspec"); + if (temp == "") + output << "avvy_bootstrap: COMSPEC not defined, => cannot run Dos shell." << NL; + command_com_result = temp; + return command_com_result; } -void explain(byte error) -{ - output << " ("; - switch (error) { - case 2: output << "it's not there"; break; - case 8: output << "out of memory"; break; - default: output << "error " << error; - } - output << ")." << NL; +void explain(byte error) { + output << " ("; + switch (error) { + case 2: + output << "it's not there"; + break; + case 8: + output << "out of memory"; + break; + default: + output << "error " << error; + } + output << ")." << NL; } /*$F+*/ -void b_flight() /*interrupt;*/ -{ - storage.skellern += 1; +void b_flight() { /*interrupt;*/ + storage.skellern += 1; } /*$F-*/ -void bflight_on() -{ - storage.skellern=reset_; - setintvec(0x1c,&b_flight); +void bflight_on() { + storage.skellern = reset_; + setintvec(0x1c, &b_flight); } -void bflight_off() -{ - setintvec(0x1c,old_1c); +void bflight_off() { + setintvec(0x1c, old_1c); } -void run(string what, boolean with_jsb,boolean with_bflight, elm how); - - -static string elm2str(elm how) -{ - string elm2str_result; - switch (how) { - case normal: case musical: elm2str_result="jsb"; break; - case regi: elm2str_result="REGI"; break; - case elmpoyten: elm2str_result="ELMPOYTEN"; break; - } - return elm2str_result; +void run(string what, boolean with_jsb, boolean with_bflight, elm how); + + +static string elm2str(elm how) { + string elm2str_result; + switch (how) { + case normal: + case musical: + elm2str_result = "jsb"; + break; + case regi: + elm2str_result = "REGI"; + break; + case elmpoyten: + elm2str_result = "ELMPOYTEN"; + break; + } + return elm2str_result; } -void run(string what, boolean with_jsb,boolean with_bflight, elm how) -{ - string which_dir,args; - integer error; +void run(string what, boolean with_jsb, boolean with_bflight, elm how) { + string which_dir, args; + integer error; - if (what=="") return; + if (what == "") return; - getdir(0,which_dir); + getdir(0, which_dir); - if (with_jsb) - { - if (how==musical) - args=elm2str(how)+' '+args_with_no_filename; /* FN is NOT given if musical*/ - else - args=elm2str(how)+' '+arguments; - } else args=""; + if (with_jsb) { + if (how == musical) + args = elm2str(how) + ' ' + args_with_no_filename; /* FN is NOT given if musical*/ + else + args = elm2str(how) + ' ' + arguments; + } else args = ""; - if (how==musical) args=args+strf(soundcard)+' '+strf(speed)+' '+ - strf(baseaddr)+' '+strf(dma)+' '+strf(irq); - if (with_bflight) bflight_on(); + if (how == musical) args = args + strf(soundcard) + ' ' + strf(speed) + ' ' + + strf(baseaddr) + ' ' + strf(dma) + ' ' + strf(irq); + if (with_bflight) bflight_on(); - swapvectors; - exec(what,args); - swapvectors; - cursor_off(); + swapvectors; + exec(what, args); + swapvectors; + cursor_off(); - error=doserror; + error = doserror; - if (with_bflight) bflight_off(); + if (with_bflight) bflight_off(); - chdir(which_dir); + chdir(which_dir); - if (error!=0) - { - output << "avvy_bootstrap: cannot execute " << what << '!'; - explain(error); - output << "Press Enter:"; input >> NL; quit(); - } + if (error != 0) { + output << "avvy_bootstrap: cannot execute " << what << '!'; + explain(error); + output << "Press Enter:"; + input >> NL; + quit(); + } } -void run_avalot() -{ - integer error; +void run_avalot() { + integer error; - bflight_on(); + bflight_on(); - swapvectors; - exec("avalot.avx",runcodes[first_time]+arguments); - swapvectors; + swapvectors; + exec("avalot.avx", runcodes[first_time] + arguments); + swapvectors; - error=doserror; + error = doserror; - bflight_off(); + bflight_off(); - if (error!=0) - { - output << "avvy_bootstrap: error in loading AVALOT.AVX!"; - explain(error); - quit(); - } + if (error != 0) { + output << "avvy_bootstrap: error in loading AVALOT.AVX!"; + explain(error); + quit(); + } - first_time=false; + first_time = false; } -void run_the_demo() -{ - string args; +void run_the_demo() { + string args; - args=arguments; - arguments=demo_args; /* Force the demo. */ + args = arguments; + arguments = demo_args; /* Force the demo. */ - run_avalot(); + run_avalot(); - arguments=args; /* Put all back to normal again. */ - first_time=true; + arguments = args; /* Put all back to normal again. */ + first_time = true; } -void get_arguments() -{ - byte fv; +void get_arguments() { + byte fv; - arguments=""; + arguments = ""; - for( fv=1; fv <= paramcount; fv ++) - arguments=arguments+paramstr(fv)+' '; + for (fv = 1; fv <= paramcount; fv ++) + arguments = arguments + paramstr(fv) + ' '; - arguments[0] -= 1; /* Get rid of the trailing space. */ + arguments[0] -= 1; /* Get rid of the trailing space. */ - segofs=string(' ')+strf(seg(storage))+' '+strf(ofs(storage)); + segofs = string(' ') + strf(seg(storage)) + ' ' + strf(ofs(storage)); - arguments=segofs+' '+arguments; + arguments = segofs + ' ' + arguments; } -void dos_shell() -{ - registers r; +void dos_shell() { + registers r; - r.ax=original_mode; intr(0x10,r); - output << NL; - output << "The Avalot Dos Shell." << NL; - output << "---------------------" << NL; - output << NL; - output << "Type EXIT to return to Avalot." << NL; - output << NL; + r.ax = original_mode; + intr(0x10, r); + output << NL; + output << "The Avalot Dos Shell." << NL; + output << "---------------------" << NL; + output << NL; + output << "Type EXIT to return to Avalot." << NL; + output << NL; - cursor_on(); - run(command_com(),no_jsb,no_bflight,normal); - cursor_off(); + cursor_on(); + run(command_com(), no_jsb, no_bflight, normal); + cursor_off(); - output << "Please wait, restoring your game..." << NL; + output << "Please wait, restoring your game..." << NL; } boolean keypressed1() { - registers r; + registers r; - boolean keypressed1_result; - r.ah=0xb; - msdos(r); - keypressed1_result=r.al==0xff; - return keypressed1_result; - } + boolean keypressed1_result; + r.ah = 0xb; + msdos(r); + keypressed1_result = r.al == 0xff; + return keypressed1_result; +} void flush_buffer() { - registers r; r.ah=7; - while (keypressed1()) msdos(r); } + registers r; + r.ah = 7; + while (keypressed1()) msdos(r); +} -void demo() -{ - run_the_demo(); if (keypressed1()) return; - run("intro.avx",jsb,bflight,musical); if (keypressed1()) return; - run("stars.avx",jsb,no_bflight,musical); if (keypressed1()) return; +void demo() { + run_the_demo(); + if (keypressed1()) return; + run("intro.avx", jsb, bflight, musical); + if (keypressed1()) return; + run("stars.avx", jsb, no_bflight, musical); + if (keypressed1()) return; - flush_buffer(); + flush_buffer(); } -void call_menu() -{ - run("stars.avx",jsb,no_bflight,musical); - flush_buffer(); - do { - run("avmenu.avx",jsb,no_bflight,normal); - - switch (storage.operation) { - case 1: return; break; /* Play the game. */ - case 2: run("intro.avx",jsb,bflight,musical); break; - case 3: run("preview1.avd",jsb,no_bflight,normal); break; - case 4: run("viewdocs.avx",jsb,bflight,elmpoyten); break; - case 5: run("viewdocs.avx",jsb,bflight,regi); break; - case 6: quit(); break; - case 177: demo(); break; - } - - flush_buffer(); - } while (!false); +void call_menu() { + run("stars.avx", jsb, no_bflight, musical); + flush_buffer(); + do { + run("avmenu.avx", jsb, no_bflight, normal); + + switch (storage.operation) { + case 1: + return; + break; /* Play the game. */ + case 2: + run("intro.avx", jsb, bflight, musical); + break; + case 3: + run("preview1.avd", jsb, no_bflight, normal); + break; + case 4: + run("viewdocs.avx", jsb, bflight, elmpoyten); + break; + case 5: + run("viewdocs.avx", jsb, bflight, regi); + break; + case 6: + quit(); + break; + case 177: + demo(); + break; + } + + flush_buffer(); + } while (!false); } -void get_slope() -{ - run("slope.avx",jsb,no_bflight,normal); - if (dosexitcode!=0) - { - cursor_on(); - exit(0); - } - - move(storage.contents,arguments,sizeof(arguments)); - move(storage.contents[4998],soundcard,4); - move(storage.contents[5002],baseaddr,4); - move(storage.contents[5006],irq,4); - move(storage.contents[5010],dma,4); - move(storage.contents[5014],speed,4); - - zoomy=(arguments[8]=='y') || (arguments[2]=='y'); - demo_args=arguments; demo_args[7]='y'; - arguments=segofs+' '+arguments; - demo_args=segofs+' '+demo_args; - - args_with_no_filename=arguments; - if (arguments[length(arguments)]!=' ') - { /* Filename was given */ - args_with_no_filename=arguments; - while ((args_with_no_filename!="") - && (args_with_no_filename[length(args_with_no_filename)]!=' ')) - args_with_no_filename[0] -= 1; /* Strip off the filename. */ - } +void get_slope() { + run("slope.avx", jsb, no_bflight, normal); + if (dosexitcode != 0) { + cursor_on(); + exit(0); + } + + move(storage.contents, arguments, sizeof(arguments)); + move(storage.contents[4998], soundcard, 4); + move(storage.contents[5002], baseaddr, 4); + move(storage.contents[5006], irq, 4); + move(storage.contents[5010], dma, 4); + move(storage.contents[5014], speed, 4); + + zoomy = (arguments[8] == 'y') || (arguments[2] == 'y'); + demo_args = arguments; + demo_args[7] = 'y'; + arguments = segofs + ' ' + arguments; + demo_args = segofs + ' ' + demo_args; + + args_with_no_filename = arguments; + if (arguments[length(arguments)] != ' ') { + /* Filename was given */ + args_with_no_filename = arguments; + while ((args_with_no_filename != "") + && (args_with_no_filename[length(args_with_no_filename)] != ' ')) + args_with_no_filename[0] -= 1; /* Strip off the filename. */ + } } -int main(int argc, const char* argv[]) -{ - pio_initialize(argc, argv); - original_mode=mem[seg0040*0x49]; getintvec(0x1c,old_1c); - first_time=true; cursor_off(); - - get_arguments(); - get_slope(); - - if (! zoomy) call_menu(); /* Not run when zoomy. */ - - do { - run_avalot(); - - if (dosexitcode!=77) quit(); /* Didn't stop for us. */ - - switch (storage.operation) { - case run_shootemup: run("seu.avx",jsb,bflight,normal); break; - case run_dosshell: dos_shell(); break; - case run_ghostroom: run("g-room.avx",jsb,no_bflight,normal); break; - case run_golden: run("golden.avx",jsb,bflight,musical); break; - } - - } while (!false); - return EXIT_SUCCESS; +int main(int argc, const char *argv[]) { + pio_initialize(argc, argv); + original_mode = mem[seg0040 * 0x49]; + getintvec(0x1c, old_1c); + first_time = true; + cursor_off(); + + get_arguments(); + get_slope(); + + if (! zoomy) call_menu(); /* Not run when zoomy. */ + + do { + run_avalot(); + + if (dosexitcode != 77) quit(); /* Didn't stop for us. */ + + switch (storage.operation) { + case run_shootemup: + run("seu.avx", jsb, bflight, normal); + break; + case run_dosshell: + dos_shell(); + break; + case run_ghostroom: + run("g-room.avx", jsb, no_bflight, normal); + break; + case run_golden: + run("golden.avx", jsb, bflight, musical); + break; + } + + } while (!false); + return EXIT_SUCCESS; } } // End of namespace Avalanche.
\ No newline at end of file diff --git a/engines/avalanche/cadburys.cpp b/engines/avalanche/cadburys.cpp index f653ad8924..9b12b39555 100644 --- a/engines/avalanche/cadburys.cpp +++ b/engines/avalanche/cadburys.cpp @@ -39,9 +39,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; exit(0); @@ -52,13 +50,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -74,7 +70,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -85,7 +80,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -103,11 +97,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = ((realx - ch.x * 8) + (x2 - x1) + 7) / 8; @@ -116,7 +108,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -133,7 +124,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } diff --git a/engines/avalanche/celer.cpp b/engines/avalanche/celer.cpp index d444845cef..62ae94d36e 100644 --- a/engines/avalanche/celer.cpp +++ b/engines/avalanche/celer.cpp @@ -432,7 +432,6 @@ asm pop ds; { Get DS back again. } */ { - ; } void show_one(byte which); diff --git a/engines/avalanche/ch_egats.cpp b/engines/avalanche/ch_egats.cpp index 98ea2a51e4..d96eb89b36 100644 --- a/engines/avalanche/ch_egats.cpp +++ b/engines/avalanche/ch_egats.cpp @@ -143,12 +143,10 @@ asm pop ds; { Get DS back again. } */ { - ; } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; assign(f, "chunk21.avd"); reset(f, 1); diff --git a/engines/avalanche/charmap.cpp b/engines/avalanche/charmap.cpp index d599ef5881..c970e1a4c1 100644 --- a/engines/avalanche/charmap.cpp +++ b/engines/avalanche/charmap.cpp @@ -38,17 +38,13 @@ pointer where; byte w, fv, ff, num; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; getintvec(0x1f, where); move(where, table, 1024); for (w = 128; w <= 255; w ++) { - ; output << w << NL; for (fv = 1; fv <= 8; fv ++) { - ; num = table.chars[w][fv]; for (ff = 1; ff <= 8; ff ++) { - ; if ((num & 128) == 0) output << " "; else output << "ÛÛ"; num = num << 1; diff --git a/engines/avalanche/chunkxf1.cpp b/engines/avalanche/chunkxf1.cpp index ba6ab57bf3..ed2999148d 100644 --- a/engines/avalanche/chunkxf1.cpp +++ b/engines/avalanche/chunkxf1.cpp @@ -59,12 +59,10 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbit.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -77,7 +75,6 @@ void load() { reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -90,7 +87,6 @@ void load() { } void open_chunk() { - ; assign(f, "chunk21.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -101,7 +97,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -269,7 +264,6 @@ end;*/ int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxf2.cpp b/engines/avalanche/chunkxf2.cpp index 781f798d17..d7ae8e4ef3 100644 --- a/engines/avalanche/chunkxf2.cpp +++ b/engines/avalanche/chunkxf2.cpp @@ -57,13 +57,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place9.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -80,12 +78,10 @@ void load_temp(string which) { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, which); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -97,7 +93,6 @@ void load_temp(string which) { } void open_chunk() { - ; assign(f, "chunk9.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -108,7 +103,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -118,9 +112,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; exit(0); @@ -131,13 +123,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -151,7 +141,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -162,7 +151,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; if (nat) ch.flavour = ch_bgi; else ch.flavour = ch_ega; /* At the moment, Celer can't handle natural ch_EGAs. */ @@ -183,7 +171,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer freemem(p, s); { - ; if (ch.flavour == ch_bgi) s = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); else s = 4 * ((x2 - x1 + 7) / 8) * (y2 - y1 + 1); ch.size = s; @@ -203,7 +190,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxf3.cpp b/engines/avalanche/chunkxf3.cpp index b0bb23242f..c693fdc1be 100644 --- a/engines/avalanche/chunkxf3.cpp +++ b/engines/avalanche/chunkxf3.cpp @@ -61,7 +61,6 @@ var string strf(longint x) { string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; @@ -70,7 +69,6 @@ string strf(longint x) { void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -82,7 +80,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -127,12 +124,10 @@ void loadtemp(string n) { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, n); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -149,12 +144,10 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place22.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -172,7 +165,6 @@ void load() { } void open_chunk() { - ; assign(f, "chunk22.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -183,7 +175,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -280,7 +271,6 @@ end;*/ int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxf4.cpp b/engines/avalanche/chunkxf4.cpp index 8648964d9e..6659aa91aa 100644 --- a/engines/avalanche/chunkxf4.cpp +++ b/engines/avalanche/chunkxf4.cpp @@ -105,7 +105,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); diff --git a/engines/avalanche/chunkxf5.cpp b/engines/avalanche/chunkxf5.cpp index 72cc0c39b7..c4b49e7911 100644 --- a/engines/avalanche/chunkxf5.cpp +++ b/engines/avalanche/chunkxf5.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "v:place1.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -139,13 +135,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbi9.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -162,7 +156,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk1.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -173,7 +166,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -183,9 +175,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -197,13 +187,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -219,7 +207,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -230,7 +217,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -248,18 +234,15 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 + 7) / 8) - (x1 / 8)) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; mgrab(ch.x, ch.y, ch.x + ch.xl, ch.y + ch.yl, s); } } else { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -276,7 +259,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -287,7 +269,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxf6.cpp b/engines/avalanche/chunkxf6.cpp index b02a9d2e24..a1ce3ee680 100644 --- a/engines/avalanche/chunkxf6.cpp +++ b/engines/avalanche/chunkxf6.cpp @@ -60,7 +60,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -72,7 +71,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -116,13 +114,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "v:place19.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -143,13 +139,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "d:temp1.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -164,7 +158,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk19.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -175,7 +168,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -185,9 +177,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -199,13 +189,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -221,7 +209,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; x1 -= x_ofs; x2 -= x_ofs; y1 -= y_ofs; @@ -236,7 +223,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -254,11 +240,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -267,7 +251,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -284,7 +267,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -295,7 +277,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxf7.cpp b/engines/avalanche/chunkxf7.cpp index 6137bc3056..4b03e3a2f2 100644 --- a/engines/avalanche/chunkxf7.cpp +++ b/engines/avalanche/chunkxf7.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place25.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbi3.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk25.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxf8.cpp b/engines/avalanche/chunkxf8.cpp index a3a8b14b3e..7e94b29d51 100644 --- a/engines/avalanche/chunkxf8.cpp +++ b/engines/avalanche/chunkxf8.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place23.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp(string x) { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, x); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp(string x) { } void open_chunk() { - ; assign(f, "chunk23.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxf9.cpp b/engines/avalanche/chunkxf9.cpp index dbd342ada2..f03674477f 100644 --- a/engines/avalanche/chunkxf9.cpp +++ b/engines/avalanche/chunkxf9.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place42.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "a:chunkbi3.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk42.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfa.cpp b/engines/avalanche/chunkxfa.cpp index 622e6be2db..31c68a0a8b 100644 --- a/engines/avalanche/chunkxfa.cpp +++ b/engines/avalanche/chunkxfa.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place7.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbi3.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk7.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfb.cpp b/engines/avalanche/chunkxfb.cpp index 820bd7816c..0b5beb7a9d 100644 --- a/engines/avalanche/chunkxfb.cpp +++ b/engines/avalanche/chunkxfb.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place71.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "d:chunkbi2.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk71.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfc.cpp b/engines/avalanche/chunkxfc.cpp index da5ffc531f..5dfc0afabe 100644 --- a/engines/avalanche/chunkxfc.cpp +++ b/engines/avalanche/chunkxfc.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place2.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "d:chunkbi2.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk2.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfd.cpp b/engines/avalanche/chunkxfd.cpp index 11aa04c3d8..97c4084a9f 100644 --- a/engines/avalanche/chunkxfd.cpp +++ b/engines/avalanche/chunkxfd.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place15.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "d:chunkbi3.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk15.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfe.cpp b/engines/avalanche/chunkxfe.cpp index 0b2757a7b4..81e1477268 100644 --- a/engines/avalanche/chunkxfe.cpp +++ b/engines/avalanche/chunkxfe.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place5.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbi2.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk5.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxff.cpp b/engines/avalanche/chunkxff.cpp index 0ff578ba5e..777e224cbd 100644 --- a/engines/avalanche/chunkxff.cpp +++ b/engines/avalanche/chunkxff.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place13.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbi3.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk13.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfg.cpp b/engines/avalanche/chunkxfg.cpp index ead50a6e9c..e1357ef83e 100644 --- a/engines/avalanche/chunkxfg.cpp +++ b/engines/avalanche/chunkxfg.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place16.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbi3.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk16.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfh.cpp b/engines/avalanche/chunkxfh.cpp index 6d8c0e8278..bf2da8f452 100644 --- a/engines/avalanche/chunkxfh.cpp +++ b/engines/avalanche/chunkxfh.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place46.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "d:chunkbi4.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk46.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -247,11 +233,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -260,7 +244,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfi.cpp b/engines/avalanche/chunkxfi.cpp index b28add0bb7..7a5df66941 100644 --- a/engines/avalanche/chunkxfi.cpp +++ b/engines/avalanche/chunkxfi.cpp @@ -57,7 +57,6 @@ array<0, arraysize, byte> aa; void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -69,7 +68,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); @@ -113,13 +111,11 @@ void load() { byte a1 /*absolute $A400:800*/; byte bit; untyped_file f; - ; assign(f, "place47.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -140,13 +136,11 @@ void loadtemp() { byte a0 /*absolute $A000:800*/; byte bit; untyped_file f; - ; assign(f, "chunkbi9.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,7 +155,6 @@ void loadtemp() { } void open_chunk() { - ; assign(f, "chunk47.avd"); rewrite(f, 1); blockwrite(f, chunkheader, sizeof(chunkheader)); @@ -172,7 +165,6 @@ void open_chunk() { } void close_chunk() { - ; seek(f, 45); blockwrite(f, offsets, num_chunks * 4); /* make sure they're right! */ close(f); @@ -182,9 +174,7 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { integer yy; word aapos; byte length, bit; - ; if (size > arraysize) { - ; restorecrtmode(); output << "*** SORRY! *** Increase the arraysize constant to be greater" << NL; output << " than " << size << '.' << NL; @@ -196,13 +186,11 @@ void mgrab(integer x1, integer y1, integer x2, integer y2, word size) { length = x2 - x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; for (yy = y1; yy <= y2; yy ++) { - ; move(mem[0xa400 * yy * 80 + x1], aa[aapos], length); aapos += length; } @@ -218,7 +206,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer word s; pointer p; chunkblocktype ch; - ; /* rectangle(x1,y1,x2,y2); exit;*/ this_chunk += 1; offsets[this_chunk] = filepos(f); @@ -229,7 +216,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer getimage(x1, y1, x2, y2, p); { - ; ch.flavour = flav; ch.x = realx; ch.y = realy; @@ -248,11 +234,9 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer putimage(ch.x, ch.y, p, 0); if (flav == ch_ega) { - ; freemem(p, s); s = 4 * (((x2 / 8) - (x1 / 8)) + 2) * (y2 - y1 + 1); { - ; ch.size = s; ch.x = ch.x / 8; ch.xl = (ch.xl / 8) + 2; @@ -261,7 +245,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer } else /* For BGI pictures. */ { - ; ch.x = ch.x / 8; ch.xl = (ch.xl + 7) / 8; ch.size = imagesize(ch.x * 8, ch.y, (ch.x + ch.xl) * 8, ch.y + ch.yl); @@ -277,7 +260,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer if (! nat) blockwrite(f, aa, s); break; case ch_bgi : { - ; if (! nat) blockwrite(f, p, s); freemem(p, s); } @@ -288,7 +270,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, integer realx, integer int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/chunkxfj.cpp b/engines/avalanche/chunkxfj.cpp index 83c379d926..558be2ae73 100644 --- a/engines/avalanche/chunkxfj.cpp +++ b/engines/avalanche/chunkxfj.cpp @@ -69,7 +69,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); diff --git a/engines/avalanche/chunkxfk.cpp b/engines/avalanche/chunkxfk.cpp index 5779d27b41..cafd2e3695 100644 --- a/engines/avalanche/chunkxfk.cpp +++ b/engines/avalanche/chunkxfk.cpp @@ -69,7 +69,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); diff --git a/engines/avalanche/chunkxfl.cpp b/engines/avalanche/chunkxfl.cpp index 935245002a..78ecd17793 100644 --- a/engines/avalanche/chunkxfl.cpp +++ b/engines/avalanche/chunkxfl.cpp @@ -47,7 +47,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); diff --git a/engines/avalanche/clock.cpp b/engines/avalanche/clock.cpp index 3cec288819..4f36cb7caa 100644 --- a/engines/avalanche/clock.cpp +++ b/engines/avalanche/clock.cpp @@ -39,7 +39,6 @@ char r; void hand(word ang, word length, byte colour) { arccoordstype a; - ; if (ang > 900) return; setcolor(colour); arc(xm, ym, 449 - ang, 450 - ang, length); @@ -49,14 +48,11 @@ void hand(word ang, word length, byte colour) { void chime() { integer gd, gm, fv; - ; if (oh > 177) return; /* too high- must be first time around */ fv = h / 30; if (fv == 0) fv = 12; for (gd = 1; gd <= fv; gd ++) { - ; for (gm = 1; gm <= 3; gm ++) { - ; sound(140 - gm * 30); delay(50 - gm * 3); } @@ -66,7 +62,6 @@ void chime() { } void plothands() { - ; hand(oh, 17, brown); hand(h, 17, yellow); hand(om * 6, 20, brown); @@ -75,7 +70,6 @@ void plothands() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); @@ -87,7 +81,6 @@ int main(int argc, const char *argv[]) { gettime(h, m, s, s1); h = (h % 12) * 30 + m / 2; if (oh != h) { - ; plothands(); chime(); } diff --git a/engines/avalanche/closing.cpp b/engines/avalanche/closing.cpp index ddd31fc34b..52a09b1b47 100644 --- a/engines/avalanche/closing.cpp +++ b/engines/avalanche/closing.cpp @@ -52,7 +52,6 @@ file<scrtype> f; pointer exitsave; void get_screen(byte which) { - ; closegraph(); textattr = 0; clrscr; @@ -65,15 +64,11 @@ void get_screen(byte which) { void show_screen() { byte fv, ff, fq, tl, bl; scrtype a /*absolute $B800:0*/; - ; for (fv = 1; fv <= 40; fv ++) { - ; if (fv > 36) { - ; tl = 1; bl = 24; } else { - ; tl = 12 - fv / 3; bl = 12 + fv / 3; } @@ -89,7 +84,6 @@ void show_screen() { } void quit_with(byte which, byte errorlev) { - ; dusk(); get_screen(which); show_screen(); /* No changes. */ @@ -98,7 +92,6 @@ void quit_with(byte which, byte errorlev) { void put_in(string x, word where) { word fv; - ; for (fv = 1; fv <= length(x); fv ++) q[1 + (where + fv) * 2] = x[fv]; } @@ -121,7 +114,6 @@ void end_of_program() }; string result; - ; nosound; get_screen(scr_nagscreen); result = nouns[Random(12)] + " will " + verbs[Random(12)] + " you"; @@ -132,7 +124,6 @@ void end_of_program() /*$F+*/ void bug_handler() { - ; exitproc = exitsave; if (erroraddr != nil) { @@ -140,7 +131,6 @@ void bug_handler() { if (exitcode == 203) get_screen(scr_ramcram); else { - ; get_screen(scr_bugalert); put_in(strf(exitcode), 678); /* 678 = [38,8]. */ put_in(strf(seg(erroraddr)) + ':' + strf(ofs(erroraddr)), 758); /* 758 = [38,9]. */ @@ -159,7 +149,6 @@ public: static unit_closing_initialize closing_constructor; unit_closing_initialize::unit_closing_initialize() { - ; exitsave = exitproc; exitproc = &bug_handler; } diff --git a/engines/avalanche/convert.cpp b/engines/avalanche/convert.cpp index f7ae1ecf77..8ab4b2d979 100644 --- a/engines/avalanche/convert.cpp +++ b/engines/avalanche/convert.cpp @@ -39,7 +39,6 @@ void loadscreen(string nam) { untyped_file f; word s; string check; - ; assign(f, nam); reset(f, 1); blockread(f, check, 41); @@ -47,7 +46,6 @@ void loadscreen(string nam) { blockread(f, check, 31); s = imagesize(0, 0, getmaxx(), 75); for (z = 1; z <= 2; z ++) { - ; getmem(a[z], s); blockread(f, a[z], s); setactivepage(0); @@ -61,12 +59,10 @@ void load2(string name) { byte a /*absolute $A000:1200*/; byte bit; untyped_file f; - ; assign(f, name); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -83,13 +79,11 @@ void save2(string name) { byte a /*absolute $A000:1200*/; byte bit; untyped_file f; - ; assign(f, name); rewrite(f, 1); blockwrite(f, header[1], 146); /* really 90 */ blockwrite(f, desc, 31); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -101,7 +95,6 @@ void save2(string name) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; output << "Filename?"; input >> fn1 >> NL; output << "New name?"; diff --git a/engines/avalanche/convmous.cpp b/engines/avalanche/convmous.cpp index 6316b61c3d..0a0bbce978 100644 --- a/engines/avalanche/convmous.cpp +++ b/engines/avalanche/convmous.cpp @@ -48,9 +48,7 @@ integer gd, gm; void recalc() { byte a, b; - ; { - ; for (a = 0; a <= 1; a ++) for (b = 0; b <= 15; b ++) c_current.mask[a][b] = bintoword(cpc[a][b]); @@ -63,7 +61,6 @@ void load() { text t; string x; byte a, b; - ; assign(t, fn); reset(t); do { @@ -83,32 +80,25 @@ void display() { const integer o0 = ord('0'); const integer o1 = ord('1'); byte x, y, p1, p2; - ; for (y = 0; y <= 15; y ++) { - ; for (x = 1; x <= 16; x ++) { - ; switch (ord(cpc[0][y][x]) * 2 + ord(cpc[1][y][x])) { case o0*2+o0: { - ; p1 = 0; p2 = 0; } break; /* p1= silhouette, p2= real */ case o0*2+o1: { - ; p1 = 0; p2 = 15; } break; case o1*2+o0: { - ; p1 = 15; p2 = 0; } break; case o1*2+o1: { - ; p1 = 9; p2 = 9; } @@ -123,7 +113,6 @@ void display() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 1; initgraph(gd, gm, ""); diff --git a/engines/avalanche/credits.cpp b/engines/avalanche/credits.cpp index 377c34c7bf..adb2057ec9 100644 --- a/engines/avalanche/credits.cpp +++ b/engines/avalanche/credits.cpp @@ -45,7 +45,6 @@ void do_one(byte z) { byte a /*absolute $A000:0*/; byte aa /*absolute $A000:80*/; byte az /*absolute $A000:27921*/; - ; a = getpixel(0, 0); move(l, az, z); @@ -56,9 +55,7 @@ void do_one(byte z) { void background() { byte y; - ; for (y = 1; y <= 15; y ++) { - ; setcolor(y); outtextxy(17, y * 12, "Jesus is Lord!"); } @@ -67,7 +64,6 @@ void background() { void scroll(string z) { byte x, y, lz; char c; - ; fillchar(l, 80, '\0'); if (z == "") for (y = 1; y <= 12; y ++) do_one(0); @@ -77,17 +73,14 @@ void scroll(string z) { switch (c) { case '*': for (y = 0; y <= 15; y ++) { - ; for (x = 1; x <= lz; x ++) l[x] = f[2][z[x]][y]; do_one(lz); } break; case '>': { - ; lz += 7; for (y = 0; y <= 13; y ++) { - ; for (x = 1; x <= lz; x ++) l[x + 7] = f[1][z[x]][y]; do_one(lz); @@ -100,7 +93,6 @@ void scroll(string z) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 1; initgraph(gd, gm, ""); diff --git a/engines/avalanche/displtxt.cpp b/engines/avalanche/displtxt.cpp index 41ebe4434c..a807743a1e 100644 --- a/engines/avalanche/displtxt.cpp +++ b/engines/avalanche/displtxt.cpp @@ -42,7 +42,6 @@ atype a /*absolute $B800:0*/; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 0; clrscr; assign(f, fn); @@ -50,13 +49,10 @@ int main(int argc, const char *argv[]) { f >> q; close(f); for (fv = 1; fv <= 40; fv ++) { - ; if (fv > 36) { - ; tl = 1; bl = 24; } else { - ; tl = 12 - fv / 3; bl = 12 + fv / 3; } diff --git a/engines/avalanche/dropdown.cpp b/engines/avalanche/dropdown.cpp index 0f3d078f12..c5b2c50042 100644 --- a/engines/avalanche/dropdown.cpp +++ b/engines/avalanche/dropdown.cpp @@ -72,7 +72,6 @@ char r; byte fv; void find_what_you_can_do_with_it() { - ; switch (thinks) { case wine: case ink: @@ -107,7 +106,6 @@ void chalk(integer x, integer y, char t, string z, boolean valid) { byte fv, ff, p, bit; word pageseg; byte ander; - ; pageseg = 0xa000 + cp * 0x400; @@ -117,7 +115,6 @@ void chalk(integer x, integer y, char t, string z, boolean valid) { for (fv = 1; fv <= length(z); fv ++) for (ff = 0; ff <= 7; ff ++) for (bit = 0; bit <= 2; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -126,7 +123,6 @@ void chalk(integer x, integer y, char t, string z, boolean valid) { } for (ff = 0; ff <= 8; ff ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << 3; @@ -139,7 +135,6 @@ void chalk(integer x, integer y, char t, string z, boolean valid) { p -= 1; for (bit = 0; bit <= 2; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -156,7 +151,6 @@ void hlchalk(integer x, integer y, char t, string z, boolean valid) byte fv, ff, p; word pageseg; byte ander; - ; pageseg = 0xa000 + cp * 0x400; @@ -183,14 +177,12 @@ begin; end;*/ void bleep() { - ; sound(177); delay(7); nosound; } void onemenu::start_afresh() { - ; number = 0; width = 0; firstlix = false; @@ -199,7 +191,6 @@ void onemenu::start_afresh() { } onemenu *onemenu::init() { - ; menunow = false; ddmnow = false; menunum = 1; @@ -208,13 +199,11 @@ onemenu *onemenu::init() { void onemenu::opt(string n, char tr, string key, boolean val) { integer l; - ; number += 1; l = length(n + key) + 3; if (width < l) width = l; { optiontype &with = oo[number]; - ; with.title = n; with.trigger = tr; with.shortcut = key; @@ -224,10 +213,8 @@ void onemenu::opt(string n, char tr, string key, boolean val) { void onemenu::displayopt(byte y, boolean highlit) { string data; - ; { optiontype &with = oo[y]; - ; if (highlit) setfillstyle(1, 0); @@ -255,7 +242,6 @@ void onemenu::displayopt(byte y, boolean highlit) { void onemenu::display() { byte y; - ; off(); setactivepage(cp); setvisualpage(cp); @@ -284,7 +270,6 @@ void onemenu::display() { void onemenu::wipe() { bytefield r; - ; setactivepage(cp); off(); { @@ -313,9 +298,7 @@ void onemenu::wipe() { void onemenu::movehighlight(shortint add) { shortint hn; - ; if (add != 0) { - ; hn = highlightnum + add; if ((hn < 0) || (hn >= (unsigned char)number)) return; highlightnum = hn; @@ -330,7 +313,6 @@ void onemenu::movehighlight(shortint add) { } void onemenu::lightup() { /* This makes the menu highlight follow the mouse.*/ - ; if ((mx < (cardinal)flx1 * 8) || (mx > (cardinal)flx2 * 8) || (my <= 12) || (my > (cardinal)fly - 3)) return; highlightnum = (my - 13) / 10; if (highlightnum == oldy) return; @@ -338,7 +320,6 @@ void onemenu::lightup() { /* This makes the menu highlight follow the mouse.*/ } void onemenu::select(byte n) { /* Choose which one you want. */ - ; if (! oo[n + 1].valid) return; choicenum = n; wipe(); @@ -352,13 +333,11 @@ void onemenu::select(byte n) { /* Choose which one you want. */ void onemenu::keystroke(char c) { byte fv; boolean found; - ; c = upcase(c); found = false; for (fv = 1; fv <= number; fv ++) { optiontype &with = oo[fv]; if ((upcase(with.trigger) == c) && with.valid) { - ; select(fv - 1); found = true; } @@ -368,7 +347,6 @@ void onemenu::keystroke(char c) { headtype *headtype::init (char trig, char alttrig, string name, byte p, proc dw, proc dc) { - ; trigger = trig; alttrigger = alttrig; title = name; @@ -381,21 +359,18 @@ headtype *headtype::init } void headtype::display() { - ; off(); /*MT*/ chalk(xpos, 1, trigger, title, true); on(); /*MT*/ } void headtype::highlight() { - ; off(); off_virtual(); nosound; setactivepage(cp); hlchalk(xpos, 1, trigger, title, true); { - ; ddm_o.left = xpos; ddm_o.menunow = true; ddmnow = true; @@ -406,9 +381,7 @@ void headtype::highlight() { boolean headtype::extdparse(char c) { boolean extdparse_result; - ; if (c != alttrigger) { - ; extdparse_result = true; return extdparse_result; } @@ -417,13 +390,11 @@ boolean headtype::extdparse(char c) { } menuset *menuset::init() { - ; howmany = 0; return this; } void menuset::create(char t, string n, char alttrig, proc dw, proc dc) { - ; howmany += 1; ddms[howmany].init(t, alttrig, n, howmany, dw, dc); } @@ -431,7 +402,6 @@ void menuset::create(char t, string n, char alttrig, proc dw, proc dc) { void menuset::update() { const bytefield menuspace = {0, 0, 80, 9}; byte fv, page_, savecp; - ; setactivepage(3); setfillstyle(1, menu_b); bar(0, 0, 640, 9); @@ -449,7 +419,6 @@ void menuset::update() { void menuset::extd(char c) { byte fv; - ; fv = 1; while ((fv <= howmany) && (ddms[fv].extdparse(c))) fv += 1; if (fv > howmany) return; @@ -457,13 +426,10 @@ void menuset::extd(char c) { } void menuset::getcertain(byte fv) { - ; { headtype &with = ddms[fv]; { - ; if (ddm_o.menunow) { - ; wipe(); /* get rid of menu */ if (ddm_o.menunum == with.position) return; /* clicked on own highlight */ } @@ -475,12 +441,10 @@ void menuset::getcertain(byte fv) { void menuset::getmenu(integer x) { byte fv; - ; fv = 0; do { fv += 1; if ((x > ddms[fv].xpos * 8) && (x < ddms[fv].xright * 8)) { - ; getcertain(fv); return; } @@ -488,15 +452,12 @@ void menuset::getmenu(integer x) { } void parsekey(char r, char re) { - ; switch (r) { case '\0': case '\340': { - ; switch (re) { case 'K': if (ddm_o.menunum > 1) { - ; wipe(); ddm_m.getcertain(ddm_o.menunum - 1); } else { @@ -507,7 +468,6 @@ void parsekey(char r, char re) { break; case 'M': if (ddm_o.menunum < ddm_m.howmany) { - ; wipe(); ddm_m.getcertain(ddm_o.menunum + 1); } else { @@ -531,7 +491,6 @@ void parsekey(char r, char re) { select(ddm_o.highlightnum); break; default: { - ; if (ddm_o.menunow) keystroke(r); } } @@ -540,9 +499,7 @@ void parsekey(char r, char re) { /*$F+ *** Here follow all the ddm__ and do__ procedures for the DDM system. */ void ddm__game() { - ; { - ; start_afresh(); opt("Help...", 'H', "f1", true); opt("Boss Key", 'B', "alt-B", true); @@ -554,9 +511,7 @@ void ddm__game() { } void ddm__file() { - ; { - ; start_afresh(); opt("New game", 'N', "f4", true); opt("Load...", 'L', "^f3", true); @@ -570,11 +525,9 @@ void ddm__file() { void ddm__action() { string n; - ; n = copy(f5_does(), 2, 255); { - ; start_afresh(); if (n == "") opt("Do something", 'D', "f5", false); @@ -598,17 +551,14 @@ void ddm__action() { void ddm__people() { byte here; char fv; - ; people = ""; here = dna.room; { - ; start_afresh(); for (fv = '\226'; fv <= '\262'; fv ++) if (whereis[fv] == here) { - ; opt(getname(fv), getnamechar(fv), "", true); people = people + fv; } @@ -618,9 +568,7 @@ void ddm__people() { void ddm__objects() { char fv; - ; { - ; start_afresh(); for (fv = '\1'; fv <= numobjs; fv ++) if (dna.obj[fv]) @@ -631,7 +579,6 @@ void ddm__objects() { string himher(char x) { /* Returns "im" for boys, and "er" for girls.*/ string himher_result; - ; if (x < '\257') himher_result = "im"; else himher_result = "er"; return himher_result; @@ -642,18 +589,14 @@ void ddm__with() { varying_string<7> verb; char vbchar; boolean n; - ; { - ; start_afresh(); if (thinkthing) { - ; find_what_you_can_do_with_it(); for (fv = 1; fv <= length(verbstr); fv ++) { - ; verbopt(verbstr[fv], verb, vbchar); opt(verb, vbchar, "", true); } @@ -665,13 +608,11 @@ void ddm__with() { if ((set::of(nowt, pavalot, eos).has(last_person)) || (whereis[last_person] != dna.room)) opt("Give to...", 'G', "", false); /* Not here. */ else { - ; opt(string("Give to ") + getname(last_person), 'G', "", true); verbstr = verbstr + vb_give; } } else { - ; opt("Examine", 'x', "", true); opt(string("Talk to h") + himher(thinks), 'T', "", true); verbstr = string(vb_exam) + vb_talk; @@ -679,21 +620,18 @@ void ddm__with() { case pgeida: case parkata: { - ; opt("Kiss her", 'K', "", true); verbstr = verbstr + vb_kiss; } break; case pdogfood: { - ; opt("Play his game", 'P', "", ! dna.wonnim); /* True if you HAVEN'T won. */ verbstr = verbstr + vb_play; } break; case pmalagauche: { - ; n = ! dna.teetotal; opt("Buy some wine", 'w', "", ! dna.obj[wine]); opt("Buy some beer", 'b', "", n); @@ -705,7 +643,6 @@ void ddm__with() { break; case ptrader: { - ; opt("Buy an onion", 'o', "", ! dna.obj[onion]); verbstr = verbstr + '\151'; } @@ -744,7 +681,6 @@ begin; end;*/ void do__game() { - ; switch (ddm_o.choicenum) { /* Help, boss, untrash screen. */ case 0: @@ -766,20 +702,17 @@ void do__game() { } void do__file() { - ; switch (ddm_o.choicenum) { /* New game, load, save, save as, DOS shell, about, quit. */ case 0: callverb(vb_restart); break; case 1: { - ; realwords[2] = ""; callverb(vb_load); } break; case 2: { - ; realwords[2] = ""; callverb(vb_save); } @@ -798,7 +731,6 @@ void do__file() { void do__action() { string n; - ; switch (ddm_o.choicenum) { /* Get up/pause game/open door/look/inv/walk-run */ case 0: { @@ -830,22 +762,18 @@ void do__action() { } void do__objects() { - ; thinkabout(objlist[ddm_o.choicenum + 1], a_thing); } void do__people() { - ; thinkabout(people[ddm_o.choicenum + 1], a_person); last_person = people[ddm_o.choicenum + 1]; } void do__with() { - ; thing = thinks; if (thinkthing) { - ; thing += 49; @@ -855,52 +783,44 @@ void do__with() { person = '\376'; } else { - ; switch (verbstr[ddm_o.choicenum + 1]) { case '\144': { - ; thing = '\144'; callverb(vb_buy); return; } break; /* Beer */ case '\145': { - ; thing = '\62'; callverb(vb_buy); return; } break; /* Wine */ case '\146': { - ; thing = '\146'; callverb(vb_buy); return; } break; /* Whisky */ case '\147': { - ; thing = '\147'; callverb(vb_buy); return; } break; /* Cider */ case '\150': { - ; thing = '\153'; callverb(vb_buy); return; } break; /* Mead */ case '\151': { - ; thing = '\103'; callverb(vb_buy); return; } break; /* Onion (trader) */ default: { - ; person = thing; thing = '\376'; } @@ -912,7 +832,6 @@ void do__with() { /*$F- That's all. Now for the ...bar procs. */ void standard_bar() { /* Standard menu bar */ - ; ddm_m.init(); ddm_o.init(); { @@ -941,11 +860,8 @@ begin; end;*/ void checkclick() { /* only for when the menu's displayed */ - ; if (mpress > 0) { - ; if (mpy > 10) { - ; if (!((ddm_o.firstlix) && ((mpx >= (cardinal)ddm_o.flx1 * 8) && (mpx <= (cardinal)ddm_o.flx2 * 8) && (mpy >= 12) && (mpy <= (cardinal)ddm_o.fly)))) { @@ -959,7 +875,6 @@ void checkclick() { /* only for when the menu's displayed */ } else { ; /* NOT clicked button... */ if (mrelease > 0) { - ; if ((ddm_o.firstlix) && ((mrx >= (cardinal)ddm_o.flx1 * 8) && (mrx <= (cardinal)ddm_o.flx2 * 8) && (mry >= 12) && (mry <= (cardinal)ddm_o.fly))) @@ -969,9 +884,7 @@ void checkclick() { /* only for when the menu's displayed */ } void menu_link() { - ; { - ; if (! ddm_o.menunow) return; check(); /* find mouse coords & click information */ @@ -984,7 +897,6 @@ void menu_link() { newpointer(1); break; /* up-arrow */ case 11 ... 169: { - ; if ((mx >= (cardinal)ddm_o.flx1 * 8) && (mx <= (cardinal)ddm_o.flx2 * 8) && (my > 10) && (my <= (cardinal)ddm_o.fly)) newpointer(3); /* right-arrow */ else newpointer(4); /* fletch */ diff --git a/engines/avalanche/dwidth.cpp b/engines/avalanche/dwidth.cpp index 56bf5093b7..206ad21631 100644 --- a/engines/avalanche/dwidth.cpp +++ b/engines/avalanche/dwidth.cpp @@ -37,7 +37,6 @@ file<fonttype> ff; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; assign(ff, "v:avalot.fnt"); reset(ff); ff >> f; diff --git a/engines/avalanche/edhead.cpp b/engines/avalanche/edhead.cpp index 3aed1a3713..af0eea97fc 100644 --- a/engines/avalanche/edhead.cpp +++ b/engines/avalanche/edhead.cpp @@ -72,7 +72,6 @@ edhead e; void info(string x) { /* info on .ASG files */ varying_string<40> describe; - ; assign(f, x); /*$I-*/ reset(f, 1); seek(f, 47); @@ -99,7 +98,6 @@ void info(string x) { /* info on .ASG files */ int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; info("tt.asg"); output << "Filename: " << x << NL; diff --git a/engines/avalanche/enhanced.cpp b/engines/avalanche/enhanced.cpp index bfe4274191..befc4dff35 100644 --- a/engines/avalanche/enhanced.cpp +++ b/engines/avalanche/enhanced.cpp @@ -47,7 +47,6 @@ boolean isenh() { boolean isenh_result; isenh_result = false; { - ; ah = 0x12; intr(0x16, r); statefrom16 = al; @@ -55,7 +54,6 @@ boolean isenh() { if (statefrom16 != shiftstate) return isenh_result; shiftstate = shiftstate ^ 0x20; { - ; ah = 0x12; intr(0x16, r); statefrom16 = al; @@ -76,7 +74,6 @@ void readkeye() { registers r; word fs; - ; if (atbios) fs = fancystuff; /* We're using an AT */ else fs = notfancystuff; /* ditto, an XT */ @@ -96,7 +93,6 @@ boolean keypressede() { registers r; boolean keypressede_result; - ; if (atbios) keypressede_result = fancystuff; /* ATs get the fancy stuff */ else keypressede_result = keypressed(); /* XTs get the usual primitive... */ @@ -110,7 +106,6 @@ public: static unit_enhanced_initialize enhanced_constructor; unit_enhanced_initialize::unit_enhanced_initialize() { - ; /* determine bios type */ atbios = isenh(); } diff --git a/engines/avalanche/filer.cpp b/engines/avalanche/filer.cpp index b8e3c8bfe0..a98161796b 100644 --- a/engines/avalanche/filer.cpp +++ b/engines/avalanche/filer.cpp @@ -108,9 +108,7 @@ boolean filefound; void shadow(integer x1, integer y1, integer x2, integer y2, byte hc, byte sc) { byte fv; - ; for (fv = 0; fv <= border; fv ++) { - ; setfillstyle(1, hc); bar(x1 + fv, y1 + fv, x1 + fv, y2 - fv); bar(x1 + fv, y1 + fv, x2 - fv, y1 + fv); @@ -123,7 +121,6 @@ void shadow(integer x1, integer y1, integer x2, integer y2, byte hc, byte sc) { void shbox(integer x1, integer y1, integer x2, integer y2, string t) { const integer fc = 7; - ; shadow(x1, y1, x2, y2, 15, 8); setfillstyle(1, fc); bar(x1 + border + 1, y1 + border + 1, x2 - border - 1, y2 - border - 1); @@ -132,7 +129,6 @@ void shbox(integer x1, integer y1, integer x2, integer y2, string t) { y1 = (y2 - y1) / 2 + y1; outtextxy(x1, y1, t); if (length(t) > 1) { - ; fillchar(t[2], length(t) - 1, '\40'); t[1] = '_'; outtextxy(x1 - 1, y1 + 1, t); @@ -141,7 +137,6 @@ void shbox(integer x1, integer y1, integer x2, integer y2, string t) { void show_drives() { byte fv; - ; settextjustify(1, 1); for (fv = 0; fv <= length(drives) - 1; fv ++) shbox((fv % drlen) * 25 + 25, (fv / drlen) * 19 + 31, @@ -151,7 +146,6 @@ void show_drives() { } void box(integer x1, integer y1, integer x2, integer y2, string z) { - ; rectangle(x1, y1, x2, y2); outtextxy(x1 + 1, y1 - 10, z + ':'); outtextxy(x1, y1 - 9, "_"); @@ -160,7 +154,6 @@ void box(integer x1, integer y1, integer x2, integer y2, string z) { string lowstr(string x) { byte fv; string lowstr_result; - ; for (fv = 1; fv <= length(x); fv ++) if (set::of(range('A', 'Z'), eos).has(x[fv])) x[fv] += 32; lowstr_result = x; @@ -175,7 +168,6 @@ char lowchar(char x) { } void getcurrent() { - ; current = lowstr(fexpand("*.asg")); } @@ -183,7 +175,6 @@ void setup() { integer gd, gm; registers r; byte floppies; - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -271,12 +262,10 @@ void scandir() { ednahead eh; array<1, 4, char> dna_type; - ; nums[files] = 0; findfirst("*.asg", archive + hidden + readonly, s); while (doserror == 0) { - ; fsplit(s.name, nix, name, nix); nums[files] += 1; lists[files][nums[files]] = lowstr(name); @@ -292,14 +281,12 @@ void scandir() { } else { ; /* EDNA-based files. */ if (dna_type == "EDNA") { - ; seek(f, 177); blockread(f, eh, sizeof(eh)); if (eh.revision != 2) descs[nums[files]] = "* Unknown EDNA type!"; else { - ; if (eh.number != 2) descs[nums[files]] = string("* Saved by ") + eh.shortname + '!'; @@ -317,9 +304,7 @@ void scandir() { nums[dirs] = 0; findfirst("*.*", directory, s); while (doserror == 0) { - ; if (((s.attr & directory) > 0) && ((length(s.name)) > 1)) { - ; nums[dirs] += 1; lists[dirs][nums[dirs]] = lowstr(s.name); } @@ -339,7 +324,6 @@ void scandir() { void show_file(integer x, integer y, byte which) { varying_string<58> z; - ; fillchar(z[1], 13, '\40'); z = lists[files][which] + ".asg"; z[0] = '\15'; @@ -355,11 +339,9 @@ void show_file(integer x, integer y, byte which) { void showfiles() { byte fv; - ; if (loading) setcolor(11); else setcolor(3); if (nums[3] == 0) { - ; outtextxy(22, 86, "(None here!)"); return; } @@ -370,7 +352,6 @@ void showfiles() { void showdirs() { byte fv; - ; setcolor(11); for (fv = 0; fv <= 8; fv ++) if (where[4] + fv <= nums[4]) @@ -382,7 +363,6 @@ void show() { dirstr d; namestr n; extstr e; - ; setfillstyle(1, 1); for (fv = 1; fv <= 4; fv ++) if (fv != 2) { @@ -396,7 +376,6 @@ void show() { } void blip() { - ; sound(177); delay(77); nosound; @@ -405,7 +384,6 @@ void blip() { void invert(integer x1, integer y1, integer x2, integer y2) { pointer p, restore; word s; - ; s = imagesize(x1, y1, x2, y2); mark(restore); getmem(p, s); @@ -416,10 +394,8 @@ void invert(integer x1, integer y1, integer x2, integer y2) { void changedrive(char drive) { byte fv; - ; fv = pos(drive, drives); if (fv == 0) { - ; blip(); return; } @@ -435,7 +411,6 @@ void changedrive(char drive) { } void highlight(byte win, byte line) { - ; switch (win) { case 3: invert(16, 75 + line * 10, 479, 85 + line * 10); @@ -467,12 +442,9 @@ void repaint(byte whichwindow) { void fileblit(word xpos, word xlen, word y1, word y2, shortint dir, word ylen) { word fv; byte bit; - ; for (bit = 0; bit <= 3; bit ++) { - ; fv = 0; while (fv < ylen) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -522,7 +494,6 @@ void pagedown(byte whichlist) { void subdirparse(string r); static void movehl(byte which, shortint howmuch) { - ; highlight(4, where[4] - top[4] + 1); if (((where[which] + howmuch) > 0) && ((where[which] + howmuch) <= (unsigned char)nums[4])) where[which] = where[which] + howmuch; @@ -532,12 +503,10 @@ static void movehl(byte which, shortint howmuch) { static void change_dir() { - ; dusk(); /*$I-*/ chdir(lists[4][where[4]]); /*$I+*/ if (ioresult != 0) { - ; dawn(); blip(); return; @@ -554,7 +523,6 @@ static void change_dir() { void subdirparse(string r) { - ; switch (r[1]) { case creturn: change_dir(); @@ -582,7 +550,6 @@ void subdirparse(string r) if (where[4] - top[4] < 8) /* Down */ movehl(4, 1); else if (top[4] + 8 < nums[4]) { - ; highlight(4, 9); top[4] += 1; where[4] += 1; @@ -620,7 +587,6 @@ void fileinfo(byte which); static void display(integer y, string left, string right) { - ; y = 17 + y * 12; settextjustify(2, 1); setcolor(11); @@ -638,7 +604,6 @@ void fileinfo(byte which) varying_string<4> os; char r; - ; /* Firstly, we must check whether or not it's an Avalot file. This is easily done, since the descriptions of all others always begin with a star. */ @@ -663,7 +628,6 @@ void fileinfo(byte which) bar(2, 2, 637, 197); /* Interesting information coming up! */ { - ; display(2, "Saved by:", eh.game); display(3, "version:", eh.verstr); @@ -688,7 +652,6 @@ void filer_help() /* This gives general help. */ { char r; - ; outtextxy(100, 100, "Just general help here."); shbox(500, 177, 650, 200, "Press any key..."); r = readkey(); @@ -701,7 +664,6 @@ void wipe() /* This allows you to delete files. */ { char r; - ; outtextxy(100, 100, "Are you sure you want to delete \"foo.bar\"?"); shbox(500, 177, 650, 200, "[Y/N]"); r = readkey(); @@ -713,7 +675,6 @@ void wipe() void filesparse(string r); static void movehl1(byte which, shortint howmuch) { - ; highlight(3, where[3] - top[3] + 1); if (((where[which] + howmuch) > 0) && ((where[which] + howmuch) <= (unsigned char)nums[3])) where[which] = where[which] + howmuch; @@ -724,7 +685,6 @@ static void movehl1(byte which, shortint howmuch) { static boolean selected_file() { boolean selected_file_result; - ; if (descs[where[file_win]][1] == '*') { blip(); selected_file_result = false; @@ -739,7 +699,6 @@ static boolean selected_file() { void filesparse(string r) { - ; switch (r[1]) { case creturn: if (selected_file()) return; @@ -765,7 +724,6 @@ void filesparse(string r) if (where[3] - top[3] < 8) /* Down */ movehl1(3, 1); else if (top[3] + 8 < nums[3]) { - ; highlight(3, 9); top[3] += 1; where[3] += 1; @@ -808,7 +766,6 @@ void filesparse(string r) string playaround(); static void changewin(byte i) { - ; switch (nowwin) { case 3: case 4: @@ -834,7 +791,6 @@ static void changewin(byte i) { string playaround() { char r, r2; string playaround_result; - ; filefound = false; dawn(); @@ -850,7 +806,6 @@ string playaround() { changewin(nowwin + 1); break; case cescape: { - ; playaround_result = ""; return playaround_result; } @@ -875,7 +830,6 @@ string playaround() { changewin(4); break; case c_ac: { - ; playaround_result = ""; return playaround_result; } @@ -912,7 +866,6 @@ string playaround() { } if (filefound) { - ; dusk(); playaround_result = filename; return playaround_result; @@ -924,7 +877,6 @@ string playaround() { void do_filer() { pathstr p; void do_filer_result; - ; loading = true; setup(); scandir(); @@ -938,7 +890,6 @@ void do_filer() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; filename = do_filer(); closegraph(); if (filename == "") diff --git a/engines/avalanche/fileunit.cpp b/engines/avalanche/fileunit.cpp index 6b1c9b196b..11c82fa64a 100644 --- a/engines/avalanche/fileunit.cpp +++ b/engines/avalanche/fileunit.cpp @@ -804,7 +804,6 @@ void entername(char r) { filefound = true; break; case '\40': - ; break; /* ignore spaces. */ default: { if (length(filename) < 55) filename = filename + r; diff --git a/engines/avalanche/filing.cpp b/engines/avalanche/filing.cpp index 78abec7e41..dce34e9b57 100644 --- a/engines/avalanche/filing.cpp +++ b/engines/avalanche/filing.cpp @@ -95,7 +95,6 @@ edhead e; void info256(string x) { /* info on dna256 *.ASG files */ varying_string<40> describe; - ; assign(f, x); /*$I-*/ reset(f, 1); seek(f, 47); @@ -103,7 +102,6 @@ void info256(string x) { /* info on dna256 *.ASG files */ blockread(f, dna256, sizeof(dna256)); close(f); /*$I+*/ { - ; e.revision = 1; e.game = "Denarius Avaricius Sextus"; e.shortname = "Avaricius"; @@ -128,16 +126,13 @@ void info256(string x) { /* info on dna256 *.ASG files */ string enlarge(string x) { string enlarge_result; - ; switch (x[length(x)]) { case '*': { - ; x[0] -= 1; x = x + "uary"; } break; case '&': { - ; x[0] -= 1; x = x + "ember"; } @@ -150,7 +145,6 @@ string enlarge(string x) { string th(byte x) { varying_string<4> n; string th_result; - ; n = strf(x); switch (x) { case 1: @@ -175,11 +169,9 @@ string th(byte x) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; info256("t:justb4.asg"); { - ; output << "DNA coding: "; switch (e.revision) { case 1: diff --git a/engines/avalanche/folktemp.cpp b/engines/avalanche/folktemp.cpp index 03da49f375..c32618209c 100644 --- a/engines/avalanche/folktemp.cpp +++ b/engines/avalanche/folktemp.cpp @@ -64,12 +64,10 @@ void load() { byte a0 /*absolute $A000:1200*/; byte bit; untyped_file f; - ; assign(f, "d:folk.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -81,7 +79,6 @@ void load() { } void get_one() { - ; gd = ((order[noo] % 9) * 70 + 10); gm = ((order[noo] / 9) * 40 + 20); @@ -94,7 +91,6 @@ void get_one() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/fontslid.cpp b/engines/avalanche/fontslid.cpp index 3173c6921c..43dbd78557 100644 --- a/engines/avalanche/fontslid.cpp +++ b/engines/avalanche/fontslid.cpp @@ -38,13 +38,11 @@ file<fonttype> f; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; assign(f, "v:avalot.fnt"); reset(f); f >> font1; close(f); for (r = '\0'; r <= '\377'; r ++) { - ; for (fv = 0; fv <= 3; fv ++) font1[r][fv] = (cardinal)font1[r][fv] >> 1; for (fv = 7; fv <= 8; fv ++) font1[r][fv] = font1[r][fv] << 1; for (fv = 9; fv <= 14; fv ++) font1[r][fv] = font1[r][fv] << 2; diff --git a/engines/avalanche/frere.cpp b/engines/avalanche/frere.cpp index 257e2b342c..fd4ffd4d02 100644 --- a/engines/avalanche/frere.cpp +++ b/engines/avalanche/frere.cpp @@ -57,7 +57,6 @@ byte value; tunetype played; void store_(byte what) { - ; move(played[2], played[1], sizeof(played) - 1); @@ -68,11 +67,9 @@ void store_(byte what) { boolean they_match() { byte fv; boolean they_match_result; - ; for (fv = 1; fv <= sizeof(played); fv ++) if (played[fv] != tune[fv]) { - ; they_match_result = false; return they_match_result; } @@ -84,7 +81,6 @@ boolean they_match() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 30; clrscr; @@ -97,7 +93,6 @@ int main(int argc, const char *argv[]) { value = pos(pressed, keys); if (value > 0) { - ; last_one = this_one; this_one = value; @@ -117,7 +112,6 @@ int main(int argc, const char *argv[]) { store_(higher); if (they_match()) { - ; textattr = 94; clrscr; output << NL; diff --git a/engines/avalanche/g-room.cpp b/engines/avalanche/g-room.cpp index 8f84e53100..2db249ba60 100644 --- a/engines/avalanche/g-room.cpp +++ b/engines/avalanche/g-room.cpp @@ -89,16 +89,13 @@ void plain_grab() /* Just grabs the next one and puts it where it's told to. */ { integer xx, yy, xofs; - ; blockread(f, cb, sizeof(cb)); switch (cb.flavour) { case ch_one: { - ; xofs = cb.x / 8; bit = 3; for (yy = 0; yy <= cb.yl; yy ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -109,12 +106,10 @@ void plain_grab() } break; case ch_ega: { - ; xofs = cb.x / 8; bit = 3; for (bit = 0; bit <= 3; bit ++) for (yy = 0; yy <= cb.yl; yy ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -128,24 +123,20 @@ void plain_grab() } void get_me(pointer &p) { - ; blockread(f, cb, sizeof(cb)); /* Take it for granted that cb.flavour = ch_BGI! */ { - ; getmem(p, cb.size); blockread(f, p, cb.size); } } void get_me_aargh(byte which) { - ; blockread(f, cb, sizeof(cb)); /* Take it for granted that cb.flavour = ch_BGI! */ { - ; getmem(aargh[which], cb.size); blockread(f, aargh[which], cb.size); } @@ -231,7 +222,6 @@ void big_green_eyes(byte how) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; if (paramstr(1) != "jsb") exit(255); gd = 3; gm = 0; @@ -245,7 +235,6 @@ int main(int argc, const char *argv[]) { mark(memlevel); for (fv = 1; fv <= 5; fv ++) { - ; blockread(f, cb, sizeof(cb)); for (bit = 2; bit <= 3; bit ++) for (y = 0; y <= cb.yl; y ++) @@ -277,7 +266,6 @@ int main(int argc, const char *argv[]) { glerk = new glerktype; for (fv = 1; fv <= 6; fv ++) { - ; blockread(f, cb, sizeof(cb)); bit = 3; for (bit = 0; bit <= 3; bit ++) @@ -309,14 +297,11 @@ int main(int argc, const char *argv[]) { bat_count = 0; for (gd = 500; gd >= 217; gd --) { - ; if (set::of(range(22, 27), eos).has((gd % 30))) { - ; if ((gd % 30) == 27) bar(gd, 135, gd + 16, 136); putimage(gd, 136, eyes[0], 0); putpixel(gd + 16, 137, 0); } else { - ; if (gd % 30 == 21) bar(gd, 137, gd + 17, 138); putimage(gd, 135, eyes[0], 0); @@ -325,13 +310,11 @@ int main(int argc, const char *argv[]) { /* Plot the Glerk: */ if (gd % 10 == 0) { - ; glerkstage += 1; if (glerkstage > 26) flush(); for (gm = 0; gm <= 34; gm ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -354,7 +337,6 @@ int main(int argc, const char *argv[]) { /* It descends... */ for (gm = -64; gm <= 103; gm ++) { - ; bit = getpixel(0, 0); if (gm > 0) @@ -363,7 +345,6 @@ int main(int argc, const char *argv[]) { for (y = 0; y <= 65; y ++) if ((y + gm) >= 0) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -382,7 +363,6 @@ int main(int argc, const char *argv[]) { for (gd = 1; gd <= 4; gd ++) for (fv = 1; fv <= 5; fv ++) { - ; y = getpixel(0, 0); @@ -391,7 +371,6 @@ int main(int argc, const char *argv[]) { for (y = 0; y <= 65; y ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -430,15 +409,12 @@ int main(int argc, const char *argv[]) { red_greldet = false; for (gd = 217; gd <= 479; gd ++) { - ; if (set::of(range(22, 27), eos).has((gd % 30))) { - ; if ((gd % 30) == 22) bar(gd + 22, 134, gd + 38, 137); putimage(gd + 23, 136, eyes[1], 0); putpixel(gd + 22, 137, 0); } else { - ; if (gd % 30 == 28) bar(gd + 22, 135, gd + 38, 138); @@ -448,7 +424,6 @@ int main(int argc, const char *argv[]) { /* Plot the Green Eyes: */ if (gd % 53 == 5) { - ; big_green_eyes(glerkstage); glerkstage += 1; } diff --git a/engines/avalanche/golden.cpp b/engines/avalanche/golden.cpp index 2ea9aec1a7..b5a6388b69 100644 --- a/engines/avalanche/golden.cpp +++ b/engines/avalanche/golden.cpp @@ -170,7 +170,6 @@ byte here() { void hold(word amount) { *skellern = 0; do { - ; } while (!(*skellern >= amount)); } @@ -408,7 +407,6 @@ int main(int argc, const char *argv[]) { initgraph(gd, gm, ""); if (! nomusic) do { - ; } while (!(ampgetrow >= 10)); setcolor(9); @@ -440,7 +438,6 @@ int main(int argc, const char *argv[]) { hold(15); else do { - ; } while (!(ampgetpattern > 2)); nexthangon = 2; hangon(1); @@ -469,7 +466,6 @@ int main(int argc, const char *argv[]) { hold(25); else do { - ; } while (!(ampgetmodulestatus != md_playing)); setcolor(0); diff --git a/engines/avalanche/gyro.cpp b/engines/avalanche/gyro.cpp index 25b2c00797..bcdd4c14d6 100644 --- a/engines/avalanche/gyro.cpp +++ b/engines/avalanche/gyro.cpp @@ -311,7 +311,6 @@ void click() { /* "Audio keyboard feedback" */ void slowdown() { /* repeat until TSkellern>=howlong; TSkellern:=0;*/ do { - ; } while (!(memw[storage_seg * skellern] >= howlong)); memw[storage_seg * skellern] = 0; } diff --git a/engines/avalanche/gyro.h b/engines/avalanche/gyro.h index d08bf86670..7a7e2aa3ae 100644 --- a/engines/avalanche/gyro.h +++ b/engines/avalanche/gyro.h @@ -348,7 +348,7 @@ const integer yw = 36; /* x width & y whatsit */ const integer margin = 5; const array<1, 9, mp> mps = { - { { + { { /* 1 - up-arrow */ { { {{65151, 64575, 64575, 63519, 63519, 61455, 61455, 57351, 57351, 49155, 49155, 64575, 64575, 64575, 64575, 64575}}, {{0, 384, 384, 960, 960, 2016, 2016, 4080, 4080, 8184, 384, 384, 384, 384, 384, 0}} @@ -497,7 +497,7 @@ const integer run = 5; const array < '\226', '\262', byte > whereis = /* The Lads */ -{ { +{ { r__yours, /* Avvy */ r__spludwicks, /* Spludwick */ r__outsideyours, /* Crapulus */ diff --git a/engines/avalanche/help.cpp b/engines/avalanche/help.cpp index 3074091a0b..23ee06819a 100644 --- a/engines/avalanche/help.cpp +++ b/engines/avalanche/help.cpp @@ -57,7 +57,6 @@ boolean lmo; void hilight(integer x, integer y, byte c1, byte c2, string z) { string w; - ; w = z; w[1] = '\40'; setcolor(c1); @@ -70,10 +69,8 @@ void hilight(integer x, integer y, byte c1, byte c2, string z) { } void showpage(byte x) { - ; if (x == page_) return; /* twit */ if (x == 7) { - ; lmo = true; return; } @@ -81,7 +78,6 @@ void showpage(byte x) { hidemousecursor; settextjustify(1, 1); if (page_ != 177) { - ; setfillstyle(1, 1); bar(507, page_ * 25 + 2, 607, page_ * 25 + 22); setfillstyle(1, 9); @@ -228,7 +224,6 @@ void showpage(byte x) { void helpsetup() { integer gd, gm; - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -246,7 +241,6 @@ void helpsetup() { settextstyle(0, 0, 1); settextjustify(1, 1); for (gd = 2; gd <= 7; gd ++) { - ; setfillstyle(1, 1); bar(507, gd * 25 + 2, 607, gd * 25 + 22); setfillstyle(1, 9); @@ -260,7 +254,6 @@ void helpsetup() { lmo = false; setfillstyle(1, 7); for (gd = 1; gd <= 3; gd ++) { - ; bar(10 - gd * 3, 200 - gd * 3, 490 - gd * 6, 200 - gd * 3); bar(490 - gd * 6, 37 - gd * 3, 491 - gd * 6, 200 - gd * 3); } @@ -268,7 +261,6 @@ void helpsetup() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; helpsetup(); do { do { @@ -299,7 +291,6 @@ int main(int argc, const char *argv[]) { } else { ; /* mouse choice */ if ((mousex > 400) && (mousey > 25)) { - ; showpage(mousey / 25); } } diff --git a/engines/avalanche/help2.cpp b/engines/avalanche/help2.cpp index 1ef6443fc7..37e23ac335 100644 --- a/engines/avalanche/help2.cpp +++ b/engines/avalanche/help2.cpp @@ -53,7 +53,6 @@ array<0, 9, byte> revpos; void loadfont() { file<fonttype> fontfile; - ; assign(fontfile, "c:\\thomas\\ttsmall.fnt"); reset(fontfile); fontfile >> font[1]; @@ -67,19 +66,16 @@ void loadfont() { void scribe(byte which, byte what); static void underline(byte &x) { - ; x = x | 177; } void scribe(byte which, byte what) { byte fv, ff; string x; - ; x = data[what]; fillchar(current, sizeof(current), '\0'); for (ff = 1; ff <= length(x); ff ++) for (fv = 0; fv <= 7; fv ++) { - ; current[fv][ff] = font[which][x[ff]][fv]; } @@ -93,18 +89,15 @@ void scribe(byte which, byte what) { } void display(word y) { - ; for (fv = 0; fv <= 7; fv ++) move(current[fv], mem[0xa000 * (y + fv) * 80], 79); } void update_link(char which, byte whence, byte whither) { byte fv; - ; for (fv = 1; fv <= numlinks; fv ++) { hypertype &with = link[fv]; if (with.trigger == which) { - ; with.line = size; with.start = whence; with.finish = whither; @@ -114,7 +107,6 @@ void update_link(char which, byte whence, byte whither) { void getlinks(string &x) { byte p, q; - ; do { p = pos("[", x); if (p == 0) return; /* lousy, huh? */ @@ -129,7 +121,6 @@ void loaddata(byte which) { text t; string x; integer e; - ; revpos[9] = position; fillchar(data, sizeof(data), '\0'); move(reverse[1], reverse[0], 9); @@ -144,21 +135,17 @@ void loaddata(byte which) { size = 0; numlinks = 0; while (! eof(t)) { - ; t >> x >> NL; if (x[1] == ':') { - ; numlinks += 1; { hypertype &with = link[numlinks]; - ; with.trigger = x[2]; Delete(x, 1, 3); Delete(x, pos(" ", x), 255); val(x, with.ref, e); } } else { - ; size += 1; getlinks(x); data[size] = x; @@ -170,7 +157,6 @@ void loaddata(byte which) { } void screen() { - ; setbkcolor(1); setfillstyle(1, 1); bar(0, 0, 640, 38); @@ -180,10 +166,8 @@ void screen() { void showscreen() { byte fv; - ; if (position < 1) position = 1; for (fv = 0; fv <= 15; fv ++) { - ; scribe(1, fv + position); display(41 + fv * 10); } @@ -191,11 +175,9 @@ void showscreen() { void up() { byte fv; - ; position -= 1; scribe(1, position); for (fv = 0; fv <= 9; fv ++) { - ; move(mem[0xa000 * 3200], mem[0xa000 * 3280], 12720); if (set::of(0, 9, eos).has(fv)) fillchar(mem[0xa000 * 3200], 79, '\0'); else @@ -205,11 +187,9 @@ void up() { void down() { byte fv; - ; position += 1; scribe(1, position + 15); for (fv = 0; fv <= 9; fv ++) { - ; move(mem[0xa000 * 3280], mem[0xa000 * 3200], 12720); if (set::of(0, 9, eos).has(fv)) fillchar(mem[0xa000 * 15920], 79, '\0'); else @@ -219,11 +199,9 @@ void down() { void newpage(char c) { byte fv; - ; for (fv = 1; fv <= numlinks; fv ++) { hypertype &with = link[fv]; if (with.trigger == c) { - ; loaddata(with.ref); showscreen(); } @@ -232,7 +210,6 @@ void newpage(char c) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -254,25 +231,21 @@ int main(int argc, const char *argv[]) { if (position < size) down(); break; case 'I': { - ; position -= 16; showscreen(); } break; case 'Q': { - ; position += 16; showscreen(); } break; case 'G': { - ; position = 1; showscreen(); } break; case 'O': { - ; position = size; showscreen(); } @@ -297,7 +270,6 @@ int main(int argc, const char *argv[]) { } break; case 'H': { - ; loaddata(7); /* help on help */ showscreen(); } diff --git a/engines/avalanche/helper.cpp b/engines/avalanche/helper.cpp index 76948b85da..622244e133 100644 --- a/engines/avalanche/helper.cpp +++ b/engines/avalanche/helper.cpp @@ -264,7 +264,6 @@ void continue_help() { if (fv > 0) switch (buttons[fv].trigger) { case '\0':/*null*/ - ; break; case '\376': return; diff --git a/engines/avalanche/hibits.cpp b/engines/avalanche/hibits.cpp index 013141998c..638f25d757 100644 --- a/engines/avalanche/hibits.cpp +++ b/engines/avalanche/hibits.cpp @@ -33,7 +33,6 @@ string q; byte fv; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; assign(inf, "v:thank.you"); assign(outf, "d:hibits.out"); reset(inf); @@ -44,7 +43,6 @@ int main(int argc, const char *argv[]) { for (fv = 1; fv <= length(q); fv ++) outf << q[fv]; while (! eof(inf)) { - ; inf >> x; if (x < '\200') x += 128; outf << x; diff --git a/engines/avalanche/highs.cpp b/engines/avalanche/highs.cpp index 09d073d3a7..bd8a5c3ce4 100644 --- a/engines/avalanche/highs.cpp +++ b/engines/avalanche/highs.cpp @@ -53,10 +53,8 @@ highscoretype h; void get_new_highs() { byte fv; - ; for (fv = 1; fv <= 12; fv ++) { A1 &with = h[fv]; - ; with.score = 32 - fv * 2; with.rank = "..."; } @@ -80,11 +78,9 @@ void show_highs() byte fv; varying_string<40> x; varying_string<5> y; - ; display("HIGH SCORERS\3\r Name\n\nScore Rank\r \"\"\"\"\n\n\"\"\"\"\" \"\"\"\"\f\4"); for (fv = 1; fv <= 12; fv ++) { A1 &with = h[fv]; - ; display(string('\15') + with.name + '\4'); fillchar(x, sizeof(x), '\40'); y = strf(with.score); @@ -99,7 +95,6 @@ void store_high(string who) /* This procedure shows the high-scores. */ { byte fv, ff; - ; for (fv = 1; fv <= 12; fv ++) if (h[fv].score < dna.score) flush(); @@ -110,7 +105,6 @@ void store_high(string who) { A1 &with = h[fv]; - ; with.name = who; with.score = dna.score; } @@ -119,7 +113,6 @@ void store_high(string who) void get_highs() { file<highscoretype> f; - ; /*$I-*/ assign(f, "scores.avd"); reset(f); @@ -142,7 +135,6 @@ public: static unit_highs_initialize highs_constructor; unit_highs_initialize::unit_highs_initialize() { - ; get_highs(); } diff --git a/engines/avalanche/hiz.cpp b/engines/avalanche/hiz.cpp index 2f9e603b9e..af924a0600 100644 --- a/engines/avalanche/hiz.cpp +++ b/engines/avalanche/hiz.cpp @@ -46,9 +46,7 @@ byte tsr_int; word tsr_ax; void grab() { - ; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -58,9 +56,7 @@ void grab() { } void drop() { - ; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -70,14 +66,12 @@ void drop() { } void say(string x) { - ; grab(); output << string('\15') + x; } void pak(string x) { char r; - ; say(x + " (press any key...)"); r = readkey(); drop(); @@ -87,33 +81,28 @@ string typein() { char r; string x; string typein_result; - ; x = ""; do { r = readkey(); switch (r) { case '\10': if (x[0] > '\0') { - ; output << string('\10') + '\40' + '\10'; x[0] -= 1; } break; case '\15': { - ; typein_result = x; return typein_result; } break; case '\33': { - ; typein_result = ""; return typein_result; } break; default: if (x[0] < '\62') { - ; x = x + r; output << r; } @@ -125,7 +114,6 @@ string typein() { void load() { byte a /*absolute $A000:1200*/; untyped_file f; - ; say("LOAD: filename?"); nam = typein(); drop(); @@ -133,20 +121,17 @@ void load() { assign(f, nam); reset(f, 1); if (ioresult != 0) { - ; pak("LOAD: file not found."); return; } seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; blockread(f, a, 12080); if (ioresult != 0) { - ; pak("LOAD: error whilst loading."); close(f); return; @@ -164,14 +149,12 @@ void save() { searchrec s; char r; byte a /*absolute $A000:1200*/; - ; say("SAVE: filename?"); nam = typein(); drop(); if (nam == "") return; findfirst(nam, anyfile, s); if (doserror == 0) { - ; say("SAVE: That exists, are you sure\? (Y/N)"); do { r = upcase(readkey()); @@ -185,14 +168,12 @@ void save() { blockwrite(f, header[1], 146); blockwrite(f, screenname, 31); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; port[0x3cf] = bit; blockwrite(f, a, 12080); if (ioresult != 0) { - ; pak("SAVE: error whilst saving."); close(f); return; @@ -201,9 +182,7 @@ void save() { } void hedges() { - ; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -215,7 +194,6 @@ void hedges() { void reset_() { registers regs; - ; regs.ax = 14; intr(0x10, regs); directvideo = false; @@ -223,7 +201,6 @@ void reset_() { void do_pop() { char r; - ; do { say("HIZ: Load Save Hedges Reset eXit?"); r = upcase(readkey()); @@ -252,14 +229,12 @@ void do_pop() { void mypoprtn() { registers r; - ; beginpop; do_pop(); endpop; } /**********************/ void stop_tsr() { - ; if (tsrexit) output << "HIZ stopped" << NL; else @@ -273,7 +248,6 @@ void stop_tsr() { void tsr_intrtn(word flags, word cs, word ip, word ax, word bx, word cx, word dx, word si, word di, word ds, word es, word bp) /*interrupt;*/ { - ; tsr_ax = ax; cli; beginint; @@ -281,18 +255,15 @@ void tsr_intrtn(word flags, word cs, word ip, word ax, word bx, word cx, word dx switch (tsr_ax) { case 1: { - ; stop_tsr(); /* Terminate TSR, if poss.*/ } break; case 2: { - ; tsroff = true; /* Suspend TSR */ output << "HIZ suspended." << NL; } break; case 3: { - ; tsroff = false; output << "HIZ restarted" << NL; } @@ -310,7 +281,6 @@ boolean b; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; /********************************************/ /* Check to see if TSR is already installed */ @@ -335,17 +305,14 @@ int main(int argc, const char *argv[]) { else r.ax = 4; if (r.ax < 4) { - ; intr(tsr_int, r); return 0; } else { - ; output << "HIZ: invalid parameter " << paramstr(1) << NL; output << "Syntax: HIZ stop/hold/rstr" << NL; return 0; } } else { - ; output << "HIZ already installed." << NL; output << "(If you're sure it isn't, try running BLANKINT /I." << NL; output << "It's in the TURBO directory.)" << NL; diff --git a/engines/avalanche/initxf.cpp b/engines/avalanche/initxf.cpp index 46ad0a4b2c..ba91e79874 100644 --- a/engines/avalanche/initxf.cpp +++ b/engines/avalanche/initxf.cpp @@ -40,14 +40,12 @@ inirex x; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; assign(i, "v:init0.dat"); reset(i); assign(o, "v:init.avd"); rewrite(o); while (! eof(i)) { - ; i >> x.a >> NL; i >> x.num >> NL; o << x; diff --git a/engines/avalanche/inputtes.cpp b/engines/avalanche/inputtes.cpp index bfb2db11e9..c1fbc214a6 100644 --- a/engines/avalanche/inputtes.cpp +++ b/engines/avalanche/inputtes.cpp @@ -39,9 +39,7 @@ char r; void plottext() { byte x, y; - ; for (y = 0; y <= 7; y ++) { - ; for (x = 1; x <= length(current); x ++) mem[0xa000 * 12880 + y * 80 + x] = font[current[x]][y]; fillchar(mem[0xa000 * 12881 + y * 80 + x], 79 - x, '\0'); @@ -50,7 +48,6 @@ void plottext() { void loadfont() { file<fonttype> f; - ; assign(f, "c:\\thomas\\ttsmall.fnt"); reset(f); f >> font; @@ -59,7 +56,6 @@ void loadfont() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\turbo"); diff --git a/engines/avalanche/intro.cpp b/engines/avalanche/intro.cpp index b23bd1cc65..b2583acde9 100644 --- a/engines/avalanche/intro.cpp +++ b/engines/avalanche/intro.cpp @@ -263,7 +263,6 @@ void load_text() { thisline += 1; break; case '\12':/*nop*/ - ; break; default: x[thisline] = x[thisline] + *c; @@ -631,7 +630,6 @@ int main(int argc, const char *argv[]) { displaycounter += 1; do { - ; } while (!(*skellern > 0)); } diff --git a/engines/avalanche/ints.cpp b/engines/avalanche/ints.cpp index f15e68bef6..3a9459ced9 100644 --- a/engines/avalanche/ints.cpp +++ b/engines/avalanche/ints.cpp @@ -37,18 +37,15 @@ void() old1b; boolean quicko; void new1b() { /* interrupt; */ - ; quicko = true; } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; getintvec(0x1b, &old1b); setintvec(0x1b, addr(new1b())); quicko = false; do { - ; } while (!quicko); setintvec(0x1b, &old1b); /* r.ah:=$02; intr($16,r); diff --git a/engines/avalanche/joysetup.cpp b/engines/avalanche/joysetup.cpp index 7569199d33..1faef823ff 100644 --- a/engines/avalanche/joysetup.cpp +++ b/engines/avalanche/joysetup.cpp @@ -44,10 +44,8 @@ boolean detect() { word x, y, xo, yo; byte count; boolean detect_result; - ; count = 0; if (joystickpresent) { - ; detect_result = true; return detect_result; } @@ -55,7 +53,6 @@ boolean detect() { do { if (count < 7) count += 1; /* Take advantage of "flutter" */ if (count == 6) { - ; output << "The Bios says you don't have a joystick. However, it's often wrong" << NL; output << "about such matters. So, do you? If you do, move joystick A to" << NL; output << "continue. If you don't, press any key to cancel." << NL; @@ -67,9 +64,7 @@ boolean detect() { } void display() { - ; { - ; gotoxy(20, 10); output << "X min: " << js.xmin << " "; gotoxy(20, 11); @@ -83,11 +78,9 @@ void display() { void getmaxmin() { word x, y; - ; output << "Rotate the joystick around in a circle, as far from the centre as it" << NL; output << "can get. Then click a button." << NL; { - ; js.xmax = 0; js.xmin = maxint; js.ymax = 0; @@ -96,7 +89,6 @@ void getmaxmin() { do { readjoya(x, y); { - ; if (x < js.xmin) js.xmin = x; if (y < js.ymin) js.ymin = y; if (x > js.xmax) js.xmax = x; @@ -105,19 +97,16 @@ void getmaxmin() { } } while (!(buttona1 | buttona2)); do { - ; } while (!(~(buttona1 | buttona2))); output << NL; output << "Thank you. Now please centre your joystick and hit a button." << NL; do { - ; } while (!(buttona1 | buttona2)); readjoya(js.xmid, js.ymid); } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 2; clrscr; output << "Avalot joystick setup routine- by TT. Thanks go to David B. Howorth." << NL; diff --git a/engines/avalanche/joystick.cpp b/engines/avalanche/joystick.cpp index 8b9496ccf1..57efc18546 100644 --- a/engines/avalanche/joystick.cpp +++ b/engines/avalanche/joystick.cpp @@ -83,7 +83,6 @@ boolean newbios() { /*$F+*/ void oldreadjoy(byte xbit, byte ybit, word &xaxis, word &yaxis) { - ; /* inline( $BA/$01/$02/ {mov dx, 201h ;load dx with joystick port address } diff --git a/engines/avalanche/loading.cpp b/engines/avalanche/loading.cpp index 234b5773b8..faacafc4f4 100644 --- a/engines/avalanche/loading.cpp +++ b/engines/avalanche/loading.cpp @@ -36,14 +36,12 @@ untyped_file f; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); assign(f, "c:\\sleep\\test.ega"); reset(f, 1); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/logger.cpp b/engines/avalanche/logger.cpp index 06c2f2969a..3b1225188f 100644 --- a/engines/avalanche/logger.cpp +++ b/engines/avalanche/logger.cpp @@ -79,14 +79,12 @@ byte scroll_line_length; void centre(byte size, byte x) { /* Prints req'd number of spaces. */ byte fv; - ; if (~ logging) return; for (fv = 1; fv <= size - (x / 2); fv ++) output << logfile << ' '; } void log_setup(string name, boolean printing) { /* Sets up. */ - ; assign(logfile, name); rewrite(logfile); output << logfile << startwith; @@ -102,10 +100,8 @@ void log_setup(string name, boolean printing) { /* Sets up. */ void log_divider() { /* Prints the divider sign. */ byte fv; - ; if (~ logging) return; if (log_epson) { - ; output << logfile << string(' ') + double_width; for (fv = 1; fv <= divide_indent; fv ++) output << logfile << ' '; output << logfile << string(' ') + double_off; @@ -115,7 +111,6 @@ void log_divider() { /* Prints the divider sign. */ } void log_command(string x) { /* Prints a command */ - ; if (~ logging) return; if (log_epson) output << logfile << double_width + '>' + double_off + ' ' + italic + x + italic_off << NL; @@ -124,14 +119,12 @@ void log_command(string x) { /* Prints a command */ } void log_addstuff(string x) { - ; if (~ logging) return; scroll_line = scroll_line + x; } void log_scrollchar(string x) { /* print one character */ varying_string<2> z; - ; if (~ logging) return; switch (x[1]) { case '`': @@ -151,7 +144,6 @@ void log_scrollchar(string x) { /* print one character */ } void log_italic() { - ; if (~ logging) return; if (log_epson) log_addstuff(italic); @@ -160,7 +152,6 @@ void log_italic() { } void log_roman() { - ; if (~ logging) return; if (log_epson) log_addstuff(italic_off); @@ -169,20 +160,17 @@ void log_roman() { } void log_epsonroman() { /* This only sends the Roman code if you're on Epson.*/ - ; if (~ logging) return; if (log_epson) log_addstuff(italic_off); } void log_scrollline() { /* Set up a line for the scroll driver */ - ; scroll_line_length = 0; scroll_line = ""; } void log_scrollendline(boolean centred) { byte x, fv; - ; if (~ logging) return; x = 17; if (centred) x += (50 - scroll_line_length) / 2; @@ -192,27 +180,22 @@ void log_scrollendline(boolean centred) { void log_bubbleline(byte linenum, byte whom, string x) { byte fv; - ; if (~ logging) return; if (linenum == 1) { - ; for (fv = 1; fv <= 15; fv ++) output << logfile << ' '; output << logfile << italic + tr[whom].a.name + ": " + italic_off + x << NL; } else { - ; for (fv = 1; fv <= 17; fv ++) output << logfile << ' '; output << logfile << x << NL; } } void log_newline() { - ; if (logging) output << logfile << NL; } void log_newroom(string where) { byte fv; - ; if (~ logging) return; for (fv = 1; fv <= 20; fv ++) output << logfile << ' '; if (log_epson) output << logfile << emph_on; @@ -224,7 +207,6 @@ void log_newroom(string where) { void log_aside(string what) /* This writes "asides" to the printer. For example, moves in Nim. */ { - ; if (~ logging) return; output << logfile << " (" << italic << what << italic_off << ')' << NL; /* "What" is what to write. */ @@ -232,7 +214,6 @@ void log_aside(string what) void log_score(word credit, word now) { byte fv; - ; if (~ logging) return; for (fv = 1; fv <= 50; fv ++) output << logfile << ' '; output << logfile << "Score " << italic << "credit : " << credit << italic_off << " total : " << now << NL; diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp index 01916ce049..f7afeec931 100644 --- a/engines/avalanche/lucerna.cpp +++ b/engines/avalanche/lucerna.cpp @@ -111,7 +111,6 @@ void draw_also_lines() { on_virtual(); break; case 2 : - ; break; /* zzzz, it was off anyway */ case 3 : on(); @@ -140,7 +139,6 @@ static void unscramble(); static void scram1(string &x) { byte fz; - ; for (fz = 1; fz <= length(x); fz ++) x[fz] = chr(ord(x[fz]) ^ 177); } @@ -1396,7 +1394,6 @@ void mblit(byte x1, byte y1, byte x2, byte y2, byte f, byte t) /* assembler; */ pop ds; { Get it back again (or we'll be in trouble with TP!) } */ { - ; } void blitfix() { @@ -1651,7 +1648,6 @@ asm @TheEnd: */ { - ; } void sprite_run() diff --git a/engines/avalanche/magic2.cpp b/engines/avalanche/magic2.cpp index 0845a05271..c3822a392a 100644 --- a/engines/avalanche/magic2.cpp +++ b/engines/avalanche/magic2.cpp @@ -38,7 +38,6 @@ word next, gg; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -48,12 +47,10 @@ int main(int argc, const char *argv[]) { rewrite(out); move(mem[0xa000 * 0], mem[0xa000 * pagetop], 16000); while (! eof(magic)) { - ; magic >> next; if (next != nextcode) mem[0xa000 * next] = 255; else { - ; for (gg = 0; gg <= 16000; gg ++) if (mem[0xa000 * gg] != mem[0xa000 * gg + pagetop]) out << gg; diff --git a/engines/avalanche/magidraw.cpp b/engines/avalanche/magidraw.cpp index 0f280c29e0..32f85108f2 100644 --- a/engines/avalanche/magidraw.cpp +++ b/engines/avalanche/magidraw.cpp @@ -39,7 +39,6 @@ array<1, 16401, word> buffer; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -49,9 +48,8 @@ int main(int argc, const char *argv[]) { close(magic); /* while not eof(magic) do*/ for (gd = 1; gd <= 16401; gd ++) { - ; /* read(magic,next); - if next<>nextcode then*/ + if next<>nextcode then*/ if (buffer[gd] != nextcode) mem[0xa000 * buffer[gd]] = 255; else diff --git a/engines/avalanche/magishuf.cpp b/engines/avalanche/magishuf.cpp index 2ef6e37fed..9d7edd76a5 100644 --- a/engines/avalanche/magishuf.cpp +++ b/engines/avalanche/magishuf.cpp @@ -43,20 +43,15 @@ circle c; file<circle> fc; void melt(byte c) { - ; for (gd = 1; gd <= 8000; gd ++) { - ; mem[0xa000 * b[gd]] = c; if ((gd % 17) == 0) delay(1); } } void magicirc(byte cc) { - ; for (gd = 1; gd <= 16401; gd ++) { - ; if (c[gd] != nextcode) { - ; if (odd(c[gd])) mem[0xa000 * c[gd] / 2] = cc; } else delay(1); @@ -65,7 +60,6 @@ void magicirc(byte cc) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; r.ax = 13; intr(0x10, r); assign(f, "d:shuffle.avd"); diff --git a/engines/avalanche/make!.cpp b/engines/avalanche/make!.cpp index a4cf27801f..4a4b274009 100644 --- a/engines/avalanche/make!.cpp +++ b/engines/avalanche/make!.cpp @@ -38,14 +38,12 @@ string x; boolean subpix(integer x, integer y) { boolean subpix_result; - ; subpix_result = getpixel(x, y) == 15; return subpix_result; } byte pixel(integer x, integer y) { byte pixel_result; - ; pixel_result = (byte)( subpix(x * 4, y * 2) || subpix(x * 4 + 1, y * 2) || @@ -61,7 +59,6 @@ byte pixel(integer x, integer y) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 1; initgraph(gd, gm, "o:"); @@ -76,7 +73,6 @@ int main(int argc, const char *argv[]) { assign(t, "d:avalot.txt"); rewrite(t); for (gm = 1; gm <= 36; gm ++) { - ; x = ""; for (gd = 1; gd <= 106; gd ++) switch (getpixel(gd, gm * 2 + 181) * 2 + getpixel(gd, gm * 2 + 182)) { diff --git a/engines/avalanche/makeregi.cpp b/engines/avalanche/makeregi.cpp index 35b37d227f..f3b5c4cb07 100644 --- a/engines/avalanche/makeregi.cpp +++ b/engines/avalanche/makeregi.cpp @@ -11,7 +11,7 @@ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License @@ -29,143 +29,148 @@ namespace Avalanche { -const array<1,56,char> padding = -"For all the Etruscan armies were ranged beneath his eye"; +const array<1, 56, char> padding = + "For all the Etruscan armies were ranged beneath his eye"; -text txi,txo; -string x,y; +text txi, txo; +string x, y; word fv; file<byte> f; -byte sum,n; -string name,number; +byte sum, n; +string name, number; -string chkname,chknum,regname,regnum; +string chkname, chknum, regname, regnum; - char decode1(char c) - { - byte b; +char decode1(char c) { + byte b; - char decode1_result; - b=ord(c)-32; - decode1_result=chr(( (b & 0xf) << 3) + ((cardinal)(b & 0x70) >> 4)); - return decode1_result; - } + char decode1_result; + b = ord(c) - 32; + decode1_result = chr(((b & 0xf) << 3) + ((cardinal)(b & 0x70) >> 4)); + return decode1_result; +} - char encode1(char c) - { - byte b; +char encode1(char c) { + byte b; - char encode1_result; - b=ord(c); - b=( (cardinal)(b & 0x78) >> 3) + ((b & 0x7) << 4); - encode1_result=chr(b+32); - return encode1_result; - } + char encode1_result; + b = ord(c); + b = ((cardinal)(b & 0x78) >> 3) + ((b & 0x7) << 4); + encode1_result = chr(b + 32); + return encode1_result; +} - char encode2(char c) - { - char encode2_result; - encode2_result=chr((((ord(c) & 0xf) << 2)+0x43)); - return encode2_result; - } +char encode2(char c) { + char encode2_result; + encode2_result = chr((((ord(c) & 0xf) << 2) + 0x43)); + return encode2_result; +} - string enc1(string x) - { - string y; byte fv; +string enc1(string x) { + string y; + byte fv; - string enc1_result; - y=x; for( fv=1; fv <= length(y); fv ++) y[fv]=encode1(y[fv]); - enc1_result=y; - return enc1_result; - } + string enc1_result; + y = x; + for (fv = 1; fv <= length(y); fv ++) y[fv] = encode1(y[fv]); + enc1_result = y; + return enc1_result; +} - string enc2(string x) - { - string y; byte fv; +string enc2(string x) { + string y; + byte fv; - string enc2_result; - y=x; for( fv=1; fv <= length(y); fv ++) y[fv]=encode2(y[fv]); - enc2_result=y; - return enc2_result; - } + string enc2_result; + y = x; + for (fv = 1; fv <= length(y); fv ++) y[fv] = encode2(y[fv]); + enc2_result = y; + return enc2_result; +} - boolean checker(string proper,string check) - { - byte fv; boolean ok; +boolean checker(string proper, string check) { + byte fv; + boolean ok; - boolean checker_result; - ok=true; - for( fv=1; fv <= length(proper); fv ++) - if ((ord(proper[fv]) & 0xf)!=((cardinal)(ord(check[fv])-0x43) >> 2)) - ok=false; + boolean checker_result; + ok = true; + for (fv = 1; fv <= length(proper); fv ++) + if ((ord(proper[fv]) & 0xf) != ((cardinal)(ord(check[fv]) - 0x43) >> 2)) + ok = false; - checker_result=ok; - return checker_result; - } + checker_result = ok; + return checker_result; +} - void unscramble() - { - byte namelen,numlen; +void unscramble() { + byte namelen, numlen; - namelen=107-ord(x[1]); numlen=107-ord(x[2]); + namelen = 107 - ord(x[1]); + numlen = 107 - ord(x[2]); - regname=copy(x,3,namelen); - regnum=copy(x,4+namelen,numlen); - chkname=copy(x,4+namelen+numlen,namelen); - chknum=copy(x,4+namelen+numlen+namelen,numlen); + regname = copy(x, 3, namelen); + regnum = copy(x, 4 + namelen, numlen); + chkname = copy(x, 4 + namelen + numlen, namelen); + chknum = copy(x, 4 + namelen + numlen + namelen, numlen); - for( fv=1; fv <= namelen; fv ++) regname[fv]=decode1(regname[fv]); - for( fv=1; fv <= numlen; fv ++) regnum[fv]=decode1(regnum[fv]); + for (fv = 1; fv <= namelen; fv ++) regname[fv] = decode1(regname[fv]); + for (fv = 1; fv <= numlen; fv ++) regnum[fv] = decode1(regnum[fv]); - if ((! checker(regname,chkname)) || (! checker(regnum,chknum))) - { - output << "CHECK ERROR: " << regname << '/' << chkname << ';' << regnum << '/' << chknum << '.' << NL; - exit(0); - } else output << "--- Passed both checks. ---" << NL; - } + if ((! checker(regname, chkname)) || (! checker(regnum, chknum))) { + output << "CHECK ERROR: " << regname << '/' << chkname << ';' << regnum << '/' << chknum << '.' << NL; + exit(0); + } else output << "--- Passed both checks. ---" << NL; +} -int main(int argc, const char* argv[]) -{ +int main(int argc, const char *argv[]) { - pio_initialize(argc, argv); - output << "Name? "; input >> name >> NL; - output << "Number? "; input >> number >> NL; + pio_initialize(argc, argv); + output << "Name? "; + input >> name >> NL; + output << "Number? "; + input >> number >> NL; - x=string(chr(107-ord(name[0])))+chr(107-ord(number[0])); + x = string(chr(107 - ord(name[0]))) + chr(107 - ord(number[0])); - x=x+enc1(name)+'J'+enc1(number)+enc2(name)+enc2(number); + x = x + enc1(name) + 'J' + enc1(number) + enc2(name) + enc2(number); - number=""; fv=1; - while ((length(number)+length(x))<57) - { - number=number+padding[fv-1]; fv=fv+1; - } - x=x+enc1(number); + number = ""; + fv = 1; + while ((length(number) + length(x)) < 57) { + number = number + padding[fv - 1]; + fv = fv + 1; + } + x = x + enc1(number); - output << x << NL; output << NL; - unscramble(); + output << x << NL; + output << NL; + unscramble(); - assign(txi,"v:register.raw"); reset(txi); - assign(txo,"a:register.dat"); rewrite(txo); + assign(txi, "v:register.raw"); + reset(txi); + assign(txo, "a:register.dat"); + rewrite(txo); - for( fv=1; fv <= 53; fv ++) - { - txi >> y >> NL; txo << y << NL; - } + for (fv = 1; fv <= 53; fv ++) { + txi >> y >> NL; + txo << y << NL; + } - txi >> y >> NL; txo << x << NL; + txi >> y >> NL; + txo << x << NL; - while (! eof(txi)) - { - txi >> y >> NL; txo << y << NL; - } + while (! eof(txi)) { + txi >> y >> NL; + txo << y << NL; + } - close(txi); close(txo); - return EXIT_SUCCESS; + close(txi); + close(txo); + return EXIT_SUCCESS; } } // End of namespace Avalanche.
\ No newline at end of file diff --git a/engines/avalanche/makesez.cpp b/engines/avalanche/makesez.cpp index 1307f17515..cba5b61b5b 100644 --- a/engines/avalanche/makesez.cpp +++ b/engines/avalanche/makesez.cpp @@ -46,14 +46,12 @@ char check; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; fillchar(x, sizeof(x), '\261'); x = string("This is a Sez file for an Avvy game, and its contents are subject") + crlf + "to copyright. Have fun with the game!" + crlf + crlf + tabs + "tt" + crlf + crlf + "[Lord Avalot D'Argent]" + crlf + crlf + eof_ + crlf + crlf + "Thomas was here!"; { - ; header.initials = "TT"; header.gamecode = 2; /* code for Avalot */ header.revision = 100; /* version 1.00 */ diff --git a/engines/avalanche/makevmou.cpp b/engines/avalanche/makevmou.cpp index 3b71276a61..4d3b3ba22f 100644 --- a/engines/avalanche/makevmou.cpp +++ b/engines/avalanche/makevmou.cpp @@ -46,7 +46,7 @@ struct vmctype { /* Virtual Mouse Cursor */ }; const array<1, 9, arrowtype> mps = { - { { + { { /* 1 - up-arrow */ ((65151, 64575, 64575, 63519, 63519, 61455, 61455, 57351, 57351, 49155, 49155, 64575, 64575, 64575, 64575, 64575), (0, 384, 384, 960, 960, 2016, 2016, 4080, 4080, 8184, 384, 384, 384, 384, 384, 0)), @@ -135,15 +135,12 @@ integer plx, ply; word swapbits(word a) { word swapbits_result; - ; swapbits_result = lo(a) * 256 + hi(a); return swapbits_result; } void plot_vmc(integer xx, integer yy, byte page_) { - ; { - ; xx = xx + vmc.ofsx; yy = yy + vmc.ofsy; @@ -152,7 +149,6 @@ void plot_vmc(integer xx, integer yy, byte page_) { putimage(xx, yy, vmc.xorpic, xorput); { pointtype &with1 = vmc.wherewas[page_]; - ; with1.x = xx; with1.y = yy; } @@ -160,7 +156,6 @@ void plot_vmc(integer xx, integer yy, byte page_) { } void wipe_vmc(byte page_) { - ; { pointtype &with1 = vmc.wherewas[page_]; if (with1.x != maxint) @@ -170,16 +165,13 @@ void wipe_vmc(byte page_) { void setup_vmc() { byte fv; - ; /* gd:=imagesize(0,0,15,15);*/ { - ; getmem(vmc.andpic, mouse_size); getmem(vmc.xorpic, mouse_size); for (fv = 0; fv <= 1; fv ++) { - ; getmem(vmc.backpic[fv], mouse_size); vmc.wherewas[fv].x = maxint; } @@ -187,13 +179,11 @@ void setup_vmc() { } void show_off_mouse() { - ; setcolor(14); settextstyle(0, 0, 2); for (gm = 0; gm <= 1; gm ++) { - ; setactivepage(gm); setfillstyle(1, blue); bar(0, 0, getmaxx(), getmaxy()); @@ -212,7 +202,6 @@ void show_off_mouse() { wipe_vmc(gd); if (plot > 0) { - ; putpixel(plx, ply, red); plot -= 1; } @@ -220,7 +209,6 @@ void show_off_mouse() { plot_vmc(mx, my, gd); if ((mkey == left) && (plot == 0)) { - ; plot = 2; plx = mx; ply = my; @@ -229,7 +217,6 @@ void show_off_mouse() { } while (!(mkey == right)); for (gm = 0; gm <= 1; gm ++) { - ; setactivepage(1 - gm); wipe_vmc(gm); } @@ -239,7 +226,6 @@ void show_off_mouse() { } void grab_cursor(byte n) { - ; getimage(32 * n - 16, 0, 32 * n - 1, 15, vmc.andpic); getimage(32 * n - 16, 20, 32 * n - 1, 35, vmc.xorpic); } @@ -247,14 +233,12 @@ void grab_cursor(byte n) { void save_mice() { untyped_file f; byte fv; - ; assign(f, "v:mice.avd"); rewrite(f, 1); blockwrite(f, mice_header, mouse_size); for (fv = 1; fv <= 9; fv ++) { - ; grab_cursor(fv); putimage(100, 100, vmc.xorpic, 0); blockwrite(f, vmc.andpic, mouse_size); @@ -266,19 +250,16 @@ void save_mice() { void load_a_mouse(byte which) { untyped_file f; - ; assign(f, "v:mice.avd"); reset(f, 1); seek(f, mouse_size * 2 * (which - 1) + 134); { - ; blockread(f, vmc.andpic, mouse_size); blockread(f, vmc.xorpic, mouse_size); close(f); { void &with1 = mps[which]; - ; vmc.ofsx = -horzhotspot; vmc.ofsy = -verthotspot; @@ -290,7 +271,6 @@ void load_a_mouse(byte which) { } void draw_mouse_cursors() { - ; for (fv = 1; fv <= 9; fv ++) for (gm = 0; gm <= 1; gm ++) for (gd = 0; gd <= 15; gd ++) @@ -299,7 +279,6 @@ void draw_mouse_cursors() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/minstran.cpp b/engines/avalanche/minstran.cpp index 3a88863acc..b60796461f 100644 --- a/engines/avalanche/minstran.cpp +++ b/engines/avalanche/minstran.cpp @@ -37,14 +37,11 @@ void mblit(integer x1, integer y1, integer x2, integer y2) { /* Minstrel Blitter integer yy, len, pp; byte bit; const integer offset = 16384; - ; x1 = x1 / 8; len = ((x2 / 8) - x1) + 1; for (yy = y1; yy <= y2; yy ++) { - ; pp = yy * 80 + x1; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -61,7 +58,6 @@ const integer fy2 = 145; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); diff --git a/engines/avalanche/newsprit.cpp b/engines/avalanche/newsprit.cpp index e5c4774428..579799a2bd 100644 --- a/engines/avalanche/newsprit.cpp +++ b/engines/avalanche/newsprit.cpp @@ -73,9 +73,7 @@ untyped_file out; integer bigsize; void copyaoa() { - ; { - ; a.name = oa.name; a.comment = "Transferred"; a.num = oa.num; @@ -90,7 +88,6 @@ void copyaoa() { void setup() { integer gd, gm; - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -99,7 +96,6 @@ void setup() { string strf(longint x) { string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; @@ -112,10 +108,8 @@ void save() { byte xw; byte nxl, nyl; word soa; - ; cleardevice(); { - ; a.xl = 45; a.yl = 10; a.num = 1; @@ -136,7 +130,6 @@ void save() { if ((nxl % 8) > 0) xw += 1; for (n = 1; n <= a.num; n ++) { - ; getimage(0, 0, a.xl, a.yl, aa); for (fv = 0; fv <= nyl; fv ++) blockwrite(out, aa[5 + fv * xw * 4], xw); @@ -149,7 +142,6 @@ void save() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; setup(); save(); diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp index 238908cf9f..9c1f2c6a23 100644 --- a/engines/avalanche/nim.cpp +++ b/engines/avalanche/nim.cpp @@ -50,20 +50,17 @@ shortint mnum, mrow; registers r; void resetmouse() { - ; r.ax = 0; intr(0x33, r); squeak = r.ax > 0; } void show() { - ; r.ax = 1; intr(0x33, r); } void hide() { - ; r.ax = 2; intr(0x33, r); } @@ -71,9 +68,7 @@ void hide() { void chalk(integer x, integer y, string z) { const array<0, 3, byte> greys = {{0, 8, 7, 15}}; byte fv; - ; for (fv = 0; fv <= 3; fv ++) { - ; setcolor(greys[fv]); outtextxy(x - fv, y, z); sound(fv * 100 * length(z)); @@ -87,7 +82,6 @@ void setup() { untyped_file f; integer gd, gm; byte bit; - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -97,7 +91,6 @@ void setup() { seek(f, 41); for (gm = 0; gm <= 22; gm ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -107,7 +100,6 @@ void setup() { for (gd = 1; gd <= 3; gd ++) for (gm = 0; gm <= 22; gm ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -116,7 +108,6 @@ void setup() { } for (gm = 0; gm <= 36; gm ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -161,11 +152,9 @@ void setup() { void plotstone(byte x, byte y) { byte fv, bit; word ofs; - ; ofs = 3200 + y * 2800 + x * 8; for (fv = 0; fv <= 22; fv ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -176,7 +165,6 @@ void plotstone(byte x, byte y) { void board() { byte fv, ff; - ; for (fv = 1; fv <= 3; fv ++) for (ff = 1; ff <= stones[fv]; ff ++) plotstone(ff, fv); @@ -185,7 +173,6 @@ void board() { void startmove() { varying_string<2> tstr; integer ypos; - ; turns += 1; str(turns, 2, tstr); ypos = 63 + turns * 10; @@ -197,7 +184,6 @@ void startmove() { void show_changes() { byte fv, ff, fq; - ; chalk(573, 63 + turns * 10, string(chr(64 + row)) + chr(48 + number)); for (fv = 1; fv <= 3; fv ++) if (old[fv] > stones[fv]) @@ -209,7 +195,6 @@ void show_changes() { void checkmouse(); static void blip() { - ; sound(1771); delay(3); nosound; @@ -217,9 +202,7 @@ static void blip() { } void checkmouse() { - ; { - ; ax = 5; bx = 0; } @@ -237,20 +220,17 @@ void checkmouse() { void takesome(); static void less() { - ; if (number > 1) number -= 1; } void takesome() { char r; byte sr; - ; number = 1; do { do { sr = stones[row]; if (sr == 0) { - ; row = row % 3 + 1; number = 1; } @@ -270,12 +250,10 @@ void takesome() { rectangle(63 + (sr - number) * 64, 38 + 35 * row, 54 + sr * 64, 63 + 35 * row); if (clicked) { - ; number = mnum; row = mrow; return; } else { - ; switch (r) { case '\0': switch (readkey()) { @@ -327,7 +305,6 @@ void takesome() { void endofgame() { char rr; - ; chalk(595, 63 + turns * 10, "Wins!"); outtextxy(100, 190, "- - - Press any key... - - -"); while (keypressed()) rr = readkey(); @@ -360,10 +337,8 @@ static boolean find(byte x) boolean q; byte p; boolean find_result; - ; q = false; for (p = 1; p <= 3; p ++) if (stones[p] == x) { - ; q = true; inap[p] = true; } @@ -375,7 +350,6 @@ static boolean find(byte x) static void find_ap(byte start, byte stepsize) { byte ff; - ; matches = 0; fillchar(inap, sizeof(inap), '\0'); /* blank 'em all */ for (ff = 0; ff <= 2; ff ++) if (find(start + ff * stepsize)) matches += 1; @@ -388,7 +362,6 @@ static void find_ap(byte start, byte stepsize) { switch (matches) { case 2: { - ; for (ff = 1; ff <= 3; ff ++) /* find which one didn't fit the A.P. */ if (! inap[ff]) ooo = ff; if (stones[ooo] > (start + thisone * stepsize)) { /* check it's possible! */ @@ -416,13 +389,10 @@ void dogfood() { boolean sorted; byte temp; - ; live = 0; lmo = false; for (fv = 1; fv <= 3; fv ++) { - ; if (stones[fv] > 0) { - ; live += 1; r[live] = fv; sr[live] = stones[fv]; @@ -430,22 +400,18 @@ void dogfood() { } switch (live) { case 1: { /* Only one is free- so take 'em all */ - ; row = r[1]; number = stones[r[1]]; return; } break; case 2: { /* Two are free- make them equal */ - ; if (sr[1] > sr[2]) { - ; row = r[1]; number = sr[1] - sr[2]; return; } else /* T > b */ if (sr[1] < sr[2]) { - ; row = r[2]; number = sr[2] - sr[1]; return; @@ -458,15 +424,13 @@ void dogfood() { } break; case 3: { /* Ho hum... this'll be difficult! */ - ; /* There are three possible courses of action when we have 3 lines left: - 1) Look for 2 equal lines, then take the odd one out. - 2) Look for A.P.s, and capitalise on them. - 3) Go any old where. */ + 1) Look for 2 equal lines, then take the odd one out. + 2) Look for A.P.s, and capitalise on them. + 3) Go any old where. */ for (fv = 1; fv <= 3; fv ++) /* Look for 2 equal lines */ if (stones[other[fv][1]] == stones[other[fv][2]]) { - ; row = fv; /* this row */ number = stones[fv]; /* all of 'em */ return; } @@ -474,7 +438,6 @@ void dogfood() { sorted = true; for (fv = 1; fv <= 2; fv ++) if (sr[fv] > sr[fv + 1]) { - ; temp = sr[fv + 1]; sr[fv + 1] = sr[fv]; sr[fv] = temp; @@ -486,7 +449,6 @@ void dogfood() { } while (!sorted); /* Now we look for A.P.s ... */ for (fv = 1; fv <= 3; fv ++) { - ; find_ap(fv, 1); /* there are 3 "1"s */ if (lmo) return; /* cut-out */ } @@ -504,7 +466,6 @@ void dogfood() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; setup(); board(); do { diff --git a/engines/avalanche/nimdraw.cpp b/engines/avalanche/nimdraw.cpp index 9464d64d8e..7a40e93b2d 100644 --- a/engines/avalanche/nimdraw.cpp +++ b/engines/avalanche/nimdraw.cpp @@ -36,7 +36,6 @@ untyped_file f; byte bit; void plot(char ch, byte x) { - ; setcolor(blue); outtextxy(x * 80 + 4, 0, ch); outtextxy(x * 80 + 10, 0, ch); @@ -56,7 +55,6 @@ void load() { varying_string<12> check; untyped_file f; word s; - ; assign(f, "c:\\avalot\\nimstone.avd"); reset(f, 1); seek(f, 85); @@ -71,7 +69,6 @@ void load() { void spludge(integer x, integer y, string z) { shortint dx, dy; - ; setcolor(15); for (dx = -1; dx <= 1; dx ++) for (dy = -1; dy <= 1; dy ++) @@ -82,7 +79,6 @@ void spludge(integer x, integer y, string z) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); @@ -123,7 +119,6 @@ int main(int argc, const char *argv[]) { for (gd = 0; gd <= 3; gd ++) for (gm = 7; gm <= 29; gm ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -132,7 +127,6 @@ int main(int argc, const char *argv[]) { } for (gm = 99; gm <= 135; gm ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/oldfiler.cpp b/engines/avalanche/oldfiler.cpp index 581f68abfb..e38ec30fa3 100644 --- a/engines/avalanche/oldfiler.cpp +++ b/engines/avalanche/oldfiler.cpp @@ -57,10 +57,8 @@ string answer; void split(string x) { byte fv; - ; x = copy(x, 4, 255); if (x == "") { - ; blank[0] = true; return; } @@ -68,7 +66,6 @@ void split(string x) { possible[0][1] = "b\\"; fv = 2; while (pos("\\", x) != 0) { - ; possible[0][fv] = string('b') + copy(x, 1, pos("\\", x) - 1); fv += 1; x = copy(x, pos("\\", x) + 1, 255); @@ -77,7 +74,6 @@ void split(string x) { } void block(integer x1, integer y1, integer x2, integer y2, string x) { - ; bar(x1, y1, x2, y2); setcolor(9); outtextxy(x1 + (x2 - x1) / 2 - 1, y1 + 5, x); @@ -86,12 +82,10 @@ void block(integer x1, integer y1, integer x2, integer y2, string x) { } void message(string x) { - ; block(5, 189, 640, 200, x); } void bigbar(byte x) { - ; bar(15 + 210 * x, 36, 210 + 210 * x, 187); } @@ -101,11 +95,9 @@ void getem(); static void sub_getem(char prefix, string spec, byte attrib, byte infonum) { searchrec s; byte fv; - ; fv = 0; findfirst(spec, attrib, s); while ((doserror == 0) && (fv < 100)) { - ; if (((s.attr & attrib) > 0) && (s.name[1] != '.')) { ; /* circumvent inclusive searching! */ fv += 1; @@ -119,7 +111,6 @@ static void sub_getem(char prefix, string spec, byte attrib, byte infonum) { void getem() { - ; message("Please wait... scanning directory..."); sub_getem('a', "*.asg", archive + hidden, 1); /* Scan for .ASG files */ sub_getem('f', "*.*", directory, 2); /* Scan for sub-directories */ @@ -127,16 +118,13 @@ void getem() void minisc(string &x) { /* Converts to lower-case */ byte fv; - ; for (fv = 1; fv <= length(x); fv ++) if ((x[fv] >= 'A') && (x[fv] <= 'Z')) x[fv] += 32; } void showall() { byte fv, ff; - ; for (fv = 0; fv <= 2; fv ++) { - ; bigbar(fv); /* blank out anything else */ if (blank[fv]) { ; /* nothing here at all */ @@ -151,7 +139,6 @@ void showall() { ; /* something here- what? */ setcolor(11); for (ff = 0; ff <= 15; ff ++) { - ; info[fv][ff + 2] = possible[fv][page_[fv] * 15 + ff + 1]; minisc(info[fv][ff + 2]); } @@ -161,7 +148,6 @@ void showall() { info[fv][18] = down; else info[fv][18] = ""; for (ff = 1; ff <= 18; ff ++) { - ; outtextxy(113 + 210 * fv, 35 + ff * 8, copy(info[fv][ff], 2, 255)); } } @@ -170,7 +156,6 @@ void showall() { } void changedir(string x) { - ; chdir(x); getdir(0, cdir); @@ -178,7 +163,6 @@ void changedir(string x) { void drawup() { integer gd; - ; block(15, 0, 630, 10, "Choose an .ASG file to load or save."); block(15, 24, 210, 34, "Looking back:"); block(225, 24, 420, 34, "Here:"); @@ -188,7 +172,6 @@ void drawup() { } void setup() { - ; settextjustify(1, 1); setfillstyle(1, 1); fillchar(blank, sizeof(blank), '\0'); @@ -202,7 +185,6 @@ void setup() { void setup1() { integer gd, gm; - ; gd = 3; gm = 0; initgraph(gd, gm, ""); @@ -224,7 +206,6 @@ void clickwait() { } }; byte oldcht; /* Click Here To... code */ - ; showmousecursor; oldcht = 177; do { @@ -241,7 +222,6 @@ void clickwait() { chtcode = 4; } if (oldcht != chtcode) { - ; hidemousecursor; message(string("Click here to ") + msg[chtcode]); showmousecursor; @@ -253,7 +233,6 @@ void clickwait() { } void blip() { - ; sound(32); delay(3); nosound; @@ -263,7 +242,6 @@ void do_cht() { char r; byte fv; string x; - ; if (chtcode == 1) { ; /* change drives */ message("Enter the drive letter (e.g. A)..."); @@ -271,7 +249,6 @@ void do_cht() { changedir(string(r) + ':'); setup(); } else { - ; x = info[chtcode - 2][where]; r = x[1]; x = copy(x, 2, 255); @@ -312,7 +289,6 @@ void do_cht() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; setup1(); do { clickwait(); diff --git a/engines/avalanche/oldhighs.cpp b/engines/avalanche/oldhighs.cpp index b53768f893..c95b9a2d91 100644 --- a/engines/avalanche/oldhighs.cpp +++ b/engines/avalanche/oldhighs.cpp @@ -64,10 +64,8 @@ tabletype table; byte ratingname(word x) { byte fv; byte ratingname_result; - ; for (fv = 9; fv >= 1; fv --) if (x >= ratings[fv].lowest) { - ; ratingname_result = fv; return ratingname_result; } /* bad style */ @@ -82,10 +80,8 @@ const string message = "A v a l o t : H i g h - S c o r e s"; static void sayfast(integer x, integer y) { integer anchor; byte fv; - ; anchor = -296; for (fv = 1; fv <= length(message); fv ++) { - ; if (message[fv - 1] != '\40') outtextxy(x + anchor, y - 8, message[fv - 1]); anchor += 16; } @@ -97,15 +93,12 @@ void title() { byte x; integer len; - ; settextstyle(0, 0, 2); /*settextjustify(1,1);*/ len = textheight(message); for (x = 6; x >= 0; x --) { - ; setcolor(shades[x]); sayfast(320 - x * 2, 20 - x); if (x > 0) { - ; sayfast(320 + x * 2, 20 - x); sayfast(320 + x * 2, 20 + x); sayfast(320 - x * 2, 20 + x); @@ -121,11 +114,9 @@ void newtable() { } }; byte fv; - ; fillchar(table, sizeof(table), '\261'); for (fv = 1; fv <= 12; fv ++) { scoretype &with = table.a[fv]; - ; with.name = names[fv]; with.score = 193 - fv * 16; } @@ -135,14 +126,12 @@ void newtable() { string strf(longint x) { /* From Gyro. Delete when integrated. */ string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; } void sparkle(integer x, integer y, string z) { - ; setcolor(cyan); outtextxy(x - 1, y - 1, z); setcolor(blue); @@ -153,7 +142,6 @@ void sparkle(integer x, integer y, string z) { void drawtable() { byte fv, last, now; - ; setfillstyle(1, 8); bar(0, 40, 105, 58); bar(110, 40, 400, 58); @@ -175,7 +163,6 @@ void drawtable() { last = 177; for (fv = 1; fv <= 12; fv ++) { scoretype &with = table.a[fv]; - ; settextjustify(righttext, bottomtext); sparkle(100, 60 + fv * 10, strf(fv) + '.'); sparkle(455, 60 + fv * 10, strf(with.score)); @@ -193,7 +180,6 @@ void drawtable() { } void message1(string x) { - ; setfillstyle(1, 8); bar(0, 190, 640, 200); settextjustify(1, 1); @@ -204,12 +190,10 @@ void sorthst() { byte fv; boolean ok; scoretype temp; - ; do { ok = true; for (fv = 1; fv <= 11; fv ++) if (table.a[fv].score < table.a[fv + 1].score) { - ; temp = table.a[fv]; table.a[fv] = table.a[fv + 1]; table.a[fv + 1] = temp; /* swap 'em */ @@ -224,7 +208,6 @@ static integer x, y; static void cursor(byte col) { - ; setcolor(col); outtextxy(x, y, "?"); } @@ -235,7 +218,6 @@ void entername() { integer counter; byte flash; - ; y = 60 + table.light * 10; i = ""; settextjustify(2, 0); @@ -246,7 +228,6 @@ void entername() { do { counter += 1; if (counter == 1000) { - ; cursor(4 + flash * 10); flash = 1 - flash; counter = 0; @@ -258,17 +239,13 @@ void entername() { r = readkey(); nosound; if (r == '\10') { - ; if (i[0] > '\0') { - ; bar(x - 17, y - 10, x - 8, y); i[0] -= 1; sparkle(x - 16, y, i[length(i)]); } } else { - ; if ((i[0] < '\42') && (r != '\15')) { - ; sparkle(x, y, r); i = i + r; } @@ -278,11 +255,9 @@ void entername() { } void newscore(word sc) { - ; { scoretype &with = table.a[12]; if (sc > with.score) { - ; with.name = ""; with.score = sc; table.light = 10; @@ -294,13 +269,11 @@ void newscore(word sc) { } /* too low for score */ message1("Press Space to continue..."); do { - ; } while (!(keypressed() && (readkey() == '\40'))); } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); diff --git a/engines/avalanche/oldincln.cpp b/engines/avalanche/oldincln.cpp index 89bc907051..b9b58265bf 100644 --- a/engines/avalanche/oldincln.cpp +++ b/engines/avalanche/oldincln.cpp @@ -60,7 +60,6 @@ string inihead, initail; /* For reading the .INI file. */ void linebug(byte which) { - ; output << "AVALOT : "; switch (which) { case bug_twonames : @@ -84,7 +83,6 @@ void linebug(byte which) { } void syntax() { - ; assign(output, ""); rewrite(output); output << NL; @@ -106,13 +104,11 @@ void syntax() { void upstr(string &x) { byte fv; - ; for (fv = 1; fv <= length(x); fv ++) x[fv] = upcase(x[fv]); } boolean yesno() { boolean yesno_result; - ; if (initail == "YES") yesno_result = true; else if (initail == "NO") yesno_result = false; else @@ -121,7 +117,6 @@ boolean yesno() { } void ini_parse() { - ; upstr(inihead); upstr(initail); @@ -135,7 +130,6 @@ void ini_parse() { void strip_ini() { byte fv; - ; if (inihead == "") return; /* Firstly, delete any comments. */ @@ -165,12 +159,10 @@ void strip_ini() { void load_ini() { text ini; - ; assign(ini, "AVALOT.INI"); reset(ini); while (! eof(ini)) { - ; ini >> inihead >> NL; strip_ini(); if (inihead != "") ini_parse(); @@ -184,7 +176,6 @@ static string arg; static string getarg(string otherwis) { string getarg_result; - ; if (arg == "") getarg_result = otherwis; else getarg_result = ""; return getarg_result; @@ -193,11 +184,9 @@ static string getarg(string otherwis) { void parse(string x) { - ; switch (x[1]) { case '/': case '-': { - ; arg = copy(x, 3, 255); switch (upcase(x[2])) { case '?': @@ -208,22 +197,18 @@ void parse(string x) break; case 'L': if (! usingp) { - ; log_setup(getarg("avvy.log"), false); usingl = true; } else { - ; close(logfile); linebug(bug_pandl); } break; case 'P': if (! usingl) { - ; log_setup(getarg("prn"), true); usingp = true; } else { - ; close(logfile); linebug(bug_pandl); } @@ -241,7 +226,6 @@ void parse(string x) demo = true; break; default: { - ; bugline = x; linebug(bug_weirdswitch); } @@ -249,7 +233,6 @@ void parse(string x) } break; case '*': { - ; inihead = copy(x, 2, 255); strip_ini(); if (inihead != "") ini_parse(); @@ -288,7 +271,6 @@ public: static unit_incline_initialize incline_constructor; unit_incline_initialize::unit_incline_initialize() { - ; filetoload = ""; usingl = false; usingp = false; diff --git a/engines/avalanche/oldtrip.cpp b/engines/avalanche/oldtrip.cpp index 0c0665180e..721a3f5a25 100644 --- a/engines/avalanche/oldtrip.cpp +++ b/engines/avalanche/oldtrip.cpp @@ -51,7 +51,6 @@ static boolean dropin(integer xc, integer yc, integer x1, integer y1, integer x2 /* Dropin returns True if the point xc,yc falls within the 1-2 rectangle. */ { boolean dropin_result; - ; dropin_result = ((xc >= x1) && (xc <= x2) && (yc >= y1) && (yc <= y2)); return dropin_result; } @@ -60,7 +59,6 @@ static boolean dropin(integer xc, integer yc, integer x1, integer y1, integer x2 static integer lesser(integer a, integer b) { integer lesser_result; - ; if (a < b) lesser_result = a; else lesser_result = b; return lesser_result; @@ -70,7 +68,6 @@ static integer lesser(integer a, integer b) { static integer greater(integer a, integer b) { integer greater_result; - ; if (a > b) greater_result = a; else greater_result = b; return greater_result; @@ -79,7 +76,6 @@ static integer greater(integer a, integer b) { void copier(integer x1, integer y1, integer x2, integer y2, integer x3, integer y3, integer x4, integer y4) { - ; if (dropin(x3, y3, x1, y1, x2, y2) || dropin(x3, y4, x1, y1, x2, y2) || dropin(x4, y3, x1, y1, x2, y2) @@ -95,7 +91,6 @@ void copier(integer x1, integer y1, integer x2, integer y2, integer x3, integer void loadtrip() { byte gm; - ; for (gm = 1; gm <= numtr; gm ++) tr[gm].original(); tr[1].init(0); } @@ -104,7 +99,6 @@ byte checkfeet(integer x1, integer x2, integer oy, integer y, byte yl) { byte a, c; integer fv, ff; byte checkfeet_result; - ; a = 0; setactivepage(2); if (x1 < 0) x1 = 0; @@ -112,14 +106,12 @@ byte checkfeet(integer x1, integer x2, integer oy, integer y, byte yl) { if (oy < y) for (fv = x1; fv <= x2; fv ++) for (ff = oy + yl; ff <= y + yl; ff ++) { - ; c = getpixel(fv, ff); if (c > a) a = c; } else for (fv = x1; fv <= x2; fv ++) for (ff = y + yl; ff <= oy + yl; ff ++) { - ; c = getpixel(fv, ff); if (c > a) a = c; } @@ -132,13 +124,11 @@ void touchcol(byte tc); static boolean bug; static void fr(byte a, byte b) { - ; fliproom(a, b); bug = false; } void touchcol(byte tc) { - ; bug = true; /* j.i.c. */ switch (dna.room) { case 1: @@ -173,7 +163,6 @@ void touchcol(byte tc) { break; } if (bug) { - ; setactivepage(0); display(string('\7') + "Unknown touchcolour (" + strf(tc) + ')' + " in " + strf(dna.room) + '.'); @@ -190,7 +179,6 @@ triptype *triptype::init(byte spritenum) { byte sort, n; word bigsize; pointer p, q; - ; str(spritenum, xx); assign(f, string("c:\\avalot\\sprite") + xx + ".avd"); reset(f, 1); @@ -199,7 +187,6 @@ triptype *triptype::init(byte spritenum) { blockread(f, bigsize, 2); setactivepage(3); for (sort = 0; sort <= 1; sort ++) { - ; mark(q); getmem(p, bigsize); blockread(f, p, bigsize); @@ -211,7 +198,6 @@ triptype *triptype::init(byte spritenum) { adxtype &with = a; for (gm = 0; gm <= (with.num / with.seq) - 1; gm ++) /* directions */ for (gd = 0; gd <= with.seq - 1; gd ++) { /* steps */ - ; getmem(pic[n][sort], a.size); /* grab the memory */ getimage((gm / 2) * (with.xl * 6) + gd * with.xl, (gm % 2)*with.yl, (gm / 2) * (with.xl * 6) + gd * with.xl + with.xl - 1, (gm % 2)*with.yl + with.yl - 1, @@ -238,12 +224,10 @@ triptype *triptype::init(byte spritenum) { } void triptype::original() { - ; quick = false; } void triptype::getback() { - ; tax = x; tay = y; off; /*getimage(x,y,x+a.xl,y+a.yl,behind^);*/ @@ -253,7 +237,6 @@ void triptype::getback() { void triptype::andexor() { byte picnum; /* Picnum, Picnic, what ye heck */ - ; picnum = face * a.seq + step + 1; off; putimage(x, y, pic[picnum][0], andput); @@ -262,12 +245,10 @@ void triptype::andexor() { } void triptype::turn(byte whichway) { - ; face = whichway; } void triptype::appear(integer wx, integer wy, byte wf) { - ; x = (wx / 8) * 8; y = wy; ox = wx; @@ -280,7 +261,6 @@ void triptype::appear(integer wx, integer wy, byte wf) { void triptype::walk() { byte tc; - ; ox = x; oy = y; if ((ix == 0) && (iy == 0)) return; @@ -288,7 +268,6 @@ void triptype::walk() { x = x + ix; y = y + iy; if (check_me) { - ; tc = checkfeet(x, x + a.xl, oy, y, a.yl); { void &with = magics[tc]; @@ -313,7 +292,6 @@ void triptype::walk() { } void triptype::bounce() { - ; setactivepage(1); putback(); x = ox; @@ -323,9 +301,7 @@ void triptype::bounce() { } void triptype::do_it() { - ; if (((ix != 0) || (iy != 0)) & (~ ddm_o.menunow)) { - ; off; copier(ox, oy, ox + a.xl, oy + a.yl, x, y, x + a.xl, y + a.yl); putback(); @@ -334,12 +310,10 @@ void triptype::do_it() { } void triptype::putback() { - ; /* putimage(tax,tay,behind^,0);*/ mblit(tax, tay, tax + a.xl, tay + a.yl, 3, 1); } void triptype::walkto(integer xx, integer yy) { - ; speed(xx - x, yy - y); hx = xx; hy = yy; @@ -347,13 +321,11 @@ void triptype::walkto(integer xx, integer yy) { } void triptype::stophoming() { - ; homing = false; } void triptype::homestep() { integer temp; - ; if ((hx == x) && (hy == y)) { ; /* touching the target */ homing = false; @@ -362,14 +334,12 @@ void triptype::homestep() { ix = 0; iy = 0; if (hy != y) { - ; temp = hy - y; if (temp > 4) iy = 4; else if (temp < -4) iy = -4; else iy = temp; } if (hx != x) { - ; temp = hx - x; if (temp > 4) ix = 4; else if (temp < -4) ix = -4; @@ -378,7 +348,6 @@ void triptype::homestep() { } void triptype::speed(shortint xx, shortint yy) { - ; ix = xx; iy = yy; if ((ix == 0) && (iy == 0)) return; /* no movement */ @@ -387,21 +356,18 @@ void triptype::speed(shortint xx, shortint yy) { if (iy < 0) turn(up); else turn(down); } else { - ; if (ix < 0) turn(left); else turn(right); } } void triptype::stopwalk() { - ; ix = 0; iy = 0; homing = false; } void triptype::chatter() { - ; talkx = x + a.xl / 2; talky = y; talkf = a.fgc; @@ -410,20 +376,17 @@ void triptype::chatter() { getsettype *getsettype::init() { - ; numleft = 0; /* initialise array pointer */ return this; } void remember(fieldtype r) { - ; numleft += 1; gs[numleft] = r; } void recall() { void recall_result; - ; recall_result = gs[numleft]; numleft -= 1; return recall_result; @@ -432,7 +395,6 @@ void recall() { void rwsp(byte t, byte r) { const integer xs = 4; const integer ys = 2; - ; { triptype &with = tr[t]; switch (r) { @@ -465,10 +427,8 @@ void rwsp(byte t, byte r) { } void apped(byte trn, byte np) { - ; { triptype &with = tr[trn]; - ; { void &with1 = peds[np]; appear(with.x - with.a.xl / 2, with.y - with.a.yl, dir); @@ -483,7 +443,6 @@ static boolean allstill() { boolean xxx; byte fv; boolean allstill_result; - ; xxx = true; for (fv = 1; fv <= numtr; fv ++) { triptype &with = tr[fv]; @@ -495,13 +454,11 @@ static boolean allstill() { void trippancy() { byte fv; - ; if ((ddm_o.menunow) | ontoolbar | seescroll | allstill()) return; setactivepage(1); for (fv = 1; fv <= numtr; fv ++) { triptype &with = tr[fv]; if (with.quick) { - ; walk(); if (with.visible && ((with.ix != 0) || (with.iy != 0))) andexor(); do_it(); @@ -513,70 +470,59 @@ void trippancy() { void tripkey(char dir); static void stopwalking() { - ; tr[1].stopwalk(); dna.rw = stopped; } void tripkey(char dir) { - ; { triptype &with = tr[1]; { - ; switch (dir) { case 'H': if (rw != up) { - ; rw = up; rwsp(1, rw); } else stopwalking(); break; case 'P': if (rw != down) { - ; rw = down; rwsp(1, rw); } else stopwalking(); break; case 'K': if (rw != left) { - ; rw = left; rwsp(1, rw); } else stopwalking(); break; case 'M': if (rw != right) { - ; rw = right; rwsp(1, rw); } else stopwalking(); break; case 'I': if (rw != ur) { - ; rw = ur; rwsp(1, rw); } else stopwalking(); break; case 'Q': if (rw != dr) { - ; rw = dr; rwsp(1, rw); } else stopwalking(); break; case 'O': if (rw != dl) { - ; rw = dl; rwsp(1, rw); } else stopwalking(); break; case 'G': if (rw != ul) { - ; rw = ul; rwsp(1, rw); } else stopwalking(); @@ -590,7 +536,6 @@ void tripkey(char dir) { } void fliproom(byte room, byte ped) { - ; dusk; tr[1].putback(); dna.room = room; @@ -605,16 +550,13 @@ void fliproom(byte room, byte ped) { boolean infield(byte x) { /* returns True if you're within field "x" */ integer ux, uy; boolean infield_result; - ; { triptype &with = tr[1]; - ; ux = with.x; uy = with.y + with.a.yl; } { void &with = fields[x]; - ; infield_result = (ux >= x1) && (ux <= x2) && (uy >= y1) && (uy <= y2); } return infield_result; @@ -625,7 +567,6 @@ boolean neardoor() { /* returns True if you're near a door! */ byte fv; boolean nd; boolean neardoor_result; - ; if (numfields < 9) { ; /* there ARE no doors here! */ neardoor_result = false; @@ -633,14 +574,12 @@ boolean neardoor() { /* returns True if you're near a door! */ } { triptype &with = tr[1]; - ; ux = with.x; uy = with.y + with.a.yl; } nd = false; for (fv = 9; fv <= numfields; fv ++) { void &with = fields[fv]; - ; if ((ux >= x1) && (ux <= x2) && (uy >= y1) && (uy <= y2)) nd = true; } neardoor_result = nd; diff --git a/engines/avalanche/omtest.cpp b/engines/avalanche/omtest.cpp index 9cab8796f5..f373c50aff 100644 --- a/engines/avalanche/omtest.cpp +++ b/engines/avalanche/omtest.cpp @@ -46,9 +46,7 @@ void graphics() { /*$F+ ... All ddm__procs and do__procs must be compiled in Far-Call state. */ void ddm__file() { - ; { - ; start_afresh; opt("Load...", 'L', "f3", true); opt("Save...", 'S', "f2", false); @@ -60,9 +58,7 @@ void ddm__file() { } void ddm__heart() { - ; { - ; start_afresh; opt("About...", 'A', "shift-f10", true); opt("Boss Key", 'B', "alt-B", true); @@ -74,9 +70,7 @@ void ddm__heart() { } void ddm__action() { - ; { - ; start_afresh; opt("Get up", 'G', "", true); opt("Open door", 'O', "", true); @@ -89,9 +83,7 @@ void ddm__action() { } void ddm__objects() { - ; { - ; start_afresh; opt("Bell", 'B', "", true); opt("Wine", 'W', "", true); @@ -104,9 +96,7 @@ void ddm__objects() { } void ddm__people() { - ; { - ; start_afresh; opt("Avalot", 'A', "", true); opt("Spludwick", 'S', "", true); @@ -118,9 +108,7 @@ void ddm__people() { } void ddm__use() { - ; { - ; start_afresh; opt("Drink", 'D', "", true); opt("Wear", 'W', "", true); @@ -131,7 +119,6 @@ void ddm__use() { void do__stuff() { varying_string<2> st; - ; str(o.choicenum + 1, st); setfillstyle(1, 6); setcolor(14); @@ -140,7 +127,6 @@ void do__stuff() { } void do__heart() { - ; switch (o.choicenum) { case 0: outtextxy(100, 100, "A really funny game!"); @@ -164,7 +150,6 @@ void do__heart() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; graphics(); setfillstyle(6, 6); bar(0, 0, 639, 199); @@ -172,7 +157,6 @@ int main(int argc, const char *argv[]) { m.init; o.init; { - ; create('H', '\3', '#', ddm__heart(), do__heart()); create('F', "File", '!', ddm__file(), do__stuff()); create('A', "Action", '\36', ddm__action(), do__stuff()); @@ -191,9 +175,7 @@ int main(int argc, const char *argv[]) { } while (!((buttonpresscount > 0) || (buttonreleasecount > 0) | keypressede)); hidemousecursor; if (buttonpresscount > 0) { - ; if (mousey > 10) { - ; if (!((o.firstlix) & ((mousex >= flx1) && (mousex <= flx2) && (mousey >= 12) && (mousey <= fly)))) { @@ -211,7 +193,6 @@ int main(int argc, const char *argv[]) { } else { ; /* NOT clicked button... */ if (buttonreleasecount > 0) { - ; if ((firstlix) & ((mousex >= flx1) && (mousex <= flx2) && (mousey >= 12) && (mousey <= fly))) diff --git a/engines/avalanche/oopmenu.cpp b/engines/avalanche/oopmenu.cpp index 94b3b0d343..9c47d18b6d 100644 --- a/engines/avalanche/oopmenu.cpp +++ b/engines/avalanche/oopmenu.cpp @@ -62,7 +62,6 @@ byte fv; void chalk(integer x, integer y, char t, string z) { byte p; - ; outtextxy(x, y, z); p = pos(t, z); if (p == 0) return; @@ -71,7 +70,6 @@ void chalk(integer x, integer y, char t, string z) { } void say(integer x, integer y, char t, string z, byte f, byte b) { - ; settextjustify(0, 2); setfillstyle(1, b); setcolor(f); @@ -82,7 +80,6 @@ void say(integer x, integer y, char t, string z, byte f, byte b) { void mblit(integer x1, integer y1, integer x2, integer y2, byte f, byte t) { /* NOT The Minstrel Blitter */ pointer p, q; word s; - ; mark(q); s = imagesize(x1, y1, x2, y2); getmem(p, s); @@ -95,7 +92,6 @@ void mblit(integer x1, integer y1, integer x2, integer y2, byte f, byte t) { /* } void onemenu::start_afresh() { - ; number = 0; width = 0; firstlix = false; @@ -104,20 +100,17 @@ void onemenu::start_afresh() { } onemenu *onemenu::init() { - ; menunow = false; return this; } void onemenu::opt(string n, char tr, string key, boolean val) { integer l; - ; number += 1; l = textwidth(n + key) + 30; if (width < l) width = l; { optiontype &with = oo[number]; - ; with.title = n; with.trigger = tr; with.shortcut = key; @@ -126,14 +119,11 @@ void onemenu::opt(string n, char tr, string key, boolean val) { } void onemenu::displayopt(byte y, byte b, byte f, byte d) { - ; { optiontype &with = oo[y]; - ; if (with.valid) setcolor(f); else setcolor(d); if (b != 177) { - ; setfillstyle(1, b); bar(flx1, 3 + y * 10, flx2, 12 + y * 10); } @@ -146,7 +136,6 @@ void onemenu::displayopt(byte y, byte b, byte f, byte d) { void onemenu::display() { byte y; - ; setfillstyle(1, menu_b); setcolor(menu_border); firstlix = true; @@ -169,7 +158,6 @@ void onemenu::display() { } void onemenu::wipe() { - ; { headtype &with = m.ddms[o.menunum]; say(flx1 + 2, 1, with.trigger, with.title, menu_f, menu_b); @@ -181,9 +169,7 @@ void onemenu::wipe() { void onemenu::movehighlight(shortint add) { shortint hn; - ; if (add != 0) { - ; hn = highlightnum + add; if ((hn < 0) || (hn >= (unsigned char)number)) return; highlightnum = hn; @@ -196,7 +182,6 @@ void onemenu::movehighlight(shortint add) { } void onemenu::lightup() { /* This makes the menu highlight follow the mouse.*/ - ; if ((mousex < flx1) || (mousex > flx2) || (mousey <= 12) || (mousey > fly - 3)) return; highlightnum = (mousey - 12) / 10; @@ -205,7 +190,6 @@ void onemenu::lightup() { /* This makes the menu highlight follow the mouse.*/ } void onemenu::select(byte n) { /* Choose which one you want. */ - ; if (! oo[n + 1].valid) return; choicenum = n; m.ddms[menunum].do_choose(); @@ -214,14 +198,12 @@ void onemenu::select(byte n) { /* Choose which one you want. */ void onemenu::keystroke(char c) { byte fv; - ; c = upcase(c); for (fv = 1; fv <= number; fv ++) if (upcase(oo[fv].trigger) == c) select(fv - 1); } void bleep() { - ; sound(177); delay(7); nosound; @@ -229,7 +211,6 @@ void bleep() { headtype *headtype::init (char trig, char alttrig, string name, byte p, proc dw, proc dc) { - ; trigger = trig; alttrigger = alttrig; title = name; @@ -242,15 +223,12 @@ headtype *headtype::init } void headtype::display() { - ; say(xpos, 1, trigger, title, menu_f, menu_b); } void headtype::highlight() { - ; say(xpos, 1, trigger, title, highlight_f, highlight_b); { - ; o.left = xpos; o.menunow = true; o.menunum = position; @@ -259,9 +237,7 @@ void headtype::highlight() { boolean headtype::extdparse(char c) { boolean extdparse_result; - ; if (c != alttrigger) { - ; extdparse_result = true; return extdparse_result; } @@ -270,20 +246,17 @@ boolean headtype::extdparse(char c) { } menuset *menuset::init() { - ; howmany = 0; return this; } void menuset::create(char t, string n, char alttrig, proc dw, proc dc) { - ; howmany += 1; ddms[howmany].init(t, alttrig, n, howmany, dw, dc); } void menuset::update() { byte fv; - ; setfillstyle(1, menu_b); bar(0, 0, 640, 10); for (fv = 1; fv <= howmany; fv ++) ddms[fv].display(); @@ -291,7 +264,6 @@ void menuset::update() { void menuset::extd(char c) { byte fv; - ; fv = 1; while ((fv <= howmany) && (ddms[fv].extdparse(c))) fv += 1; if (fv > howmany) return; @@ -300,16 +272,13 @@ void menuset::extd(char c) { void menuset::getmenu(integer x) { byte fv; - ; fv = 0; do { fv += 1; if ((x > ddms[fv].xpos - 3) && (x < ddms[fv].xright)) { headtype &with = ddms[fv]; { - ; if (o.menunow) { - ; wipe(); /* get rid of menu */ if (o.menunum == with.position) return; /* click on own highlight */ } @@ -322,19 +291,15 @@ void menuset::getmenu(integer x) { } void parsekey(char r, char re) { - ; switch (r) { case '\0': { - ; switch (re) { case 'K': { - ; wipe(); m.getmenu((o.menunum - 2)*spacing + indent); } break; case 'M': { - ; wipe(); m.getmenu((o.menunum * spacing + indent)); } @@ -357,7 +322,6 @@ void parsekey(char r, char re) { select(o.highlightnum); break; default: { - ; if (o.menunow) keystroke(r); else kbuffer = kbuffer + r + re; diff --git a/engines/avalanche/overlap.cpp b/engines/avalanche/overlap.cpp index 3c72e1178b..4b498fd500 100644 --- a/engines/avalanche/overlap.cpp +++ b/engines/avalanche/overlap.cpp @@ -33,7 +33,6 @@ namespace Avalanche { integer gd, gm; void flash(integer x1, integer y1, integer x2, integer y2) { - ; setcolor(14); rectangle(x1, y1, x2, y2); sound(x1 + x2); @@ -49,13 +48,11 @@ boolean dropin(integer xc, integer yc, integer x1, integer y1, integer x2, integ /* Dropin returns True if the point xc,yc falls within the 1-2 rectangle. */ { boolean dropin_result; - ; dropin_result = ((xc >= x1) && (xc <= x2) && (yc >= y1) && (yc <= y2)); return dropin_result; } void test(integer x1, integer y1, integer x2, integer y2, integer x3, integer y3, integer x4, integer y4) { - ; cleardevice(); rectangle(x1, y1, x2, y2); rectangle(x3, y3, x4, y4); @@ -77,7 +74,6 @@ void test(integer x1, integer y1, integer x2, integer y2, integer x3, integer y3 int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 1; initgraph(gd, gm, ""); diff --git a/engines/avalanche/overscro.cpp b/engines/avalanche/overscro.cpp index 58ab270419..bf0825c1a2 100644 --- a/engines/avalanche/overscro.cpp +++ b/engines/avalanche/overscro.cpp @@ -32,7 +32,6 @@ namespace Avalanche { integer gd, gm; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); @@ -52,7 +51,6 @@ int main(int argc, const char *argv[]) { setactivepage(0); gm = 0; for (gd = 0; gd <= 640; gd ++) { - ; gm += 1; if (gm == 8) gm = 1; setcolor(gm); @@ -66,7 +64,6 @@ int main(int argc, const char *argv[]) { /* setfillstyle(1,6); bar(100,100,500,100);*/ gd = getpixel(0, 0); for (gm = 8; gm <= 15; gm ++) setpalette(gm, egayellow); for (gd = 0; gd <= 199; gd ++) { - ; port[0x3c4] = 2; port[0x3cf] = 4; port[0x3c5] = 8; diff --git a/engines/avalanche/particle.cpp b/engines/avalanche/particle.cpp index b6b830542b..74f9dbb65e 100644 --- a/engines/avalanche/particle.cpp +++ b/engines/avalanche/particle.cpp @@ -52,22 +52,18 @@ const char marker = '\33'; void cursor() { byte fv; - ; for (fv = 12; fv <= 15; fv ++) mem[0xa000 * cpos + fv * 80] = ~(mem[0xa000 * cpos + fv * 80]); } void xy() { - ; cpos = (bufpos / 80) * 1280 + (bufpos % 80); } void show() { word fv, orig, y; - ; for (fv = 0; fv <= 1999; fv ++) if (buffer[fv] != was[fv]) { - ; orig = (fv / 80) * 1280 + (fv % 80); for (y = 0; y <= 15; y ++) mem[0xa000 * orig + y * 80] = (byte)(font[buffer[fv]][y]); @@ -77,7 +73,6 @@ void show() { } void sizeup() { - ; do { switch (buffer[bufsize]) { case marker: @@ -95,7 +90,6 @@ void sizeup() { void graphics() { integer gd, gm; file<fonttype> fontfile; - ; gd = 3; gm = 1; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -110,7 +104,6 @@ void helpscreen(); static byte l, fv; static void addon(char b, string st) { - ; buffer[3 + 80 * l] = b; b -= 64; buffer[5 + 80 * l] = b; @@ -121,7 +114,6 @@ static void addon(char b, string st) { void helpscreen() { array<0, 1999, char> temp; char r; - ; l = 0; move(buffer, temp, 2000); fillchar(buffer, sizeof(buffer), '\0'); @@ -163,7 +155,6 @@ static void legit(char r) { void edit_it() { byte fv; - ; bufpos = 0; fillchar(was, sizeof(was), '\0'); show(); @@ -176,54 +167,46 @@ void edit_it() { switch (readkey()) { /* extd keystrokes */ case 'K': if (bufpos > 0) { - ; bufpos -= 1; xy(); } break; /* Left */ case 'M': if (bufpos < bufsize) { - ; bufpos += 1; xy(); } break; /* Right */ case 'H': if (bufpos > 80) { - ; bufpos -= 80; xy(); } break; /* Up */ case 'P': if (bufpos < (cardinal)bufsize - 79) { - ; bufpos += 80; xy(); } break; /* Down */ case 's': if (bufpos > 10) { - ; bufpos -= 10; xy(); } break; case 't': if (bufpos < (cardinal)bufsize - 10) { - ; bufpos += 10; xy(); } break; case 'G': { - ; bufpos = 0; xy(); } break; /* Home */ case 'O': { - ; bufpos = bufsize; xy(); } @@ -258,7 +241,6 @@ void edit_it() { } break; case '\33': { - ; restorecrtmode(); return; } @@ -272,14 +254,12 @@ void edit_it() { void loadit() { untyped_file f; - ; if (pos(".", rawname) == 0) rawname = rawname + ".raw"; fillchar(buffer, sizeof(buffer), '\0'); /*$I-*/ assign(f, rawname); reset(f, 1); if (ioresult != 0) { - ; output << string('\7') + "New file!" + '\7' << NL; buffer[0] = marker; return; @@ -297,7 +277,6 @@ void loadit() { void saveit() { untyped_file f; - ; output << "Saving " << rawname << ", " << bufsize << " bytes..." << NL; assign(f, rawname); rewrite(f, 1); @@ -307,7 +286,6 @@ void saveit() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; output << "Filename of .RAW file?"; input >> rawname >> NL; loadit(); @@ -335,7 +313,6 @@ int main(int argc, const char *argv[]) { ok = true; break; case 'S': { - ; saveit(); exit(0); } diff --git a/engines/avalanche/pictemp.cpp b/engines/avalanche/pictemp.cpp index 261e59297f..e41c395d71 100644 --- a/engines/avalanche/pictemp.cpp +++ b/engines/avalanche/pictemp.cpp @@ -46,7 +46,6 @@ void save() { "copyright." + '\15' + '\12' + '\15' + '\12' + "Have fun!" + '\32'; byte a /*absolute $A000:1200i*/; byte bit; - ; nam = "d:thingtmp.avd"; screenname = "Temp."; assign(f, nam); @@ -56,7 +55,6 @@ void save() { blockwrite(f, header[1], 146); blockwrite(f, screenname, 31); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -68,7 +66,6 @@ void save() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -81,14 +78,12 @@ int main(int argc, const char *argv[]) { gm = 20; while (gm < 120) { - ; if (! eof(f)) blockread(f, p, picsize); putimage(gd, gm, p, 0); gd += 70; if (gd == 640) { - ; gd = 10; gm += 40; } diff --git a/engines/avalanche/pictemp2.cpp b/engines/avalanche/pictemp2.cpp index 8d5cdfe4c2..656987fe3c 100644 --- a/engines/avalanche/pictemp2.cpp +++ b/engines/avalanche/pictemp2.cpp @@ -45,12 +45,10 @@ void load() { byte a0 /*absolute $A000:1200*/; byte bit; untyped_file f; - ; assign(f, "d:thingtmp.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -63,7 +61,6 @@ void load() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -79,14 +76,12 @@ int main(int argc, const char *argv[]) { gm = 20; while (noo <= number_of_objects) { - ; getimage(gd, gm, gd + 59, gm + 29, p); putimage(gd, gm, p, notput); blockwrite(f, p, picsize); gd += 70; if (gd == 640) { - ; gd = 10; gm += 40; } diff --git a/engines/avalanche/pingo.cpp b/engines/avalanche/pingo.cpp index df50cb0b94..f9d3571ce8 100644 --- a/engines/avalanche/pingo.cpp +++ b/engines/avalanche/pingo.cpp @@ -48,7 +48,6 @@ namespace Avalanche { void dplot(integer x, integer y, string z) { - ; setcolor(9); outtextxy(x, y , z); setcolor(11); @@ -88,11 +87,9 @@ begin; copy02;*/ { byte fv; - ; dusk(); off_virtual(); for (fv = 0; fv <= 1; fv ++) { - ; setactivepage(fv); cleardevice(); } @@ -123,10 +120,8 @@ void copy02() { /* taken from Wobble (below) */ byte a0 /*absolute $A000:0*/; byte a2/*absolute $A800:0*/; byte bit; - ; off(); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -159,7 +154,6 @@ void copy03() { /* taken from Wobble (below) */ } for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -172,7 +166,6 @@ void copy03() { /* taken from Wobble (below) */ on_virtual(); break; case 2 : - ; break; /* zzzz, it was off anyway */ case 3 : on(); @@ -183,10 +176,8 @@ void copy03() { /* taken from Wobble (below) */ void copypage(byte frp, byte top) { /* taken from Copy02 (above) */ byte bit; - ; off(); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -199,13 +190,11 @@ void copypage(byte frp, byte top) { /* taken from Copy02 (above) */ void wobble() { byte bit; byte a2 /*absolute $A800:80i*/; - ; off(); setactivepage(2); bit = getpixel(0, 0); cleardevice(); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -213,7 +202,6 @@ void wobble() { move(mem[0xa000 * cp * pagetop], a2, 16000); } for (bit = 0; bit <= 25; bit ++) { - ; setvisualpage(2); delay(bit * 7); setvisualpage(cp); @@ -228,7 +216,6 @@ void wobble() { void zonk(); static void zl(integer x1, integer y1, integer x2, integer y2) { - ; setlinestyle(0, 0, 3); setcolor(1); line(x1, y1, x2, y2); @@ -240,12 +227,10 @@ static void zl(integer x1, integer y1, integer x2, integer y2) { void zonk() { integer xx, yy; /* a0:byte absolute $A000:0; a3:byte absolute $A000:245760;*/ byte bit, fv; - ; off(); copypage(3, 1 - cp); { triptype &with = tr[1]; - ; xx = with.x + with.a.xl / 2; yy = with.y; } @@ -266,7 +251,6 @@ void zonk() { setbkcolor(yellow); for (bit = 0; bit <= 255; bit ++) { - ; note(270 - bit); setvisualpage(3); note(2700 - 10 * bit); diff --git a/engines/avalanche/plottest.cpp b/engines/avalanche/plottest.cpp index 9a03718067..8ff0c36475 100644 --- a/engines/avalanche/plottest.cpp +++ b/engines/avalanche/plottest.cpp @@ -35,7 +35,6 @@ matrix<1, 35, 0, 39, byte> a; array<0, 3, 0, 4, 1, 35, byte> b; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); @@ -49,9 +48,7 @@ int main(int argc, const char *argv[]) { fillchar(b, sizeof(b), '\0'); for (gm = 1; gm <= 35; gm ++) for (gd = 0; gd <= 39; gd ++) { - ; for (fv = 0; fv <= 3; fv ++) { - ; b[fv][gd / 8][gm] = (b[fv][gd / 8][gm] << 1); b[fv][gd / 8][gm] += ((cardinal)(a[gm][gd] & (1 << fv)) >> fv); } @@ -59,9 +56,7 @@ int main(int argc, const char *argv[]) { for (gd = 1; gd <= 35; gd ++) for (gm = 0; gm <= 4; gm ++) { - ; for (fv = 0; fv <= 3; fv ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << fv; diff --git a/engines/avalanche/preview1.cpp b/engines/avalanche/preview1.cpp index da5b71dae7..bdb5f40896 100644 --- a/engines/avalanche/preview1.cpp +++ b/engines/avalanche/preview1.cpp @@ -42,7 +42,6 @@ void load() { reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/qintro.cpp b/engines/avalanche/qintro.cpp index 0d15a9d7da..695dda45ae 100644 --- a/engines/avalanche/qintro.cpp +++ b/engines/avalanche/qintro.cpp @@ -254,7 +254,6 @@ void load_text() { thisline += 1; break; case '\12':/*nop*/ - ; break; default: x[thisline] = x[thisline] + *c; @@ -311,7 +310,6 @@ int main(int argc, const char *argv[]) { displaycounter += 1; do { - ; } while (!(*skellern > 0)); } diff --git a/engines/avalanche/qstars.cpp b/engines/avalanche/qstars.cpp index 69920ef292..553aee4c83 100644 --- a/engines/avalanche/qstars.cpp +++ b/engines/avalanche/qstars.cpp @@ -182,7 +182,6 @@ void do_stuff() { void setcol(byte which, byte what) /*var dummy:byte;*/ { - ; /* setpalette(which,what); asm (* mov dx,$3DA; diff --git a/engines/avalanche/rawupd.cpp b/engines/avalanche/rawupd.cpp index 8c2c36784f..e3ed388eeb 100644 --- a/engines/avalanche/rawupd.cpp +++ b/engines/avalanche/rawupd.cpp @@ -37,7 +37,6 @@ boolean s_exists; void find_out_about_s(string name) { searchrec ss; - ; findfirst(name, anyfile, ss); s_exists = doserror == 0; diff --git a/engines/avalanche/readsez.cpp b/engines/avalanche/readsez.cpp index bdf3a7ee8c..cd4cd62e8b 100644 --- a/engines/avalanche/readsez.cpp +++ b/engines/avalanche/readsez.cpp @@ -53,10 +53,8 @@ byte sumup() { word fv; byte total; byte sumup_result; - ; total = 0; for (fv = 0; fv <= marker.length; fv ++) { - ; total += ord(x[fv]); } sumup_result = total; @@ -65,7 +63,6 @@ byte sumup() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; output << "READ-SEZ by TT." << NL; output << NL; assign(f, "avalot.sez"); @@ -73,9 +70,7 @@ int main(int argc, const char *argv[]) { seek(f, 255); blockread(f, sezhead, sizeof(sezhead)); { - ; if (sezhead.initials != "TT") { - ; output << "Not a valid Sez file!" << NL; exit(0); } @@ -88,7 +83,6 @@ int main(int argc, const char *argv[]) { seek(f, longint(262) + number * longint(7)); blockread(f, marker, 7); { - ; output << "Scrollchain no. " << number << NL; output << "Length: " << marker.length << NL; output << "Offset: " << marker.offset << NL; @@ -103,7 +97,6 @@ int main(int argc, const char *argv[]) { output << "Checksum in file: " << marker.checksum << ". Actual value: " << sum << '.' << NL; output << NL; if (sum != marker.checksum) { - ; output << "Bleargh! Checksum failed!" << NL; exit(0); } diff --git a/engines/avalanche/reginam.cpp b/engines/avalanche/reginam.cpp index 441a35ace0..2ed33bea74 100644 --- a/engines/avalanche/reginam.cpp +++ b/engines/avalanche/reginam.cpp @@ -39,7 +39,6 @@ static byte p; static void replace(char what, char whatwith) { - ; p = pos(what, z); if (p > 0) z[p] = whatwith; } @@ -47,7 +46,6 @@ static void replace(char what, char whatwith) { void alphanum() { byte fv; - ; z = ""; for (fv = 1; fv <= length(name); fv ++) if (set::of(range('A', 'Z'), eos).has(name[fv])) @@ -71,9 +69,7 @@ void alphanum() { void scramble() { byte fv, what; - ; for (fv = 1; fv <= length(name); fv ++) { - ; what = pos(name[fv], letters); what += 177; what += (fv + 1) * 3; @@ -83,7 +79,6 @@ void scramble() { void checks() { byte fv, total; - ; total = 177; for (fv = 1; fv <= length(name); fv ++) total += ord(name[fv]); @@ -92,7 +87,6 @@ void checks() { void negate() { byte fv; - ; name[1] = 'N'; for (fv = 2; fv <= length(name); fv ++) name[fv] = letters[37 - pos(name[fv], letters) - 1]; @@ -100,7 +94,6 @@ void negate() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; output << "Registrant's name?"; input >> name >> NL; output << "And number (eg, A1)?"; diff --git a/engines/avalanche/sackb1.cpp b/engines/avalanche/sackb1.cpp index 54d860c5c6..b197977c8e 100644 --- a/engines/avalanche/sackb1.cpp +++ b/engines/avalanche/sackb1.cpp @@ -67,12 +67,10 @@ void sb_start(string md) { } void sb_stop() { - ; modstop(); } void sb_link() { /* At the moment, this does nothing. */ - ; } } // End of namespace Avalanche.
\ No newline at end of file diff --git a/engines/avalanche/saving.cpp b/engines/avalanche/saving.cpp index 8075225e7b..8d52e76a65 100644 --- a/engines/avalanche/saving.cpp +++ b/engines/avalanche/saving.cpp @@ -40,7 +40,6 @@ void load(string nam) { untyped_file f; word s; string check; - ; assign(f, nam); reset(f, 1); blockread(f, check, 41); @@ -48,7 +47,6 @@ void load(string nam) { blockread(f, check, 31); s = imagesize(0, 0, getmaxx(), 75); for (z = 1; z <= 2; z ++) { - ; getmem(a[z], s); blockread(f, a[z], s); setactivepage(0); @@ -60,7 +58,6 @@ void load(string nam) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); @@ -68,7 +65,6 @@ int main(int argc, const char *argv[]) { assign(f, "c:\\sleep\\test.ega"); rewrite(f, 1); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/scr_1.cpp b/engines/avalanche/scr_1.cpp index 5d8bc7d23b..bb5fa1d84f 100644 --- a/engines/avalanche/scr_1.cpp +++ b/engines/avalanche/scr_1.cpp @@ -46,7 +46,6 @@ void save() { file<atype> f; word fv; atype a /*absolute $B800:0*/; - ; assign(f, "TEXT1.SCR"); rewrite(f); f << a; @@ -54,14 +53,12 @@ void save() { } void centre(byte y, string z) { - ; gotoxy(40 - length(z) / 2, y); output << z; } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; /* write('Title?'); readln(title); write('Font?'); readln(fn); */ textattr = 0; @@ -69,7 +66,6 @@ int main(int argc, const char *argv[]) { title = "Bug Alert!"; fn = ""; for (xx = 1; xx <= 77; xx ++) { - ; gotoxy(Random(80) + 1, Random(24) + 1); switch (Random(2)) { case 0: @@ -100,11 +96,8 @@ int main(int argc, const char *argv[]) { f >> font; close(f); for (y = 0; y <= 3; y ++) { - ; for (x = 1; x <= length(title); x ++) { - ; for (xx = 7; xx >= 0; xx --) { - ; code = (byte)(((1 << xx) & font[title[x]][y * 2]) > 0) + (byte)(((1 << xx) & font[title[x]][y * 2 + 1]) > 0) * 2; gotoxy(1 + x * 8 - xx, y + 1); diff --git a/engines/avalanche/scr_2.cpp b/engines/avalanche/scr_2.cpp index c3de473a0a..039583a021 100644 --- a/engines/avalanche/scr_2.cpp +++ b/engines/avalanche/scr_2.cpp @@ -46,7 +46,6 @@ void save() { file<atype> f; word fv; atype a /*absolute $B800:0*/; - ; assign(f, "TEXT2.SCR"); rewrite(f); f << a; @@ -55,9 +54,7 @@ void save() { void centre(byte y, string z) { byte fv; - ; for (fv = 1; fv <= length(z); fv ++) { - ; gotoxy(39 - length(z) / 2 + fv, y); if (odd(fv + y)) textattr = 2; else textattr = cyan; @@ -67,14 +64,10 @@ void centre(byte y, string z) { void line(byte yy, string title) { const integer offset = 5; - ; for (y = 1; y <= 6; y ++) { - ; qq = ""; for (x = 1; x <= length(title); x ++) { - ; for (xx = 7; xx >= 0; xx --) { - ; code = (byte)(((1 << xx) & font[title[x]][y * 2 - offset]) > 0) + (byte)(((1 << xx) & font[title[x]][y * 2 + 1 - offset]) > 0) * 2; qq = qq + codes[code + 1 - 1]; @@ -86,12 +79,9 @@ void line(byte yy, string title) { void chips() { byte fv, x, y; - ; for (fv = 0; fv <= 1; fv ++) { - ; textattr = 120; for (y = 2; y <= 6; y ++) { - ; gotoxy(fv * 67 + 3, y); output << " "; if (fv == 1) output << ' '; @@ -102,7 +92,6 @@ void chips() { textattr = 7; for (x = 0; x <= 1; x ++) for (y = 2; y <= 6; y ++) { - ; gotoxy(fv * 67 + 2 + x * (6 + fv), y); output << 'ð'; } @@ -111,7 +100,6 @@ void chips() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 0; clrscr; chips(); @@ -126,7 +114,6 @@ int main(int argc, const char *argv[]) { centre(13, "you can do about this:"); textattr = 3; for (xx = 15; xx <= 17; xx ++) { - ; gotoxy(23, xx); output << '\20'; } diff --git a/engines/avalanche/scr_3.cpp b/engines/avalanche/scr_3.cpp index 54ad5b0f4d..3dd3373cea 100644 --- a/engines/avalanche/scr_3.cpp +++ b/engines/avalanche/scr_3.cpp @@ -46,7 +46,6 @@ void save() { file<atype> f; word fv; atype a /*absolute $B800:0*/; - ; assign(f, "TEXT3.SCR"); rewrite(f); f << a; @@ -55,23 +54,17 @@ void save() { void centre(byte y, string z) { byte fv; - ; for (fv = 1; fv <= length(z); fv ++) { - ; gotoxy(39 - length(z) / 2 + fv, y); if (z[fv] != '\40') output << z[fv]; } } void line(byte cx, byte cy, string title) { - ; for (y = 0; y <= 4; y ++) { - ; qq = ""; for (x = 1; x <= length(title); x ++) { - ; for (xx = 7; xx >= 0; xx --) { - ; code = (byte)(((1 << xx) & font[title[x]][y * 2]) > 0) + (byte)(((1 << xx) & font[title[x]][y * 2 + 1]) > 0) * 2; qq = qq + codes[code + 1 - 1]; @@ -86,12 +79,10 @@ void big_t() { text t; string x; byte y; - ; assign(t, "c:\\avalot\\t.txt"); reset(t); y = 1; while (! eof(t)) { - ; t >> x >> NL; gotoxy(1, y); output << x; @@ -101,7 +92,6 @@ void big_t() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 4; clrscr; assign(f, "c:\\thomas\\ttsmall.fnt"); diff --git a/engines/avalanche/scr_4.cpp b/engines/avalanche/scr_4.cpp index befde2a7f3..05e5fdcc3f 100644 --- a/engines/avalanche/scr_4.cpp +++ b/engines/avalanche/scr_4.cpp @@ -41,23 +41,17 @@ byte code; void centre(byte y, string z) { byte fv; - ; for (fv = 1; fv <= length(z); fv ++) { - ; gotoxy(39 - length(z) / 2 + fv, y); if (z[fv] != '\40') output << z[fv]; } } void line(byte cy, string title) { - ; for (y = 0; y <= 6; y ++) { - ; qq = ""; for (x = 1; x <= length(title); x ++) { - ; for (xx = 3; xx >= 0; xx --) { - ; code = (byte)(((1 << (xx * 2)) & font[title[x]][y]) > 0) + (byte)(((1 << (xx * 2 + 1)) & font[title[x]][y]) > 0) * 2; qq = qq + codes[code + 1 - 1]; @@ -71,12 +65,10 @@ void big_t() { text t; string x; byte y; - ; assign(t, "c:\\avalot\\t.txt"); reset(t); y = 1; while (! eof(t)) { - ; t >> x >> NL; gotoxy(1, y); output << x; @@ -86,7 +78,6 @@ void big_t() { void box(byte x1, byte y1, byte x2, byte y2, string z) { byte fv; - ; gotoxy(x1, y1); output << z[1]; /* tl */ gotoxy(x2, y1); @@ -96,7 +87,6 @@ void box(byte x1, byte y1, byte x2, byte y2, string z) { gotoxy(x2, y2); output << z[4]; /* br */ for (fv = y1 + 1; fv <= y2 - 1; fv ++) { - ; gotoxy(x1, fv); output << z[5]; /* verticals */ gotoxy(x2, fv); @@ -110,7 +100,6 @@ void box(byte x1, byte y1, byte x2, byte y2, string z) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 26; clrscr; assign(f, "c:\\thomas\\ttsmall.fnt"); diff --git a/engines/avalanche/scr_5.cpp b/engines/avalanche/scr_5.cpp index bc4472a6c8..a61bf86e9f 100644 --- a/engines/avalanche/scr_5.cpp +++ b/engines/avalanche/scr_5.cpp @@ -46,7 +46,6 @@ void save() { file<atype> f; word fv; atype a /*absolute $B800:0*/; - ; assign(f, "TEXT5.SCR"); rewrite(f); f << a; @@ -54,14 +53,10 @@ void save() { } void line(byte cx, byte cy, string title) { - ; for (y = 0; y <= 4; y ++) { - ; qq = ""; for (x = 1; x <= length(title); x ++) { - ; for (xx = 7; xx >= 0; xx --) { - ; code = (byte)(((1 << xx) & font[title[x]][y * 2]) > 0) + (byte)(((1 << xx) & font[title[x]][y * 2 + 1]) > 0) * 2; qq = qq + codes[code + 1 - 1]; @@ -74,9 +69,7 @@ void line(byte cx, byte cy, string title) { void uline() { byte fv, ff; - ; for (fv = 1; fv <= 10; fv ++) { - ; gotoxy(16 - fv, 21 - fv); textattr = fv; for (ff = 1; ff <= fv; ff ++) output << "ÄÍÍ-"; @@ -85,7 +78,6 @@ void uline() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; textattr = 0; clrscr; assign(f, "c:\\thomas\\ttsmall.fnt"); diff --git a/engines/avalanche/scr_9.cpp b/engines/avalanche/scr_9.cpp index f71afd0f61..6b0f3cd794 100644 --- a/engines/avalanche/scr_9.cpp +++ b/engines/avalanche/scr_9.cpp @@ -35,7 +35,6 @@ byte fv; untyped_file f; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; assign(f, "v:paralogo.scr"); clrscr; reset(f, 1); diff --git a/engines/avalanche/scrolls.cpp b/engines/avalanche/scrolls.cpp index 878f8d0f78..71bb0360ea 100644 --- a/engines/avalanche/scrolls.cpp +++ b/engines/avalanche/scrolls.cpp @@ -410,7 +410,6 @@ void block_drop(string fn, integer xl, integer yl, integer y) { for (fv = 1; fv <= yl; fv ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -715,7 +714,6 @@ void calldrivers() { break; /* ^D = (D)on't include pagebreak */ case '\2': case '\21': - ; break; /* ^B = speech (B)ubble, ^Q = (Q)uestion in dialogue box */ default: { bufsize += 1; diff --git a/engines/avalanche/sequence.cpp b/engines/avalanche/sequence.cpp index 2715e648b3..57d39a91db 100644 --- a/engines/avalanche/sequence.cpp +++ b/engines/avalanche/sequence.cpp @@ -47,17 +47,14 @@ namespace Avalanche { void then_show(byte what) { byte fv; - ; for (fv = 1; fv <= seq_length; fv ++) if (seq[fv] == 0) { - ; seq[fv] = what; return; } } void first_show(byte what) { - ; /* First, we need to blank out the entire array. */ fillchar(seq, sizeof(seq), '\0'); @@ -67,7 +64,6 @@ void first_show(byte what) { } void then_flip(byte where, byte ped) { - ; then_show(now_flip); dna.flip_to_where = where; @@ -75,13 +71,11 @@ void then_flip(byte where, byte ped) { } void start_to_close() { - ; lose_timer(reason_sequencer); set_up_timer(7, procsequence, reason_sequencer); } void start_to_open() { - ; dna.user_moves_avvy = false; /* They can't move. */ stopwalking; /* And they're not moving now. */ start_to_close(); /* Apart from that, it's the same thing. */ @@ -91,12 +85,10 @@ void call_sequencer(); /* This proc is called by Timeout when it's time to do another frame. */ static void shove_left() { - ; move(seq[2], seq[1], seq_length - 1); /* Shift everything to the left. */ } void call_sequencer() { - ; switch (seq[1]) { case 0: return; @@ -108,7 +100,6 @@ void call_sequencer() { } break; case 177: { - ; user_moves_avvy = true; fliproom(flip_to_where, flip_to_ped); /* 177 = Flip room. */ if (seq[1] == 177) shove_left(); diff --git a/engines/avalanche/setup.cpp b/engines/avalanche/setup.cpp index 072c3ef2a4..184e42f9a9 100644 --- a/engines/avalanche/setup.cpp +++ b/engines/avalanche/setup.cpp @@ -496,7 +496,6 @@ void getmaxmin() { centre(19, 1, "Thank you. Now please centre your joystick and hit a button."); do { - ; } while (!(buttona1() || buttona2())); readjoya(jmidx, jmidy); diff --git a/engines/avalanche/seu.cpp b/engines/avalanche/seu.cpp index 8025b9a4c1..4374de9c13 100644 --- a/engines/avalanche/seu.cpp +++ b/engines/avalanche/seu.cpp @@ -874,7 +874,6 @@ void escape_check() { memw[storage_seg * storage_ofs + 1] = 0; do { - ; } while (!(memw[storage_seg * storage_ofs + 1] > 9)); setvisualpage(1 - cp); @@ -882,14 +881,12 @@ void escape_check() { memw[storage_seg * storage_ofs + 1] = 0; do { - ; } while (!(memw[storage_seg * storage_ofs + 1] > 72)); setvisualpage(cp); memw[storage_seg * storage_ofs + 1] = 0; do { - ; } while (!(memw[storage_seg * storage_ofs + 1] > 9)); time1 = 0; @@ -973,7 +970,6 @@ int main(int argc, const char *argv[]) { read_kbd(); flippage(); do { - ; } while (!(memw[storage_seg * storage_ofs + 1] > 0)); } while (!(time1 == 0)); diff --git a/engines/avalanche/seu_avvy.cpp b/engines/avalanche/seu_avvy.cpp index 931fbf05b6..e0c29309cf 100644 --- a/engines/avalanche/seu_avvy.cpp +++ b/engines/avalanche/seu_avvy.cpp @@ -54,10 +54,8 @@ untyped_file outfile; void plotat(integer xx, integer yy) { /* Does NOT cameo the picture!*/ word soaa; - ; move(mani, aa[5], sizeof(mani)); { - ; aa[1] = a.xl; aa[2] = 0; aa[3] = a.yl; @@ -76,9 +74,7 @@ void explode(byte which) /* 0 is the first one! */ { byte fv, ff; word so1; /* size of one */ - ; { - ; so1 = a.size - 6; so1 += so1 / 4; seek(sf, 183 + soa + so1 * which); /* First is at 221 */ @@ -98,7 +94,6 @@ void explode(byte which) /* 0 is the first one! */ int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/sezedit.cpp b/engines/avalanche/sezedit.cpp index 73f5be19cf..1b90ed94bf 100644 --- a/engines/avalanche/sezedit.cpp +++ b/engines/avalanche/sezedit.cpp @@ -67,10 +67,8 @@ byte sumup() { word fv; byte total; byte sumup_result; - ; total = 0; for (fv = 0; fv <= bufsize - 1; fv ++) { - ; total += ord(was[fv]); } sumup_result = total; @@ -81,7 +79,6 @@ string findname(longint which) { string x; varying_string<10> q; string findname_result; - ; str(which, q); reset(nicknames); do { @@ -91,10 +88,8 @@ string findname(longint which) { nicknames >> x >> NL; } while (!(pos(q, x) > 0)); if (eof(nicknames)) { - ; findname_result = "noname"; } else { - ; Delete(x, 1, 3); /* lose "{__" */ Delete(x, pos(" ", x), 255); /* lose all chars after first space */ findname_result = x; @@ -105,22 +100,18 @@ string findname(longint which) { void cursor() { byte fv; - ; for (fv = 12; fv <= 15; fv ++) mem[0xa000 * cpos + fv * 80] = ~(mem[0xa000 * cpos + fv * 80]); } void xy() { - ; cpos = (bufpos / 80) * 1280 + (bufpos % 80); } void show() { word fv, orig, y; - ; for (fv = 0; fv <= 1999; fv ++) if (buffer[fv] != was[fv]) { - ; orig = (fv / 80) * 1280 + (fv % 80); for (y = 0; y <= 15; y ++) mem[0xa000 * orig + y * 80] = (byte)(font[buffer[fv]][y]); @@ -130,7 +121,6 @@ void show() { } void sizeup() { - ; do { switch (buffer[bufsize]) { case marker: @@ -148,7 +138,6 @@ void sizeup() { void graphics() { integer gd, gm; file<fonttype> fontfile; - ; gd = 3; gm = 1; initgraph(gd, gm, ""); @@ -170,7 +159,6 @@ static void legit(char r) { void edit_it() { byte fv; - ; for (fv = 1; fv <= bufsize; fv ++) buffer[fv] -= (byte)(177 * bufsize); fillchar(was, sizeof(was), '\0'); show(); @@ -183,40 +171,34 @@ void edit_it() { switch (readkey()) { /* extd keystrokes */ case 'K': if (bufpos > 0) { - ; bufpos -= 1; xy(); } break; /* Left */ case 'M': if (bufpos < bufsize) { - ; bufpos += 1; xy(); } break; /* Right */ case 'H': if (bufpos > 80) { - ; bufpos -= 80; xy(); } break; /* Up */ case 'P': if (bufpos < (cardinal)bufsize - 79) { - ; bufpos += 80; xy(); } break; /* Down */ case 'G': { - ; bufpos = 0; xy(); } break; /* Home */ case 'O': { - ; bufpos = bufsize; xy(); } @@ -241,7 +223,6 @@ void edit_it() { } break; case '\33': { - ; for (fv = 1; fv <= bufsize; fv ++) buffer[fv] += (byte)(177 * bufsize); restorecrtmode(); return; @@ -262,7 +243,6 @@ void saveit(longint ourchain, word oldsize, word newsize) { markertype m; integer sizechange; /* so's it can be +ve or -ve */ longint wheresit; /* "offset" value for "ourchain" */ - ; assign(tempf, "sez.tmp"); /* OK, here goes... */ sezhead.size = sezhead.size - longint(oldsize) + longint(newsize); /* adjust our size */ @@ -279,11 +259,9 @@ void saveit(longint ourchain, word oldsize, word newsize) { /* Now to move the markers */ output << "Moving markers..." << NL; for (fv = 1; fv <= sezhead.chains; fv ++) { - ; output << fv << '\15'; blockread(f, m, sizeof(m)); if (fv == ourchain) { /* Right, this one's ours! */ - ; wheresit = m.offset; /* recorded for later */ m.length = newsize - 1; m.checksum = sumup(); @@ -302,7 +280,6 @@ void saveit(longint ourchain, word oldsize, word newsize) { output << "Updating the chains..." << NL; while (total <= wheresit) { - ; blockread(f, buffer, 1, numread); blockwrite(tempf, buffer, numread, numwritten); output << '.'; @@ -317,7 +294,6 @@ void saveit(longint ourchain, word oldsize, word newsize) { output << NL; output << "Copying everything else..." << NL; while (! eof(f)) { /* high-speed copy */ - ; blockread(f, buffer, 17777, numread); blockwrite(tempf, buffer, numread); output << '.'; @@ -333,12 +309,10 @@ void saveit(longint ourchain, word oldsize, word newsize) { void particular() { word origsize; - ; bufsize = 0; output << "Which one\? (? for a list)"; input >> chainnum >> NL; if ((chainnum < 0) || (chainnum > sezhead.chains)) { - ; output << "Don't be silly!" << NL; return; } @@ -371,7 +345,6 @@ void particular() { output << r << NL; switch (r) { case 'N': { - ; output << NL; output << "New nickname (max 40 chars, Enter to cancel)?"; input >> temp >> NL; @@ -379,7 +352,6 @@ void particular() { } break; case 'E': { - ; setgraphmode(1); edit_it(); } @@ -398,10 +370,8 @@ void titles() { const varying_string<7> title = "SEZedit"; byte fv; char r; - ; settextstyle(1, 0, 0); for (fv = 7; fv >= 1; fv --) { - ; setcolor(fv * 2); setusercharsize(8 - fv, 1, 8 - fv, 1); outtextxy(fv * 65, fv * 40 - 30, title[fv - 1]); @@ -423,7 +393,6 @@ void addone() { /* Adds a new, empty chain to the end of the list. */ markertype m; array<1, 17777, byte> buffer; word numread; - ; assign(tempf, "sez.tmp"); textattr = 27; rewrite(tempf, 1); @@ -437,7 +406,6 @@ void addone() { /* Adds a new, empty chain to the end of the list. */ /* Now to move the markers */ output << "Moving markers..." << NL; for (fv = 1; fv <= sezhead.chains - longint(1); fv ++) { /* -1 because we've added 1 to it */ - ; output << fv << '\12'; blockread(f, m, sizeof(m)); blockwrite(tempf, m, sizeof(m)); @@ -445,7 +413,6 @@ void addone() { /* Adds a new, empty chain to the end of the list. */ output << "Done OK." << NL; /* Now we add a new marker onto the end! */ { - ; m.offset = sezhead.size; /* right onto the end */ m.length = 0; /* it's empty */ } @@ -454,7 +421,6 @@ void addone() { /* Adds a new, empty chain to the end of the list. */ /* Copy everything else... including the #177 check char */ output << "Copying everything else over..." << NL; while (! eof(f)) { - ; blockread(f, buffer, 17777, numread); blockwrite(tempf, buffer, numread); output << '.'; @@ -468,7 +434,6 @@ void addone() { /* Adds a new, empty chain to the end of the list. */ void general() { char r; - ; do { textattr = 31; output << NL; @@ -499,7 +464,6 @@ void general() { } void loadit() { - ; reset(f, 1); blockread(f, junk, 255); blockread(f, sezhead, sizeof(sezhead)); @@ -508,7 +472,6 @@ void loadit() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; assign(f, string(game) + ".SEZ"); assign(tempf, "sez.tmp"); assign(nicknames, string(game) + ".NIK"); diff --git a/engines/avalanche/sezunit.cpp b/engines/avalanche/sezunit.cpp index fa7bbb8c79..2841a960ff 100644 --- a/engines/avalanche/sezunit.cpp +++ b/engines/avalanche/sezunit.cpp @@ -45,7 +45,6 @@ word fv; byte sum; void sez_setup() { /* This procedure sets up the Sez system (obviously!) */ - ; /* Set up variables */ @@ -65,10 +64,8 @@ void sez_setup() { /* This procedure sets up the Sez system (obviously!) */ return; } { - ; if ((sezhead.initials != "TT") || (sezhead.gamecode != thisgamecode) || (sezhead.revision != thisvercode)) { - ; sezerror = sezgunkyfile; /* not a valid file */ return; } @@ -79,10 +76,8 @@ byte sumup() { word fv; byte total; byte sumup_result; - ; total = 0; for (fv = 0; fv <= chainsize; fv ++) { - ; total += ord(chain[fv]); } sumup_result = total; @@ -90,17 +85,14 @@ byte sumup() { } void getchain(longint number) { - ; seek(f, longint(262) + number * longint(7)); blockread(f, marker, 7); { - ; seek(f, longint(270) + sezhead.chains * longint(7) + marker.offset); blockread(f, chain, marker.length + 1); for (fv = 0; fv <= marker.length; fv ++) chain[fv] -= 3 + 177 * fv * marker.length; /* unscramble */ chainsize = marker.length; if (sumup() != marker.checksum) { - ; sezerror = sezhacked; return; } diff --git a/engines/avalanche/sezxfr.cpp b/engines/avalanche/sezxfr.cpp index 7d56e668fe..79876930d4 100644 --- a/engines/avalanche/sezxfr.cpp +++ b/engines/avalanche/sezxfr.cpp @@ -41,7 +41,6 @@ longint total; untyped_file f; void strip() { - ; x = copy(x, 2, 255); } @@ -49,7 +48,6 @@ void squish(string &q) { string n; boolean ctrl; byte fv; - ; ctrl = false; n = ""; for (fv = 1; fv <= length(q); fv ++) @@ -67,7 +65,6 @@ void squish(string &q) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; dp = 0; ip = 0; fillchar(data, sizeof(data), '\0'); @@ -76,17 +73,14 @@ int main(int argc, const char *argv[]) { assign(t, "v:sez.dat"); reset(t); while (! eof(t)) { - ; t >> x >> NL; switch (x[1]) { case ';': { - ; textattr = lightred; strip(); } break; case ':': { - ; textattr = lightblue; strip(); if (dp > 0) squish(data[dp][2]); @@ -101,7 +95,6 @@ int main(int argc, const char *argv[]) { } break; default: { - ; textattr = white; data[dp][2] = data[dp][2] + x + '\40'; } @@ -112,7 +105,6 @@ int main(int argc, const char *argv[]) { total = 1; for (fv = 1; fv <= dp; fv ++) { - ; thumb[fv] = total; total += length(data[fv][2]) + 1; } diff --git a/engines/avalanche/shell1.cpp b/engines/avalanche/shell1.cpp index 358f679e61..fa9513960a 100644 --- a/engines/avalanche/shell1.cpp +++ b/engines/avalanche/shell1.cpp @@ -39,7 +39,6 @@ pointer where; string comspec; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; getintvec(0x1f, where); move(where, table, 1280); comspec = getenv("comspec"); diff --git a/engines/avalanche/shell2.cpp b/engines/avalanche/shell2.cpp index 9ca4e29599..1c7e52217b 100644 --- a/engines/avalanche/shell2.cpp +++ b/engines/avalanche/shell2.cpp @@ -39,7 +39,6 @@ pointer where; integer gd, gm; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; getintvec(0x1f, where); move(where, table, 1280); gd = 1; diff --git a/engines/avalanche/spread.cpp b/engines/avalanche/spread.cpp index 21e73cac46..17a494cf41 100644 --- a/engines/avalanche/spread.cpp +++ b/engines/avalanche/spread.cpp @@ -56,7 +56,6 @@ void load() { untyped_file f; byte gd, gm, sort, n; pointer p, q; - ; assign(f, string("v:sprite") + sn + ".avd"); reset(f, 1); seek(f, 59); @@ -64,7 +63,6 @@ void load() { blockread(f, bigsize, 2); setactivepage(3); for (sort = 0; sort <= 1; sort ++) { - ; mark(q); getmem(p, bigsize); blockread(f, p, bigsize); @@ -73,7 +71,6 @@ void load() { n = 1; for (gm = 0; gm <= (a.num / a.seq) - 1; gm ++) /* directions */ for (gd = 0; gd <= a.seq - 1; gd ++) { /* steps */ - ; getmem(pic[n][sort], a.size); /* grab the memory */ getimage((gm / 2) * (a.xl * 6) + gd * a.xl, (gm % 2)*a.yl, (gm / 2) * (a.xl * 6) + gd * a.xl + a.xl - 1, (gm % 2)*a.yl + a.yl - 1, @@ -91,9 +88,7 @@ void save() { pointer p, q; string x; integer txl, tyl; - ; { - ; txl = a.seq * a.xl * 2; tyl = a.yl * 2; } @@ -107,13 +102,11 @@ void save() { blockwrite(f, bigsize, 2); setactivepage(3); for (sort = 0; sort <= 1; sort ++) { - ; mark(q); getmem(p, bigsize); n = 1; for (gm = 0; gm <= (a.num / a.seq) - 1; gm ++) /* directions */ for (gd = 0; gd <= a.seq - 1; gd ++) { /* steps */ - ; putimage((gm / 2) * (a.xl * 6) + gd * a.xl, (gm % 2)*a.yl, pic[n][sort], 0); /* drop the pic */ n += 1; @@ -128,7 +121,6 @@ void save() { void setup() { integer gd, gm; - ; output << "SPREAD (c) 1992, Thomas Thurman." << NL; output << NL; output << "Enter number of SPRITE*.AVD file to edit:"; @@ -142,16 +134,13 @@ void setup() { string strf(longint x) { string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; } void likethis() { - ; { - ; setfillstyle(1, a.bgc); setcolor(a.fgc); settextstyle(0, 0, 1); @@ -162,7 +151,6 @@ void likethis() { void values() { byte fv; - ; settextstyle(2, 0, 9); setcolor(14); outtextxy(277, 0, string("Spread: editing ") + sn); @@ -171,7 +159,6 @@ void values() { settextstyle(2, 0, 7); outtextxy(0, 30, "Views:"); { - ; outtextxy(0, 50, string("N: Name: ") + a.name); outtextxy(0, 70, string("No. of pictures: ") + strf(a.num) + " (" + strf(a.num / a.seq) + " ways)"); outtextxy(0, 90, string("XY: Size: ") + strf(a.xl) + 'x' + strf(a.yl)); @@ -193,11 +180,9 @@ void values() { byte ccol() { byte fv; byte ccol_result; - ; restorecrtmode(); output << "Choose a colour- one of these..." << NL; for (fv = 0; fv <= 15; fv ++) { - ; textattr = 14; output << fv << ") "; textattr = fv; @@ -218,7 +203,6 @@ byte ccol() { string cstr(string oc) { string x; string cstr_result; - ; restorecrtmode(); output << string("Old choice is: <") + oc + '>' << NL; output << NL; @@ -239,14 +223,12 @@ longint cnum(longint on) { longint q; integer e; longint cnum_result; - ; restorecrtmode(); do { output << "Old value is: " << on << '.' << NL; output << string("New choice, or Enter for no change?") + prompt; input >> x >> NL; if (x == "") { - ; e = 0; /* must be OK here */ q = on; } else val(x, q, e); if (e != 0) output << x << " isn't a number, silly!" << NL; @@ -258,7 +240,6 @@ longint cnum(longint on) { void animate() { byte facing, step, slow, fv; - ; cleardevice(); settextstyle(0, 0, 2); setcolor(12); @@ -275,13 +256,11 @@ void animate() { if (keypressed()) switch (upcase(readkey())) { case '\15': { - ; facing += 1; if (facing * a.seq >= a.num) facing = 0; } break; case '\33': { - ; cleardevice(); return; } @@ -303,14 +282,12 @@ void animate() { byte tabpel(integer x, integer y) { byte tabpel_result; - ; if (getpixel(400 + x, 17 + y) == 15) tabpel_result = 17; else tabpel_result = getpixel(500 + x, 17 + y); return tabpel_result; } void bigpixel(integer x, integer y, byte size, byte col) { - ; if (col == 17) setfillstyle(9, 8); else setfillstyle(1, col); bar(x * size, y * size, x * size + size - 2, y * size + size - 2); @@ -318,9 +295,7 @@ void bigpixel(integer x, integer y, byte size, byte col) { void blowup(byte n) { byte fv, x, y, xyl; - ; { - ; for (fv = 0; fv <= 1; fv ++) putimage(400 + fv * 100, 17, pic[n][fv], 0); xyl = 200 / a.yl; for (x = 0; x <= a.xl; x ++) @@ -333,7 +308,6 @@ void edit(); static void putnum(byte x, byte p) { varying_string<2> z; - ; str(x, z); outtextxy(x * 53 + 17, 87, z); putimage(x * 53, 100, pic[p][1], 0); @@ -341,7 +315,6 @@ static void putnum(byte x, byte p) { static void title() { - ; cleardevice(); setcolor(11); settextstyle(0, 0, 2); @@ -352,9 +325,7 @@ static void title() { void edit() { byte fv, ra, rb; - ; { - ; title(); for (fv = 1; fv <= (a.num / a.seq); fv ++) putnum(fv, fv * a.seq); do { @@ -375,7 +346,6 @@ void edit() { void pickone() { char r; - ; r = upcase(readkey()); switch (r) { case 'N': @@ -408,7 +378,6 @@ void pickone() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; setup(); do { values(); diff --git a/engines/avalanche/spread2.cpp b/engines/avalanche/spread2.cpp index c6c586921d..b2faed3508 100644 --- a/engines/avalanche/spread2.cpp +++ b/engines/avalanche/spread2.cpp @@ -74,7 +74,6 @@ void setup() { boolean ok; longint id; varying_string<2> sn; - ; output << "Sprite Editor 2 (c) 1993, Thomas Thurman." << NL; bigpix_size = 3; bigpix_gap = 5; @@ -87,17 +86,14 @@ void setup() { seek(sf, 177); blockread(sf, id, 4); if (id != shouldid) { - ; output << "That isn't a valid Trip5 spritefile." << NL; output << "Please choose another." << NL; output << NL; ok = false; close(sf); } else { - ; blockread(sf, soa, 2); if (soa != (cardinal)sizeof(a)) { /* to change this, just change the "type adx=" bit.*/ - ; output << "That spritefile contains an unknown ADX field type." << NL; output << "Please choose another." << NL; output << NL; @@ -118,20 +114,17 @@ void setup() { string strf(longint x) { string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; } void centre(byte y, string z) { - ; gotoxy(40 - length(z) / 2, y); output << z; } void info(byte x, byte y, string p, string q) { - ; gotoxy(x, y); textattr = 6; output << p + ":ú"; @@ -142,7 +135,6 @@ void info(byte x, byte y, string p, string q) { } void colours(byte f, byte b) { - ; gotoxy(35, 11); textattr = 6; output << "Bubbles"; @@ -151,9 +143,7 @@ void colours(byte f, byte b) { } void adxinfo() { - ; { - ; info(5, 8, "Name", a.name); info(35, 8, "Comment", a.comment); info(5, 9, "Width", strf(a.xl)); @@ -168,7 +158,6 @@ void adxinfo() { } void status() { - ; textattr = 7; clrscr; textattr = 10; @@ -190,7 +179,6 @@ void status() { void enterstring(string w, byte l, string &q) { string t; - ; textattr = 13; clrscr; output << NL; @@ -208,26 +196,22 @@ void entercolour(string w, byte &c); static byte fv; static void loseold() { - ; output << string('\10') + '\377'; } static void drawnew() { - ; gotoxy(3 + fv * 5, 11); output << '\30'; } void entercolour(string w, byte &c) { - ; textattr = 13; clrscr; output << NL; output << "New value for " << w << '?' << NL; output << " Use \32\33 to move about, Enter=OK, Esc=Cancel." << NL; for (fv = 1; fv <= 15; fv ++) { - ; gotoxy(3 + fv * 5, 10); textattr = fv; output << 'þ'; @@ -241,7 +225,6 @@ void entercolour(string w, byte &c) { return; break; /* no change to c */ case '\15': { - ; c = fv; adxmodi = true; return; @@ -250,14 +233,12 @@ void entercolour(string w, byte &c) { case '\0': switch (readkey()) { case 'G': { - ; loseold(); fv = 0; drawnew(); } break; /* home */ case 'O': { - ; loseold(); fv = 15; drawnew(); @@ -265,7 +246,6 @@ void entercolour(string w, byte &c) { break; /* end */ case 'K': if (fv > 0) { - ; loseold(); fv -= 1; drawnew(); @@ -273,7 +253,6 @@ void entercolour(string w, byte &c) { break; /* left */ case 'M': if (fv < 15) { - ; loseold(); fv += 1; drawnew(); @@ -289,7 +268,6 @@ void enternum(string w, byte &q) { string t; integer e; byte r; - ; textattr = 13; clrscr; output << NL; @@ -306,7 +284,6 @@ void enternum(string w, byte &q) { void editadx() { char r; - ; do { clrscr; textattr = 10; @@ -344,12 +321,10 @@ void editadx() { void saveit() { char pak; integer oldsoa; - ; textattr = 10; clrscr; centre(7, "Saving!"); if (adxmodi) { - ; centre(10, "ADX information being saved..."); seek(sf, 181); /* start of ADX info */ soa = sizeof(a); @@ -367,7 +342,6 @@ void saveit() { } void quit() { - ; close(sf); exit(0); } @@ -375,7 +349,6 @@ void quit() { void getsilmani() { /* Reclaims original sil & mani arrays */ byte x, y, z; word offs; - ; /* Sil... */ @@ -384,7 +357,6 @@ void getsilmani() { /* Reclaims original sil & mani arrays */ for (x = 0; x <= 3; x ++) for (y = 0; y <= a.yl; y ++) for (z = 0; z <= (a.xl / 8); z ++) { - ; offs = 5 + y * xw * 4 + xw * x + z; sil[y][z] = aa[offs]; } @@ -402,9 +374,7 @@ void explode(byte which) /* 0 is the first one! */ { byte fv, ff; word so1; /* size of one */ - ; { - ; so1 = a.size - 6; so1 += so1 / 4; seek(sf, 183 + soa + so1 * which); /* First is at 221 */ @@ -423,9 +393,7 @@ void explode(byte which) /* 0 is the first one! */ void implode(byte which) { /* Writes a pic back onto the disk */ byte fv, ff; word so1; /* size of one */ - ; { - ; getsilmani(); /* Restore original arrays */ @@ -445,10 +413,8 @@ void implode(byte which) { /* Writes a pic back onto the disk */ } void plotat(integer xx, integer yy) { /* Does NOT cameo the picture!*/ - ; move(mani, aa[5], sizeof(mani)); { - ; aa[1] = a.xl; aa[2] = 0; aa[3] = a.yl; @@ -460,17 +426,14 @@ void plotat(integer xx, integer yy) { /* Does NOT cameo the picture!*/ void plotsil(integer xx, integer yy) { /* Plots silhouette- rarely used */ byte x, y, z; word offs; - ; for (x = 0; x <= 3; x ++) for (y = 0; y <= a.yl; y ++) for (z = 0; z <= (a.xl / 8); z ++) { - ; offs = 5 + y * xw * 4 + xw * x + z; aa[offs] = sil[y][z]; } { - ; aa[1] = a.xl; aa[2] = 0; aa[3] = a.yl; @@ -482,7 +445,6 @@ void plotsil(integer xx, integer yy) { /* Plots silhouette- rarely used */ } void style(byte x) { - ; if (x == 16) /*setfillstyle(pattern,8)*/setfillpattern(grey50, 8); else @@ -490,7 +452,6 @@ void style(byte x) { } void bigpixel(integer x, integer y) { - ; if (getpixel(500 + x, 150 + y) == 15) /*setfillstyle(pattern,8)*/setfillpattern(grey50, 8); else @@ -501,7 +462,6 @@ void bigpixel(integer x, integer y) { } void subplot(byte y, integer x, char c) { - ; setfillstyle(1, 0); bar(x, 0, x + 9, 170); outtextxy(x + 5, y * 10 + 5, c); @@ -512,28 +472,23 @@ void plotleft() { subplot(leftc, 239, '\32'); } void plotright() { - ; subplot(rightc, 351, '\33'); } void plotbig(byte x, byte y, byte c) { - ; style(c); bar(x * bigpix_gap, y * bigpix_gap, x * bigpix_gap + bigpix_size, y * bigpix_gap + bigpix_size); if (c == 16) { - ; putpixel(500 + x, 150 + y, 15); putpixel(500 + x, 50 + y, 0); } else { - ; putpixel(500 + x, 150 + y, 0); putpixel(500 + x, 50 + y, c); } } void changepic() { - ; mx = mx / bigpix_gap; my = my / bigpix_gap; if ((mx > a.xl) || (my > a.yl)) return; @@ -544,22 +499,18 @@ void changepic() { } void changecol() { - ; my = my / 10; if (my > 16) return; if (mkey == left) { - ; leftc = my; plotleft(); } else { - ; rightc = my; plotright(); } } void showcutpic() { - ; setfillstyle(5, 1); bar(20, 160, 40 + clipx, 180 + clipy); putimage(30, 170, clip[2], andput); @@ -568,7 +519,6 @@ void showcutpic() { void movesquare(integer &xc, integer &yc, integer xl, integer yl) { integer x2, y2; - ; do { x2 = xl + xc; y2 = yl + yc; @@ -612,7 +562,6 @@ void switch_(integer &v1, integer &v2) /* Swaps over the values of v1 and v2. */ { integer temp; - ; temp = v1; v1 = v2; v2 = temp; @@ -620,7 +569,6 @@ void switch_(integer &v1, integer &v2) void choosesquare(integer &x1, integer &y1, integer &x2, integer &y2) { boolean tl; - ; do { setcolor(15); do { @@ -655,7 +603,6 @@ void choosesquare(integer &x1, integer &y1, integer &x2, integer &y2) { tl = ! tl; break; case '\15': { - ; if (x1 > x2) switch_(x1, x2); /* Get the square the right way up. */ if (y1 > y2) switch_(y1, y2); y2 -= y1; @@ -667,7 +614,6 @@ void choosesquare(integer &x1, integer &y1, integer &x2, integer &y2) { if (x1 < 0) x1 = 0; if (y1 < 0) y1 = 0; { - ; if (y2 > a.yl) y2 = a.yl; if (x2 > a.xl) x2 = a.xl; } @@ -676,9 +622,7 @@ void choosesquare(integer &x1, integer &y1, integer &x2, integer &y2) { void paste() { byte x, y; - ; if (! boardfull) { - ; output << '\7'; return; } @@ -688,17 +632,14 @@ void paste() { putimage(500 + xofs, 150 + yofs, clip[2], 0); for (x = 0; x <= a.xl; x ++) for (y = 0; y <= a.yl; y ++) { - ; bigpixel(x, y); } } void cut() { - ; xofs = 0; yofs = 0; /* From the TL. */ { - ; getimage(500, 50, 500 + a.xl, 50 + a.yl, clip[1]); getimage(500, 150, 500 + a.xl, 150 + a.yl, clip[2]); clipx = a.xl; @@ -709,9 +650,7 @@ void cut() { } void cutsome() { - ; { - ; choosesquare(xofs, yofs, clipx, clipy); getimage(500 + xofs, 50 + yofs, 500 + xofs + clipx, 50 + yofs + clipy, clip[1]); getimage(500 + xofs, 150 + yofs, 500 + xofs + clipx, 150 + yofs + clipy, clip[2]); @@ -724,7 +663,6 @@ boolean confirm(char c, string x) { byte col; char groi; boolean confirm_result; - ; while (keypressed()) groi = readkey(); x = x + "? " + c + " to confirm."; col = 1; @@ -741,12 +679,10 @@ boolean confirm(char c, string x) { } void checkbutton(byte which) { - ; my = (my - 12) / 25; switch (my) { case 0: if (confirm('S', "Save")) { - ; implode(which); lmo = true; } @@ -767,22 +703,18 @@ void checkbutton(byte which) { } void animate() { - ; } void undo() { - ; } void fliplr(); static void flipline(integer x1, integer x2, integer y) { integer fv, ff; - ; for (fv = x1; fv <= x2; fv ++) putpixel(fv, 0, getpixel(fv, y)); ff = x2; for (fv = x1; fv <= x2; fv ++) { - ; putpixel(fv, y, getpixel(ff, 0)); ff -= 1; } @@ -790,9 +722,7 @@ static void flipline(integer x1, integer x2, integer y) { void fliplr() { /* Flips left-to-right. */ integer fv, ff; - ; for (fv = 0; fv <= a.yl; fv ++) { - ; flipline(500, 500 + a.xl, 50 + fv); flipline(500, 500 + a.xl, 150 + fv); } @@ -803,10 +733,8 @@ void fliplr() { /* Flips left-to-right. */ void change_colours() { /* Swaps one colour with another. */ byte fv, ff; - ; if ((leftc == 16) || (rightc == 16)) { /* See-through can't be one of the colours. */ - ; output << '\7'; /* Bleep! */ return; } @@ -823,19 +751,16 @@ void change_colours() { /* Swaps one colour with another. */ void redraw() { byte x, y; - ; setfillstyle(1, 0); bar(0, 0, 250, 200); for (x = 0; x <= a.xl; x ++) for (y = 0; y <= a.yl; y ++) { - ; bigpixel(x, y); } } void parse(char c) { /* Parses keystrokes */ - ; switch (upcase(c)) { case '\26': case 'P': @@ -863,7 +788,6 @@ void parse(char c) { /* Parses keystrokes */ break; case '<': if (bigpix_size > 1) { - ; bigpix_size -= 1; bigpix_gap -= 1; redraw(); @@ -871,7 +795,6 @@ void parse(char c) { /* Parses keystrokes */ break; case '>': if (bigpix_size < 8) { - ; bigpix_size += 1; bigpix_gap += 1; redraw(); @@ -885,18 +808,15 @@ void parse(char c) { /* Parses keystrokes */ void editone(byte which) { byte x, y; - ; cleardevice(); explode(which); plotat(500, 50); plotsil(500, 150); for (x = 0; x <= a.xl; x ++) for (y = 0; y <= a.yl; y ++) { - ; bigpixel(x, y); } for (y = 0; y <= 16; y ++) { - ; style(y); bar(251, y * 10 + 1, 349, y * 10 + 9); rectangle(250, y * 10, 350, y * 10 + 10); @@ -929,7 +849,6 @@ void editone(byte which) { off; if (! lmo) { - ; getbuttonstatus; switch (mx) { @@ -957,13 +876,11 @@ static shortint first; static void drawup(byte &which) { byte fv; - ; whichc = chr(which + 48); cleardevice(); outtextxy(320, 10, string("Edit stride ") + whichc); first = (which - 1) * a.seq - 1; for (fv = 1; fv <= a.seq; fv ++) { - ; explode(fv + first); plotat(fv * 73, 77); outtextxy(17 + fv * 73, 64, chr(fv + 48)); @@ -973,12 +890,10 @@ static void drawup(byte &which) { void editstride(byte which) { char r; - ; drawup(which); do { r = readkey(); if ((r > '0') && (r <= chr(a.seq + 48))) { - ; editone(ord(r) - 48 + first); drawup(which); } @@ -991,7 +906,6 @@ static byte nds; /* num div seq */ static void drawup1() { byte fv; - ; setgraphmode(0); directvideo = false; settextjustify(1, 1); @@ -1000,7 +914,6 @@ static void drawup1() { outtextxy(320, 10, "Edit pictures..."); outtextxy(320, 40, "(Usually, 1=away, 2=right, 3=towards, 4=left.)"); for (fv = 1; fv <= nds; fv ++) { - ; explode((fv - 1)*a.seq); plotat(fv * 73, 100); outtextxy(17 + fv * 73, 87, chr(fv + 48)); @@ -1013,12 +926,10 @@ void editpics() { char r; byte which; integer e; - ; drawup1(); do { r = readkey(); if ((r > '0') && (r <= chr(nds + 48))) { - ; editstride(ord(r) - 48); drawup1(); } @@ -1030,7 +941,6 @@ void titles() { integer gd, gm; char pak; word wait; - ; gd = 3; gm = 1; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -1040,23 +950,19 @@ void titles() { wait = 0; do { for (gm = 0; gm <= 15; gm ++) { - ; setcolor(15 - gm); for (gd = 0; gd <= (150 - gm * 10); gd ++) { - ; outtextxy(320, 124 - gd, "Spread 2"); outtextxy(320, 125 + gd, "Spread 2"); if ((gd == 5) && (gm == 0)) wait = 2345; if ((gd == 6) && (gm == 0)) wait = 0; do { if (keypressed()) { - ; while (keypressed()) pak = readkey(); restorecrtmode(); return; } if (wait > 0) { - ; wait -= 1; delay(1); } @@ -1068,7 +974,6 @@ void titles() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; titles(); setup(); do { diff --git a/engines/avalanche/squish.cpp b/engines/avalanche/squish.cpp index fc49a5e7f1..a083af054c 100644 --- a/engines/avalanche/squish.cpp +++ b/engines/avalanche/squish.cpp @@ -250,7 +250,6 @@ void initialize() blockread(input_file, method, 1); if (method == 177) { - ; output << "It's already compressed!" << NL; exit(177); } diff --git a/engines/avalanche/ss_blank.cpp b/engines/avalanche/ss_blank.cpp index 04f0da9e6b..9be7982862 100644 --- a/engines/avalanche/ss_blank.cpp +++ b/engines/avalanche/ss_blank.cpp @@ -36,7 +36,6 @@ boolean test; boolean the_cows_come_home() { registers rmove, rclick; boolean the_cows_come_home_result; - ; rmove.ax = 11; intr(0x33, rmove); rclick.ax = 3; @@ -51,12 +50,10 @@ boolean the_cows_come_home() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; test = the_cows_come_home(); textattr = 0; clrscr; do { - ; } while (!the_cows_come_home()); textattr = 30; clrscr; diff --git a/engines/avalanche/ss_clock.cpp b/engines/avalanche/ss_clock.cpp index aa74b806ed..1ac8763234 100644 --- a/engines/avalanche/ss_clock.cpp +++ b/engines/avalanche/ss_clock.cpp @@ -46,7 +46,6 @@ boolean test; boolean the_cows_come_home() { registers rmove, rclick; boolean the_cows_come_home_result; - ; rmove.ax = 11; intr(0x33, rmove); rclick.ax = 3; @@ -64,12 +63,10 @@ string time1() { varying_string<2> hh, mm, ss; char ampm; string time1_result; - ; gettime(h, m, s, s1); if (h < 12) ampm = 'a'; else { - ; ampm = 'p'; if (h == 0) h = 12; else h -= 12; /* 24-hr adjustment */ @@ -83,7 +80,6 @@ string time1() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; test = the_cows_come_home(); gm = registerbgidriver(&egavgadriverproc); gd = 3; @@ -105,7 +101,6 @@ int main(int argc, const char *argv[]) { if (count > 0) count -= 1; { pointtype &with = pages[cp]; - ; if (count == 0) bar(with.x, with.y, with.x + width, with.y + height); with.x = xx; diff --git a/engines/avalanche/stars.cpp b/engines/avalanche/stars.cpp index 83490de6d5..09bbe3f931 100644 --- a/engines/avalanche/stars.cpp +++ b/engines/avalanche/stars.cpp @@ -191,7 +191,6 @@ void do_stuff() { void setcol(byte which, byte what) /*var dummy:byte;*/ { - ; /* setpalette(which,what); asm (* mov dx,$3DA; diff --git a/engines/avalanche/status.cpp b/engines/avalanche/status.cpp index b4dd206c2a..e81f092294 100644 --- a/engines/avalanche/status.cpp +++ b/engines/avalanche/status.cpp @@ -32,7 +32,6 @@ namespace Avalanche { integer gd, gm; void data(integer y, string a, string b) { - ; setcolor(1); settextjustify(2, 0); outtextxy(315, y, a + ':'); @@ -43,7 +42,6 @@ void data(integer y, string a, string b) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\turbo"); diff --git a/engines/avalanche/sticks.cpp b/engines/avalanche/sticks.cpp index 97b60f74f6..6b7965afc1 100644 --- a/engines/avalanche/sticks.cpp +++ b/engines/avalanche/sticks.cpp @@ -48,7 +48,6 @@ byte joyway(); static lmc getlmc(word n, word max, word min) { lmc getlmc_result; - ; if (n < min) getlmc_result = l; else if (n > max) getlmc_result = r; else @@ -60,13 +59,11 @@ byte joyway() { word x, y; lmc xx, yy; byte joyway_result; - ; if (~ dna.user_moves_avvy) return joyway_result; if (use_joy_a) readjoya(x, y); else readjoyb(x, y); { - ; xx = getlmc(x, cxmax, cxmin); yy = getlmc(y, cymax, cymin); } @@ -119,7 +116,6 @@ void joykeys() /* The 2 joystick keys may be reprogrammed. This parses them. */ { byte v; - ; if (use_joy_a) { v = (byte)(buttona1); v += (byte)(buttona2) * 2; diff --git a/engines/avalanche/sunrise.cpp b/engines/avalanche/sunrise.cpp index 7baa88fe87..f5e1f35fef 100644 --- a/engines/avalanche/sunrise.cpp +++ b/engines/avalanche/sunrise.cpp @@ -34,16 +34,13 @@ integer gd, gm; longint tskellern /*absolute $0:244*/; /* Over int $61 */ void hold() { - ; do { - ; } while (!(tskellern >= 1)); tskellern = 0; } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 1; initgraph(gd, gm, "c:\\bp\\bgi"); @@ -78,14 +75,12 @@ int main(int argc, const char *argv[]) { port[0x3cf] = 1; for (gm = 227; gm >= 1; gm --) { /* <<< try running this loop the other way round! */ - ; move(mem[0xa000 * gm * 80 + 80], mem[0xa000 * gm * 80], 8042); hold(); if (keypressed()) return 0; } for (gm = 101; gm >= 1; gm --) { - ; move(mem[0xa000 * 80], mem[0xa000 * 0], gm * 80); hold(); if (keypressed()) return 0; diff --git a/engines/avalanche/tempo.cpp b/engines/avalanche/tempo.cpp index 914ba60d3a..7374330707 100644 --- a/engines/avalanche/tempo.cpp +++ b/engines/avalanche/tempo.cpp @@ -50,7 +50,6 @@ untyped_file f; string strf(longint x) { string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; @@ -59,11 +58,9 @@ string strf(longint x) { void load() { byte a /*absolute $A000:1200*/; byte bit; - ; reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -76,7 +73,6 @@ void load() { void init() { integer gd, gm; - ; output << "*** Tempo file creater ***" << NL; output << "Enter place*.avd number:"; input >> screennum >> NL; @@ -93,13 +89,11 @@ void init() { void choose() { integer x1, y1, xl, yl; - ; } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; init(); choose(); return EXIT_SUCCESS; diff --git a/engines/avalanche/test.cpp b/engines/avalanche/test.cpp index 220c92c2c2..016322fb67 100644 --- a/engines/avalanche/test.cpp +++ b/engines/avalanche/test.cpp @@ -34,7 +34,6 @@ const array<1, 22, char> signature = string("*AVALOT* v1.00 ±tt± ") + '\3' + '\0 pointer saveint1f; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; getintvec(0x1f, saveint1f); setintvec(0x1f, &signature); swapvectors; diff --git a/engines/avalanche/test2.cpp b/engines/avalanche/test2.cpp index dfdaae5227..1452ff89fd 100644 --- a/engines/avalanche/test2.cpp +++ b/engines/avalanche/test2.cpp @@ -34,7 +34,6 @@ pointer getint1f; array<1, 22, char> x; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; getintvec(0x1f, getint1f); move(getint1f, x, 22); if (x == signature) diff --git a/engines/avalanche/testblit.cpp b/engines/avalanche/testblit.cpp index b58ddc628d..ff2d381815 100644 --- a/engines/avalanche/testblit.cpp +++ b/engines/avalanche/testblit.cpp @@ -41,10 +41,8 @@ word s; void mblit() { byte bit; longint st; - ; st = ttp; for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = mb1; portw[0x3ce] = copyput * 256 + 3; portw[0x3ce] = 0x205; @@ -57,13 +55,11 @@ void mblit() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, ""); settextstyle(1, 0, 7); for (gd = 0; gd <= 1; gd ++) { - ; setactivepage(gd); setcolor(6 * gd + 6); outtextxy(0, 0, chr(65 + gd)); diff --git a/engines/avalanche/testcard.cpp b/engines/avalanche/testcard.cpp index aec0d92aed..a0bcdc8fdd 100644 --- a/engines/avalanche/testcard.cpp +++ b/engines/avalanche/testcard.cpp @@ -40,14 +40,12 @@ searchrec r; int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); for (gd = 0; gd <= 14; gd ++) for (gm = 0; gm <= 11; gm ++) { - ; setfillstyle(gm, gd + 1); bar(gd * 43, gm * 12 + 10, 42 + gd * 43, gm * 12 + 21); } @@ -64,7 +62,6 @@ int main(int argc, const char *argv[]) { findfirst(string("place") + filename + ".avd", anyfile, r); if (doserror == 0) { - ; output << "*** ALREADY EXISTS! CANCELLED! ***" << NL; input >> NL; exit(0); @@ -80,7 +77,6 @@ int main(int argc, const char *argv[]) { rewrite(f, 1); blockwrite(f, gd, 177); /* just anything */ for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/testenh.cpp b/engines/avalanche/testenh.cpp index d0a0ac31f6..2ce1932d1e 100644 --- a/engines/avalanche/testenh.cpp +++ b/engines/avalanche/testenh.cpp @@ -31,7 +31,6 @@ namespace Avalanche { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; do { readkeye; switch (inchar) { diff --git a/engines/avalanche/travel.cpp b/engines/avalanche/travel.cpp index 84b6f04ed7..88bbce9a48 100644 --- a/engines/avalanche/travel.cpp +++ b/engines/avalanche/travel.cpp @@ -35,13 +35,11 @@ integer gd, gm; void zoomout(integer x, integer y) { integer x1, y1, x2, y2; byte fv; - ; setcolor(white); setwritemode(xorput); setlinestyle(dottedln, 0, 1); for (fv = 1; fv <= 20; fv ++) { - ; x1 = x - (x / 20) * fv; y1 = y - ((y - 10) / 20) * fv; x2 = x + (((639 - x) / 20) * fv); @@ -56,13 +54,11 @@ void zoomout(integer x, integer y) { void zoomin(integer x, integer y) { integer x1, y1, x2, y2; byte fv; - ; setcolor(white); setwritemode(xorput); setlinestyle(dottedln, 0, 1); for (fv = 20; fv >= 1; fv --) { - ; x1 = x - (x / 20) * fv; y1 = y - ((y - 10) / 20) * fv; x2 = x + (((639 - x) / 20) * fv); @@ -76,7 +72,6 @@ void zoomin(integer x, integer y) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/trip.cpp b/engines/avalanche/trip.cpp index 8ef57c591a..753db0dc65 100644 --- a/engines/avalanche/trip.cpp +++ b/engines/avalanche/trip.cpp @@ -64,7 +64,6 @@ void gpwtcol(void *buf, integer n) { /* Cedola */ void loadtrip() { untyped_file inf; - ; assign(inf, "t:avvy.trp"); reset(inf, 1); seek(inf, 0x27); @@ -75,7 +74,6 @@ void loadtrip() { void plot(word count, integer ox, integer oy) { /* orig x & y. Page is always 1. */ byte x, y, len; - ; do { len = blue3[count]; if (len == 177) return; @@ -83,13 +81,11 @@ void plot(word count, integer ox, integer oy) { /* orig x & y. Page is always 1. y = blue3[count + 2]; count += 3; { - ; gdcur_x = x + ox; gdcur_y = y + oy; /* fiddle xy coords to match page 1 */ gdcur_y += 205; /* 203 */ gdcur_x -= 128; /* 114 */ if (gdcur_x < 0) { - ; gdcur_x += 640; gdcur_y -= 1; } @@ -100,7 +96,6 @@ void plot(word count, integer ox, integer oy) { /* orig x & y. Page is always 1. } void boundscheck() { - ; if (dna.uy > 123) dna.uy = 123; if (dna.uy < 10) dna.uy = 10; if (dna.ux < 5) dna.ux = 5; @@ -108,7 +103,6 @@ void boundscheck() { } void budge() { - ; if (set::of(up, ul, ur, eos).has(dna.rw)) dna.uy -= 3; if (set::of(down, dl, dr, eos).has(dna.rw)) dna.uy += 3; if (set::of(left, ul, dl, eos).has(dna.rw)) dna.ux -= 5; @@ -117,78 +111,66 @@ void budge() { boundscheck(); if (dna.rw > 0) { - ; anim += 1; if (anim == 7) anim = 1; } } void tripkey(char dir) { - ; if (cw != 177) return; { dnatype &with = dna; - ; switch (dir) { case 'H': if (with.rw != up) { - ; with.rw = up; ww = up; } else with.rw = 0; break; case 'P': if (with.rw != down) { - ; with.rw = down; ww = down; } else with.rw = 0; break; case 'K': if (with.rw != left) { - ; with.rw = left; ww = left; } else with.rw = 0; break; case 'M': if (with.rw != right) { - ; with.rw = right; ww = right; } else with.rw = 0; break; case 'I': if (with.rw != ur) { - ; with.rw = ur; ww = right; } else with.rw = 0; break; case 'Q': if (with.rw != dr) { - ; with.rw = dr; ww = right; } else with.rw = 0; break; case 'O': if (with.rw != dl) { - ; with.rw = dl; ww = left; } else with.rw = 0; break; case 'G': if (with.rw != ul) { - ; with.rw = ul; ww = left; } else with.rw = 0; break; } if (with.rw == 0) { - ; ux = ppos[0][0]; uy = ppos[0][1]; anim -= 1; @@ -198,14 +180,12 @@ void tripkey(char dir) { } void trippancy() { - ; if ((dna.rw == 0) || (cw != 177) || (! dropsok)) return; r.ax = 11; intr(0x33, r); setactivepage(1); off(); if (ppos[0][1] != -177) { - ; putimage(ppos[0][0], ppos[0][1], replace[0], 0); } diff --git a/engines/avalanche/trip3.cpp b/engines/avalanche/trip3.cpp index 4889b264a5..33f2859c7e 100644 --- a/engines/avalanche/trip3.cpp +++ b/engines/avalanche/trip3.cpp @@ -74,7 +74,6 @@ const integer ul = 8; /* merge setting is used to control the combining of bits. */ /* */ void gpwtcol(void *buf, integer n) { /* Cedola */ - ; /* inline ($1E/$A1/GDCUR_Y/$D1/$E0/$D1/$E0/$03/$06/GDCUR_Y/$05/$A000/$8E/$C0/$8B/$3E/ GDCUR_X/$8B/$CF/$D1/$EF/$D1/$EF/$D1/$EF/$BA/$03CE/$8A/$26/GDMERGE/$B0/$03/ @@ -86,7 +85,6 @@ void gpwtcol(void *buf, integer n) { /* Cedola */ void loadtrip() { untyped_file inf; - ; assign(inf, "t:avvy.trp"); reset(inf, 1); seek(inf, 0x27); @@ -96,11 +94,9 @@ void loadtrip() { } void enter(byte what_handle, integer xx, integer yy, integer lx, integer ly, byte mmx, byte mmy, byte st) { - ; tramt += 1; { triprec &with = tr[tramt]; - ; with.handle = what_handle; with.ix = 0; with.iy = 0; @@ -119,7 +115,6 @@ void enter(byte what_handle, integer xx, integer yy, integer lx, integer ly, byt void plot(byte stage, integer ox, integer oy) { /* orig x & y. Page is always 1/UNSEEN. */ byte x, y, len; word count; - ; count = pozzes[stage]; do { len = blue3[count]; @@ -128,13 +123,11 @@ void plot(byte stage, integer ox, integer oy) { /* orig x & y. Page is always 1/ y = blue3[count + 2]; count += 3; { - ; gdcur_x = x + ox; gdcur_y = y + oy; /* fiddle xy coords to match page 1 */ gdcur_y += 205; /* 203 */ gdcur_x -= 128; /* 114 */ if (gdcur_x < 0) { - ; gdcur_x += 640; gdcur_y -= 1; } @@ -150,7 +143,6 @@ void trippancy() { word s; array<1, 10, pointer> q; boolean allstill; - ; if ((cw != 177) || (! dropsok) || keypressed()) return; /* Do the Avvy Walk */ @@ -195,7 +187,6 @@ void trippancy() { if (allstill) return; if (dna.rw > 0) { - ; anim += 1; if (anim == 7) anim = 1; } @@ -206,7 +197,6 @@ void trippancy() { off(); for (fv = 1; fv <= tramt; fv ++) { triprec &with = tr[fv]; - ; s = imagesize(with.x - with.xm, with.y - with.ym, with.x + with.xl + with.xm, with.y + with.yl + with.ym); getmem(q[fv], s); getimage(with.x - with.xm, with.y - with.ym, with.x + with.xl + with.xm, with.y + with.yl + with.ym, q[fv]); @@ -214,7 +204,6 @@ void trippancy() { /* Step 2 - Plot sprites on 1/UNSEEN */ for (fv = 1; fv <= tramt; fv ++) { triprec &with = tr[fv]; - ; plot(with.stage, with.x, with.y); } /* Step 3 - Copy all eligible from 1/UNSEEN to 0/SEEN */ @@ -222,7 +211,6 @@ void trippancy() { for (fv = 1; fv <= tramt; fv ++) { triprec &with = tr[fv]; if (((with.alive) && (!((with.ix == 0) && (with.iy == 0)))) || with.prime) { - ; s = imagesize(with.x - with.xm, with.y - with.ym, with.x + with.xl + with.xm, with.y + with.yl + with.ym); getmem(p, s); setactivepage(1); @@ -237,7 +225,6 @@ void trippancy() { setactivepage(1); for (fv = 1; fv <= tramt; fv ++) { triprec &with = tr[fv]; - ; putimage(with.x - with.xm, with.y - with.ym, q[fv], 0); if (with.ix != 0) with.x = with.x + with.ix; if (with.iy != 0) with.y = with.y + with.iy; @@ -253,7 +240,6 @@ void trippancy() { release(saved1); for (fv = 1; fv <= tramt; fv ++) { /* synch xy coords of mouths */ triprec &with = tr[fv]; - ; mouths[fv].x = with.x + 20; mouths[fv].y = with.y; } @@ -263,11 +249,9 @@ void trippancy() { void budge(byte who, shortint xx, shortint yy, byte frame) { /* Moving & animation controller */ byte fv; - ; for (fv = 1; fv <= tramt; fv ++) { triprec &with = tr[fv]; if (with.handle == who) { - ; with.ix = xx; with.iy = yy; with.stage = frame; @@ -276,71 +260,60 @@ void budge(byte who, shortint xx, shortint yy, byte frame) { /* Moving & animati } void tripkey(char dir) { - ; if (cw != 177) return; { dnatype &with = dna; - ; switch (dir) { case 'H': if (with.rw != up) { - ; with.rw = up; ww = up; } else with.rw = 0; break; case 'P': if (with.rw != down) { - ; with.rw = down; ww = down; } else with.rw = 0; break; case 'K': if (with.rw != left) { - ; with.rw = left; ww = left; } else with.rw = 0; break; case 'M': if (with.rw != right) { - ; with.rw = right; ww = right; } else with.rw = 0; break; case 'I': if (with.rw != ur) { - ; with.rw = ur; ww = right; } else with.rw = 0; break; case 'Q': if (with.rw != dr) { - ; with.rw = dr; ww = right; } else with.rw = 0; break; case 'O': if (with.rw != dl) { - ; with.rw = dl; ww = left; } else with.rw = 0; break; case 'G': if (with.rw != ul) { - ; with.rw = ul; ww = left; } else with.rw = 0; break; } if (with.rw == 0) { - ; ux = ppos[0][0]; uy = ppos[0][1]; anim -= 1; @@ -350,7 +323,6 @@ void tripkey(char dir) { } void boundscheck(integer &x, integer &y, byte xm, byte ym) { - ; if (y > 127 - ym) y = 127 - ym; if (y < ym + 10) y = ym + 10; if (x < xm) x = xm; diff --git a/engines/avalanche/trip42.cpp b/engines/avalanche/trip42.cpp index 04acf36f74..29482dcd24 100644 --- a/engines/avalanche/trip42.cpp +++ b/engines/avalanche/trip42.cpp @@ -78,7 +78,6 @@ end; */ void loadtrip() { byte gm; - ; for (gm = 1; gm <= numtr; gm ++) tr[gm].original(); tr[1].init(0); } @@ -87,7 +86,6 @@ byte checkfeet(integer x1, integer x2, integer oy, integer y, byte yl) { byte a, c; integer fv, ff; byte checkfeet_result; - ; a = 0; setactivepage(2); if (x1 < 0) x1 = 0; @@ -95,14 +93,12 @@ byte checkfeet(integer x1, integer x2, integer oy, integer y, byte yl) { if (oy < y) for (fv = x1; fv <= x2; fv ++) for (ff = oy + yl; ff <= y + yl; ff ++) { - ; c = getpixel(fv, ff); if (c > a) a = c; } else for (fv = x1; fv <= x2; fv ++) for (ff = y + yl; ff <= oy + yl; ff ++) { - ; c = getpixel(fv, ff); if (c > a) a = c; } @@ -115,13 +111,11 @@ void touchcol(byte tc); static boolean bug; static void fr(byte a, byte b) { - ; fliproom(a, b); bug = false; } void touchcol(byte tc) { - ; bug = true; /* j.i.c. */ switch (dna.room) { case 1: @@ -156,7 +150,6 @@ void touchcol(byte tc) { break; } if (bug) { - ; display(string('\7') + "Unknown touchcolour (" + strf(tc) + ')' + " in " + strf(dna.room) + '.'); tr[1].bounce(); @@ -171,7 +164,6 @@ triptype *triptype::init(byte spritenum) { byte sort, n; word bigsize; pointer p, q; - ; str(spritenum, xx); assign(f, string("c:\\avalot\\sprite") + xx + ".avd"); reset(f, 1); @@ -180,7 +172,6 @@ triptype *triptype::init(byte spritenum) { blockread(f, bigsize, 2); setactivepage(3); for (sort = 0; sort <= 1; sort ++) { - ; mark(q); getmem(p, bigsize); blockread(f, p, bigsize); @@ -192,7 +183,6 @@ triptype *triptype::init(byte spritenum) { adxtype &with = a; for (gm = 0; gm <= (with.num / with.seq) - 1; gm ++) /* directions */ for (gd = 0; gd <= with.seq - 1; gd ++) { /* steps */ - ; getmem(pic[n][sort], a.size); /* grab the memory */ getimage((gm / 2) * (with.xl * 6) + gd * with.xl, (gm % 2)*with.yl, (gm / 2) * (with.xl * 6) + gd * with.xl + with.xl - 1, (gm % 2)*with.yl + with.yl - 1, @@ -219,13 +209,11 @@ triptype *triptype::init(byte spritenum) { } void triptype::original() { - ; quick = false; } void triptype::andexor() { byte picnum; /* Picnum, Picnic, what ye heck */ - ; picnum = face * a.seq + step + 1; off; putimage(x, y, pic[picnum][0], andput); @@ -233,13 +221,11 @@ void triptype::andexor() { } void triptype::turn(byte whichway) { - ; if (whichway == 8) face = 0; else face = whichway; } void triptype::appear(integer wx, integer wy, byte wf) { - ; x = (wx / 8) * 8; y = wy; ox[cp] = wx; @@ -253,9 +239,7 @@ void triptype::appear(integer wx, integer wy, byte wf) { void triptype::walk() { byte tc; fieldtype r; - ; { - ; x1 = x - 1; y1 = y - 2; x2 = x + a.xl + 1; @@ -268,13 +252,11 @@ void triptype::walk() { x = x + ix; y = y + iy; if (check_me) { - ; tc = checkfeet(x, x + a.xl, oy[cp], y, a.yl); if (tc != 0) { void &with = magics[tc]; switch (op) { case exclaim: { - ; bounce(); dixi('x', data); } @@ -286,7 +268,6 @@ void triptype::walk() { fliproom(hi(data), lo(data)); break; case unfinished: { - ; bounce(); display("\7Sorry.\3\rThis place is not avaliable yet!"); } @@ -296,7 +277,6 @@ void triptype::walk() { } count += 1; if (((ix != 0) || (iy != 0)) && (count > 1)) { - ; step += 1; if (step == a.seq) step = 0; count = 0; @@ -304,7 +284,6 @@ void triptype::walk() { } void triptype::bounce() { - ; x = ox[cp]; y = oy[cp]; stopwalk(); @@ -312,7 +291,6 @@ void triptype::bounce() { } void triptype::walkto(integer xx, integer yy) { - ; speed(xx - x, yy - y); hx = xx; hy = yy; @@ -320,13 +298,11 @@ void triptype::walkto(integer xx, integer yy) { } void triptype::stophoming() { - ; homing = false; } void triptype::homestep() { integer temp; - ; if ((hx == x) && (hy == y)) { ; /* touching the target */ homing = false; @@ -335,14 +311,12 @@ void triptype::homestep() { ix = 0; iy = 0; if (hy != y) { - ; temp = hy - y; if (temp > 4) iy = 4; else if (temp < -4) iy = -4; else iy = temp; } if (hx != x) { - ; temp = hx - x; if (temp > 4) ix = 4; else if (temp < -4) ix = -4; @@ -351,7 +325,6 @@ void triptype::homestep() { } void triptype::speed(shortint xx, shortint yy) { - ; ix = xx; iy = yy; if ((ix == 0) && (iy == 0)) return; /* no movement */ @@ -360,21 +333,18 @@ void triptype::speed(shortint xx, shortint yy) { if (iy < 0) turn(up); else turn(down); } else { - ; if (ix < 0) turn(left); else turn(right); } } void triptype::stopwalk() { - ; ix = 0; iy = 0; homing = false; } void triptype::chatter() { - ; talkx = x + a.xl / 2; talky = y; talkf = a.fgc; @@ -382,19 +352,16 @@ void triptype::chatter() { } getsettype *getsettype::init() { - ; numleft = 0; /* initialise array pointer */ return this; } void getsettype::remember(fieldtype r) { - ; numleft += 1; gs[numleft] = r; } void getsettype::recall(fieldtype &r) { - ; r = gs[numleft]; numleft -= 1; } @@ -402,7 +369,6 @@ void getsettype::recall(fieldtype &r) { void rwsp(byte t, byte r) { const integer xs = 3; const integer ys = 1; - ; { triptype &with = tr[t]; switch (r) { @@ -435,10 +401,8 @@ void rwsp(byte t, byte r) { } void apped(byte trn, byte np) { - ; { triptype &with = tr[trn]; - ; { void &with1 = peds[np]; appear(with.x - with.a.xl / 2, with.y - with.a.yl, dir); @@ -450,11 +414,9 @@ void apped(byte trn, byte np) { void getback() { byte fv; fieldtype r; - ; { getsettype &with = getset[1 - cp]; while (with.numleft > 0) { - ; recall(r); mblit(x1, y1, x2, y2, 3, 1 - cp); } @@ -463,7 +425,6 @@ void getback() { void trippancy_link() { byte fv; - ; if ((ddm_o.menunow) | ontoolbar | seescroll | (~ alive)) return; for (fv = 1; fv <= numtr; fv ++) { triptype &with = tr[fv]; @@ -480,72 +441,61 @@ void trippancy_link() { } void stopwalking() { - ; tr[1].stopwalk(); dna.rw = stopped; } void tripkey(char dir) { - ; if (ctrl == cjoy) return; { triptype &with = tr[1]; { - ; switch (dir) { case 'H': if (rw != up) { - ; rw = up; rwsp(1, rw); } else stopwalking(); break; case 'P': if (rw != down) { - ; rw = down; rwsp(1, rw); } else stopwalking(); break; case 'K': if (rw != left) { - ; rw = left; rwsp(1, rw); } else stopwalking(); break; case 'M': if (rw != right) { - ; rw = right; rwsp(1, rw); } else stopwalking(); break; case 'I': if (rw != ur) { - ; rw = ur; rwsp(1, rw); } else stopwalking(); break; case 'Q': if (rw != dr) { - ; rw = dr; rwsp(1, rw); } else stopwalking(); break; case 'O': if (rw != dl) { - ; rw = dl; rwsp(1, rw); } else stopwalking(); break; case 'G': if (rw != ul) { - ; rw = ul; rwsp(1, rw); } else stopwalking(); @@ -560,12 +510,10 @@ void tripkey(char dir) { void getsetclear() { byte fv; - ; for (fv = 0; fv <= 1; fv ++) getset[fv].init(); } void fliproom(byte room, byte ped) { - ; dusk; getsetclear(); enterroom(room); @@ -579,12 +527,10 @@ void fliproom(byte room, byte ped) { boolean infield(byte x) { /* returns True if you're within field "x" */ integer yy; boolean infield_result; - ; { void &with = fields[x]; { triptype &with = tr[1]; - ; yy = with.y + with.a.yl; infield_result = (with.x >= x1) && (with.x <= x2) && (yy >= y1) && (yy <= y2); } @@ -597,7 +543,6 @@ boolean neardoor() { /* returns True if you're near a door! */ byte fv; boolean nd; boolean neardoor_result; - ; if (numfields < 9) { ; /* there ARE no doors here! */ neardoor_result = false; @@ -605,14 +550,12 @@ boolean neardoor() { /* returns True if you're near a door! */ } { triptype &with = tr[1]; - ; ux = with.x; uy = with.y + with.a.yl; } nd = false; for (fv = 9; fv <= numfields; fv ++) { void &with = fields[fv]; - ; if ((ux >= x1) && (ux <= x2) && (uy >= y1) && (uy <= y2)) nd = true; } neardoor_result = nd; @@ -621,24 +564,20 @@ boolean neardoor() { /* returns True if you're near a door! */ void readstick() { byte jw; - ; if (ctrl == ckey) return; jw = joyway; { triptype &with = tr[1]; - ; if (jw == stopped) stopwalking(); else { - ; dna.rw = jw; rwsp(1, dna.rw); } } if (jw != oldjw) { - ; showrw; oldjw = jw; } @@ -652,7 +591,6 @@ public: static unit_trip42_initialize trip42_constructor; unit_trip42_initialize::unit_trip42_initialize() { - ; getsetclear(); } diff --git a/engines/avalanche/trip5.cpp b/engines/avalanche/trip5.cpp index 9a6a82f637..8557f1873b 100644 --- a/engines/avalanche/trip5.cpp +++ b/engines/avalanche/trip5.cpp @@ -1036,7 +1036,6 @@ void triptype::andexor() { loop @nextbyte; { Keep going round until cx=0. } */ { - ; } #endif diff --git a/engines/avalanche/trip5tst.cpp b/engines/avalanche/trip5tst.cpp index 191d8f3756..98f0afaa25 100644 --- a/engines/avalanche/trip5tst.cpp +++ b/engines/avalanche/trip5tst.cpp @@ -54,13 +54,11 @@ void filesetup() { const integer idshould = -1317732048; longint id; word soa; - ; assign(inf, "v:sprite2.avd"); reset(inf, 1); seek(inf, 177); blockread(inf, id, 4); if (id != idshould) { - ; output << '\7'; close(inf); exit(0); @@ -72,9 +70,7 @@ void filesetup() { void loadpic() { byte fv, ff; - ; { - ; xw = a.xl / 8; if ((a.xl % 8) > 0) xw += 1; @@ -95,9 +91,7 @@ void plotone(integer xx, integer yy) { word s; word ofs, fv; byte x, y, z; - ; { - ; s = imagesize(x, y, xx + a.xl, yy + a.yl); getimage(xx, yy, xx + a.xl, yy + a.yl, aa); /* Now loaded into our local buffer. */ @@ -106,7 +100,6 @@ void plotone(integer xx, integer yy) { for (x = 0; x <= 3; x ++) for (y = 0; y <= 35; y ++) for (z = 0; z <= 4; z ++) { - ; ofs = 5 + y * xw * 4 + xw * x + z; aa[ofs] = aa[ofs] & sil[y][z]; } @@ -147,7 +140,6 @@ void plotone(integer xx, integer yy) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/trip5xf.cpp b/engines/avalanche/trip5xf.cpp index eecfa75de2..1f701db678 100644 --- a/engines/avalanche/trip5xf.cpp +++ b/engines/avalanche/trip5xf.cpp @@ -72,9 +72,7 @@ untyped_file out; integer bigsize; void copyaoa() { - ; { - ; a.name = oa.name; a.comment = "Transferred"; a.num = oa.num; @@ -92,7 +90,6 @@ void load() { byte gd, gm, sort, n; pointer p, q; pointer xf; - ; assign(f, string("v:osprte") + sn + ".avd"); reset(f, 1); seek(f, 59); @@ -103,7 +100,6 @@ void load() { getmem(xf, a.size); for (sort = 0; sort <= 1; sort ++) { - ; mark(q); getmem(p, bigsize); blockread(f, p, bigsize); @@ -117,7 +113,6 @@ void load() { for (gm = 0; gm <= (a.num / a.seq) - 1; gm ++) /* directions */ for (gd = 0; gd <= a.seq - 1; gd ++) { /* steps */ - ; getmem(pic[n][sort], a.size); /* grab the memory */ getimage((gm / 2) * (a.xl * 6) + gd * a.xl, (gm % 2)*a.yl, (gm / 2) * (a.xl * 6) + gd * a.xl + a.xl - 1, (gm % 2)*a.yl + a.yl - 1, @@ -137,7 +132,6 @@ void load() { void setup() { integer gd, gm; - ; output << "TRIP5XF (c) 1992, Thomas Thurman." << NL; output << NL; output << "Enter number of SPRITE*.AVD file to convert:"; @@ -151,7 +145,6 @@ void setup() { string strf(longint x) { string q; string strf_result; - ; str(x, q); strf_result = q; return strf_result; @@ -164,10 +157,8 @@ void save() { byte xw; byte nxl, nyl; word soa; - ; cleardevice(); { - ; a.size = imagesize(0, 0, a.xl, a.yl); soa = sizeof(a); @@ -184,7 +175,6 @@ void save() { if ((nxl % 8) > 0) xw += 1; for (n = 1; n <= a.num; n ++) { - ; putimage(0, 0, pic[n][0], 0); getimage(0, 0, a.xl, a.yl, aa); for (fv = 0; fv <= nyl; fv ++) @@ -204,7 +194,6 @@ void save() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; setup(); save(); diff --git a/engines/avalanche/tripoop.cpp b/engines/avalanche/tripoop.cpp index 2fe8f5f4cb..6e98d800c0 100644 --- a/engines/avalanche/tripoop.cpp +++ b/engines/avalanche/tripoop.cpp @@ -86,7 +86,6 @@ static boolean dropin(integer xc, integer yc, integer x1, integer y1, integer x2 /* Dropin returns True if the point xc,yc falls within the 1-2 rectangle. */ { boolean dropin_result; - ; dropin_result = ((xc >= x1) && (xc <= x2) && (yc >= y1) && (yc <= y2)); return dropin_result; } @@ -96,7 +95,6 @@ static boolean dropin(integer xc, integer yc, integer x1, integer y1, integer x2 static void transfer(integer x1, integer y1, integer x2, integer y2) { pointer p, q; word s; - ; s = imagesize(x1, y1, x2, y2); setfillstyle(1, 0); mark(q); @@ -113,7 +111,6 @@ static void transfer(integer x1, integer y1, integer x2, integer y2) { static integer lesser(integer a, integer b) { integer lesser_result; - ; if (a < b) lesser_result = a; else lesser_result = b; return lesser_result; @@ -123,7 +120,6 @@ static integer lesser(integer a, integer b) { static integer greater(integer a, integer b) { integer greater_result; - ; if (a > b) greater_result = a; else greater_result = b; return greater_result; @@ -132,7 +128,6 @@ static integer greater(integer a, integer b) { void copier(integer x1, integer y1, integer x2, integer y2, integer x3, integer y3, integer x4, integer y4) { - ; if (dropin(x3, y3, x1, y1, x2, y2) || dropin(x3, y4, x1, y1, x2, y2) || dropin(x4, y3, x1, y1, x2, y2) @@ -148,12 +143,10 @@ void copier(integer x1, integer y1, integer x2, integer y2, integer x3, integer void setup() { integer gd, gm; - ; gd = 3; gm = 0; initgraph(gd, gm, ""); for (gd = 0; gd <= 1; gd ++) { - ; setactivepage(gd); setfillstyle(9, 1); bar(0, 0, 640, 200); @@ -169,7 +162,6 @@ triptype *triptype::init(byte spritenum) { pointer p, q; word bigsize; byte sort, n; - ; str(spritenum, xx); assign(f, string("v:sprite") + xx + ".avd"); reset(f, 1); @@ -179,7 +171,6 @@ triptype *triptype::init(byte spritenum) { setvisualpage(3); setactivepage(3); for (sort = 0; sort <= 1; sort ++) { - ; mark(q); getmem(p, bigsize); blockread(f, p, bigsize); @@ -190,7 +181,6 @@ triptype *triptype::init(byte spritenum) { adxtype &with = a; for (gm = 0; gm <= (with.num / with.seq) - 1; gm ++) /* directions */ for (gd = 0; gd <= with.seq - 1; gd ++) { /* steps */ - ; getmem(pic[n][sort], a.size); /* grab the memory */ getimage((gm / 2) * (with.xl * 6) + gd * with.xl, (gm % 2)*with.yl, (gm / 2) * (with.xl * 6) + gd * with.xl + with.xl - 1, (gm % 2)*with.yl + with.yl - 1, @@ -216,12 +206,10 @@ triptype *triptype::init(byte spritenum) { } void triptype::original() { - ; quick = false; } void triptype::getback() { - ; tax = x; tay = y; getimage(x, y, x + a.xl, y + a.yl, behind); @@ -229,20 +217,17 @@ void triptype::getback() { void triptype::andexor() { byte picnum; /* Picnum, Picnic, what ye heck */ - ; picnum = face * a.seq + step + 1; putimage(x, y, pic[picnum][0], andput); putimage(x, y, pic[picnum][1], xorput); } void triptype::turn(byte whichway) { - ; face = whichway; step = 0; } void triptype::appear(integer wx, integer wy, byte wf) { - ; x = wx; y = wy; ox = wx; @@ -252,7 +237,6 @@ void triptype::appear(integer wx, integer wy, byte wf) { } void triptype::walk() { - ; ox = x; oy = y; if (homing) homestep(); @@ -264,17 +248,14 @@ void triptype::walk() { } void triptype::do_it() { - ; copier(ox, oy, ox + a.xl, oy + a.yl, x, y, x + a.xl, y + a.yl); } void triptype::putback() { - ; putimage(tax, tay, behind, 0); } void triptype::walkto(integer xx, integer yy) { - ; speed(xx - x, yy - y); hx = xx; hy = yy; @@ -282,13 +263,11 @@ void triptype::walkto(integer xx, integer yy) { } void triptype::stophoming() { - ; homing = false; } void triptype::homestep() { integer temp; - ; if ((hx == x) && (hy == y)) { ; /* touching the target */ homing = false; @@ -297,14 +276,12 @@ void triptype::homestep() { ix = 0; iy = 0; if (hy != y) { - ; temp = hy - y; if (temp > 4) iy = 4; else if (temp < -4) iy = -4; else iy = temp; } if (hx != x) { - ; temp = hx - x; if (temp > 4) ix = 4; else if (temp < -4) ix = -4; @@ -313,7 +290,6 @@ void triptype::homestep() { } void triptype::speed(shortint xx, shortint yy) { - ; ix = xx; iy = yy; if ((ix == 0) && (iy == 0)) return; /* no movement */ @@ -322,14 +298,12 @@ void triptype::speed(shortint xx, shortint yy) { if (iy < 0) turn(up); else turn(down); } else { - ; if (ix < 0) turn(left); else turn(right); } } void triptype::halt() { - ; ix = 0; iy = 0; homing = false; @@ -337,10 +311,8 @@ void triptype::halt() { void trip() { byte fv; - ; for (fv = 1; fv <= numtr; fv ++) { triptype &with = tr[fv]; - ; walk(); if (with.quick && with.visible) andexor(); do_it(); @@ -350,11 +322,9 @@ void trip() { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; setup(); { triptype &with = tr[1]; - ; init(1); appear(600, 100, left); do { diff --git a/engines/avalanche/ttmenuxf.cpp b/engines/avalanche/ttmenuxf.cpp index 1a10794940..bc9fbafa23 100644 --- a/engines/avalanche/ttmenuxf.cpp +++ b/engines/avalanche/ttmenuxf.cpp @@ -62,7 +62,6 @@ void load() { /* Load2, actually */ void finder() { char r; integer x, y; - ; setfillstyle(0, 0); setcolor(14); x = 320; @@ -74,7 +73,6 @@ void finder() { line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); do { - ; } while (!keypressed()); line(x - 20, y, x + 20, y); line(x, y - 20, x, y + 20); diff --git a/engines/avalanche/unsquish.cpp b/engines/avalanche/unsquish.cpp index 63d2562f8b..78ac9997d6 100644 --- a/engines/avalanche/unsquish.cpp +++ b/engines/avalanche/unsquish.cpp @@ -43,9 +43,7 @@ buffertype *buffer; word bufsize; void putup(byte what) { - ; if (offset > 12080) { - ; bit += 1; port[0x3c4] = 2; port[0x3ce] = 4; @@ -64,7 +62,6 @@ void load_uncomp(string xx) /* Load2, actually */ byte this_; untyped_file f; word place; - ; assign(f, string("v:place") + xx + ".avd"); reset(f, 1); seek(f, 146); @@ -79,7 +76,6 @@ void load_uncomp(string xx) /* Load2, actually */ place = 1; while (place <= bufsize) { - ; this_ = (*buffer)[place]; place += 1; putup(this_); @@ -371,14 +367,12 @@ static void get_code(integer &hash_code) if (place > bufsize) return; else { - ; local_buf = (*buffer)[place]; place += 1; } if (place > bufsize) return; else { - ; input_code = (*buffer)[place]; place += 1; } @@ -393,7 +387,6 @@ static void get_code(integer &hash_code) if (place > bufsize) return; else { - ; local_buf = (*buffer)[place]; place += 1; } @@ -517,7 +510,6 @@ void load_comp(string xx) { byte this_; untyped_file f; - ; string_table = new sttype; inempty = true; initialize_string_table(); @@ -544,7 +536,6 @@ void load_comp(string xx) { int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); diff --git a/engines/avalanche/viewdocs.cpp b/engines/avalanche/viewdocs.cpp index b205474879..ff00aab57e 100644 --- a/engines/avalanche/viewdocs.cpp +++ b/engines/avalanche/viewdocs.cpp @@ -97,7 +97,6 @@ void wipesb(word wheretop) { byte plane; for (plane = 2; plane <= 3; plane ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << plane; @@ -124,7 +123,6 @@ void displstat(byte wipepos) { /*displays the status bar*/ port[0x3cf] = 3; wrapcopy(stbar2, (lat + 336) * 80); for (plane = 2; plane <= 3; plane ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << plane; @@ -152,7 +150,6 @@ void udstat() { /*updates the status bar*/ str(round((real)((tlab - 21)) / (nol - 21) * 100), pt); for (fv = 1; fv <= 3; fv ++) for (fv2 = 0; fv2 <= 13; fv2 ++) { - ; stbar[fv2 * 80 + fv + 68] = ~ textvar[ord(pt[fv]) + 1][fv2]; stbar2[fv2 * 80 + fv + 68] = textvar[ord(pt[fv]) + 1][fv2]; } @@ -191,7 +188,6 @@ headers by searching for '"""'*/ varpos2 = posof13[varpos - 2] + 2; while (((*textmem)[varpos2] == 32) || ((*textmem)[varpos2] == 9)) varpos2 += 1; while (varpos2 != posof13[varpos - 1]) { - ; headerstring = headerstring + chr((*textmem)[varpos2]); varpos2 += 1; } @@ -244,7 +240,6 @@ void setupsb(byte sbtype) { /*sets up the status bar in several styles*/ break; } for (fv = 0; fv <= 1118; fv ++) { - ; stbar[fv + 1] = ~ textvar[ord(stline[fv % 80 + 1]) + 1][fv / 80]; stbar2[fv + 1] = textvar[ord(stline[fv % 80 + 1]) + 1][fv / 80]; } @@ -284,12 +279,10 @@ void setup() { /*sets up graphics, variables, etc.*/ close(f); finddocinfo(); if (paramstr(1) == "REGI") { - ; regimode = true; tlab = contlist[contsize].headeroffset + 24; lat = contlist[contsize].headeroffset * 14; } else { - ; lat = 0; tlab = 24; regimode = false; @@ -316,7 +309,6 @@ void drawscreenf(integer tl) /*draws a screen from a line forwards*/ if (tl < 0) tl = 0; lat = tl * 14; for (plane = 2; plane <= 3; plane ++) { /*wipe sb off*/ - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << plane; @@ -404,7 +396,6 @@ void displcont() { /*displays the contents*/ } showscreen(); do { - ; } while (!keypressed()); rkv = readkey(); switch (rkv) { @@ -517,7 +508,6 @@ void control() { /*User control*/ else drawscreenf(tlab - 24); first = true; do { - ; rkv = readkey(); switch (rkv) { case '\0': { @@ -530,7 +520,6 @@ void control() { /*User control*/ drawscreenf(nol - 24); break; case cpgdn: { - ; memw[bfseg * bfofs] = 0; if (fast == false) wipesb(lat); fv = 1; @@ -543,7 +532,6 @@ void control() { /*User control*/ } break; case cpgup: { - ; memw[bfseg * bfofs] = 0; if (fast == false) wipesb(lat); fv = 1; diff --git a/engines/avalanche/xf_gover.cpp b/engines/avalanche/xf_gover.cpp index f8726c3a62..30d16a79d2 100644 --- a/engines/avalanche/xf_gover.cpp +++ b/engines/avalanche/xf_gover.cpp @@ -32,12 +32,10 @@ namespace Avalanche { void load() { byte a; /*absolute $A000:1200;*/ byte bit; untyped_file f; - ; assign(f, "avagame.avd"); reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -93,7 +91,6 @@ void dump_to_file(byte x1, byte y1, byte x2, byte y2, string fn) { for (y = y1; y <= y2; y ++) for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/xfbutton.cpp b/engines/avalanche/xfbutton.cpp index d2c552dae9..c216d31706 100644 --- a/engines/avalanche/xfbutton.cpp +++ b/engines/avalanche/xfbutton.cpp @@ -46,7 +46,6 @@ void load() { /* Load2, actually */ reset(f, 1); seek(f, 177); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/xfghost.cpp b/engines/avalanche/xfghost.cpp index 28e7efddd6..2ad6a43db5 100644 --- a/engines/avalanche/xfghost.cpp +++ b/engines/avalanche/xfghost.cpp @@ -66,14 +66,12 @@ pointer a_p; word a_s; void open_chunk() { - ; assign(chunkfile, "v:spooky.avd"); rewrite(chunkfile, 1); blockwrite(chunkfile, chunkheader, sizeof(chunkheader)); } void close_chunk() { - ; close(chunkfile); } @@ -83,10 +81,8 @@ void grab(integer x1, integer y1, integer x2, integer y2, flavourtype how, integ integer y; byte bit; - ; #ifndef DRYRUN { - ; cb.flavour = how; switch (newx) { case n: @@ -116,7 +112,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, flavourtype how, integ } if (how != ch_natural) { - ; s = imagesize(x1, y1, x2, y2); getmem(p, s); getimage(x1, y1, x2, y2, p); @@ -137,7 +132,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, flavourtype how, integ blockwrite(chunkfile, p, s); break; case ch_ega: { - ; setactivepage(1); cleardevice(); putimage(0, 0, p, 0); @@ -145,7 +139,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, flavourtype how, integ for (bit = 0; bit <= 3; bit ++) for (y = 0; y <= cb.yl; y ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -165,7 +158,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, flavourtype how, integ for (bit = 2; bit <= 3; bit ++) /* << Bit to grab? */ for (y = 0; y <= cb.yl; y ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -185,7 +177,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, flavourtype how, integ for (bit = 3; bit <= 3; bit ++) for (y = 0; y <= cb.yl; y ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; @@ -206,7 +197,6 @@ void grab(integer x1, integer y1, integer x2, integer y2, flavourtype how, integ int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; #ifndef DRYRUN open_chunk(); #endif @@ -217,7 +207,6 @@ int main(int argc, const char *argv[]) { assign(f, "c:\\sleep4\\colour.ptx"); reset(f, 1); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; diff --git a/engines/avalanche/zapdraw.cpp b/engines/avalanche/zapdraw.cpp index cae7b04cf6..6172f84837 100644 --- a/engines/avalanche/zapdraw.cpp +++ b/engines/avalanche/zapdraw.cpp @@ -38,21 +38,18 @@ integer gd, gm; void graphmode(integer mode) { registers regs; - ; regs.ax = (mode % 0x100); intr(0x10, regs); } int main(int argc, const char *argv[]) { pio_initialize(argc, argv); - ; gd = 3; gm = 0; initgraph(gd, gm, "c:\\bp\\bgi"); assign(f, "d:avltzap.raw"); reset(f, 1); for (bit = 0; bit <= 3; bit ++) { - ; port[0x3c4] = 2; port[0x3ce] = 4; port[0x3c5] = 1 << bit; |