aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/dreamgen.cpp
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-12 23:55:14 +0400
committerAlyssa Milburn2011-06-15 17:34:38 +0200
commit6fb25cdde4381233f3aa98f92f7dfa62aa10b2fa (patch)
tree440013e452f184aef30cfbdd01a821bdddf03947 /engines/dreamweb/dreamgen.cpp
parentedf7d9b42bb4f88b8681e0d3732b4e2daad377c9 (diff)
downloadscummvm-rg350-6fb25cdde4381233f3aa98f92f7dfa62aa10b2fa.tar.gz
scummvm-rg350-6fb25cdde4381233f3aa98f92f7dfa62aa10b2fa.tar.bz2
scummvm-rg350-6fb25cdde4381233f3aa98f92f7dfa62aa10b2fa.zip
DREAMWEB: added stack depth check to code generator
Diffstat (limited to 'engines/dreamweb/dreamgen.cpp')
-rw-r--r--engines/dreamweb/dreamgen.cpp2876
1 files changed, 1782 insertions, 1094 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 29b0955f07..de9a7c1c38 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -475,6 +475,7 @@ void intro3text(Context &context);
void intro1text(Context &context);
void alleybarksound(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.es.word(context.bx+3);
context._dec(context.ax);
context._cmp(context.ax, 0);
@@ -488,24 +489,27 @@ void alleybarksound(Context & context) {
context.ax = 1000;
nobark:
context.es.word(context.bx+3) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intromusic(Context & context) {
- return;
+ uint stack_depth = context.stack.size();
+ {assert(stack_depth == context.stack.size()); return; }
}
void foghornsound(Context & context) {
+ uint stack_depth = context.stack.size();
randomnumber(context);
context._cmp(context.al, 198);
if (!context.flags.z()) goto nofog;
context.al = 13;
playchannel1(context);
nofog:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void receptionist(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto gotrecep;
context._cmp(context.data.byte(kCardpassflag), 1);
@@ -544,10 +548,11 @@ gotrecep:
if (context.flags.z()) goto nottalkedrecep;
context.data.byte(kTalkedtorecep) = 1;
nottalkedrecep:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void smokebloke(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kRockstardead), 0);
if (!context.flags.z()) goto notspokento;
context.al = context.es.byte(context.bx+7);
@@ -579,10 +584,11 @@ notsmokeb2:
gotsmokeb:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void attendant(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
context.al = context.es.byte(context.bx+7);
@@ -590,28 +596,31 @@ void attendant(Context & context) {
if (context.flags.z()) goto nottalked;
context.data.byte(kTalkedtoattendant) = 1;
nottalked:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void manasleep(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.es.byte(context.bx+7);
context._and(context.al, 127);
context.es.byte(context.bx+7) = context.al;
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void eden(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kGeneraldead), 0);
if (!context.flags.z()) goto notinbed;
showgamereel(context);
addtopeoplelist(context);
notinbed:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void edeninbath(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kGeneraldead), 0);
if (context.flags.z()) goto notinbed;
context._cmp(context.data.byte(kSartaindead), 0);
@@ -619,35 +628,39 @@ void edeninbath(Context & context) {
showgamereel(context);
addtopeoplelist(context);
notinbath:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
/*continuing to unbounded code: notinbed from eden:5-6*/
notinbed:
- return;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
+ {assert(stack_depth == context.stack.size()); return; }
}
void malefan(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void femalefan(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void louis(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kRockstardead), 0);
if (!context.flags.z()) goto notlouis1;
showgamereel(context);
addtopeoplelist(context);
notlouis1:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void louischair(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kRockstardead), 0);
if (context.flags.z()) goto notlouis2;
checkspeed(context);
@@ -672,31 +685,35 @@ notlouisanim:
showgamereel(context);
addtopeoplelist(context);
notlouis2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void manasleep2(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.es.byte(context.bx+7);
context._and(context.al, 127);
context.es.byte(context.bx+7) = context.al;
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void mansatstill(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void tattooman(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void drinker(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto gotdrinker;
context._inc(context.es.word(context.bx+3));
@@ -714,10 +731,11 @@ notdrinker1:
gotdrinker:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void bartender(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto gotsmoket;
context._cmp(context.es.word(context.bx+3), 86);
@@ -741,22 +759,25 @@ gotsmoket:
context.es.byte(context.bx+7) = 9;
notgotgun:
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void othersmoker(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void barwoman(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void interviewer(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kReeltowatch), 68);
if (!context.flags.z()) goto notgeneralstart;
context._inc(context.es.word(context.bx+3));
@@ -770,10 +791,11 @@ notgeneralstart:
context._inc(context.es.word(context.bx+3));
talking:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void soldier1(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.es.word(context.bx+3), 0);
if (context.flags.z()) goto soldierwait;
context.data.word(kWatchingtime) = 10;
@@ -803,10 +825,11 @@ soldierwait:
gotsoldframe:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void rockstar(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.es.word(context.bx+3);
context._cmp(context.ax, 303);
if (context.flags.z()) goto rockcombatend;
@@ -844,20 +867,21 @@ rockspeed:
addtopeoplelist(context);
context.data.byte(kPointermode) = 2;
context.data.word(kWatchingtime) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notalkrock:
context.data.word(kWatchingtime) = 2;
context.data.byte(kPointermode) = 0;
context.al = context.data.byte(kMapy);
context.es.byte(context.bx+2) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
rockcombatend:
context.data.byte(kNewlocation) = 45;
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void helicopter(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.es.word(context.bx+3);
context._cmp(context.ax, 203);
if (context.flags.z()) goto heliwon;
@@ -904,17 +928,18 @@ helicombatend:
if (context.flags.c()) goto notwaitingheli;
context.data.byte(kPointermode) = 2;
context.data.word(kWatchingtime) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwaitingheli:
context.data.byte(kPointermode) = 0;
context.data.word(kWatchingtime) = 2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
heliwon:
context.data.byte(kPointermode) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void mugger(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.es.word(context.bx+3);
context._cmp(context.ax, 138);
if (context.flags.z()) goto endmugger1;
@@ -931,7 +956,7 @@ notmugger:
showgamereel(context);
context.al = context.data.byte(kMapx);
context.es.byte(context.bx+1) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
endmugger1:
context.push(context.es);
context.push(context.bx);
@@ -982,18 +1007,20 @@ endmugger1:
context.data.byte(kBeenmugged) = 1;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
endmugger2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void aide(Context & context) {
+ uint stack_depth = context.stack.size();
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void businessman(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kPointermode) = 0;
context.data.word(kWatchingtime) = 2;
context.ax = context.es.word(context.bx+3);
@@ -1073,16 +1100,17 @@ busspeed:
if (!context.flags.z()) goto buscombatend;
context.data.word(kWatchingtime) = 0;
context.data.byte(kPointermode) = 2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
buscombatend:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
buscombatwonend:
context.data.byte(kPointermode) = 0;
context.data.word(kWatchingtime) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void poolguard(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.es.word(context.bx+3);
context._cmp(context.ax, 214);
if (context.flags.z()) goto combatover2;
@@ -1140,11 +1168,11 @@ guardspeed:
if (context.flags.z()) goto iswaitingpool;
context.data.byte(kPointermode) = 0;
context.data.word(kWatchingtime) = 2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
iswaitingpool:
context.data.byte(kPointermode) = 2;
context.data.word(kWatchingtime) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
combatover1:
context.data.word(kWatchingtime) = 0;
context.data.byte(kPointermode) = 0;
@@ -1152,7 +1180,7 @@ combatover1:
turnpathon(context);
context.al = 1;
turnpathoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
combatover2:
showgamereel(context);
context.data.word(kWatchingtime) = 2;
@@ -1163,15 +1191,16 @@ combatover2:
context.data.word(kWatchingtime) = 0;
context.data.byte(kMandead) = 2;
doneover2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void security(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.es.word(context.bx+3), 32);
if (context.flags.z()) goto securwait;
context._cmp(context.es.word(context.bx+3), 69);
if (!context.flags.z()) goto notaftersec;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notaftersec:
context.data.word(kWatchingtime) = 10;
checkspeed(context);
@@ -1191,10 +1220,11 @@ securwait:
gotsecurframe:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void heavy(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.es.byte(context.bx+7);
context._and(context.al, 127);
context.es.byte(context.bx+7) = context.al;
@@ -1226,10 +1256,11 @@ heavywait:
gotheavyframe:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void bossman(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto notboss;
context.ax = context.es.word(context.bx+3);
@@ -1269,10 +1300,11 @@ notboss:
if (context.flags.z()) goto nottalkedboss;
context.data.byte(kTalkedtoboss) = 1;
nottalkedboss:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void gamer(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto gamerfin;
gameragain:
@@ -1288,29 +1320,32 @@ gameragain:
gamerfin:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void sparkydrip(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto cantdrip;
context.al = 14;
context.ah = 0;
playchannel0(context);
cantdrip:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void carparkdrip(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto cantdrip2;
context.al = 14;
playchannel1(context);
cantdrip2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void keeper(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kKeeperflag), 0);
if (!context.flags.z()) goto notwaiting;
context._cmp(context.data.word(kReeltowatch), 190);
@@ -1323,15 +1358,16 @@ void keeper(Context & context) {
context.al = context.data.byte(kDreamnumber);
context.es.byte(context.bx+7) = context.al;
notdiff:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwaiting:
addtopeoplelist(context);
showgamereel(context);
waiting:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void candles1(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto candle1;
context.ax = context.es.word(context.bx+3);
@@ -1343,10 +1379,11 @@ notendcandle1:
context.es.word(context.bx+3) = context.ax;
candle1:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void smallcandle(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto smallcandlef;
context.ax = context.es.word(context.bx+3);
@@ -1358,10 +1395,11 @@ notendsmallcandle:
context.es.word(context.bx+3) = context.ax;
smallcandlef:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intromagic1(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto introm1fin;
context.ax = context.es.word(context.bx+3);
@@ -1385,10 +1423,11 @@ gotintrom1:
context.data.byte(kNowinnewroom) = 1;
introm1fin:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void candles(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto candlesfin;
context.ax = context.es.word(context.bx+3);
@@ -1400,10 +1439,11 @@ gotcandles:
context.es.word(context.bx+3) = context.ax;
candlesfin:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void candles2(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto candles2fin;
context.ax = context.es.word(context.bx+3);
@@ -1415,10 +1455,11 @@ gotcandles2:
context.es.word(context.bx+3) = context.ax;
candles2fin:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void gates(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto gatesfin;
context.ax = context.es.word(context.bx+3);
@@ -1451,10 +1492,11 @@ gotgates:
context.es = context.pop();
gatesfin:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intromagic2(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto introm2fin;
context.ax = context.es.word(context.bx+3);
@@ -1466,10 +1508,11 @@ gotintrom2:
context.es.word(context.bx+3) = context.ax;
introm2fin:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intromagic3(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto introm3fin;
context.ax = context.es.word(context.bx+3);
@@ -1483,10 +1526,11 @@ introm3fin:
showgamereel(context);
context.al = context.data.byte(kMapx);
context.es.byte(context.bx+1) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intromonks1(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto intromonk1fin;
context.ax = context.es.word(context.bx+3);
@@ -1496,7 +1540,7 @@ void intromonks1(Context & context) {
context._add(context.data.byte(kMapy), 10);
context.data.byte(kNowinnewroom) = 1;
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notendmonk1:
context._cmp(context.ax, 30);
if (!context.flags.z()) goto gotintromonk1;
@@ -1527,10 +1571,11 @@ intromonk1fin:
showgamereel(context);
context.al = context.data.byte(kMapy);
context.es.byte(context.bx+2) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intromonks2(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto intromonk2fin;
context.ax = context.es.word(context.bx+3);
@@ -1579,14 +1624,16 @@ gotintromonk2:
context.es.word(context.bx+3) = context.ax;
intromonk2fin:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void handclap(Context & context) {
- return;
+ uint stack_depth = context.stack.size();
+ {assert(stack_depth == context.stack.size()); return; }
}
void monks2text(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kIntrocount), 1);
if (!context.flags.z()) goto notmonk2text1;
context.al = 8;
@@ -1677,16 +1724,17 @@ notmonk2text10:
context.cx = 100;
goto gotmonks2text;
notmonk2text11:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotmonks2text:
context.dx = 1;
context.cx = 120;
context.ah = 82;
setuptimedtemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intro1text(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kIntrocount), 2);
if (!context.flags.z()) goto notintro1text1;
context.al = 40;
@@ -1711,16 +1759,17 @@ notintro1text2:
context.cx = 90;
goto gotintro1text;
notintro1text3:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotintro1text:
context.dx = 1;
context.ah = 82;
oktalk2:
setuptimedtemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intro2text(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.ax, 5);
if (!context.flags.z()) goto notintro2text1;
context.al = 43;
@@ -1737,15 +1786,16 @@ notintro2text1:
context.cx = 90;
goto gotintro2text;
notintro2text2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotintro2text:
context.dx = 1;
context.ah = 82;
setuptimedtemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intro3text(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.ax, 107);
if (!context.flags.z()) goto notintro3text1;
context.al = 45;
@@ -1762,15 +1812,16 @@ notintro3text1:
context.cx = 100;
goto gotintro3text;
notintro3text2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotintro3text:
context.dx = 1;
context.ah = 82;
setuptimedtemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void monkandryan(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto notmonkryan;
context.ax = context.es.word(context.bx+3);
@@ -1787,15 +1838,16 @@ void monkandryan(Context & context) {
context._cmp(context.data.byte(kIntrocount), 57);
if (!context.flags.z()) goto gotmonkryan;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotmonkryan:
context.es.word(context.bx+3) = context.ax;
notmonkryan:
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void endgameseq(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto notendseq;
context.ax = context.es.word(context.bx+3);
@@ -1849,10 +1901,11 @@ notendseq:
context.es.word(context.bx+3) = 146;
rollendcredits(context);
notendcreds:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void rollendcredits(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 16;
context.ah = 255;
playchannel0(context);
@@ -1937,10 +1990,11 @@ gotnext:
hangon(context);
paneltomap(context);
fadescreenuphalf(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void priest(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.es.word(context.bx+3), 8);
if (context.flags.z()) goto priestspoken;
context.data.byte(kPointermode) = 0;
@@ -1954,12 +2008,13 @@ void priest(Context & context) {
context.bx = context.pop();
context.es = context.pop();
priestwait:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
priestspoken:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void madmanstelly(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.es.word(context.bx+3);
context._inc(context.ax);
context._cmp(context.ax, 307);
@@ -1968,10 +2023,11 @@ void madmanstelly(Context & context) {
notendtelly:
context.es.word(context.bx+3) = context.ax;
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void madman(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kWatchingtime) = 2;
checkspeed(context);
if (!context.flags.z()) goto nomadspeed;
@@ -2023,7 +2079,7 @@ nomadspeed:
context.al = context.data.byte(kMapx);
context.es.byte(context.bx+1) = context.al;
madmode(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
madmanspoken:
context._cmp(context.data.byte(kWongame), 1);
if (context.flags.z()) goto alreadywon;
@@ -2034,14 +2090,15 @@ madmanspoken:
context.bx = context.pop();
context.es = context.pop();
alreadywon:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
ryansded:
context.data.byte(kMandead) = 2;
showgamereel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void madmantext(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCombatcount), 61);
if (!context.flags.c()) goto nomadtext;
context.al = context.data.byte(kCombatcount);
@@ -2058,10 +2115,11 @@ void madmantext(Context & context) {
context.ah = 82;
setuptimedtemp(context);
nomadtext:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void madmode(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kWatchingtime) = 2;
context.data.byte(kPointermode) = 0;
context._cmp(context.data.byte(kCombatcount), 63);
@@ -2070,10 +2128,11 @@ void madmode(Context & context) {
if (!context.flags.c()) goto iswatchmad;
context.data.byte(kPointermode) = 2;
iswatchmad:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void priesttext(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.es.word(context.bx+3), 2);
if (context.flags.c()) goto nopriesttext;
context._cmp(context.es.word(context.bx+3), 7);
@@ -2090,10 +2149,11 @@ void priesttext(Context & context) {
context.dx = 1;
setuptimeduse(context);
nopriesttext:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void textforend(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kIntrocount), 20);
if (!context.flags.z()) goto notendtext1;
context.al = 0;
@@ -2118,15 +2178,16 @@ notendtext2:
context.cx = 60;
goto gotendtext;
notendtext3:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotendtext:
context.dx = 1;
context.ah = 83;
setuptimedtemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void textformonk(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kIntrocount), 1);
if (!context.flags.z()) goto notmonktext1;
context.al = 19;
@@ -2235,16 +2296,17 @@ notmonktext13:
if (!context.flags.z()) goto notendtitles;
fadescreendowns(context);
notendtitles:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotmonktext:
context.dx = 1;
context.ah = 82;
oktalk:
setuptimedtemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void drunk(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kGeneraldead), 0);
if (!context.flags.z()) goto trampgone;
context.al = context.es.byte(context.bx+7);
@@ -2253,10 +2315,11 @@ void drunk(Context & context) {
showgamereel(context);
addtopeoplelist(context);
trampgone:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void advisor(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto noadvisor;
goto noadvisor;
@@ -2281,10 +2344,11 @@ gotadvframe:
noadvisor:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void copper(Context & context) {
+ uint stack_depth = context.stack.size();
checkspeed(context);
if (!context.flags.z()) goto nocopper;
context.ax = context.es.word(context.bx+3);
@@ -2311,10 +2375,11 @@ gotcopframe:
nocopper:
showgamereel(context);
addtopeoplelist(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void sparky(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kCard1money), 0);
if (context.flags.z()) goto animsparky;
context.es.byte(context.bx+7) = 3;
@@ -2344,11 +2409,12 @@ finishsparky:
if (context.flags.z()) goto nottalkedsparky;
context.data.byte(kTalkedtosparky) = 1;
nottalkedsparky:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void train(Context & context) {
- return;
+ uint stack_depth = context.stack.size();
+ {assert(stack_depth == context.stack.size()); return; }
context.ax = context.es.word(context.bx+3);
context._cmp(context.ax, 21);
if (!context.flags.c()) goto notrainyet;
@@ -2367,10 +2433,11 @@ gottrainframe:
context.es.word(context.bx+3) = context.ax;
showgamereel(context);
notrainatall:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void addtopeoplelist(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.push(context.bx);
@@ -2385,10 +2452,11 @@ void addtopeoplelist(Context & context) {
context.bx = context.pop();
context.es = context.pop();
context._add(context.data.word(kListpos), 5);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showgamereel(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.es.word(context.bx+3);
context._cmp(context.ax, 512);
if (!context.flags.c()) goto noshow;
@@ -2401,10 +2469,11 @@ void showgamereel(Context & context) {
context.ax = context.data.word(kReelpointer);
context.es.word(context.bx+3) = context.ax;
noshow:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkspeed(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLastweapon), -1);
if (!context.flags.z()) goto forcenext;
context._inc(context.es.byte(context.bx+6));
@@ -2415,22 +2484,24 @@ void checkspeed(Context & context) {
context.es.byte(context.bx+6) = context.al;
context._cmp(context.al, context.al);
notspeed:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
forcenext:
context._cmp(context.al, context.al);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearsprites(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
context.al = 255;
context.cx = (32)*16;
while(context.cx--) context._stosb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void makesprite(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
_tmp17:
@@ -2446,18 +2517,20 @@ _tmp17a:
context.es.word(context.bx+2) = 0x0ffff;
context.es.byte(context.bx+15) = 0;
context.es.byte(context.bx+18) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void delsprite(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.bx;
context.cx = (32);
context.al = 255;
while(context.cx--) context._stosb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void spriteupdate(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
context.al = context.data.byte(kRyanon);
@@ -2486,10 +2559,11 @@ _tmp18a:
context._add(context.bx, (32));
if (--context.cx) goto _tmp18;
_tmp18b:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printsprites(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.cx = 0;
priorityloop:
@@ -2518,10 +2592,11 @@ skipsprite:
context._inc(context.cx);
context._cmp(context.cx, 7);
if (!context.flags.z()) goto priorityloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printasprite(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.si = context.bx;
@@ -2554,10 +2629,11 @@ notquickp:
showframe(context);
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkone(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.cx);
context.al = context.ch;
context.ah = 0;
@@ -2589,29 +2665,31 @@ void checkone(Context & context) {
context.cx = context.ax;
context._lodsb();
context.dx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findsource(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kCurrentframe);
context._cmp(context.ax, 160);
if (!context.flags.c()) goto over1000;
context.ds = context.data.word(kReel1);
context.data.word(kTakeoff) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
over1000:
context._cmp(context.ax, 320);
if (!context.flags.c()) goto over1001;
context.ds = context.data.word(kReel2);
context.data.word(kTakeoff) = 160;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
over1001:
context.ds = context.data.word(kReel3);
context.data.word(kTakeoff) = 320;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void initman(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kRyanx);
context.ah = context.data.byte(kRyany);
context.si = context.ax;
@@ -2622,10 +2700,11 @@ void initman(Context & context) {
context.es.byte(context.bx+23) = 4;
context.es.byte(context.bx+22) = 0;
context.es.byte(context.bx+29) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void mainman(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kResetmanxy), 1);
if (!context.flags.z()) goto notinnewroom;
context.data.byte(kResetmanxy) = 0;
@@ -2638,7 +2717,7 @@ notinnewroom:
context._dec(context.es.byte(context.bx+22));
context._cmp(context.es.byte(context.bx+22), -1);
if (context.flags.z()) goto executewalk;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
executewalk:
context.es.byte(context.bx+22) = 0;
context.al = context.data.byte(kTurntoface);
@@ -2705,10 +2784,11 @@ notwalk:
context.ax = context.es.word(context.bx+10);
context.data.byte(kRyanx) = context.al;
context.data.byte(kRyany) = context.ah;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void aboutturn(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kTurndirection), 1);
if (context.flags.z()) goto incdir;
context._cmp(context.data.byte(kTurndirection), -1);
@@ -2731,7 +2811,7 @@ incdir:
context._and(context.al, 7);
context.data.byte(kFacing) = context.al;
context.es.byte(context.bx+29) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
decdir:
context.data.byte(kTurndirection) = -1;
context.al = context.data.byte(kFacing);
@@ -2739,10 +2819,11 @@ decdir:
context._and(context.al, 7);
context.data.byte(kFacing) = context.al;
context.es.byte(context.bx+29) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void walking(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLinedirection), 0);
if (context.flags.z()) goto normalwalk;
context.al = context.data.byte(kLinepointer);
@@ -2771,7 +2852,7 @@ continuewalk:
context.es = context.pop();
stillline:
context.es.word(context.bx+10) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
endofline:
context.data.byte(kLinepointer) = 254;
context.al = context.data.byte(kDestination);
@@ -2785,13 +2866,14 @@ endofline:
autosetwalk(context);
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
finishedwalk:
facerightway(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void facerightway(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
getroomspaths(context);
@@ -2806,10 +2888,11 @@ void facerightway(Context & context) {
context.data.byte(kLeavedirection) = context.al;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkforexit(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = context.data.byte(kRyanx);
context._add(context.cl, 12);
context.ch = context.data.byte(kRyany);
@@ -2824,7 +2907,7 @@ void checkforexit(Context & context) {
if (context.flags.z()) goto notnewdirect;
context.al = context.data.byte(kLastflagex);
context.data.byte(kAutolocation) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notnewdirect:
context._test(context.al, 32);
if (context.flags.z()) goto notleave;
@@ -2871,37 +2954,38 @@ notravmessage:
context.data.byte(kTurntoface) = context.al;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notlouis:
context.bx = context.pop();
context.es = context.pop();
context.data.byte(kNeedtotravel) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notleave:
context._test(context.al, 4);
if (context.flags.z()) goto notaleft;
adjustleft(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notaleft:
context._test(context.al, 2);
if (context.flags.z()) goto notaright;
adjustright(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notaright:
context._test(context.al, 8);
if (context.flags.z()) goto notadown;
adjustdown(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notadown:
context._test(context.al, 16);
if (context.flags.z()) goto notanup;
adjustup(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notanup:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void adjustdown(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context._add(context.data.byte(kMapy), 10);
@@ -2912,10 +2996,11 @@ void adjustdown(Context & context) {
context.data.byte(kNowinnewroom) = 1;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void adjustup(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context._sub(context.data.byte(kMapy), 10);
@@ -2926,10 +3011,11 @@ void adjustup(Context & context) {
context.data.byte(kNowinnewroom) = 1;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void adjustleft(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.data.byte(kLastflag) = 0;
@@ -2941,10 +3027,11 @@ void adjustleft(Context & context) {
context.data.byte(kNowinnewroom) = 1;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void adjustright(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context._add(context.data.byte(kMapx), 11);
@@ -2956,10 +3043,11 @@ void adjustright(Context & context) {
context.data.byte(kNowinnewroom) = 1;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void reminders(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 24);
if (!context.flags.z()) goto notinedenslift;
context._cmp(context.data.byte(kMapx), 44);
@@ -2994,7 +3082,7 @@ void reminders(Context & context) {
havegotcard:
context._inc(context.data.byte(kProgresspoints));
notfirst:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
forgotone:
context.al = 50;
context.bl = 54;
@@ -3002,12 +3090,13 @@ forgotone:
context.cx = 48;
context.dx = 8;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinedenslift:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void initrain(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*24));
context.bx = 1113;
@@ -3063,10 +3152,11 @@ initrainside2:
finishinitrain:
context.al = 255;
context._stosb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void splitintolines(Context & context) {
+ uint stack_depth = context.stack.size();
lookforlinestart:
getblockofpixel(context);
context._cmp(context.al, 0);
@@ -3112,10 +3202,11 @@ foundlineend:
if (!context.flags.c()) goto endofthisline;
goto lookforlinestart;
endofthisline:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getblockofpixel(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.cx);
context.push(context.es);
context.push(context.di);
@@ -3129,16 +3220,17 @@ void getblockofpixel(Context & context) {
context.di = context.pop();
context.es = context.pop();
context.cx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
failrain:
context.di = context.pop();
context.es = context.pop();
context.cx = context.pop();
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showrain(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kMainsprites);
context.si = 6*58;
context.ax = context.ds.word(context.si+2);
@@ -3212,10 +3304,11 @@ notlouisthund:
isthunder1:
playchannel1(context);
nothunder:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void backobject(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kSetdat);
context.di = context.es.word(context.bx+20);
context.al = context.es.byte(context.bx+18);
@@ -3260,10 +3353,11 @@ notdoor:
steadyob:
steady(context);
finishback:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void liftsprite(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kLiftflag);
context._cmp(context.al, 0);
if (context.flags.z()) goto liftclosed;
@@ -3284,7 +3378,7 @@ void liftsprite(Context & context) {
goto pokelift;
finishclose:
context.data.byte(kLiftflag) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
openlift:
context.al = context.es.byte(context.bx+19);
context._cmp(context.al, 12);
@@ -3305,10 +3399,10 @@ pokelift:
context.di = context.pop();
context.es.byte(context.bx+15) = context.al;
context.ds.byte(context.di+17) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
endoflist:
context.data.byte(kLiftflag) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
liftopen:
context.al = context.data.byte(kLiftpath);
context.push(context.es);
@@ -3344,19 +3438,21 @@ nocountopen:
}
void liftnoise(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 5);
if (context.flags.z()) goto hissnoise;
context._cmp(context.data.byte(kReallocation), 21);
if (context.flags.z()) goto hissnoise;
playchannel1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
hissnoise:
context.al = 13;
playchannel1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void random(Context & context) {
+ uint stack_depth = context.stack.size();
randomnum1(context);
context.push(context.di);
context._and(context.ax, 7);
@@ -3365,17 +3461,19 @@ void random(Context & context) {
context.al = context.ds.byte(context.di);
context.di = context.pop();
context.es.byte(context.bx+15) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void steady(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.ds.byte(context.di+18);
context.ds.byte(context.di+17) = context.al;
context.es.byte(context.bx+15) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void constant(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.es.byte(context.bx+19));
context.cl = context.es.byte(context.bx+19);
context.ch = 0;
@@ -3390,28 +3488,31 @@ gotconst:
context._sub(context.di, context.cx);
context.es.byte(context.bx+15) = context.al;
context.ds.byte(context.di+17) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void doorway(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kDoorcheck1) = -24;
context.data.byte(kDoorcheck2) = 10;
context.data.byte(kDoorcheck3) = -30;
context.data.byte(kDoorcheck4) = 10;
dodoor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void widedoor(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kDoorcheck1) = -24;
context.data.byte(kDoorcheck2) = 24;
context.data.byte(kDoorcheck3) = -30;
context.data.byte(kDoorcheck4) = 24;
dodoor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dodoor(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kRyanx);
context.ah = context.data.byte(kRyany);
context.cl = context.es.byte(context.bx+10);
@@ -3470,7 +3571,7 @@ atlast1:
context.es.byte(context.bx+15) = context.al;
context.ds.byte(context.di+17) = context.al;
context.data.byte(kThroughdoor) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
shutdoor:
context.cl = context.es.byte(context.bx+19);
context._cmp(context.cl, 5);
@@ -3498,10 +3599,11 @@ atlast2:
if (!context.flags.z()) goto notnearly;
context.data.byte(kThroughdoor) = 0;
notnearly:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void lockeddoorway(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kRyanx);
context.ah = context.data.byte(kRyany);
context.cl = context.es.byte(context.bx+10);
@@ -3574,7 +3676,7 @@ atlast3:
if (!context.flags.z()) goto justshutting;
context.data.byte(kThroughdoor) = 1;
justshutting:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
shutdoor2:
context.cl = context.es.byte(context.bx+19);
context._cmp(context.cl, 5);
@@ -3605,7 +3707,7 @@ atlast4:
context.es = context.pop();
context.data.byte(kLockstatus) = 1;
notlocky:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
/*continuing to unbounded code: shutdoor from dodoor:60-87*/
shutdoor:
context.cl = context.es.byte(context.bx+19);
@@ -3634,11 +3736,12 @@ atlast2:
if (!context.flags.z()) goto notnearly;
context.data.byte(kThroughdoor) = 0;
notnearly:
- return;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
+ {assert(stack_depth == context.stack.size()); return; }
}
void updatepeople(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
context.data.word(kListpos) = context.di;
@@ -3669,10 +3772,11 @@ notinthisroom:
context._add(context.di, 2);
goto updateloop;
endupdate:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getreelframeax(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ds);
context.data.word(kCurrentframe) = context.ax;
findsource(context);
@@ -3685,19 +3789,21 @@ void getreelframeax(Context & context) {
context._add(context.ax, context.ax);
context._add(context.ax, context.cx);
context.bx = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void reelsonscreen(Context & context) {
+ uint stack_depth = context.stack.size();
reconstruct(context);
updatepeople(context);
watchreel(context);
showrain(context);
usetimedtext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void plotreel(Context & context) {
+ uint stack_depth = context.stack.size();
getreelstart(context);
retryreel:
context.push(context.es);
@@ -3732,10 +3838,11 @@ notplot:
soundonreels(context);
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void soundonreels(Context & context) {
+ uint stack_depth = context.stack.size();
context.bl = context.data.byte(kReallocation);
context._add(context.bl, context.bl);
context._xor(context.bh, context.bh);
@@ -3772,10 +3879,11 @@ endreelsound:
if (context.flags.z()) goto nochange2;
context.data.word(kLastsoundreel) = -1;
nochange2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void reconstruct(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kHavedoneobs), 0);
if (context.flags.z()) goto noneedtorecon;
context.data.byte(kNewobs) = 1;
@@ -3784,101 +3892,105 @@ void reconstruct(Context & context) {
printsprites(context);
context.data.byte(kHavedoneobs) = 0;
noneedtorecon:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dealwithspecial(Context & context) {
+ uint stack_depth = context.stack.size();
context._sub(context.al, 220);
context._cmp(context.al, 0);
if (!context.flags.z()) goto notplset;
context.al = context.ah;
placesetobject(context);
context.data.byte(kHavedoneobs) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notplset:
context._cmp(context.al, 1);
if (!context.flags.z()) goto notremset;
context.al = context.ah;
removesetobject(context);
context.data.byte(kHavedoneobs) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notremset:
context._cmp(context.al, 2);
if (!context.flags.z()) goto notplfree;
context.al = context.ah;
placefreeobject(context);
context.data.byte(kHavedoneobs) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notplfree:
context._cmp(context.al, 3);
if (!context.flags.z()) goto notremfree;
context.al = context.ah;
removefreeobject(context);
context.data.byte(kHavedoneobs) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notremfree:
context._cmp(context.al, 4);
if (!context.flags.z()) goto notryanoff;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notryanoff:
context._cmp(context.al, 5);
if (!context.flags.z()) goto notryanon;
context.data.byte(kTurntoface) = context.ah;
context.data.byte(kFacing) = context.ah;
switchryanon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notryanon:
context._cmp(context.al, 6);
if (!context.flags.z()) goto notchangeloc;
context.data.byte(kNewlocation) = context.ah;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notchangeloc:
movemap(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void movemap(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.ah, 32);
if (!context.flags.z()) goto notmapup2;
context._sub(context.data.byte(kMapy), 20);
context.data.byte(kNowinnewroom) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notmapup2:
context._cmp(context.ah, 16);
if (!context.flags.z()) goto notmapupspec;
context._sub(context.data.byte(kMapy), 10);
context.data.byte(kNowinnewroom) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notmapupspec:
context._cmp(context.ah, 8);
if (!context.flags.z()) goto notmapdownspec;
context._add(context.data.byte(kMapy), 10);
context.data.byte(kNowinnewroom) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notmapdownspec:
context._cmp(context.ah, 2);
if (!context.flags.z()) goto notmaprightspec;
context._add(context.data.byte(kMapx), 11);
context.data.byte(kNowinnewroom) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notmaprightspec:
context._sub(context.data.byte(kMapx), 11);
context.data.byte(kNowinnewroom) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getreelstart(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kReelpointer);
context.cx = 40;
context._mul(context.cx);
context.es = context.data.word(kReels);
context.si = context.ax;
context._add(context.si, (0+(36*144)));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showreelframe(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.es.byte(context.si+2);
context.ah = 0;
context.di = context.ax;
@@ -3893,25 +4005,27 @@ void showreelframe(Context & context) {
context._sub(context.ax, context.data.word(kTakeoff));
context.ah = 8;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void deleverything(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kMapysize);
context.ah = 0;
context._add(context.ax, context.data.word(kMapoffsety));
context._cmp(context.ax, 182);
if (!context.flags.c()) goto bigroom;
maptopanel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
bigroom:
context._sub(context.data.byte(kMapysize), 8);
maptopanel(context);
context._add(context.data.byte(kMapysize), 8);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpeverything(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40));
dumpevery1:
@@ -3963,17 +4077,19 @@ dumpevery2:
context._add(context.bx, 5);
goto dumpevery2;
finishevery2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void allocatework(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = 0x1000;
allocatemem(context);
context.data.word(kWorkspace) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readabyte(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.si, 30000);
if (!context.flags.z()) goto notendblock;
context.push(context.bx);
@@ -3990,10 +4106,11 @@ void readabyte(Context & context) {
context.si = 0;
notendblock:
context._lodsb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadpalfromiff(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 2481;
openfile(context);
context.cx = 2000;
@@ -4025,10 +4142,11 @@ palloop:
nought:
context._stosb();
if (--context.cx) goto palloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void paneltomap(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.data.word(kMapxstart);
context._add(context.di, context.data.word(kMapadx));
context.bx = context.data.word(kMapystart);
@@ -4038,10 +4156,11 @@ void paneltomap(Context & context) {
context.cl = context.data.byte(kMapxsize);
context.ch = context.data.byte(kMapysize);
multiget(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void maptopanel(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.data.word(kMapxstart);
context._add(context.di, context.data.word(kMapadx));
context.bx = context.data.word(kMapystart);
@@ -4051,10 +4170,11 @@ void maptopanel(Context & context) {
context.cl = context.data.byte(kMapxsize);
context.ch = context.data.byte(kMapysize);
multiput(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpmap(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.data.word(kMapxstart);
context._add(context.di, context.data.word(kMapadx));
context.bx = context.data.word(kMapystart);
@@ -4062,10 +4182,11 @@ void dumpmap(Context & context) {
context.cl = context.data.byte(kMapxsize);
context.ch = context.data.byte(kMapysize);
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void pixelcheckset(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context._sub(context.al, context.es.byte(context.bx));
context._sub(context.ah, context.es.byte(context.bx+1));
@@ -4102,10 +4223,11 @@ void pixelcheckset(Context & context) {
context.es = context.pop();
context.ax = context.pop();
context._cmp(context.dl, 0);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void createpanel(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 0;
context.bx = 8;
context.ds = context.data.word(kIcons2);
@@ -4130,10 +4252,11 @@ void createpanel(Context & context) {
context.al = 0;
context.ah = 2;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void createpanel2(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel(context);
context.di = 0;
context.bx = 0;
@@ -4147,10 +4270,11 @@ void createpanel2(Context & context) {
context.al = 5;
context.ah = 2;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearwork(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = 0x0;
context.es = context.data.word(kWorkspace);
context.di = 0;
@@ -4189,22 +4313,23 @@ clearloop:
context._stosw();
context._stosw();
if (--context.cx) goto clearloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void zoom(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kWatchingtime), 0);
if (!context.flags.z()) goto inwatching;
context._cmp(context.data.byte(kZoomon), 1);
if (context.flags.z()) goto zoomswitch;
inwatching:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
zoomswitch:
context._cmp(context.data.byte(kCommandtype), 199);
if (context.flags.c()) goto zoomit;
cantzoom:
putunderzoom(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
zoomit:
context.ax = context.data.word(kOldpointery);
context._sub(context.ax, 9);
@@ -4236,10 +4361,11 @@ zoomloop2:
if (--context.cx) goto zoomloop;
crosshair(context);
context.data.byte(kDidzoom) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void delthisone(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.ax);
context.al = context.ah;
@@ -4279,10 +4405,11 @@ deloneloop:
context._add(context.si, context.dx);
context._dec(context.ch);
if (!context.flags.z()) goto deloneloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void width160(Context & context) {
+ uint stack_depth = context.stack.size();
context._movsw();
context._movsw();
context._movsw();
@@ -4512,10 +4639,11 @@ void width160(Context & context) {
width1:
context._movsw();
width0:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void doblocks(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kWorkspace);
context.ax = context.data.word(kMapady);
context.cx = (320);
@@ -4627,10 +4755,11 @@ zeroblock:
context.di = context.pop();
context._add(context.di, (320)*16);
if (--context.cx) goto loop120;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showframe(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.dx);
context.push(context.ax);
context.cx = context.ax;
@@ -4642,7 +4771,7 @@ void showframe(Context & context) {
context._cmp(context.ds.word(context.si), 0);
if (!context.flags.z()) goto notblankshow;
context.cx = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notblankshow:
context._test(context.ah, 128);
if (!context.flags.z()) goto skipoffsets;
@@ -4679,7 +4808,7 @@ notcentred:
context.push(context.cx);
frameoutfx(context);
context.cx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notdiffdest:
context._test(context.ah, 8);
if (context.flags.z()) goto notprintlist;
@@ -4699,7 +4828,7 @@ notprintlist:
context.push(context.cx);
frameoutfx(context);
context.cx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notflippedx:
context._test(context.ah, 2);
if (context.flags.z()) goto notnomask;
@@ -4708,7 +4837,7 @@ notflippedx:
context.push(context.cx);
frameoutnm(context);
context.cx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notnomask:
context._test(context.ah, 32);
if (context.flags.z()) goto noeffects;
@@ -4717,17 +4846,18 @@ notnomask:
context.push(context.cx);
frameoutbh(context);
context.cx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
noeffects:
context.dx = (320);
context.es = context.data.word(kWorkspace);
context.push(context.cx);
frameoutv(context);
context.cx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void frameoutv(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.dx);
context.ax = context.bx;
context.bx = context.dx;
@@ -4752,7 +4882,7 @@ backtoother:
context._add(context.di, context.dx);
context._dec(context.ch);
if (!context.flags.z()) goto frameloop1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
frameloop3:
context._lodsb();
context._cmp(context.al, 0);
@@ -4764,10 +4894,11 @@ backtosolid:
context._add(context.di, context.dx);
context._dec(context.ch);
if (!context.flags.z()) goto frameloop1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void frameoutbh(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.dx);
context.ax = context.bx;
context.bx = context.dx;
@@ -4797,10 +4928,11 @@ nextline:
context.cx = context.pop();
context._dec(context.ch);
if (!context.flags.z()) goto bhloop2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void frameoutfx(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.dx);
context.ax = context.bx;
context.bx = context.dx;
@@ -4825,7 +4957,7 @@ backtootherfx:
context._add(context.di, context.dx);
context._dec(context.ch);
if (!context.flags.z()) goto frameloopfx1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
frameloopfx3:
context._lodsb();
context._cmp(context.al, 0);
@@ -4838,10 +4970,11 @@ backtosolidfx:
context._add(context.di, context.dx);
context._dec(context.ch);
if (!context.flags.z()) goto frameloopfx1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void transferinv(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.data.word(kExframepos);
context.push(context.di);
context.al = context.data.byte(kExpos);
@@ -4887,10 +5020,11 @@ void transferinv(Context & context) {
context.ax = context.pop();
context.es.word(context.bx+2) = context.ax;
context._add(context.data.word(kExframepos), context.cx);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void transfermap(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.data.word(kExframepos);
context.push(context.di);
context.al = context.data.byte(kExpos);
@@ -4934,10 +5068,11 @@ void transfermap(Context & context) {
context.ax = context.pop();
context.es.word(context.bx+2) = context.ax;
context._add(context.data.word(kExframepos), context.cx);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dofade(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kFadedirection), 0);
if (context.flags.z()) goto finishfade;
context.cl = context.data.byte(kNumtofade);
@@ -4957,36 +5092,40 @@ void dofade(Context & context) {
if (!context.flags.z()) goto finishfade;
fadecalculation(context);
finishfade:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearendpal(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
context.cx = 768;
context.al = 0;
while(context.cx--) context._stosb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearpalette(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kFadedirection) = 0;
clearstartpal(context);
dumpcurrent(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadescreenup(Context & context) {
+ uint stack_depth = context.stack.size();
clearstartpal(context);
paltoendpal(context);
context.data.byte(kFadedirection) = 1;
context.data.byte(kFadecount) = 63;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 128;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadetowhite(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
context.cx = 768;
@@ -5002,10 +5141,11 @@ void fadetowhite(Context & context) {
context.data.byte(kFadecount) = 63;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 128;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadefromwhite(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3));
context.cx = 768;
@@ -5021,20 +5161,22 @@ void fadefromwhite(Context & context) {
context.data.byte(kFadecount) = 63;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 128;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadescreenups(Context & context) {
+ uint stack_depth = context.stack.size();
clearstartpal(context);
paltoendpal(context);
context.data.byte(kFadedirection) = 1;
context.data.byte(kFadecount) = 63;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 64;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadescreendownhalf(Context & context) {
+ uint stack_depth = context.stack.size();
paltostartpal(context);
paltoendpal(context);
context.cx = 768;
@@ -5060,40 +5202,44 @@ halfend:
context.data.byte(kFadecount) = 31;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 32;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadescreenuphalf(Context & context) {
+ uint stack_depth = context.stack.size();
endpaltostart(context);
paltoendpal(context);
context.data.byte(kFadedirection) = 1;
context.data.byte(kFadecount) = 31;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 32;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadescreendown(Context & context) {
+ uint stack_depth = context.stack.size();
paltostartpal(context);
clearendpal(context);
context.data.byte(kFadedirection) = 1;
context.data.byte(kFadecount) = 63;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 128;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadescreendowns(Context & context) {
+ uint stack_depth = context.stack.size();
paltostartpal(context);
clearendpal(context);
context.data.byte(kFadedirection) = 1;
context.data.byte(kFadecount) = 63;
context.data.byte(kColourpos) = 0;
context.data.byte(kNumtofade) = 64;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearstartpal(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3));
context.cx = 256;
@@ -5103,10 +5249,11 @@ wholeloop1:
context.al = 0;
context._stosb();
if (--context.cx) goto wholeloop1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showgun(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kAddtored) = 0;
context.data.byte(kAddtogreen) = 0;
context.data.byte(kAddtoblue) = 0;
@@ -5157,15 +5304,17 @@ void showgun(Context & context) {
loadtemptext(context);
rollendcredits2(context);
getridoftemptext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void rollendcredits2(Context & context) {
+ uint stack_depth = context.stack.size();
rollem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void rollem(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 160;
context.ch = 160;
context.di = 25;
@@ -5246,14 +5395,15 @@ gotnext2:
if (--context.cx) goto endcredits21;
context.cx = 120;
hangone(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
endearly2:
context.cx = context.pop();
endearly:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadecalculation(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kFadecount), 0);
if (context.flags.z()) goto nomorefading;
context.bl = context.data.byte(kFadecount);
@@ -5280,13 +5430,14 @@ gotthere:
context._inc(context.di);
if (--context.cx) goto fadecolloop;
context._dec(context.data.byte(kFadecount));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nomorefading:
context.data.byte(kFadedirection) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void greyscalesum(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
@@ -5338,50 +5489,55 @@ noaddb:
context._add(context.si, 3);
context.cx = context.pop();
if (--context.cx) goto greysumloop1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void paltostartpal(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.ds = context.data.word(kBuffers);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3));
context.cx = 768/2;
while(context.cx--) context._movsw();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void endpaltostart(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.ds = context.data.word(kBuffers);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3));
context.cx = 768/2;
while(context.cx--) context._movsw();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void startpaltoend(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.ds = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3));
context.cx = 768/2;
while(context.cx--) context._movsw();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void paltoendpal(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.ds = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
context.cx = 768/2;
while(context.cx--) context._movsw();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void allpalette(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.ds = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3));
@@ -5389,10 +5545,11 @@ void allpalette(Context & context) {
context.cx = 768/2;
while(context.cx--) context._movsw();
dumpcurrent(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpcurrent(Context & context) {
+ uint stack_depth = context.stack.size();
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3));
context.ds = context.data.word(kBuffers);
vsync(context);
@@ -5403,10 +5560,11 @@ void dumpcurrent(Context & context) {
context.al = 128;
context.cx = 128;
showgroup(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadedownmon(Context & context) {
+ uint stack_depth = context.stack.size();
paltostartpal(context);
paltoendpal(context);
context.es = context.data.word(kBuffers);
@@ -5423,10 +5581,11 @@ void fadedownmon(Context & context) {
context.data.byte(kNumtofade) = 128;
context.cx = 64;
hangon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadeupmon(Context & context) {
+ uint stack_depth = context.stack.size();
paltostartpal(context);
paltoendpal(context);
context.es = context.data.word(kBuffers);
@@ -5443,10 +5602,11 @@ void fadeupmon(Context & context) {
context.data.byte(kNumtofade) = 128;
context.cx = 128;
hangon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadeupmonfirst(Context & context) {
+ uint stack_depth = context.stack.size();
paltostartpal(context);
paltoendpal(context);
context.es = context.data.word(kBuffers);
@@ -5467,10 +5627,11 @@ void fadeupmonfirst(Context & context) {
playchannel1(context);
context.cx = 64;
hangon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fadeupyellows(Context & context) {
+ uint stack_depth = context.stack.size();
paltoendpal(context);
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768)+(231*3);
@@ -5486,10 +5647,11 @@ void fadeupyellows(Context & context) {
context.data.byte(kNumtofade) = 128;
context.cx = 128;
hangon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void initialmoncols(Context & context) {
+ uint stack_depth = context.stack.size();
paltostartpal(context);
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3))+(230*3);
@@ -5504,17 +5666,19 @@ void initialmoncols(Context & context) {
context.al = 230;
context.cx = 18;
showgroup(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void titles(Context & context) {
+ uint stack_depth = context.stack.size();
clearpalette(context);
biblequote(context);
intro(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void endgame(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 2260;
loadtemptext(context);
monkspeaking(context);
@@ -5524,10 +5688,11 @@ void endgame(Context & context) {
context.data.byte(kVolumedirection) = 1;
context.cx = 200;
hangon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void monkspeaking(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kRoomssample) = 35;
loadroomssample(context);
context.dx = 2364;
@@ -5582,20 +5747,22 @@ nextbit:
context.cx = 300;
hangon(context);
getridoftemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showmonk(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 0;
context.ah = 128;
context.di = 160;
context.bx = 72;
context.ds = context.data.word(kTempgraphics);
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void gettingshot(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kNewlocation) = 55;
clearpalette(context);
loadintroroom(context);
@@ -5604,16 +5771,18 @@ void gettingshot(Context & context) {
context.data.byte(kVolumedirection) = -1;
runendseq(context);
clearbeforeload(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void credits(Context & context) {
+ uint stack_depth = context.stack.size();
clearpalette(context);
realcredits(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void biblequote(Context & context) {
+ uint stack_depth = context.stack.size();
mode640x480(context);
context.dx = 2377;
showpcx(context);
@@ -5633,10 +5802,11 @@ void biblequote(Context & context) {
if (context.flags.z()) goto biblequotearly;
cancelch0(context);
biblequotearly:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hangone(Context & context) {
+ uint stack_depth = context.stack.size();
hangonloope:
context.push(context.cx);
vsync(context);
@@ -5645,10 +5815,11 @@ hangonloope:
if (context.flags.z()) goto hangonearly;
if (--context.cx) goto hangonloope;
hangonearly:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intro(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 2247;
loadtemptext(context);
loadpalfromiff(context);
@@ -5688,10 +5859,11 @@ void intro(Context & context) {
getridoftemptext(context);
clearbeforeload(context);
introearly:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void runintroseq(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kGetback) = 0;
moreintroseq:
vsync(context);
@@ -5716,14 +5888,15 @@ moreintroseq:
if (context.flags.z()) goto earlyendrun;
context._cmp(context.data.byte(kGetback), 1);
if (!context.flags.z()) goto moreintroseq;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
earlyendrun:
getridoftemptext(context);
clearbeforeload(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void runendseq(Context & context) {
+ uint stack_depth = context.stack.size();
atmospheres(context);
context.data.byte(kGetback) = 0;
moreendseq:
@@ -5741,10 +5914,11 @@ moreendseq:
vsync(context);
context._cmp(context.data.byte(kGetback), 1);
if (!context.flags.z()) goto moreendseq;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadintroroom(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kIntrocount) = 0;
context.data.byte(kLocation) = 255;
loadroom(context);
@@ -5761,10 +5935,11 @@ void loadintroroom(Context & context) {
spriteupdate(context);
printsprites(context);
worktoscreen(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void realcredits(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kRoomssample) = 33;
loadroomssample(context);
context.data.byte(kVolume) = 0;
@@ -5884,10 +6059,11 @@ void realcredits(Context & context) {
context.cx = 256;
hangone(context);
realcreditsearly:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printchar(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.al, 255);
if (context.flags.z()) goto ignoreit;
context.push(context.si);
@@ -5911,15 +6087,16 @@ nokern:
context._add(context.di, context.cx);
context.cx = context.pop();
ignoreit:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void kernchars(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.al, 'a');
if (context.flags.z()) goto iskern;
context._cmp(context.al, 'u');
if (context.flags.z()) goto iskern;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
iskern:
context._cmp(context.ah, 'n');
if (context.flags.z()) goto kernit;
@@ -5931,13 +6108,14 @@ iskern:
if (context.flags.z()) goto kernit;
context._cmp(context.ah, 'l');
if (context.flags.z()) goto kernit;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
kernit:
context._dec(context.cl);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printslow(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kPointerframe) = 1;
context.data.byte(kPointermode) = 3;
context.ds = context.data.word(kCharset1);
@@ -6017,7 +6195,7 @@ finishslow:
context.di = context.pop();
context.bx = context.pop();
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
finishslow2:
context.es = context.pop();
context.si = context.pop();
@@ -6026,10 +6204,11 @@ finishslow2:
context.di = context.pop();
context.bx = context.pop();
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void waitframes(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.di);
context.push(context.bx);
context.push(context.es);
@@ -6046,10 +6225,11 @@ void waitframes(Context & context) {
context.es = context.pop();
context.bx = context.pop();
context.di = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printboth(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.cx);
context.push(context.bx);
@@ -6063,10 +6243,11 @@ void printboth(Context & context) {
context.bx = context.pop();
context.cx = context.pop();
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printdirect(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kLastxpos) = context.di;
context.ds = context.data.word(kCurrentset);
printloop6:
@@ -6098,10 +6279,11 @@ finishdirct:
context.dx = context.pop();
context.di = context.pop();
context.bx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void monprint(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kKerning) = 1;
context.si = context.bx;
context.dl = 166;
@@ -6176,10 +6358,11 @@ nottrigger2:
scrollmonitor(context);
context.bx = context.si;
context.data.byte(kKerning) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getnumber(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = 0;
context.push(context.si);
context.push(context.bx);
@@ -6228,7 +6411,7 @@ gotoverend:
context.si = context.pop();
context._add(context.di, context.ax);
context.cl = context.ch;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notcentre:
context.es = context.pop();
context.ds = context.pop();
@@ -6236,7 +6419,7 @@ notcentre:
context.bx = context.pop();
context.si = context.pop();
context.cl = context.ch;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
endoftext:
context.al = context.cl;
context.ah = 0;
@@ -6271,7 +6454,7 @@ gotoverend2:
context.si = context.pop();
context._add(context.di, context.ax);
context.cl = context.ch;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notcent2:
context.es = context.pop();
context.ds = context.pop();
@@ -6279,10 +6462,11 @@ notcent2:
context.bx = context.pop();
context.si = context.pop();
context.cl = context.ch;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getnextword(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = 0;
getloop:
context.ax = context.es.word(context.di);
@@ -6312,14 +6496,15 @@ getloop:
endword:
context._add(context.bl, 6);
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
endall:
context._add(context.bl, 6);
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fillryan(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32);
findallryan(context);
@@ -6359,10 +6544,11 @@ ryanloop1:
context._add(context.bx, (44));
if (--context.cx) goto ryanloop2;
showryanpage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fillopen(Context & context) {
+ uint stack_depth = context.stack.size();
deltextline(context);
getopenedsize(context);
context._cmp(context.ah, 4);
@@ -6400,10 +6586,11 @@ nextopenslot:
context._cmp(context.cl, 5);
if (!context.flags.z()) goto openloop1;
undertextline(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findallryan(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.di);
context.cx = 30;
context.ax = 0x0ffff;
@@ -6432,10 +6619,11 @@ notinryaninv:
context._inc(context.ch);
context._cmp(context.ch, (114));
if (!context.flags.z()) goto findryanloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findallopen(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.di);
context.cx = 16;
context.ax = 0x0ffff;
@@ -6497,10 +6685,11 @@ findopen2a:
context._inc(context.ch);
context._cmp(context.ch, 80);
if (!context.flags.z()) goto findopen1a;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void obtoinv(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.bx);
context.push(context.es);
context.push(context.si);
@@ -6554,26 +6743,29 @@ finishfill:
context.si = context.pop();
context.es = context.pop();
context.bx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void isitworn(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.es.byte(context.bx+12);
context._cmp(context.al, 'W'-'A');
if (!context.flags.z()) goto notworn;
context.al = context.es.byte(context.bx+13);
context._cmp(context.al, 'E'-'A');
notworn:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void makeworn(Context & context) {
+ uint stack_depth = context.stack.size();
context.es.byte(context.bx+12) = 'W'-'A';
context.es.byte(context.bx+13) = 'E'-'A';
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void examineob(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kPointermode) = 0;
context.data.word(kTimecount) = 0;
examineagain:
@@ -6631,14 +6823,15 @@ iswatching:
makemainscreen(context);
context.data.byte(kInvopen) = 0;
context.data.byte(kOpenedob) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
justgetback:
context.data.byte(kInvopen) = 0;
context.data.byte(kOpenedob) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void makemainscreen(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel(context);
context.data.byte(kNewobs) = 1;
drawfloor(context);
@@ -6653,20 +6846,22 @@ void makemainscreen(Context & context) {
worktoscreenm(context);
context.data.byte(kCommandtype) = 200;
context.data.byte(kManisoffscreen) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getbackfromob(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kPickup), 1);
if (!context.flags.z()) goto notheldob;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notheldob:
getback1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void incryanpage(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 222);
if (context.flags.z()) goto alreadyincryan;
context.data.byte(kCommandtype) = 222;
@@ -6679,7 +6874,7 @@ alreadyincryan:
context._and(context.ax, 1);
if (!context.flags.z()) goto doincryan;
noincryan:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doincryan:
context.ax = context.data.word(kMousex);
context._sub(context.ax, (80)+167);
@@ -6694,10 +6889,11 @@ findnewpage:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openinv(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kInvopen) = 1;
context.al = 61;
context.di = (80);
@@ -6706,10 +6902,11 @@ void openinv(Context & context) {
printmessage(context);
fillryan(context);
context.data.byte(kCommandtype) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showryanpage(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kIcons1);
context.di = (80)+167;
context.bx = (58)-12;
@@ -6730,10 +6927,11 @@ void showryanpage(Context & context) {
context.ax = context.pop();
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openob(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kOpenedob);
context.ah = context.data.byte(kOpenedtype);
context.di = 5674;
@@ -6761,10 +6959,11 @@ void openob(Context & context) {
context._add(context.ax, (80));
context.bx = 2588;
context.cs.word(context.bx) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void obicons(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kCommand);
getanyad(context);
context._cmp(context.al, 255);
@@ -6782,20 +6981,22 @@ cantopenit:
context.al = 1;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void examicon(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kIcons2);
context.di = 254;
context.bx = 5;
context.al = 3;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void obpicture(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kCommand);
context.ah = context.data.byte(kObjecttype);
context._cmp(context.ah, 1);
@@ -6811,9 +7012,9 @@ void obpicture(Context & context) {
context._inc(context.al);
context.ah = 128;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
setframe:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
exframe:
context.ds = context.data.word(kExtras);
context.di = 160;
@@ -6824,10 +7025,11 @@ exframe:
context._inc(context.al);
context.ah = 128;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void describeob(Context & context) {
+ uint stack_depth = context.stack.size();
getobtextstart(context);
context.di = 33;
context.bx = 92;
@@ -6845,10 +7047,11 @@ void describeob(Context & context) {
obsthatdothings(context);
context.bx = context.pop();
additionaltext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void additionaltext(Context & context) {
+ uint stack_depth = context.stack.size();
context._add(context.bx, 10);
context.push(context.bx);
context.al = context.data.byte(kCommand);
@@ -6868,7 +7071,7 @@ void additionaltext(Context & context) {
compare(context);
if (context.flags.z()) goto fullcup;
context.bx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
emptycup:
context.al = 40;
findpuztext(context);
@@ -6877,7 +7080,7 @@ emptycup:
context.dl = 241;
context.ah = 0;
printdirect(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
fullcup:
context.al = 39;
findpuztext(context);
@@ -6886,10 +7089,11 @@ fullcup:
context.dl = 241;
context.ah = 0;
printdirect(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void obsthatdothings(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kCommand);
context.ah = context.data.byte(kObjecttype);
context.cl = 'M';
@@ -6906,12 +7110,13 @@ void obsthatdothings(Context & context) {
setlocation(context);
lookatcard(context);
seencard:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notlouiscard:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getobtextstart(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kFreedesc);
context.si = (0);
context.cx = (0+(82*2));
@@ -6947,14 +7152,15 @@ tryagain:
context._cmp(context.al, ':');
if (context.flags.z()) goto findsometext;
cantmakeoneup:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
findsometext:
searchforsame(context);
goto tryagain;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void searchforsame(Context & context) {
+ uint stack_depth = context.stack.size();
context.si = context.cx;
searchagain:
context._inc(context.si);
@@ -6968,7 +7174,7 @@ search:
if (context.flags.c()) goto search;
context.si = context.bx;
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotstartletter:
context.push(context.bx);
context.push(context.si);
@@ -6989,10 +7195,11 @@ keepchecking:
foundmatch:
context.si = context.pop();
context.bx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findnextcolon(Context & context) {
+ uint stack_depth = context.stack.size();
isntcolon:
context.al = context.es.byte(context.si);
context._inc(context.si);
@@ -7001,17 +7208,18 @@ isntcolon:
context._cmp(context.al, ':');
if (!context.flags.z()) goto isntcolon;
endofcolon:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void inventory(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kMandead), 1);
if (context.flags.z()) goto iswatchinv;
context._cmp(context.data.word(kWatchingtime), 0);
if (context.flags.z()) goto notwatchinv;
iswatchinv:
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwatchinv:
context._cmp(context.data.byte(kCommandtype), 239);
if (context.flags.z()) goto alreadyopinv;
@@ -7025,7 +7233,7 @@ alreadyopinv:
context._and(context.ax, 1);
if (!context.flags.z()) goto doopeninv;
cantopinv:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doopeninv:
context.data.word(kTimecount) = 0;
context.data.byte(kPointermode) = 0;
@@ -7102,19 +7310,20 @@ iswatching:
makemainscreen(context);
context.data.byte(kInvopen) = 0;
context.data.byte(kOpenedob) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
justgetback:
context.data.byte(kInvopen) = 0;
context.data.byte(kOpenedob) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
examlist:
invlist1:
openchangesize:
withlist1:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setpickup(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kObjecttype), 1);
if (context.flags.z()) goto cantpick;
context._cmp(context.data.byte(kObjecttype), 3);
@@ -7125,7 +7334,7 @@ void setpickup(Context & context) {
if (!context.flags.z()) goto canpick;
cantpick:
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canpick:
context._cmp(context.data.byte(kCommandtype), 209);
if (context.flags.z()) goto alreadysp;
@@ -7141,7 +7350,7 @@ alreadysp:
context._cmp(context.ax, context.data.word(kOldbutton));
if (!context.flags.z()) goto dosetpick;
nosetpick:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dosetpick:
createpanel(context);
showpanel(context);
@@ -7163,17 +7372,18 @@ dosetpick:
context.es.byte(context.bx+3) = 255;
openinv(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
pickupexob:
context.al = context.data.byte(kCommand);
context.data.byte(kItemframe) = context.al;
context.data.byte(kOpenedob) = 255;
openinv(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void examinventory(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 249);
if (context.flags.z()) goto alreadyexinv;
context.data.byte(kCommandtype) = 249;
@@ -7183,7 +7393,7 @@ alreadyexinv:
context.ax = context.data.word(kMousebutton);
context._and(context.ax, 1);
if (!context.flags.z()) goto doexinv;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doexinv:
createpanel(context);
showpanel(context);
@@ -7194,31 +7404,34 @@ doexinv:
context.data.byte(kInvopen) = 2;
openinv(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void reexfrominv(Context & context) {
+ uint stack_depth = context.stack.size();
findinvpos(context);
context.ax = context.es.word(context.bx);
context.data.byte(kCommandtype) = context.ah;
context.data.byte(kCommand) = context.al;
context.data.byte(kExamagain) = 1;
context.data.byte(kPointermode) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void reexfromopen(Context & context) {
- return;
+ uint stack_depth = context.stack.size();
+ {assert(stack_depth == context.stack.size()); return; }
findopenpos(context);
context.ax = context.es.word(context.bx);
context.data.byte(kCommandtype) = context.ah;
context.data.byte(kCommand) = context.al;
context.data.byte(kExamagain) = 1;
context.data.byte(kPointermode) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void swapwithinv(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kItemframe);
context.ah = context.data.byte(kObjecttype);
context._cmp(context.ax, context.data.word(kOldsubject));
@@ -7238,7 +7451,7 @@ alreadyswap1:
context._and(context.ax, 1);
if (!context.flags.z()) goto doswap1;
cantswap1:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doswap1:
context.ah = context.data.byte(kObjecttype);
context.al = context.data.byte(kItemframe);
@@ -7272,10 +7485,11 @@ doswap1:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void swapwithopen(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kItemframe);
context.ah = context.data.byte(kObjecttype);
context._cmp(context.ax, context.data.word(kOldsubject));
@@ -7295,13 +7509,13 @@ alreadyswap2:
context._and(context.ax, 1);
if (!context.flags.z()) goto doswap2;
cantswap2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doswap2:
geteitherad(context);
isitworn(context);
if (!context.flags.z()) goto notwornswap;
wornerror(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwornswap:
delpointer(context);
context.al = context.data.byte(kItemframe);
@@ -7311,12 +7525,12 @@ notwornswap:
context._cmp(context.al, context.data.byte(kOpenedtype));
if (!context.flags.z()) goto isntsame2;
errormessage1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isntsame2:
checkobjectsize(context);
context._cmp(context.al, 0);
if (context.flags.z()) goto sizeok2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
sizeok2:
context.ah = context.data.byte(kObjecttype);
context.al = context.data.byte(kItemframe);
@@ -7366,21 +7580,22 @@ actuallyswap:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void intoinv(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kPickup), 0);
if (!context.flags.z()) goto notout;
outofinv(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notout:
findinvpos(context);
context.ax = context.es.word(context.bx);
context._cmp(context.al, 255);
if (context.flags.z()) goto canplace1;
swapwithinv(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canplace1:
context.al = context.data.byte(kItemframe);
context.ah = context.data.byte(kObjecttype);
@@ -7401,7 +7616,7 @@ alreadyplce:
context._and(context.ax, 1);
if (!context.flags.z()) goto doplace;
notletgo2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doplace:
delpointer(context);
context.al = context.data.byte(kItemframe);
@@ -7417,10 +7632,11 @@ doplace:
outofinv(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void deletetaken(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kFreedat);
context.ah = context.data.byte(kReallocation);
context.ds = context.data.word(kExtras);
@@ -7440,22 +7656,23 @@ takenloop:
notinhere:
context._add(context.si, 16);
if (--context.cx) goto takenloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void outofinv(Context & context) {
+ uint stack_depth = context.stack.size();
findinvpos(context);
context.ax = context.es.word(context.bx);
context._cmp(context.al, 255);
if (!context.flags.z()) goto canpick2;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canpick2:
context.bx = context.data.word(kMousebutton);
context._cmp(context.bx, 2);
if (!context.flags.z()) goto canpick2a;
reexfrominv(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canpick2a:
context._cmp(context.ax, context.data.word(kOldsubject));
if (!context.flags.z()) goto difsub3;
@@ -7474,7 +7691,7 @@ alreadygrab:
context._and(context.ax, 1);
if (!context.flags.z()) goto dograb;
notletgo:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dograb:
delpointer(context);
context.data.byte(kPickup) = 1;
@@ -7491,41 +7708,45 @@ dograb:
intoinv(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getfreead(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.cl = 4;
context._shl(context.ax, context.cl);
context.bx = context.ax;
context.es = context.data.word(kFreedat);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getexad(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.bx = 16;
context._mul(context.bx);
context.bx = context.ax;
context.es = context.data.word(kExtras);
context._add(context.bx, (0+2080+30000));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void geteitherad(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kObjecttype), 4);
if (context.flags.z()) goto isinexlist;
context.al = context.data.byte(kItemframe);
getfreead(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isinexlist:
context.al = context.data.byte(kItemframe);
getexad(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getanyad(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kObjecttype), 4);
if (context.flags.z()) goto isex;
context._cmp(context.data.byte(kObjecttype), 2);
@@ -7533,35 +7754,37 @@ void getanyad(Context & context) {
context.al = context.data.byte(kCommand);
getsetad(context);
context.ax = context.es.word(context.bx+4);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isfree:
context.al = context.data.byte(kCommand);
getfreead(context);
context.ax = context.es.word(context.bx+7);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isex:
context.al = context.data.byte(kCommand);
getexad(context);
context.ax = context.es.word(context.bx+7);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getanyaddir(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.ah, 4);
if (context.flags.z()) goto isex3;
context._cmp(context.ah, 2);
if (context.flags.z()) goto isfree3;
getsetad(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isfree3:
getfreead(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isex3:
getexad(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getopenedsize(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kOpenedtype), 4);
if (context.flags.z()) goto isex2;
context._cmp(context.data.byte(kOpenedtype), 2);
@@ -7569,29 +7792,31 @@ void getopenedsize(Context & context) {
context.al = context.data.byte(kOpenedob);
getsetad(context);
context.ax = context.es.word(context.bx+3);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isfree2:
context.al = context.data.byte(kOpenedob);
getfreead(context);
context.ax = context.es.word(context.bx+7);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isex2:
context.al = context.data.byte(kOpenedob);
getexad(context);
context.ax = context.es.word(context.bx+7);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getsetad(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.bx = 64;
context._mul(context.bx);
context.bx = context.ax;
context.es = context.data.word(kSetdat);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findinvpos(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = context.data.word(kMousex);
context._sub(context.cx, (80));
context.bx = -1;
@@ -7616,10 +7841,11 @@ findinv2:
context._add(context.bx, context.bx);
context.es = context.data.word(kBuffers);
context._add(context.bx, (0+(180*10)+32));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findopenpos(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = context.data.word(kMousex);
context._sub(context.cx, (80));
context.bx = -1;
@@ -7632,10 +7858,11 @@ findopenp1:
context._add(context.bx, context.bx);
context.es = context.data.word(kBuffers);
context._add(context.bx, (0+(180*10)));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dropobject(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 223);
if (context.flags.z()) goto alreadydrop;
context.data.byte(kCommandtype) = 223;
@@ -7652,13 +7879,13 @@ alreadydrop:
context._and(context.ax, 1);
if (!context.flags.z()) goto dodrop;
nodrop:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dodrop:
geteitherad(context);
isitworn(context);
if (!context.flags.z()) goto nowornerror;
wornerror(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nowornerror:
context._cmp(context.data.byte(kReallocation), 47);
if (context.flags.z()) goto nodrop2;
@@ -7671,14 +7898,14 @@ nowornerror:
if (context.flags.c()) goto nodroperror;
nodrop2:
droperror(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nodroperror:
context._cmp(context.data.byte(kMapxsize), 64);
if (!context.flags.z()) goto notinlift;
context._cmp(context.data.byte(kMapysize), 64);
if (!context.flags.z()) goto notinlift;
droperror(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinlift:
context.al = context.data.byte(kItemframe);
context.ah = 4;
@@ -7723,10 +7950,11 @@ notinlift:
context.data.byte(kPickup) = 0;
context.al = context.data.byte(kReallocation);
context.es.byte(context.bx) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void droperror(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCommandtype) = 255;
delpointer(context);
context.di = 76;
@@ -7742,10 +7970,11 @@ void droperror(Context & context) {
examicon(context);
context.data.byte(kCommandtype) = 255;
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void cantdrop(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCommandtype) = 255;
delpointer(context);
context.di = 76;
@@ -7761,10 +7990,11 @@ void cantdrop(Context & context) {
examicon(context);
context.data.byte(kCommandtype) = 255;
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void wornerror(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCommandtype) = 255;
delpointer(context);
context.di = 76;
@@ -7780,10 +8010,11 @@ void wornerror(Context & context) {
examicon(context);
context.data.byte(kCommandtype) = 255;
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void removeobfrominv(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommand), 100);
if (context.flags.z()) goto obnotexist;
getanyad(context);
@@ -7792,16 +8023,17 @@ void removeobfrominv(Context & context) {
context.ch = 0;
deleteexobject(context);
obnotexist:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void selectopenob(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kCommand);
getanyad(context);
context._cmp(context.al, 255);
if (!context.flags.z()) goto canopenit1;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canopenit1:
context._cmp(context.data.byte(kCommandtype), 224);
if (context.flags.z()) goto alreadyopob;
@@ -7817,7 +8049,7 @@ alreadyopob:
context._and(context.ax, 1);
if (!context.flags.z()) goto doopenob;
noopenob:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doopenob:
context.al = context.data.byte(kCommand);
context.data.byte(kOpenedob) = context.al;
@@ -7835,16 +8067,17 @@ doopenob:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useopened(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kOpenedob), 255);
if (context.flags.z()) goto cannotuseopen;
context._cmp(context.data.byte(kPickup), 0);
if (!context.flags.z()) goto notout2;
outofopen(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notout2:
findopenpos(context);
context.ax = context.es.word(context.bx);
@@ -7852,12 +8085,12 @@ notout2:
if (context.flags.z()) goto canplace3;
swapwithopen(context);
cannotuseopen:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canplace3:
context._cmp(context.data.byte(kPickup), 1);
if (context.flags.z()) goto intoopen;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
intoopen:
context.al = context.data.byte(kItemframe);
context.ah = context.data.byte(kObjecttype);
@@ -7878,13 +8111,13 @@ alreadyplc2:
context._cmp(context.ax, 1);
if (context.flags.z()) goto doplace2;
notletgo3:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doplace2:
geteitherad(context);
isitworn(context);
if (!context.flags.z()) goto notworntoopen;
wornerror(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notworntoopen:
delpointer(context);
context.al = context.data.byte(kItemframe);
@@ -7894,12 +8127,12 @@ notworntoopen:
context._cmp(context.al, context.data.byte(kOpenedtype));
if (!context.flags.z()) goto isntsame;
errormessage1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isntsame:
checkobjectsize(context);
context._cmp(context.al, 0);
if (context.flags.z()) goto sizeok1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
sizeok1:
context.data.byte(kPickup) = 0;
context.al = context.data.byte(kItemframe);
@@ -7919,10 +8152,11 @@ sizeok1:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void errormessage1(Context & context) {
+ uint stack_depth = context.stack.size();
delpointer(context);
context.di = 76;
context.bx = 21;
@@ -7943,10 +8177,11 @@ void errormessage1(Context & context) {
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void errormessage2(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCommandtype) = 255;
delpointer(context);
context.di = 76;
@@ -7968,10 +8203,11 @@ void errormessage2(Context & context) {
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void errormessage3(Context & context) {
+ uint stack_depth = context.stack.size();
delpointer(context);
context.di = 76;
context.bx = 21;
@@ -7989,10 +8225,11 @@ void errormessage3(Context & context) {
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkobjectsize(Context & context) {
+ uint stack_depth = context.stack.size();
getopenedsize(context);
context.push(context.ax);
context.al = context.data.byte(kItemframe);
@@ -8027,13 +8264,14 @@ bothspecial:
errormessage3(context);
sizewrong:
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
sizeok:
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void outofopen(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kOpenedob), 255);
if (context.flags.z()) goto cantuseopen;
findopenpos(context);
@@ -8042,7 +8280,7 @@ void outofopen(Context & context) {
if (!context.flags.z()) goto canpick4;
cantuseopen:
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canpick4:
context._cmp(context.ax, context.data.word(kOldsubject));
if (!context.flags.z()) goto difsub4;
@@ -8064,7 +8302,7 @@ alreadygrb:
if (!context.flags.z()) goto notletgo4;
reexfromopen(context);
notletgo4:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dogrb:
delpointer(context);
context.data.byte(kPickup) = 1;
@@ -8093,10 +8331,11 @@ actuallyout:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void transfertoex(Context & context) {
+ uint stack_depth = context.stack.size();
emergencypurge(context);
getexpos(context);
context.al = context.data.byte(kExpos);
@@ -8134,10 +8373,11 @@ void transfertoex(Context & context) {
context.ds.byte(context.si+2) = 254;
pickupconts(context);
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void pickupconts(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.ds.byte(context.si+7);
context._cmp(context.al, 255);
if (context.flags.z()) goto notopenable;
@@ -8170,10 +8410,11 @@ notinsidethis:
context._cmp(context.cx, 80);
if (!context.flags.z()) goto pickupcontloop;
notopenable:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void transfercontoex(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.push(context.dx);
@@ -8200,10 +8441,11 @@ void transfercontoex(Context & context) {
context.si = context.pop();
context.ds = context.pop();
context.ds.byte(context.si+2) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void transfertext(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kExtras);
context.al = context.data.byte(kExpos);
context.ah = 0;
@@ -8228,10 +8470,11 @@ moretext:
context._inc(context.data.word(kExtextpos));
context._cmp(context.al, 0);
if (!context.flags.z()) goto moretext;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getexpos(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kExtras);
context.al = 0;
context.di = (0+2080+30000);
@@ -8244,10 +8487,11 @@ tryanotherex:
if (!context.flags.z()) goto tryanotherex;
foundnewex:
context.data.byte(kExpos) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void purgealocation(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.es = context.data.word(kExtras);
context.di = (0+2080+30000);
@@ -8272,10 +8516,11 @@ dontpurge:
context._inc(context.cx);
context._cmp(context.cx, (114));
if (!context.flags.z()) goto purgeloc;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void emergencypurge(Context & context) {
+ uint stack_depth = context.stack.size();
checkpurgeagain:
context.ax = context.data.word(kExframepos);
context._add(context.ax, 4000);
@@ -8291,10 +8536,11 @@ notnearframeend:
purgeanitem(context);
goto checkpurgeagain;
notneartextend:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void purgeanitem(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kExtras);
context.di = (0+2080+30000);
context.bl = context.data.byte(kReallocation);
@@ -8311,7 +8557,7 @@ iscup:
context._cmp(context.es.byte(context.di+11), context.bl);
if (context.flags.z()) goto cantpurge;
deleteexobject(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cantpurge:
context._add(context.di, 16);
context._inc(context.cx);
@@ -8327,16 +8573,17 @@ lookforpurge2:
context._cmp(context.es.byte(context.di+12), 255);
if (!context.flags.z()) goto cantpurge2;
deleteexobject(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cantpurge2:
context._add(context.di, 16);
context._inc(context.cx);
context._cmp(context.cx, (114));
if (!context.flags.z()) goto lookforpurge2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void deleteexobject(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.cx);
context.push(context.cx);
context.push(context.cx);
@@ -8377,10 +8624,11 @@ notinsideex:
context._inc(context.cx);
context._cmp(context.cx, (114));
if (!context.flags.z()) goto deleteconts;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void deleteexframe(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (0);
context.ah = 0;
context._add(context.ax, context.ax);
@@ -8416,10 +8664,11 @@ beforethisone:
context.es.word(context.di+2) = context.ax;
context._add(context.di, 6);
if (--context.cx) goto shuffleadsdown;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void deleteextext(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (0+2080+30000+(16*114));
context.ah = 0;
context._add(context.ax, context.ax);
@@ -8457,19 +8706,21 @@ beforethistext:
context.es.word(context.di) = context.ax;
context._add(context.di, 2);
if (--context.cx) goto shuffletextads;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void blockget(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = context.al;
context.al = 0;
context.ds = context.data.word(kBackdrop);
context.si = (0+192);
context._add(context.si, context.ax);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void drawfloor(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
eraseoldobs(context);
@@ -8484,10 +8735,11 @@ void drawfloor(Context & context) {
context.data.byte(kNewobs) = 0;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void calcmapad(Context & context) {
+ uint stack_depth = context.stack.size();
getdimension(context);
context.push(context.cx);
context.push(context.dx);
@@ -8511,10 +8763,11 @@ void calcmapad(Context & context) {
context._mul(context.bx);
context._add(context.ax, context.data.word(kMapoffsety));
context.data.word(kMapady) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getdimension(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32));
context.ch = 0;
@@ -8591,10 +8844,11 @@ finishdim4:
context._shl(context.ax, 1);
context._shl(context.ax, 1);
context.data.byte(kMapysize) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void addalong(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 11;
addloop:
context._cmp(context.es.byte(context.bx), 0);
@@ -8603,13 +8857,14 @@ addloop:
context._dec(context.ah);
if (!context.flags.z()) goto addloop;
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotalong:
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void addlength(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 10;
addloop2:
context._cmp(context.es.byte(context.bx), 0);
@@ -8618,13 +8873,14 @@ addloop2:
context._dec(context.ah);
if (!context.flags.z()) goto addloop2;
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotlength:
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void drawflags(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.di = (0+(180*10)+32+60+(32*32));
context.al = context.data.byte(kMapy);
@@ -8658,10 +8914,11 @@ _tmp28a:
context._add(context.si, (66)-11);
context.cx = context.pop();
if (--context.cx) goto _tmp28;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void eraseoldobs(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNewobs), 0);
if (context.flags.z()) goto donterase;
context.es = context.data.word(kBuffers);
@@ -8683,10 +8940,11 @@ notthisob:
context._add(context.bx, (32));
if (--context.cx) goto oberase;
donterase:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showallobs(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32));
context.data.word(kListpos) = context.bx;
@@ -8765,10 +9023,11 @@ blankframe:
if (context.flags.z()) goto finishedsetobs;
goto showobsloop;
finishedsetobs:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void makebackob(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNewobs), 0);
if (context.flags.z()) goto nomake;
context.al = context.es.byte(context.si+5);
@@ -8798,10 +9057,11 @@ usedpriority:
context.es.byte(context.bx+19) = 0;
context.si = context.pop();
nomake:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showallfree(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
context.data.word(kListpos) = context.bx;
@@ -8877,10 +9137,11 @@ over138:
if (context.flags.z()) goto finfree;
goto loop127;
finfree:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showallex(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
context.data.word(kListpos) = context.bx;
@@ -8961,10 +9222,11 @@ blankex:
if (context.flags.z()) goto finex;
goto exloop;
finex:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void calcfrframe(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = context.data.word(kFrsegment);
context.ax = context.data.word(kFramesad);
context.push(context.ax);
@@ -8991,15 +9253,16 @@ void calcfrframe(Context & context) {
context.al = context.ah;
context.ah = 0;
context.data.word(kOffsety) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nullframe:
context.ax = context.pop();
context.cx = 0;
context.data.word(kSavesize) = context.cx;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void finalframe(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kObjecty);
context._add(context.ax, context.data.word(kOffsety));
context.bx = context.data.word(kObjectx);
@@ -9008,10 +9271,11 @@ void finalframe(Context & context) {
context.data.byte(kSavey) = context.al;
context.di = context.data.word(kObjectx);
context.bx = context.data.word(kObjecty);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void adjustlen(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = context.al;
context._add(context.al, context.ch);
context._cmp(context.al, 100);
@@ -9020,10 +9284,11 @@ void adjustlen(Context & context) {
context._sub(context.al, context.ch);
context.ch = context.al;
over242:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getmapad(Context & context) {
+ uint stack_depth = context.stack.size();
getxad(context);
context._cmp(context.ch, 0);
if (context.flags.z()) goto over146;
@@ -9034,10 +9299,11 @@ void getmapad(Context & context) {
context.data.word(kObjecty) = context.ax;
context.ch = 1;
over146:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getxad(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = context.es.byte(context.si);
context._inc(context.si);
context.al = context.es.byte(context.si);
@@ -9055,13 +9321,14 @@ void getxad(Context & context) {
context._or(context.al, context.ah);
context.ah = 0;
context.ch = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
over148:
context.ch = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getyad(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.es.byte(context.si);
context._inc(context.si);
context.ah = context.es.byte(context.si);
@@ -9075,13 +9342,14 @@ void getyad(Context & context) {
context._or(context.al, context.ah);
context.ah = 0;
context.ch = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
over147:
context.ch = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void autolook(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kMousex);
context._cmp(context.ax, context.data.word(kOldx));
if (!context.flags.z()) goto diffmouse;
@@ -9095,13 +9363,14 @@ void autolook(Context & context) {
if (!context.flags.z()) goto noautolook;
dolook(context);
noautolook:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
diffmouse:
context.data.word(kLookcounter) = 1000;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void look(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kWatchingtime), 0);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kPointermode), 2);
@@ -9119,10 +9388,11 @@ alreadylook:
if (context.flags.z()) goto nolook;
dolook(context);
nolook:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dolook(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel(context);
showicon(context);
undertextline(context);
@@ -9155,10 +9425,11 @@ afterlook:
context.data.byte(kCommandtype) = 0;
redrawmainscrn(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void redrawmainscrn(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kTimecount) = 0;
createpanel(context);
context.data.byte(kNewobs) = 0;
@@ -9170,14 +9441,15 @@ void redrawmainscrn(Context & context) {
undertextline(context);
readmouse(context);
context.data.byte(kCommandtype) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getback1(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kPickup), 0);
if (context.flags.z()) goto notgotobject;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notgotobject:
context._cmp(context.data.byte(kCommandtype), 202);
if (context.flags.z()) goto alreadyget;
@@ -9191,14 +9463,15 @@ alreadyget:
context._and(context.ax, 1);
if (!context.flags.z()) goto dogetback;
nogetback:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dogetback:
context.data.byte(kGetback) = 1;
context.data.byte(kPickup) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void talk(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kTalkpos) = 0;
context.data.byte(kInmaparea) = 0;
context.al = context.data.byte(kCommand);
@@ -9244,10 +9517,11 @@ notnexttalk:
context.data.byte(kVolumedirection) = -1;
context.data.byte(kVolumeto) = 0;
nospeech:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void convicons(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kCharacter);
context._and(context.al, 127);
getpersframe(context);
@@ -9259,20 +9533,22 @@ void convicons(Context & context) {
context._sub(context.ax, context.data.word(kTakeoff));
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getpersframe(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context._add(context.ax, context.ax);
context.bx = context.ax;
context.es = context.data.word(kPeople);
context._add(context.bx, (0));
context.ax = context.es.word(context.bx);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void starttalk(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kTalkmode) = 0;
context.al = context.data.byte(kCharacter);
context._and(context.al, 127);
@@ -9292,10 +9568,11 @@ void starttalk(Context & context) {
context.ah = 0;
printdirect(context);
nospeech1:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getpersontext(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.cx = 64*2;
context._mul(context.cx);
@@ -9306,14 +9583,15 @@ void getpersontext(Context & context) {
context.ax = context.es.word(context.si);
context._add(context.ax, context.cx);
context.si = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void moretalk(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kTalkmode), 0);
if (context.flags.z()) goto canmore;
redes(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canmore:
context._cmp(context.data.byte(kCommandtype), 215);
if (context.flags.z()) goto alreadymore;
@@ -9327,7 +9605,7 @@ alreadymore:
context._and(context.ax, 1);
if (!context.flags.z()) goto domoretalk;
nomore:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
domoretalk:
context.data.byte(kTalkmode) = 2;
context.data.byte(kTalkpos) = 4;
@@ -9336,10 +9614,11 @@ domoretalk:
context.data.byte(kTalkpos) = 48;
notsecondpart:
dosometalk(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dosometalk(Context & context) {
+ uint stack_depth = context.stack.size();
watchtalk:
context.al = context.data.byte(kTalkpos);
context.al = context.data.byte(kCharacter);
@@ -9429,10 +9708,11 @@ skiptalk:
goto watchtalk;
endwatchtalk:
context.data.byte(kPointermode) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hangonpq(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kGetback) = 0;
context.bx = 0;
hangloopq:
@@ -9466,23 +9746,24 @@ notspeaking:
finishconv:
delpointer(context);
context.data.byte(kPointermode) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
quitconv:
delpointer(context);
context.data.byte(kPointermode) = 0;
context.ax = context.pop();
cancelch1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void redes(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCh1playing), 255);
if (!context.flags.z()) goto cantredes;
context._cmp(context.data.byte(kTalkmode), 2);
if (context.flags.z()) goto canredes;
cantredes:
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canredes:
context._cmp(context.data.byte(kCommandtype), 217);
if (context.flags.z()) goto alreadyreds;
@@ -9493,7 +9774,7 @@ alreadyreds:
context.ax = context.data.word(kMousebutton);
context._and(context.ax, 1);
if (!context.flags.z()) goto doredes;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doredes:
delpointer(context);
createpanel(context);
@@ -9506,27 +9787,29 @@ doredes:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void newplace(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNeedtotravel), 1);
if (context.flags.z()) goto istravel;
context._cmp(context.data.byte(kAutolocation), -1);
if (!context.flags.z()) goto isautoloc;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isautoloc:
context.al = context.data.byte(kAutolocation);
context.data.byte(kNewlocation) = context.al;
context.data.byte(kAutolocation) = -1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
istravel:
context.data.byte(kNeedtotravel) = 0;
selectlocation(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void selectlocation(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kInmaparea) = 0;
clearbeforeload(context);
context.data.byte(kGetback) = 0;
@@ -9572,7 +9855,7 @@ select:
getridoftemp3(context);
context.es = context.data.word(kTraveltext);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
quittravel:
context.al = context.data.byte(kReallocation);
context.data.byte(kNewlocation) = context.al;
@@ -9582,10 +9865,11 @@ quittravel:
getridoftemp3(context);
context.es = context.data.word(kTraveltext);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showcity(Context & context) {
+ uint stack_depth = context.stack.size();
clearwork(context);
context.ds = context.data.word(kTempgraphics);
context.di = 57;
@@ -9599,10 +9883,11 @@ void showcity(Context & context) {
context.al = 1;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void lookatplace(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 224);
if (context.flags.z()) goto alreadyinfo;
context.data.byte(kCommandtype) = 224;
@@ -9654,10 +9939,11 @@ afterinfo:
putundercentre(context);
worktoscreenm(context);
noinfo:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getundercentre(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 58;
context.bx = 72;
context.ds = context.data.word(kMapstore);
@@ -9665,10 +9951,11 @@ void getundercentre(Context & context) {
context.cl = 254;
context.ch = 110;
multiget(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void putundercentre(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 58;
context.bx = 72;
context.ds = context.data.word(kMapstore);
@@ -9676,10 +9963,11 @@ void putundercentre(Context & context) {
context.cl = 254;
context.ch = 110;
multiput(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void locationpic(Context & context) {
+ uint stack_depth = context.stack.size();
getdestinfo(context);
context.al = context.es.byte(context.si);
context.push(context.es);
@@ -9722,10 +10010,11 @@ notinthisone:
context.al = 0;
context.ah = 0;
printdirect(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getdestinfo(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kDestpos);
context.ah = 0;
context.push(context.ax);
@@ -9741,10 +10030,11 @@ void getdestinfo(Context & context) {
context.si = 7798;
context._add(context.si, context.ax);
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showarrows(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 116-12;
context.bx = 16;
context.ds = context.data.word(kTempgraphics);
@@ -9763,10 +10053,11 @@ void showarrows(Context & context) {
context.al = 2;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void nextdest(Context & context) {
+ uint stack_depth = context.stack.size();
duok:
context._cmp(context.data.byte(kCommandtype), 218);
if (context.flags.z()) goto alreadydu;
@@ -9801,10 +10092,11 @@ notlastdest:
worktoscreen(context);
delpointer(context);
nodu:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void lastdest(Context & context) {
+ uint stack_depth = context.stack.size();
ddok:
context._cmp(context.data.byte(kCommandtype), 219);
if (context.flags.z()) goto alreadydd;
@@ -9839,10 +10131,11 @@ notfirstdest:
worktoscreen(context);
delpointer(context);
nodd:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void destselect(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 222);
if (context.flags.z()) goto alreadytrav;
context.data.byte(kCommandtype) = 222;
@@ -9858,30 +10151,33 @@ alreadytrav:
context.al = context.data.byte(kDestpos);
context.data.byte(kNewlocation) = context.al;
notrav:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getlocation(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.bx = context.ax;
context.dx = context.data;
context.es = context.dx;
context._add(context.bx, 7782);
context.al = context.es.byte(context.bx);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setlocation(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.bx = context.ax;
context.dx = context.data;
context.es = context.dx;
context._add(context.bx, 7782);
context.es.byte(context.bx) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void resetlocation(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context._cmp(context.al, 5);
if (!context.flags.z()) goto notdelhotel;
@@ -9925,26 +10221,29 @@ clearedlocations:
context.es = context.dx;
context._add(context.bx, 7782);
context.es.byte(context.bx) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readdesticon(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 2013;
loadintotemp(context);
context.dx = 2026;
loadintotemp2(context);
context.dx = 1961;
loadintotemp3(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readcitypic(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 2000;
loadintotemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usemon(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kLasttrigger) = 0;
context.es = context.cs;
context.di = 2892+1;
@@ -10031,10 +10330,11 @@ endmon:
restoreall(context);
redrawmainscrn(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printoutermon(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 40;
context.bx = 32;
context.ds = context.data.word(kTempgraphics);
@@ -10059,10 +10359,11 @@ void printoutermon(Context & context) {
context.al = 4;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadpersonal(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kLocation);
context.dx = 2052;
context._cmp(context.al, 0);
@@ -10086,10 +10387,11 @@ foundpersonal:
context.dx = 0;
readfromfile(context);
closefile(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadnews(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kNewsitem);
context.dx = 2078;
context._cmp(context.al, 0);
@@ -10115,10 +10417,11 @@ foundnews:
context.dx = 0;
readfromfile(context);
closefile(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadcart(Context & context) {
+ uint stack_depth = context.stack.size();
lookininterface(context);
context.dx = 2130;
context._cmp(context.al, 0);
@@ -10147,10 +10450,11 @@ gotcart:
context.dx = 0;
readfromfile(context);
closefile(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void lookininterface(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 'I';
context.ah = 'N';
context.cl = 'T';
@@ -10162,13 +10466,14 @@ void lookininterface(Context & context) {
if (context.flags.z()) goto emptyinterface;
context.al = context.es.byte(context.bx+15);
context._inc(context.al);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
emptyinterface:
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void turnonpower(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = 3;
powerloop:
context.push(context.cx);
@@ -10181,10 +10486,11 @@ powerloop:
context.cx = context.pop();
if (--context.cx) goto powerloop;
powerlighton(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void randomaccess(Context & context) {
+ uint stack_depth = context.stack.size();
accessloop:
context.push(context.cx);
vsync(context);
@@ -10201,10 +10507,11 @@ chosenaccess:
context.cx = context.pop();
if (--context.cx) goto accessloop;
accesslightoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void powerlighton(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 257+4;
context.bx = 182;
context.ds = context.data.word(kTempgraphics);
@@ -10218,10 +10525,11 @@ void powerlighton(Context & context) {
context.cl = 12;
context.ch = 8;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void powerlightoff(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 257+4;
context.bx = 182;
context.ds = context.data.word(kTempgraphics);
@@ -10235,10 +10543,11 @@ void powerlightoff(Context & context) {
context.cl = 12;
context.ch = 8;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void accesslighton(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 74;
context.bx = 182;
context.ds = context.data.word(kTempgraphics);
@@ -10252,10 +10561,11 @@ void accesslighton(Context & context) {
context.cl = 12;
context.ch = 8;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void accesslightoff(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 74;
context.bx = 182;
context.ds = context.data.word(kTempgraphics);
@@ -10269,10 +10579,11 @@ void accesslightoff(Context & context) {
context.cl = 12;
context.ch = 8;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void locklighton(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 56;
context.bx = 182;
context.ds = context.data.word(kTempgraphics);
@@ -10286,10 +10597,11 @@ void locklighton(Context & context) {
context.cl = 12;
context.ch = 8;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void locklightoff(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 56;
context.bx = 182;
context.ds = context.data.word(kTempgraphics);
@@ -10303,10 +10615,11 @@ void locklightoff(Context & context) {
context.cl = 12;
context.ch = 8;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void input(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.cs;
context.di = 7816;
context.cx = 64;
@@ -10392,18 +10705,20 @@ notleadingspace:
context._add(context.data.word(kCurslocx), context.cx);
goto waitkey;
endofinput:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void makecaps(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.al, 'a');
if (context.flags.c()) goto notupperc;
context._sub(context.al, 32);
notupperc:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void delchar(Context & context) {
+ uint stack_depth = context.stack.size();
context._dec(context.data.word(kCurpos));
context.si = context.data.word(kCurpos);
context._add(context.si, context.si);
@@ -10428,10 +10743,11 @@ void delchar(Context & context) {
context.cl = context.al;
context.ch = 8;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void execcommand(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.cs;
context.bx = 2776;
context.ds = context.cs;
@@ -10440,7 +10756,7 @@ void execcommand(Context & context) {
context._cmp(context.al, 0);
if (!context.flags.z()) goto notblankinp;
scrollmonitor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notblankinp:
context.cl = 0;
comloop:
@@ -10463,7 +10779,7 @@ comloop2:
if (!context.flags.z()) goto comloop;
neterror(context);
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
foundcom:
context.si = context.pop();
context.bx = context.pop();
@@ -10481,44 +10797,46 @@ foundcom:
directory:
dircom(context);
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
signoncom:
signon(context);
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
accesscom:
read(context);
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
keyscom:
showkeys(context);
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
testcom:
context.al = 6;
monmessage(context);
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
quitcom:
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void neterror(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 5;
monmessage(context);
scrollmonitor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dircom(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = 30;
randomaccess(context);
parser(context);
context._cmp(context.es.byte(context.di+1), 0);
if (context.flags.z()) goto dirroot;
dirfile(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dirroot:
context.data.byte(kLogonum) = 0;
context.ds = context.cs;
@@ -10540,10 +10858,11 @@ dirroot:
context.es = context.data.word(kTextfile3);
searchforfiles(context);
scrollmonitor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void searchforfiles(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = (66*2);
directloop1:
context.al = context.es.byte(context.bx);
@@ -10555,10 +10874,11 @@ directloop1:
monprint(context);
goto directloop1;
endofdir:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void signon(Context & context) {
+ uint stack_depth = context.stack.size();
parser(context);
context._inc(context.di);
context.ds = context.cs;
@@ -10588,7 +10908,7 @@ nomatch:
if (--context.cx) goto signonloop;
context.al = 13;
monmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
foundsign:
context.di = context.pop();
context.si = context.pop();
@@ -10599,7 +10919,7 @@ foundsign:
if (context.flags.z()) goto notyetassigned;
context.al = 17;
monmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notyetassigned:
context.push(context.es);
context.push(context.bx);
@@ -10636,7 +10956,7 @@ passerror:
scrollmonitor(context);
context.al = 16;
monmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
passpassed:
context.al = 14;
monmessage(context);
@@ -10650,10 +10970,11 @@ passpassed:
context.bx = context.pop();
context.es = context.pop();
context.es.byte(context.bx) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showkeys(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = 10;
randomaccess(context);
scrollmonitor(context);
@@ -10675,17 +10996,18 @@ notheld:
context._add(context.bx, 26);
if (--context.cx) goto keysloop;
scrollmonitor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void read(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = 40;
randomaccess(context);
parser(context);
context._cmp(context.es.byte(context.di+1), 0);
if (!context.flags.z()) goto okcom;
neterror(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
okcom:
context.es = context.cs;
context.di = 2892;
@@ -10712,12 +11034,12 @@ okcom:
if (context.flags.z()) goto foundfile2;
context.al = 7;
monmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
foundfile2:
getkeyandlogo(context);
context._cmp(context.al, 0);
if (context.flags.z()) goto keyok1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
keyok1:
context.es = context.cs;
context.di = 2883;
@@ -10729,7 +11051,7 @@ keyok1:
context.data.byte(kLogonum) = context.al;
context.al = 11;
monmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
findtopictext:
context._inc(context.bx);
context.push(context.es);
@@ -10757,10 +11079,11 @@ moretopic:
goto moretopic;
endoftopic:
scrollmonitor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dirfile(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 34;
context.es.byte(context.di) = context.al;
context.push(context.es);
@@ -10792,14 +11115,14 @@ void dirfile(Context & context) {
context.es = context.pop();
context.al = 7;
monmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
foundfile:
context.ax = context.pop();
context.ax = context.pop();
getkeyandlogo(context);
context._cmp(context.al, 0);
if (context.flags.z()) goto keyok2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
keyok2:
context.push(context.es);
context.push(context.bx);
@@ -10828,10 +11151,11 @@ directloop2:
goto directloop2;
endofdir2:
scrollmonitor(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getkeyandlogo(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.bx);
context.al = context.es.byte(context.bx);
context._sub(context.al, 48);
@@ -10865,17 +11189,18 @@ void getkeyandlogo(Context & context) {
context.bx = context.pop();
context.es = context.pop();
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
keyok:
context.bx = context.pop();
context.es = context.pop();
context.al = context.data.byte(kNewlogonum);
context.data.byte(kLogonum) = context.al;
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void searchforstring(Context & context) {
+ uint stack_depth = context.stack.size();
context.dl = context.es.byte(context.di);
context.cx = context.di;
restartlook:
@@ -10907,13 +11232,14 @@ complete:
context.es = context.ds;
context.al = 0;
context.bx = context.si;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notfound:
context.al = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void parser(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.cs;
context.di = 2883;
context.cx = 13;
@@ -10944,10 +11270,11 @@ copyin1:
if (!context.flags.z()) goto copyin1;
finishpars:
context.di = 2883;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void scrollmonitor(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.bx);
context.push(context.cx);
@@ -10972,10 +11299,11 @@ void scrollmonitor(Context & context) {
context.cx = context.pop();
context.bx = context.pop();
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void lockmon(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLasthardkey), 57);
if (!context.flags.z()) goto notlock;
locklighton(context);
@@ -10984,10 +11312,11 @@ lockloop:
if (context.flags.z()) goto lockloop;
locklightoff(context);
notlock:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void monitorlogo(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kLogonum);
context._cmp(context.al, context.data.byte(kOldlogonum));
if (context.flags.z()) goto notnewlogo;
@@ -11001,13 +11330,14 @@ void monitorlogo(Context & context) {
playchannel1(context);
context.cx = 20;
randomaccess(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notnewlogo:
printlogo(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printlogo(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 56;
context.bx = 32;
context.ds = context.data.word(kTempgraphics);
@@ -11015,10 +11345,11 @@ void printlogo(Context & context) {
context.ah = 0;
showframe(context);
showcurrentfile(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showcurrentfile(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 178;
context.bx = 37;
context.si = 2892+1;
@@ -11034,10 +11365,11 @@ curfileloop:
context.si = context.pop();
goto curfileloop;
finishfile:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void monmessage(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kTextfile1);
context.bx = (66*2);
context.cl = context.al;
@@ -11049,17 +11381,18 @@ monmessageloop:
if (!context.flags.z()) goto monmessageloop;
if (--context.cx) goto monmessageloop;
monprint(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void processtrigger(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLasttrigger), '1');
if (!context.flags.z()) goto notfirsttrigger;
context.al = 8;
setlocation(context);
context.al = 45;
triggermessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notfirsttrigger:
context._cmp(context.data.byte(kLasttrigger), '2');
if (!context.flags.z()) goto notsecondtrigger;
@@ -11067,7 +11400,7 @@ notfirsttrigger:
setlocation(context);
context.al = 55;
triggermessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notsecondtrigger:
context._cmp(context.data.byte(kLasttrigger), '3');
if (!context.flags.z()) goto notthirdtrigger;
@@ -11076,10 +11409,11 @@ notsecondtrigger:
context.al = 59;
triggermessage(context);
notthirdtrigger:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void triggermessage(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.di = 174;
context.bx = 153;
@@ -11109,10 +11443,11 @@ void triggermessage(Context & context) {
multiput(context);
worktoscreen(context);
context.data.byte(kLasttrigger) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printcurs(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.si);
context.push(context.di);
context.push(context.ds);
@@ -11154,10 +11489,11 @@ flashcurs:
context.ds = context.pop();
context.di = context.pop();
context.si = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void delcurs(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.push(context.di);
@@ -11185,10 +11521,11 @@ finishcurdel:
context.di = context.pop();
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useobject(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kWithobject) = 255;
context._cmp(context.data.byte(kCommandtype), 229);
if (context.flags.z()) goto alreadyuse;
@@ -11204,18 +11541,19 @@ alreadyuse:
context._and(context.ax, 1);
if (!context.flags.z()) goto douse;
nouse:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
douse:
useroutine(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useroutine(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 50);
if (context.flags.c()) goto nodream7;
context._cmp(context.data.byte(kPointerpower), 0);
if (!context.flags.z()) goto powerok;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
powerok:
context.data.byte(kPointerpower) = 0;
nodream7:
@@ -11244,7 +11582,7 @@ checkuselist:
context._lodsw();
context.si = context.pop();
__dispatch_call(context, context.ax);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
failed:
context.si = context.pop();
context._add(context.si, 6);
@@ -11265,7 +11603,7 @@ failed:
context.cx = 400;
hangonp(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cantuse2:
createpanel(context);
showpanel(context);
@@ -11282,22 +11620,24 @@ cantuse2:
hangonp(context);
putbackobstuff(context);
context.data.byte(kCommandtype) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void wheelsound(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 17;
playchannel1(context);
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void runtap(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto tapwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
tapwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11319,7 +11659,7 @@ tapwith:
context.al = 56;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
fillcupfromtap:
context.al = context.data.byte(kWithobject);
getexad(context);
@@ -11330,46 +11670,50 @@ fillcupfromtap:
context.al = 57;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cupfromtapfull:
context.cx = 300;
context.al = 58;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void playguitar(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 14;
playchannel1(context);
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hotelcontrol(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 21);
if (!context.flags.z()) goto notrightcont;
context._cmp(context.data.byte(kMapx), 33);
if (!context.flags.z()) goto notrightcont;
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notrightcont:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hotelbell(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 12;
playchannel1(context);
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void opentomb(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.data.byte(kProgresspoints));
showfirstuse(context);
context.data.word(kWatchingtime) = 35*2;
@@ -11378,10 +11722,11 @@ void opentomb(Context & context) {
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usetrainer(Context & context) {
+ uint stack_depth = context.stack.size();
getanyad(context);
context._cmp(context.es.byte(context.bx+2), 4);
if (!context.flags.z()) goto notheldtrainer;
@@ -11389,13 +11734,14 @@ void usetrainer(Context & context) {
makeworn(context);
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notheldtrainer:
nothelderror(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void nothelderror(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel(context);
showpanel(context);
showman(context);
@@ -11411,14 +11757,15 @@ void nothelderror(Context & context) {
context.cx = 50;
hangonp(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usepipe(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto pipewith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
pipewith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11440,7 +11787,7 @@ pipewith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
fillcup:
context.cx = 300;
context.al = 36;
@@ -11449,16 +11796,17 @@ fillcup:
context.al = context.data.byte(kWithobject);
getexad(context);
context.es.byte(context.bx+15) = 'F'-'A';
- return;
+ {assert(stack_depth == context.stack.size()); return; }
alreadyfull:
context.cx = 300;
context.al = 35;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usefullcart(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.data.byte(kProgresspoints));
context.al = 2;
context.ah = context.data.byte(kRoomnum);
@@ -11477,14 +11825,15 @@ void usefullcart(Context & context) {
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useplinth(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto plinthwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
plinthwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11496,7 +11845,7 @@ plinthwith:
if (context.flags.z()) goto isrightkey;
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isrightkey:
context._inc(context.data.byte(kProgresspoints));
showseconduse(context);
@@ -11508,18 +11857,20 @@ isrightkey:
context.data.byte(kGetback) = 1;
context.al = context.data.byte(kRoomafterdream);
context.data.byte(kNewlocation) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void chewy(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
getanyad(context);
context.es.byte(context.bx+2) = 255;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useladder(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context._sub(context.data.byte(kMapx), 11);
findroominloc(context);
@@ -11531,10 +11882,11 @@ void useladder(Context & context) {
findxyfrompath(context);
context.data.byte(kResetmanxy) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useladderb(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context._add(context.data.byte(kMapx), 11);
findroominloc(context);
@@ -11546,10 +11898,11 @@ void useladderb(Context & context) {
findxyfrompath(context);
context.data.byte(kResetmanxy) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void slabdoora(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kGetback) = 1;
context.data.byte(kWatchspeed) = 1;
@@ -11561,16 +11914,17 @@ void slabdoora(Context & context) {
context.data.word(kWatchingtime) = 60;
context.data.word(kEndwatchreel) = 42;
context.data.byte(kNewlocation) = 47;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
slabawrong:
context.data.word(kWatchingtime) = 40;
context.data.word(kEndwatchreel) = 34;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void slabdoorb(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kDreamnumber), 1);
if (!context.flags.z()) goto slabbwrong;
context.al = 'S';
@@ -11583,7 +11937,7 @@ void slabdoorb(Context & context) {
context.cx = 200;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotcrystal:
showfirstuse(context);
context._inc(context.data.byte(kProgresspoints));
@@ -11594,7 +11948,7 @@ gotcrystal:
context.data.word(kWatchingtime) = 60;
context.data.word(kEndwatchreel) = 71;
context.data.byte(kNewlocation) = 47;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
slabbwrong:
showfirstuse(context);
context.data.byte(kGetback) = 1;
@@ -11605,10 +11959,11 @@ slabbwrong:
context.data.word(kEndwatchreel) = 63;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void slabdoord(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kGetback) = 1;
context.data.byte(kWatchspeed) = 1;
@@ -11620,16 +11975,17 @@ void slabdoord(Context & context) {
context.data.word(kWatchingtime) = 60;
context.data.word(kEndwatchreel) = 102;
context.data.byte(kNewlocation) = 47;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
slabcwrong:
context.data.word(kWatchingtime) = 40;
context.data.word(kEndwatchreel) = 94;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void slabdoorc(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kGetback) = 1;
context.data.byte(kWatchspeed) = 1;
@@ -11641,16 +11997,17 @@ void slabdoorc(Context & context) {
context.data.word(kWatchingtime) = 60;
context.data.word(kEndwatchreel) = 135;
context.data.byte(kNewlocation) = 47;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
slabdwrong:
context.data.word(kWatchingtime) = 40;
context.data.word(kEndwatchreel) = 127;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void slabdoore(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kGetback) = 1;
context.data.byte(kWatchspeed) = 1;
@@ -11662,16 +12019,17 @@ void slabdoore(Context & context) {
context.data.word(kWatchingtime) = 60;
context.data.word(kEndwatchreel) = 168;
context.data.byte(kNewlocation) = 47;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
slabewrong:
context.data.word(kWatchingtime) = 40;
context.data.word(kEndwatchreel) = 160;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void slabdoorf(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kGetback) = 1;
context.data.byte(kWatchspeed) = 1;
@@ -11683,20 +12041,21 @@ void slabdoorf(Context & context) {
context.data.word(kWatchingtime) = 60;
context.data.word(kEndwatchreel) = 197;
context.data.byte(kNewlocation) = 47;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
slabfwrong:
context.data.word(kWatchingtime) = 40;
context.data.word(kEndwatchreel) = 189;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useslab(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto slabwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
slabwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11710,7 +12069,7 @@ slabwith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nextslab:
context.al = context.data.byte(kWithobject);
getexad(context);
@@ -11736,14 +12095,15 @@ notlastslab:
context._inc(context.data.byte(kProgresspoints));
showfirstuse(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecart(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto cartwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cartwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11757,7 +12117,7 @@ cartwith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nextcart:
context.al = context.data.byte(kWithobject);
getexad(context);
@@ -11773,14 +12133,15 @@ nextcart:
playchannel1(context);
showfirstuse(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useclearbox(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto clearboxwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
clearboxwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11794,7 +12155,7 @@ clearboxwith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
openbox:
context._inc(context.data.byte(kProgresspoints));
showfirstuse(context);
@@ -11804,10 +12165,11 @@ openbox:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecoveredbox(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.data.byte(kProgresspoints));
showfirstuse(context);
context.data.word(kWatchingtime) = 50;
@@ -11816,10 +12178,11 @@ void usecoveredbox(Context & context) {
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void userailing(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.word(kWatchingtime) = 80;
context.data.word(kReeltowatch) = 0;
@@ -11828,14 +12191,15 @@ void userailing(Context & context) {
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
context.data.byte(kMandead) = 4;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useopenbox(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto openboxwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
openboxwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11854,7 +12218,7 @@ openboxwith:
compare(context);
if (context.flags.z()) goto openboxwrong;
showfirstuse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
destoryopenbox:
context._inc(context.data.byte(kProgresspoints));
context.cx = 300;
@@ -11871,16 +12235,17 @@ destoryopenbox:
context.al = 4;
turnpathon(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
openboxwrong:
context.cx = 300;
context.al = 38;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void wearwatch(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWatchon), 1);
if (context.flags.z()) goto wearingwatch;
showfirstuse(context);
@@ -11888,14 +12253,15 @@ void wearwatch(Context & context) {
context.data.byte(kGetback) = 1;
getanyad(context);
makeworn(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wearingwatch:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void wearshades(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kShadeson), 1);
if (context.flags.z()) goto wearingshades;
context.data.byte(kShadeson) = 1;
@@ -11903,14 +12269,15 @@ void wearshades(Context & context) {
context.data.byte(kGetback) = 1;
getanyad(context);
makeworn(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wearingshades:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void sitdowninbar(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWatchmode), -1);
if (!context.flags.z()) goto satdown;
showfirstuse(context);
@@ -11922,14 +12289,15 @@ void sitdowninbar(Context & context) {
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
satdown:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usechurchhole(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kGetback) = 1;
context.data.word(kWatchingtime) = 28;
@@ -11937,14 +12305,15 @@ void usechurchhole(Context & context) {
context.data.word(kEndwatchreel) = 26;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usehole(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto holewith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
holewith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -11958,7 +12327,7 @@ holewith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
righthand:
showfirstuse(context);
context.al = 86;
@@ -11968,10 +12337,11 @@ righthand:
context.es.byte(context.bx+2) = 255;
context.data.byte(kCanmovealtar) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usealtar(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 'C';
context.ah = 'N';
context.cl = 'D';
@@ -11992,7 +12362,7 @@ void usealtar(Context & context) {
context.al = 23;
showpuztext(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
movealtar:
context._inc(context.data.byte(kProgresspoints));
showseconduse(context);
@@ -12008,18 +12378,19 @@ movealtar:
context.dx = 98;
setuptimeduse(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
thingsonaltar:
showfirstuse(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void opentvdoor(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto tvdoorwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
tvdoorwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12033,66 +12404,72 @@ tvdoorwith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
keyontv:
showfirstuse(context);
context.data.byte(kLockstatus) = 0;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usedryer(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 12;
playchannel1(context);
showfirstuse(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openlouis(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 5;
context.ah = 2;
context.cl = 3;
context.ch = 8;
entercode(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void nextcolon(Context & context) {
+ uint stack_depth = context.stack.size();
lookcolon:
context.al = context.es.byte(context.si);
context._inc(context.si);
context._cmp(context.al, ':');
if (!context.flags.z()) goto lookcolon;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openyourneighbour(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 255;
context.ah = 255;
context.cl = 255;
context.ch = 255;
entercode(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usewindow(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kManspath), 6);
if (!context.flags.z()) goto notonbalc;
context._inc(context.data.byte(kProgresspoints));
showfirstuse(context);
context.data.byte(kNewlocation) = 29;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notonbalc:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usebalcony(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.al = 6;
turnpathon(context);
@@ -12121,50 +12498,55 @@ void usebalcony(Context & context) {
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openryan(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 5;
context.ah = 1;
context.cl = 0;
context.ch = 6;
entercode(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openpoolboss(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 5;
context.ah = 2;
context.cl = 2;
context.ch = 2;
entercode(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openeden(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 2;
context.ah = 8;
context.cl = 6;
context.ch = 5;
entercode(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void opensarters(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 7;
context.ah = 8;
context.cl = 3;
context.ch = 3;
entercode(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void isitright(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = context.data;
context.es = context.bx;
context.bx = 8344;
@@ -12176,22 +12558,24 @@ void isitright(Context & context) {
if (!context.flags.z()) goto notright;
context._cmp(context.es.byte(context.bx+3), context.ch);
notright:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void drawitall(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel(context);
drawfloor(context);
printsprites(context);
showicon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openhoteldoor(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto hoteldoorwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
hoteldoorwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12205,21 +12589,22 @@ hoteldoorwith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
keyonhotel1:
context.al = 16;
playchannel1(context);
showfirstuse(context);
context.data.byte(kLockstatus) = 0;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void openhoteldoor2(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto hoteldoorwith2;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
hoteldoorwith2:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12233,20 +12618,21 @@ hoteldoorwith2:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
keyonhotel2:
context.al = 16;
playchannel1(context);
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void grafittidoor(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto grafwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
grafwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12260,14 +12646,15 @@ grafwith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dograf:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void trapdoor(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.data.byte(kProgresspoints));
showfirstuse(context);
switchryanoff(context);
@@ -12278,10 +12665,11 @@ void trapdoor(Context & context) {
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void callhotellift(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 12;
playchannel1(context);
showfirstuse(context);
@@ -12292,19 +12680,21 @@ void callhotellift(Context & context) {
autosetwalk(context);
context.al = 4;
turnpathon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void calledenslift(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kCounttoopen) = 8;
context.data.byte(kGetback) = 1;
context.al = 2;
turnpathon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void calledensdlift(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLiftflag), 1);
if (context.flags.z()) goto edensdhere;
showfirstuse(context);
@@ -12312,18 +12702,19 @@ void calledensdlift(Context & context) {
context.data.byte(kGetback) = 1;
context.al = 2;
turnpathon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
edensdhere:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usepoolreader(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto poolwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
poolwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12337,27 +12728,28 @@ poolwith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
openpool:
context._cmp(context.data.byte(kTalkedtoattendant), 1);
if (context.flags.z()) goto canopenpool;
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canopenpool:
context.al = 17;
playchannel1(context);
showfirstuse(context);
context.data.byte(kCounttoopen) = 6;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void uselighter(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gotlighterwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotlighterwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12369,7 +12761,7 @@ gotlighterwith:
if (context.flags.z()) goto cigarette;
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cigarette:
context.cx = 300;
context.al = 9;
@@ -12378,10 +12770,11 @@ cigarette:
getexad(context);
context.es.byte(context.bx+2) = 255;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showseconduse(Context & context) {
+ uint stack_depth = context.stack.size();
getobtextstart(context);
nextcolon(context);
nextcolon(context);
@@ -12389,14 +12782,15 @@ void showseconduse(Context & context) {
usetext(context);
context.cx = 400;
hangonp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecardreader1(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gotreader1with;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotreader1with:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12410,7 +12804,7 @@ gotreader1with:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
correctcard:
context._cmp(context.data.byte(kTalkedtosparky), 0);
if (context.flags.z()) goto notyet;
@@ -12420,7 +12814,7 @@ correctcard:
context.al = 17;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
getscash:
context.al = 16;
playchannel1(context);
@@ -12430,18 +12824,19 @@ getscash:
context._inc(context.data.byte(kProgresspoints));
context.data.word(kCard1money) = 12432;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notyet:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecardreader2(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gotreader2with;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotreader2with:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12455,7 +12850,7 @@ gotreader2with:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
correctcard2:
context._cmp(context.data.byte(kTalkedtoboss), 0);
if (context.flags.z()) goto notyetboss;
@@ -12474,30 +12869,31 @@ correctcard2:
context._sub(context.data.word(kCard1money), 2000);
context._inc(context.data.byte(kProgresspoints));
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nocash:
context.cx = 300;
context.al = 20;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
alreadygotnew:
context.cx = 300;
context.al = 22;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notyetboss:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecardreader3(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gotreader3with;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotreader3with:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12511,7 +12907,7 @@ gotreader3with:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
rightcard:
context._cmp(context.data.byte(kTalkedtorecep), 0);
if (context.flags.z()) goto notyetrecep;
@@ -12526,20 +12922,21 @@ rightcard:
context._sub(context.data.word(kCard1money), 8300);
context.data.byte(kCardpassflag) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
alreadyusedit:
context.cx = 300;
context.al = 26;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notyetrecep:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecashcard(Context & context) {
+ uint stack_depth = context.stack.size();
getridofreels(context);
loadkeypad(context);
createpanel(context);
@@ -12588,10 +12985,11 @@ void usecashcard(Context & context) {
getridoftemp(context);
restorereels(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void lookatcard(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kManisoffscreen) = 1;
getridofreels(context);
loadkeypad(context);
@@ -12639,10 +13037,11 @@ void lookatcard(Context & context) {
getridoftemp(context);
restorereels(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void moneypoke(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = 3385;
context.cl = 48-1;
numberpoke0:
@@ -12678,14 +13077,15 @@ numberpoke3:
context.bx = 3390;
context._add(context.al, 48);
context.cs.byte(context.bx) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecontrol(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gotcontrolwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotcontrolwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12716,7 +13116,7 @@ gotcontrolwith:
balls:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
rightkey:
context.al = 16;
playchannel1(context);
@@ -12730,7 +13130,7 @@ rightkey:
context.data.byte(kCounttoopen) = 0;
context.data.word(kWatchingtime) = 80;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
goingdown:
context.cx = 300;
context.al = 3;
@@ -12740,7 +13140,7 @@ goingdown:
context.data.byte(kCounttoopen) = 0;
context.data.word(kWatchingtime) = 80;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
jimmycontrols:
context.al = 50;
placesetobject(context);
@@ -12761,28 +13161,30 @@ jimmycontrols:
showpuztext(context);
context._inc(context.data.byte(kProgresspoints));
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
axeoncontrols:
context.cx = 300;
context.al = 16;
showpuztext(context);
context._inc(context.data.byte(kProgresspoints));
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usehatch(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kNewlocation) = 40;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usewire(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gotwirewith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotwirewith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -12804,13 +13206,13 @@ gotwirewith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wireaxe:
context.cx = 300;
context.al = 16;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wireknife:
context.al = 51;
removesetobject(context);
@@ -12821,10 +13223,11 @@ wireknife:
showpuztext(context);
context._inc(context.data.byte(kProgresspoints));
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usehandle(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 'C';
context.ah = 'U';
context.cl = 'T';
@@ -12837,34 +13240,37 @@ void usehandle(Context & context) {
context.al = 12;
showpuztext(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
havecutwire:
context.cx = 300;
context.al = 13;
showpuztext(context);
context.data.byte(kNewlocation) = 22;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useelevator1(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
selectlocation(context);
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showfirstuse(Context & context) {
+ uint stack_depth = context.stack.size();
getobtextstart(context);
findnextcolon(context);
findnextcolon(context);
usetext(context);
context.cx = 400;
hangonp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useelevator3(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.byte(kCounttoclose) = 20;
context.data.byte(kNewlocation) = 34;
@@ -12874,10 +13280,11 @@ void useelevator3(Context & context) {
context.data.byte(kSpeedcount) = 1;
context.data.word(kWatchingtime) = 80;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useelevator4(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.word(kReeltowatch) = 0;
context.data.word(kEndwatchreel) = 11;
@@ -12887,10 +13294,11 @@ void useelevator4(Context & context) {
context.data.word(kWatchingtime) = 80;
context.data.byte(kGetback) = 1;
context.data.byte(kNewlocation) = 24;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useelevator2(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLocation), 23);
if (context.flags.z()) goto inpoolhall;
showfirstuse(context);
@@ -12899,7 +13307,7 @@ void useelevator2(Context & context) {
context.data.byte(kCounttoopen) = 0;
context.data.word(kWatchingtime) = 80;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
inpoolhall:
showfirstuse(context);
context.data.byte(kNewlocation) = 31;
@@ -12907,10 +13315,11 @@ inpoolhall:
context.data.byte(kCounttoopen) = 0;
context.data.word(kWatchingtime) = 80;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useelevator5(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 4;
placesetobject(context);
context.al = 0;
@@ -12920,10 +13329,11 @@ void useelevator5(Context & context) {
context.data.byte(kLiftflag) = 1;
context.data.byte(kCounttoclose) = 8;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usekey(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLocation), 5);
if (context.flags.z()) goto usekey1;
context._cmp(context.data.byte(kLocation), 30);
@@ -12934,7 +13344,7 @@ void usekey(Context & context) {
context.al = 1;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
usekey1:
context._cmp(context.data.byte(kMapx), 22);
if (!context.flags.z()) goto wrongroom1;
@@ -12945,7 +13355,7 @@ usekey1:
showpuztext(context);
context.data.byte(kCounttoclose) = 100;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
usekey2:
context._cmp(context.data.byte(kMapx), 11);
if (!context.flags.z()) goto wrongroom1;
@@ -12959,23 +13369,24 @@ usekey2:
fadescreendown(context);
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wrongroom1:
context.cx = 200;
context.al = 2;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usestereo(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLocation), 0);
if (context.flags.z()) goto stereook;
context.cx = 400;
context.al = 4;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
stereook:
context._cmp(context.data.byte(kMapx), 11);
if (!context.flags.z()) goto stereonotok;
@@ -12986,7 +13397,7 @@ stereonotok:
context.al = 5;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
stereook2:
context.al = 'C';
context.ah = 'D';
@@ -13004,7 +13415,7 @@ stereook2:
getanyad(context);
context.al = 255;
context.es.byte(context.bx+10) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cdinside:
getanyad(context);
context.al = context.es.byte(context.bx+10);
@@ -13016,16 +13427,17 @@ cdinside:
context.cx = 400;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
stereoon:
context.al = 8;
context.cx = 400;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecooker(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kCommand);
context.ah = context.data.byte(kObjecttype);
checkinside(context);
@@ -13033,14 +13445,15 @@ void usecooker(Context & context) {
if (!context.flags.z()) goto foodinside;
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
foodinside:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useaxe(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 22);
if (!context.flags.z()) goto notinpool;
context._cmp(context.data.byte(kMapy), 10);
@@ -13050,10 +13463,10 @@ void useaxe(Context & context) {
context.data.byte(kLastweapon) = 2;
context.data.byte(kGetback) = 1;
removeobfrominv(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinpool:
showfirstuse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
/*continuing to unbounded code: axeondoor from useelvdoor:19-30*/
axeondoor:
context.al = 15;
@@ -13066,15 +13479,16 @@ axeondoor:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
+ {assert(stack_depth == context.stack.size()); return; }
}
void useelvdoor(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gotdoorwith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotdoorwith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -13088,7 +13502,7 @@ gotdoorwith:
context.cx = 300;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
axeondoor:
context.al = 15;
context.cx = 300;
@@ -13100,10 +13514,11 @@ axeondoor:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void withwhat(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel(context);
showpanel(context);
showman(context);
@@ -13142,16 +13557,17 @@ void withwhat(Context & context) {
worktoscreen(context);
delpointer(context);
context.data.byte(kInvopen) = 2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void selectob(Context & context) {
+ uint stack_depth = context.stack.size();
findinvpos(context);
context.ax = context.es.word(context.bx);
context._cmp(context.al, 255);
if (!context.flags.z()) goto canselectob;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canselectob:
context.data.byte(kWithobject) = context.al;
context.data.byte(kWithtype) = context.ah;
@@ -13172,15 +13588,16 @@ alreadyselob:
context._and(context.ax, 1);
if (!context.flags.z()) goto doselob;
notselob:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doselob:
delpointer(context);
context.data.byte(kInvopen) = 0;
useroutine(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void compare(Context & context) {
+ uint stack_depth = context.stack.size();
context._sub(context.dl, 'A');
context._sub(context.dh, 'A');
context._sub(context.cl, 'A');
@@ -13194,10 +13611,11 @@ void compare(Context & context) {
if (!context.flags.z()) goto comparefin;
context._cmp(context.es.word(context.bx+14), context.dx);
comparefin:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findsetobject(Context & context) {
+ uint stack_depth = context.stack.size();
context._sub(context.al, 'A');
context._sub(context.ah, 'A');
context._sub(context.cl, 'A');
@@ -13215,17 +13633,18 @@ findsetloop:
context._cmp(context.ch, context.es.byte(context.bx+15));
if (!context.flags.z()) goto nofind;
context.al = context.dl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nofind:
context._add(context.bx, 64);
context._inc(context.dl);
context._cmp(context.dl, 128);
if (!context.flags.z()) goto findsetloop;
context.al = context.dl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findexobject(Context & context) {
+ uint stack_depth = context.stack.size();
context._sub(context.al, 'A');
context._sub(context.ah, 'A');
context._sub(context.cl, 'A');
@@ -13243,17 +13662,18 @@ findexloop:
context._cmp(context.ch, context.es.byte(context.bx+15));
if (!context.flags.z()) goto nofindex;
context.al = context.dl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nofindex:
context._add(context.bx, 16);
context._inc(context.dl);
context._cmp(context.dl, (114));
if (!context.flags.z()) goto findexloop;
context.al = context.dl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void isryanholding(Context & context) {
+ uint stack_depth = context.stack.size();
context._sub(context.al, 'A');
context._sub(context.ah, 'A');
context._sub(context.cl, 'A');
@@ -13274,7 +13694,7 @@ searchinv:
if (!context.flags.z()) goto nofindininv;
context.al = context.dl;
context._cmp(context.al, (114));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nofindininv:
context._add(context.bx, 16);
context._inc(context.dl);
@@ -13282,10 +13702,11 @@ nofindininv:
if (!context.flags.z()) goto searchinv;
context.al = context.dl;
context._cmp(context.al, (114));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkinside(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kExtras);
context.bx = (0+2080+30000);
context.cl = 0;
@@ -13294,16 +13715,17 @@ insideloop:
if (!context.flags.z()) goto notfoundinside;
context._cmp(context.ah, context.es.byte(context.bx+2));
if (!context.flags.z()) goto notfoundinside;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notfoundinside:
context._add(context.bx, 16);
context._inc(context.cl);
context._cmp(context.cl, (114));
if (!context.flags.z()) goto insideloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usetext(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.si);
createpanel(context);
@@ -13320,10 +13742,11 @@ void usetext(Context & context) {
context.ah = 0;
printdirect(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void putbackobstuff(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel(context);
showpanel(context);
showman(context);
@@ -13337,10 +13760,11 @@ void putbackobstuff(Context & context) {
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showpuztext(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.cx);
findpuztext(context);
context.push(context.es);
@@ -13360,10 +13784,11 @@ void showpuztext(Context & context) {
worktoscreenm(context);
context.cx = context.pop();
hangonp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findpuztext(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.si = context.ax;
context._add(context.si, context.si);
@@ -13371,10 +13796,11 @@ void findpuztext(Context & context) {
context.ax = context.es.word(context.si);
context._add(context.ax, (66*2));
context.si = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void placesetobject(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.cl = 0;
@@ -13384,10 +13810,11 @@ void placesetobject(Context & context) {
context.es.byte(context.bx+58) = 0;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void removesetobject(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.cl = 255;
@@ -13397,10 +13824,11 @@ void removesetobject(Context & context) {
context.es.byte(context.bx+58) = 255;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void issetobonmap(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
getsetad(context);
@@ -13408,10 +13836,11 @@ void issetobonmap(Context & context) {
context.bx = context.pop();
context.es = context.pop();
context._cmp(context.al, 0);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void placefreeobject(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
context.cl = 0;
@@ -13421,20 +13850,22 @@ void placefreeobject(Context & context) {
context.es.byte(context.bx+2) = 0;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void removefreeobject(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.bx);
getfreead(context);
context.es.byte(context.bx+2) = 255;
context.bx = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findormake(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
context.push(context.ax);
context.es = context.data.word(kBuffers);
@@ -13452,25 +13883,28 @@ nofoundchange:
foundchange:
context.ax = context.pop();
context.es.byte(context.bx+2) = context.cl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
haventfound:
context.es.word(context.bx) = context.ax;
context.es.word(context.bx+2) = context.cx;
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void switchryanon(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kRyanon) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void switchryanoff(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kRyanon) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setallchanges(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
setallloop:
@@ -13488,10 +13922,11 @@ setallloop:
context.es = context.pop();
goto setallloop;
endsetloop:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dochange(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.ch, 0);
if (context.flags.z()) goto object;
context._cmp(context.ch, 1);
@@ -13515,13 +13950,13 @@ path:
context.cx = context.pop();
context.es.byte(context.bx+6) = context.cl;
nopath:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
object:
context.push(context.cx);
getsetad(context);
context.cx = context.pop();
context.es.byte(context.bx+58) = context.cl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
freeobject:
context.push(context.cx);
getfreead(context);
@@ -13530,10 +13965,11 @@ freeobject:
if (!context.flags.z()) goto beenpickedup;
context.es.byte(context.bx+2) = context.cl;
beenpickedup:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void autoappear(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLocation), 32);
if (!context.flags.z()) goto notinalley;
context.al = 5;
@@ -13541,7 +13977,7 @@ void autoappear(Context & context) {
context.al = 10;
setlocation(context);
context.data.byte(kDestpos) = 10;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinalley:
context._cmp(context.data.byte(kReallocation), 24);
if (!context.flags.z()) goto notinedens;
@@ -13564,7 +14000,7 @@ notinalley:
removesetobject(context);
context.al = 85;
removesetobject(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
edenspart2:
context._cmp(context.data.byte(kSartaindead), 1);
if (!context.flags.z()) goto notedens2;
@@ -13576,7 +14012,7 @@ edenspart2:
placesetobject(context);
context._inc(context.data.byte(kSartaindead));
notedens2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinedens:
context._cmp(context.data.byte(kReallocation), 25);
if (!context.flags.z()) goto notonsartroof;
@@ -13586,7 +14022,7 @@ notinedens:
context.al = 11;
setlocation(context);
context.data.byte(kDestpos) = 11;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notonsartroof:
context._cmp(context.data.byte(kReallocation), 2);
if (!context.flags.z()) goto notinlouiss;
@@ -13595,10 +14031,11 @@ notonsartroof:
context.al = 23;
placesetobject(context);
notinlouiss:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getundertimed(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kTimedy);
context.ah = 0;
context.bx = context.ax;
@@ -13610,10 +14047,11 @@ void getundertimed(Context & context) {
context.ds = context.data.word(kBuffers);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
multiget(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void putundertimed(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kTimedy);
context.ah = 0;
context.bx = context.ax;
@@ -13625,10 +14063,11 @@ void putundertimed(Context & context) {
context.ds = context.data.word(kBuffers);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
multiput(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumptimedtext(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNeedtodumptimed), 1);
if (!context.flags.z()) goto nodumptimed;
context.al = context.data.byte(kTimedy);
@@ -13642,10 +14081,11 @@ void dumptimedtext(Context & context) {
multidump(context);
context.data.byte(kNeedtodumptimed) = 0;
nodumptimed:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setuptimeduse(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kTimecount), 0);
if (!context.flags.z()) goto cantsetup;
context.data.byte(kTimedy) = context.bh;
@@ -13664,10 +14104,11 @@ void setuptimeduse(Context & context) {
context.data.word(kTimedseg) = context.es;
context.data.word(kTimedoffset) = context.bx;
cantsetup:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setuptimedtemp(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kTimecount), 0);
if (!context.flags.z()) goto cantsetup2;
context.data.byte(kTimedy) = context.bh;
@@ -13686,10 +14127,11 @@ void setuptimedtemp(Context & context) {
context.data.word(kTimedseg) = context.es;
context.data.word(kTimedoffset) = context.bx;
cantsetup2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usetimedtext(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kTimecount), 0);
if (context.flags.z()) goto notext;
context._dec(context.data.word(kTimecount));
@@ -13715,14 +14157,15 @@ notfirsttimed:
printdirect(context);
context.data.byte(kNeedtodumptimed) = 1;
notext:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
deltimedtext:
putundertimed(context);
context.data.byte(kNeedtodumptimed) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void edenscdplayer(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context.data.word(kWatchingtime) = 18*2;
context.data.word(kReeltowatch) = 25;
@@ -13730,10 +14173,11 @@ void edenscdplayer(Context & context) {
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usewall(Context & context) {
+ uint stack_depth = context.stack.size();
showfirstuse(context);
context._cmp(context.data.byte(kManspath), 3);
if (context.flags.z()) goto gobackover;
@@ -13760,7 +14204,7 @@ void usewall(Context & context) {
findxyfrompath(context);
context.data.byte(kResetmanxy) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gobackover:
context.data.word(kWatchingtime) = 30*2;
context.data.word(kReeltowatch) = 34;
@@ -13785,14 +14229,15 @@ gobackover:
findxyfrompath(context);
context.data.byte(kResetmanxy) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usechurchgate(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto gatewith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gatewith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -13806,7 +14251,7 @@ gatewith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cutgate:
showfirstuse(context);
context.data.word(kWatchingtime) = 64*2;
@@ -13823,15 +14268,16 @@ cutgate:
context.al = 2;
turnpathon(context);
notopenchurch:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usegun(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kObjecttype), 4);
if (context.flags.z()) goto istakengun;
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
istakengun:
context._cmp(context.data.byte(kReallocation), 22);
if (!context.flags.z()) goto notinpoolroom;
@@ -13842,7 +14288,7 @@ istakengun:
context.data.byte(kCombatcount) = 39;
context.data.byte(kGetback) = 1;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinpoolroom:
context._cmp(context.data.byte(kReallocation), 25);
if (!context.flags.z()) goto nothelicopter;
@@ -13856,7 +14302,7 @@ notinpoolroom:
context.data.byte(kRoomafterdream) = 38;
context.data.byte(kSartaindead) = 1;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nothelicopter:
context._cmp(context.data.byte(kReallocation), 27);
if (!context.flags.z()) goto notinrockroom;
@@ -13871,7 +14317,7 @@ nothelicopter:
context.data.byte(kRoomafterdream) = 32;
context.data.byte(kDreamnumber) = 0;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinrockroom:
context._cmp(context.data.byte(kReallocation), 8);
if (!context.flags.z()) goto notbystudio;
@@ -13890,7 +14336,7 @@ notinrockroom:
context.data.byte(kLastweapon) = 1;
context.data.byte(kGetback) = 1;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notbystudio:
context._cmp(context.data.byte(kReallocation), 6);
if (!context.flags.z()) goto notsarters;
@@ -13920,7 +14366,7 @@ notbystudio:
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notsarters:
context._cmp(context.data.byte(kReallocation), 29);
if (!context.flags.z()) goto notaide;
@@ -13942,7 +14388,7 @@ notsarters:
context.data.byte(kDreamnumber) = 3;
context.data.byte(kRoomafterdream) = 33;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notaide:
context._cmp(context.data.byte(kReallocation), 23);
if (!context.flags.z()) goto notwithboss;
@@ -13958,7 +14404,7 @@ notaide:
pathokboss:
context.data.byte(kLastweapon) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwithboss:
context._cmp(context.data.byte(kReallocation), 8);
if (!context.flags.z()) goto nottvsoldier;
@@ -13974,14 +14420,15 @@ notwithboss:
pathoktv:
context.data.byte(kLastweapon) = 1;
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nottvsoldier:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useshield(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 20);
if (!context.flags.z()) goto notinsartroom;
context._cmp(context.data.byte(kCombatcount), 0);
@@ -13991,14 +14438,15 @@ void useshield(Context & context) {
context.data.byte(kGetback) = 1;
context._inc(context.data.byte(kProgresspoints));
removeobfrominv(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinsartroom:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usebuttona(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 95;
issetobonmap(context);
if (context.flags.z()) goto donethisbit;
@@ -14018,18 +14466,19 @@ void usebuttona(Context & context) {
context.data.byte(kSpeedcount) = 1;
context.data.byte(kGetback) = 1;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
donethisbit:
showseconduse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void useplate(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWithobject), 255);
if (!context.flags.z()) goto platewith;
withwhat(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
platewith:
context.al = context.data.byte(kWithobject);
context.ah = context.data.byte(kWithtype);
@@ -14051,7 +14500,7 @@ platewith:
context.al = 14;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
unscrewplate:
context.al = 20;
playchannel1(context);
@@ -14066,16 +14515,17 @@ unscrewplate:
placefreeobject(context);
context._inc(context.data.byte(kProgresspoints));
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
triedknife:
context.cx = 300;
context.al = 54;
showpuztext(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usewinch(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 40;
context.ah = 1;
checkinside(context);
@@ -14102,14 +14552,15 @@ void usewinch(Context & context) {
context.data.byte(kNewsitem) = 2;
context.data.byte(kGetback) = 1;
context._inc(context.data.byte(kProgresspoints));
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nowinch:
showfirstuse(context);
putbackobstuff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void entercode(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kKeypadax) = context.ax;
context.data.word(kKeypadcx) = context.cx;
getridofreels(context);
@@ -14178,16 +14629,18 @@ numberright:
restorereels(context);
redrawmainscrn(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadkeypad(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 1948;
loadintotemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void quitkey(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 222);
if (context.flags.z()) goto alreadyqk;
context.data.byte(kCommandtype) = 222;
@@ -14200,13 +14653,14 @@ alreadyqk:
context._and(context.ax, 1);
if (!context.flags.z()) goto doqk;
notqk:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doqk:
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void addtopresslist(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kPresspointer), 5);
if (context.flags.z()) goto nomorekeys;
context.al = context.data.byte(kPressed);
@@ -14221,76 +14675,88 @@ not10:
context.es.byte(context.bx) = context.al;
context._inc(context.data.word(kPresspointer));
nomorekeys:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonone(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 1;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttontwo(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 2;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonthree(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 3;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonfour(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 4;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonfive(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 5;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonsix(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 6;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonseven(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 7;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttoneight(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 8;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonnine(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 9;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonnought(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 10;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonenter(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = 11;
buttonpress(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void buttonpress(Context & context) {
+ uint stack_depth = context.stack.size();
context.ch = context.cl;
context._add(context.ch, 100);
context._cmp(context.data.byte(kCommandtype), context.ch);
@@ -14308,7 +14774,7 @@ alreadyb:
context._and(context.ax, 1);
if (!context.flags.z()) goto dob;
notb:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dob:
context.data.byte(kPressed) = context.cl;
context._add(context.cl, 21);
@@ -14319,10 +14785,11 @@ dob:
context.al = 10;
playchannel1(context);
nonoise:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showouterpad(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (36+112)-3;
context.bx = (72)-4;
context.ds = context.data.word(kTempgraphics);
@@ -14335,10 +14802,11 @@ void showouterpad(Context & context) {
context.al = 37;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showkeypad(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 22;
context.di = (36+112)+9;
context.bx = (72)+5;
@@ -14404,10 +14872,11 @@ gotlight:
context.di = (36+112)+60;
showframe(context);
notenter:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void singlekey(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kGraphicpress), context.al);
if (!context.flags.z()) goto gotkey;
context._add(context.al, 11);
@@ -14419,19 +14888,21 @@ gotkey:
context._sub(context.al, 20);
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpkeypad(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (36+112)-3;
context.bx = (72)-4;
context.cl = 120;
context.ch = 90;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usemenu(Context & context) {
+ uint stack_depth = context.stack.size();
getridofreels(context);
loadmenu(context);
createpanel(context);
@@ -14475,21 +14946,23 @@ menuloop:
getridoftemp2(context);
restorereels(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
menulist:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpmenu(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (80+40);
context.bx = (60);
context.cl = 48;
context.ch = 48;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getundermenu(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (80+40);
context.bx = (60);
context.cl = 48;
@@ -14497,10 +14970,11 @@ void getundermenu(Context & context) {
context.ds = context.data.word(kBuffers);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
multiget(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void putundermenu(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (80+40);
context.bx = (60);
context.cl = 48;
@@ -14508,10 +14982,11 @@ void putundermenu(Context & context) {
context.ds = context.data.word(kBuffers);
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
multiput(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showoutermenu(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 40;
context.ah = 0;
context.di = (80+40)-34;
@@ -14536,10 +15011,11 @@ void showoutermenu(Context & context) {
context.bx = (60)+57-40;
context.ds = context.data.word(kTempgraphics);
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showmenu(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.data.byte(kMenucount));
context._cmp(context.data.byte(kMenucount), 37*2);
if (!context.flags.z()) goto menuframeok;
@@ -14552,18 +15028,20 @@ menuframeok:
context.bx = (60);
context.ds = context.data.word(kTempgraphics);
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadmenu(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 1832;
loadintotemp(context);
context.dx = 1987;
loadintotemp2(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void viewfolder(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kManisoffscreen) = 1;
getridofall(context);
loadfolder(context);
@@ -14590,14 +15068,15 @@ folderloop:
restoreall(context);
redrawmainscrn(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void nextfolder(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kFolderpage), 12);
if (!context.flags.z()) goto cannextf;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cannextf:
context._cmp(context.data.byte(kCommandtype), 201);
if (context.flags.z()) goto alreadynextf;
@@ -14611,7 +15090,7 @@ alreadynextf:
context._cmp(context.ax, 1);
if (context.flags.z()) goto donextf;
notnextf:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
donextf:
context._inc(context.data.byte(kFolderpage));
folderhints(context);
@@ -14621,10 +15100,11 @@ donextf:
context.bx = 3547;
checkcoords(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void folderhints(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kFolderpage), 5);
if (!context.flags.z()) goto notaideadd;
context._cmp(context.data.byte(kAidedead), 1);
@@ -14646,7 +15126,7 @@ void folderhints(Context & context) {
worktoscreenm(context);
context.cx = 200;
hangonp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notaideadd:
context._cmp(context.data.byte(kFolderpage), 9);
if (!context.flags.z()) goto notaristoadd;
@@ -14668,14 +15148,15 @@ notaideadd:
context.cx = 200;
hangonp(context);
notaristoadd:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void lastfolder(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kFolderpage), 0);
if (!context.flags.z()) goto canlastf;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
canlastf:
context._cmp(context.data.byte(kCommandtype), 202);
if (context.flags.z()) goto alreadylastf;
@@ -14691,7 +15172,7 @@ alreadylastf:
context._cmp(context.ax, 1);
if (context.flags.z()) goto dolastf;
notlastf:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dolastf:
context._dec(context.data.byte(kFolderpage));
delpointer(context);
@@ -14700,10 +15181,11 @@ dolastf:
context.bx = 3547;
checkcoords(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadfolder(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 2299;
loadintotemp(context);
context.dx = 2312;
@@ -14714,10 +15196,11 @@ void loadfolder(Context & context) {
loadtempcharset(context);
context.dx = 2195;
loadtemptext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showfolder(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCommandtype) = 255;
context._cmp(context.data.byte(kFolderpage), 0);
if (context.flags.z()) goto closedfolder;
@@ -14758,7 +15241,7 @@ noleftpage:
norightpage:
usecharset1(context);
undertextline(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
closedfolder:
createpanel2(context);
context.ds = context.data.word(kTempgraphics3);
@@ -14775,20 +15258,22 @@ closedfolder:
showframe(context);
folderexit(context);
undertextline(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void folderexit(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics2);
context.di = 296;
context.bx = 178;
context.al = 6;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showleftpage(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics2);
context.di = 0;
context.bx = 12;
@@ -14866,10 +15351,11 @@ flipfolderline:
context._add(context.si, 320);
context._add(context.di, 320);
if (--context.cx) goto flipfolder;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showrightpage(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics2);
context.di = 143;
context.bx = 12;
@@ -14920,10 +15406,11 @@ contrightpage:
if (--context.cx) goto twolotsright;
context.data.byte(kKerning) = 0;
context.data.word(kLinespacing) = 10;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void entersymbol(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kManisoffscreen) = 1;
getridofreels(context);
context.dx = 2338;
@@ -14971,7 +15458,7 @@ symbolloop:
worktoscreenm(context);
context.al = 13;
playchannel1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
symbolwrong:
context.al = 46;
removesetobject(context);
@@ -14986,10 +15473,11 @@ symbolwrong:
getridoftemp(context);
restorereels(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void quitsymbol(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSymboltopx), 24);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kSymbolbotx), 24);
@@ -15006,13 +15494,14 @@ alreadyqs:
context._and(context.ax, 1);
if (!context.flags.z()) goto doqs;
notqs:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doqs:
context.data.byte(kGetback) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void settopleft(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSymboltopdir), 0);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kCommandtype), 210);
@@ -15025,10 +15514,11 @@ alreadytopl:
if (context.flags.z()) goto notopleft;
context.data.byte(kSymboltopdir) = -1;
notopleft:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void settopright(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSymboltopdir), 0);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kCommandtype), 211);
@@ -15041,10 +15531,11 @@ alreadytopr:
if (context.flags.z()) goto notopright;
context.data.byte(kSymboltopdir) = 1;
notopright:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setbotleft(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSymbolbotdir), 0);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kCommandtype), 212);
@@ -15057,10 +15548,11 @@ alreadybotl:
if (context.flags.z()) goto nobotleft;
context.data.byte(kSymbolbotdir) = -1;
nobotleft:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setbotright(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSymbolbotdir), 0);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kCommandtype), 213);
@@ -15073,20 +15565,22 @@ alreadybotr:
if (context.flags.z()) goto nobotright;
context.data.byte(kSymbolbotdir) = 1;
nobotright:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpsymbol(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kNewtextline) = 0;
context.di = (64);
context.bx = (56)+20;
context.cl = 104;
context.ch = 60;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showsymbol(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 12;
context.ah = 0;
context.di = (64);
@@ -15156,25 +15650,27 @@ void showsymbol(Context & context) {
nextsymbol(context);
context._add(context.di, 49);
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void nextsymbol(Context & context) {
+ uint stack_depth = context.stack.size();
context._inc(context.al);
context._cmp(context.al, 6);
if (context.flags.z()) goto topwrap;
context._cmp(context.al, 12);
if (context.flags.z()) goto botwrap;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
topwrap:
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
botwrap:
context.al = 6;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void updatesymboltop(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSymboltopdir), 0);
if (context.flags.z()) goto topfinished;
context._cmp(context.data.byte(kSymboltopdir), -1);
@@ -15187,12 +15683,12 @@ void updatesymboltop(Context & context) {
context._cmp(context.data.byte(kSymboltopnum), -1);
if (!context.flags.z()) goto topfinished;
context.data.byte(kSymboltopnum) = 5;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwrapfor:
context._cmp(context.data.byte(kSymboltopx), 24);
if (!context.flags.z()) goto topfinished;
context.data.byte(kSymboltopdir) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
backwards:
context._dec(context.data.byte(kSymboltopx));
context._cmp(context.data.byte(kSymboltopx), -1);
@@ -15202,16 +15698,17 @@ backwards:
context._cmp(context.data.byte(kSymboltopnum), 6);
if (!context.flags.z()) goto topfinished;
context.data.byte(kSymboltopnum) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwrapback:
context._cmp(context.data.byte(kSymboltopx), 24);
if (!context.flags.z()) goto topfinished;
context.data.byte(kSymboltopdir) = 0;
topfinished:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void updatesymbolbot(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSymbolbotdir), 0);
if (context.flags.z()) goto botfinished;
context._cmp(context.data.byte(kSymbolbotdir), -1);
@@ -15224,12 +15721,12 @@ void updatesymbolbot(Context & context) {
context._cmp(context.data.byte(kSymbolbotnum), -1);
if (!context.flags.z()) goto botfinished;
context.data.byte(kSymbolbotnum) = 5;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwrapforb:
context._cmp(context.data.byte(kSymbolbotx), 24);
if (!context.flags.z()) goto botfinished;
context.data.byte(kSymbolbotdir) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
backwardsbot:
context._dec(context.data.byte(kSymbolbotx));
context._cmp(context.data.byte(kSymbolbotx), -1);
@@ -15239,16 +15736,17 @@ backwardsbot:
context._cmp(context.data.byte(kSymbolbotnum), 6);
if (!context.flags.z()) goto botfinished;
context.data.byte(kSymbolbotnum) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwrapbackb:
context._cmp(context.data.byte(kSymbolbotx), 24);
if (!context.flags.z()) goto botfinished;
context.data.byte(kSymbolbotdir) = 0;
botfinished:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpsymbox(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kDumpx), -1);
if (context.flags.z()) goto nodumpsym;
context.di = context.data.word(kDumpx);
@@ -15258,10 +15756,11 @@ void dumpsymbox(Context & context) {
multidump(context);
context.data.word(kDumpx) = -1;
nodumpsym:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usediary(Context & context) {
+ uint stack_depth = context.stack.size();
getridofreels(context);
context.dx = 2039;
loadintotemp(context);
@@ -15299,12 +15798,13 @@ diaryloop:
context.data.byte(kManisoffscreen) = 0;
redrawmainscrn(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
diarylist:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showdiary(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 1;
context.ah = 0;
context.di = (68+24);
@@ -15317,10 +15817,11 @@ void showdiary(Context & context) {
context.bx = (48+12)+108;
context.ds = context.data.word(kTempgraphics);
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showdiarykeys(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kPresscount), 0);
if (context.flags.z()) goto nokeyatall;
context._dec(context.data.byte(kPresscount));
@@ -15342,7 +15843,7 @@ gotkeyn:
if (!context.flags.z()) goto notshown;
showdiarypage(context);
notshown:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nokeyn:
context.al = 5;
context._cmp(context.data.byte(kPresscount), 1);
@@ -15358,12 +15859,13 @@ gotkeyp:
if (!context.flags.z()) goto notshowp;
showdiarypage(context);
notshowp:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nokeyatall:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpdiarykeys(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kPresscount), 1);
if (!context.flags.z()) goto notdumpdiary;
context._cmp(context.data.byte(kSartaindead), 1);
@@ -15395,7 +15897,7 @@ void dumpdiarykeys(Context & context) {
showdiarypage(context);
worktoscreenm(context);
showpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notsartadd:
context.di = (68+24)+48;
context.bx = (48+12)+15;
@@ -15413,10 +15915,11 @@ notdumpdiary:
context.cl = 16;
context.ch = 16;
multidump(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void diarykeyp(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 214);
if (context.flags.z()) goto alreadykeyp;
context.data.byte(kCommandtype) = 214;
@@ -15439,10 +15942,11 @@ alreadykeyp:
if (!context.flags.z()) goto notkeyp;
context.data.byte(kDiarypage) = 11;
notkeyp:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void diarykeyn(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 213);
if (context.flags.z()) goto alreadykeyn;
context.data.byte(kCommandtype) = 213;
@@ -15465,10 +15969,11 @@ alreadykeyn:
if (!context.flags.z()) goto notkeyn;
context.data.byte(kDiarypage) = 0;
notkeyn:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showdiarypage(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = 0;
context.ah = 0;
context.di = (68+24);
@@ -15498,10 +16003,11 @@ void showdiarypage(Context & context) {
context.data.byte(kKerning) = 0;
context.data.word(kCharshift) = 0;
usecharset1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findtext1(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.si = context.ax;
context._add(context.si, context.si);
@@ -15509,10 +16015,11 @@ void findtext1(Context & context) {
context.ax = context.es.word(context.si);
context._add(context.ax, (66*2));
context.si = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void zoomonoff(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kWatchingtime), 0);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kPointermode), 2);
@@ -15529,7 +16036,7 @@ alreadyonoff:
context._and(context.ax, 1);
if (!context.flags.z()) goto dozoomonoff;
nozoomonoff:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dozoomonoff:
context.al = context.data.byte(kZoomon);
context._xor(context.al, 1);
@@ -15546,10 +16053,11 @@ dozoomonoff:
commandonly(context);
readmouse(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void saveload(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kWatchingtime), 0);
if (!context.flags.z()) { blank(context); return; };
context._cmp(context.data.byte(kPointermode), 2);
@@ -15567,10 +16075,11 @@ alreadyops:
if (context.flags.z()) goto noops;
dosaveload(context);
noops:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dosaveload(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kPointerframe) = 0;
context.data.word(kTextaddressx) = 70;
context.data.word(kTextaddressy) = 182-8;
@@ -15616,20 +16125,22 @@ waitops:
context.data.byte(kCommandtype) = 200;
justret:
context.data.byte(kManisoffscreen) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getbackfromops(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kMandead), 2);
if (context.flags.z()) goto opsblock1;
getback1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
opsblock1:
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showmainops(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics);
context.di = (60)+10;
context.bx = (52)+10;
@@ -15648,10 +16159,11 @@ void showmainops(Context & context) {
context.al = 1;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showdiscops(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics);
context.di = (60)+128+4;
context.bx = (52)+12;
@@ -15676,16 +16188,18 @@ void showdiscops(Context & context) {
context.al = 5;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadsavebox(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 1961;
loadintotemp(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadgame(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 246);
if (context.flags.z()) goto alreadyload;
context.data.byte(kCommandtype) = 246;
@@ -15698,7 +16212,7 @@ alreadyload:
context._cmp(context.ax, 1);
if (context.flags.z()) goto doload;
noload:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
doload:
context.data.byte(kLoadingorsave) = 1;
showopbox(context);
@@ -15741,10 +16255,11 @@ loadops:
worktoscreen(context);
context.data.byte(kGetback) = 4;
quitloaded:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getbacktoops(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 201);
if (context.flags.z()) goto alreadygetops;
context.data.byte(kCommandtype) = 201;
@@ -15757,14 +16272,15 @@ alreadygetops:
context._and(context.ax, 1);
if (!context.flags.z()) goto dogetbackops;
nogetbackops:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dogetbackops:
oldtonames(context);
context.data.byte(kGetback) = 2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void discops(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 249);
if (context.flags.z()) goto alreadydiscops;
context.data.byte(kCommandtype) = 249;
@@ -15777,7 +16293,7 @@ alreadydiscops:
context._and(context.ax, 1);
if (!context.flags.z()) goto dodiscops;
nodiscops:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dodiscops:
scanfornames(context);
context.data.byte(kLoadingorsave) = 2;
@@ -15797,14 +16313,15 @@ discopsloop:
checkcoords(context);
context._cmp(context.data.byte(kGetback), 0);
if (context.flags.z()) goto discopsloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void savegame(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kMandead), 2);
if (!context.flags.z()) goto cansaveok;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cansaveok:
context._cmp(context.data.byte(kCommandtype), 247);
if (context.flags.z()) goto alreadysave;
@@ -15815,7 +16332,7 @@ alreadysave:
context.ax = context.data.word(kMousebutton);
context._and(context.ax, 1);
if (!context.flags.z()) goto dosave;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
dosave:
context.data.byte(kLoadingorsave) = 2;
showopbox(context);
@@ -15840,10 +16357,11 @@ saveops:
checkcoords(context);
context._cmp(context.data.byte(kGetback), 0);
if (context.flags.z()) goto saveops;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void actualsave(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 222);
if (context.flags.z()) goto alreadyactsave;
context.data.byte(kCommandtype) = 222;
@@ -15900,10 +16418,11 @@ alreadyactsave:
worktoscreenm(context);
context.data.byte(kGetback) = 4;
noactsave:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void actualload(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 221);
if (context.flags.z()) goto alreadyactload;
context.data.byte(kCommandtype) = 221;
@@ -15929,19 +16448,21 @@ alreadyactload:
loadposition(context);
context.data.byte(kGetback) = 1;
notactload:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void selectslot2(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kMousebutton), 0);
if (context.flags.z()) goto noselslot2;
context.data.byte(kLoadingorsave) = 2;
noselslot2:
selectslot(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkinput(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLoadingorsave), 3);
if (context.flags.z()) goto nokeypress;
readkey(context);
@@ -15974,17 +16495,18 @@ spacepress:
context.es.byte(context.bx+3) = 1;
goto afterkey;
nokeypress:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
afterkey:
showopbox(context);
shownames(context);
showslots(context);
showsaveops(context);
worktoscreenm(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getnamepos(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kCurrentslot);
context.ah = 0;
context.cx = 17;
@@ -15996,10 +16518,11 @@ void getnamepos(Context & context) {
context.al = context.data.byte(kCursorpos);
context.ah = 0;
context._add(context.bx, context.ax);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showopbox(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics);
context.di = (60);
context.bx = (52);
@@ -16012,10 +16535,11 @@ void showopbox(Context & context) {
context.al = 4;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showloadops(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics);
context.di = (60)+128+4;
context.bx = (52)+12;
@@ -16033,10 +16557,11 @@ void showloadops(Context & context) {
context.al = 55;
context.dl = 101;
printmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showsaveops(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempgraphics);
context.di = (60)+128+4;
context.bx = (52)+12;
@@ -16054,10 +16579,11 @@ void showsaveops(Context & context) {
context.al = 54;
context.dl = 101;
printmessage(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void selectslot(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 244);
if (context.flags.z()) goto alreadysel;
context.data.byte(kCommandtype) = 244;
@@ -16093,19 +16619,20 @@ getslotnum:
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isloadmode:
showloadops(context);
readmouse(context);
showpointer(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
noselslot:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showslots(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (60)+7;
context.bx = (52)+8;
context.al = 2;
@@ -16133,10 +16660,11 @@ nomatchslot:
context._inc(context.cl);
context._cmp(context.cl, 7);
if (!context.flags.z()) goto slotloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void shownames(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = context.data;
context.es = context.dx;
context.si = 8350+1;
@@ -16199,30 +16727,33 @@ afterprintname:
context._inc(context.cl);
context._cmp(context.cl, 7);
if (!context.flags.z()) goto shownameloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void namestoold(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.cs;
context.si = 8350;
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
context.es = context.data.word(kBuffers);
context.cx = 17*4;
while(context.cx--) context._movsb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void oldtonames(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.cs;
context.di = 8350;
context.si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
context.ds = context.data.word(kBuffers);
context.cx = 17*4;
while(context.cx--) context._movsb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void saveposition(Context & context) {
+ uint stack_depth = context.stack.size();
makeheader(context);
context.al = context.data.byte(kCurrentslot);
context.ah = 0;
@@ -16270,10 +16801,11 @@ void saveposition(Context & context) {
saveseg(context);
fquit:
closefile(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadposition(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kTimecount) = 0;
clearchanges(context);
context.al = context.data.byte(kCurrentslot);
@@ -16318,10 +16850,11 @@ void loadposition(Context & context) {
context.dx = 534;
loadseg(context);
closefile(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void makeheader(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = context.data;
context.es = context.dx;
context.di = 5912;
@@ -16337,19 +16870,21 @@ void makeheader(Context & context) {
storeit(context);
context.ax = (991-534);
storeit(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void storeit(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.ax, 0);
if (!context.flags.z()) goto isntblank;
context._inc(context.ax);
isntblank:
context._stosw();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findlen(Context & context) {
+ uint stack_depth = context.stack.size();
context._dec(context.bx);
context._add(context.bx, context.ax);
nextone:
@@ -16360,10 +16895,11 @@ nextone:
context._cmp(context.ax, 0);
if (!context.flags.z()) goto nextone;
foundlen:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void scanfornames(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = context.data;
context.es = context.dx;
context.di = 8350;
@@ -16408,10 +16944,11 @@ notexist:
context._dec(context.cl);
if (!context.flags.z()) goto scanloop;
context.al = context.ch;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void decide(Context & context) {
+ uint stack_depth = context.stack.size();
setmode(context);
loadpalfromiff(context);
clearpalette(context);
@@ -16445,10 +16982,11 @@ hasloadedroom:
context.data.word(kTextaddressx) = 13;
context.data.word(kTextaddressy) = 182;
context.data.byte(kTextlen) = 240;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showdecisions(Context & context) {
+ uint stack_depth = context.stack.size();
createpanel2(context);
showopbox(context);
context.ds = context.data.word(kTempgraphics);
@@ -16458,10 +16996,11 @@ void showdecisions(Context & context) {
context.ah = 0;
showframe(context);
undertextline(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void newgame(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 251);
if (context.flags.z()) goto alreadynewgame;
context.data.byte(kCommandtype) = 251;
@@ -16473,10 +17012,11 @@ alreadynewgame:
if (!context.flags.z()) goto nonewgame;
context.data.byte(kGetback) = 3;
nonewgame:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void doload(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kLoadingorsave) = 1;
showopbox(context);
showloadops(context);
@@ -16518,10 +17058,11 @@ loadops:
worktoscreen(context);
context.data.byte(kGetback) = 4;
quitloaded:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadold(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 252);
if (context.flags.z()) goto alreadyloadold;
context.data.byte(kCommandtype) = 252;
@@ -16538,10 +17079,11 @@ alreadyloadold:
worktoscreenm(context);
context.data.byte(kGetback) = 0;
noloadold:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void createname(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.di = 4932;
context.cs.byte(context.di+0) = context.dl;
@@ -16579,10 +17121,11 @@ tensc:
context.cs.byte(context.di+6) = context.cl;
context._add(context.al, '0');
context.cs.byte(context.di+7) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void trysoundalloc(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNeedsoundbuff), 1);
if (context.flags.z()) goto gotsoundbuff;
context._inc(context.data.byte(kSoundtimes));
@@ -16606,15 +17149,16 @@ void trysoundalloc(Context & context) {
context.ax = 0x7f7f;
while(context.cx--) context._stosw();
context.data.byte(kNeedsoundbuff) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
soundfail:
context.es = context.data.word(kSoundbuffer);
deallocatemem(context);
gotsoundbuff:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void playchannel0(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSoundint), 255);
if (context.flags.z()) goto dontbother4;
context.push(context.es);
@@ -16659,10 +17203,11 @@ nosetloop:
context.ds = context.pop();
context.es = context.pop();
dontbother4:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void playchannel1(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kSoundint), 255);
if (context.flags.z()) goto dontbother5;
context._cmp(context.data.byte(kCh1playing), 7);
@@ -16699,10 +17244,11 @@ notsecondbank1:
context.ds = context.pop();
context.es = context.pop();
dontbother5:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void makenextblock(Context & context) {
+ uint stack_depth = context.stack.size();
volumeadjust(context);
loopchannel0(context);
context._cmp(context.data.word(kCh1blockstocopy), 0);
@@ -16712,7 +17258,7 @@ void makenextblock(Context & context) {
context._dec(context.data.word(kCh0blockstocopy));
context._dec(context.data.word(kCh1blockstocopy));
bothchannels(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
mightbeonlych1:
context.data.byte(kCh0playing) = 255;
context._cmp(context.data.word(kCh1blockstocopy), 0);
@@ -16720,14 +17266,14 @@ mightbeonlych1:
context._dec(context.data.word(kCh1blockstocopy));
channel1only(context);
notch1only:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
mightbeonlych0:
context.data.byte(kCh1playing) = 255;
context._cmp(context.data.word(kCh0blockstocopy), 0);
if (context.flags.z()) goto notch0only;
context._dec(context.data.word(kCh0blockstocopy));
channel0only(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notch0only:
context.es = context.data.word(kSoundbuffer);
context.di = context.data.word(kSoundbufferwrite);
@@ -16736,10 +17282,11 @@ notch0only:
while(context.cx--) context._stosw();
context._and(context.di, 16384-1);
context.data.word(kSoundbufferwrite) = context.di;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void volumeadjust(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kVolumedirection);
context._cmp(context.al, 0);
if (context.flags.z()) goto volok;
@@ -16751,14 +17298,15 @@ void volumeadjust(Context & context) {
context.al = context.data.byte(kVolume);
context._add(context.al, context.data.byte(kVolumedirection));
context.data.byte(kVolume) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
volfinish:
context.data.byte(kVolumedirection) = 0;
volok:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loopchannel0(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kCh0blockstocopy), 0);
if (!context.flags.z()) goto notloop;
context._cmp(context.data.byte(kCh0repeat), 0);
@@ -16774,30 +17322,33 @@ endlessloop:
context.ax = context.data.word(kCh0blockstocopy);
context._add(context.ax, context.data.word(kCh0oldblockstocopy));
context.data.word(kCh0blockstocopy) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notloop:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void cancelch0(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCh0repeat) = 0;
context.data.word(kCh0blockstocopy) = 0;
context.data.byte(kCh0playing) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void cancelch1(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kCh1blockstocopy) = 0;
context.data.byte(kCh1playing) = 255;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void channel0tran(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kVolume), 0);
if (!context.flags.z()) goto lowvolumetran;
context.cx = 1024;
while(context.cx--) context._movsw();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
lowvolumetran:
context.cx = 1024;
context.bh = context.data.byte(kVolume);
@@ -16811,10 +17362,11 @@ volloop:
context.ah = context.es.byte(context.bx);
context._stosw();
if (--context.cx) goto volloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void domix(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kVolume), 0);
if (!context.flags.z()) goto lowvolumemix;
slow:
@@ -16903,10 +17455,11 @@ nodistortv:
context._stosb();
if (--context.cx) goto lowvolumemix;
doneit:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void entrytexts(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLocation), 21);
if (!context.flags.z()) goto notloc15;
context.al = 28;
@@ -16915,7 +17468,7 @@ void entrytexts(Context & context) {
context.bl = 68;
context.bh = 64;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notloc15:
context._cmp(context.data.byte(kLocation), 30);
if (!context.flags.z()) goto notloc43;
@@ -16925,7 +17478,7 @@ notloc15:
context.bl = 68;
context.bh = 64;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notloc43:
context._cmp(context.data.byte(kLocation), 23);
if (!context.flags.z()) goto notloc23;
@@ -16935,7 +17488,7 @@ notloc43:
context.bl = 68;
context.bh = 64;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notloc23:
context._cmp(context.data.byte(kLocation), 31);
if (!context.flags.z()) goto notloc44;
@@ -16945,7 +17498,7 @@ notloc23:
context.bl = 68;
context.bh = 64;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notloc44:
context._cmp(context.data.byte(kLocation), 20);
if (!context.flags.z()) goto notsarters2;
@@ -16955,7 +17508,7 @@ notloc44:
context.bl = 68;
context.bh = 64;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notsarters2:
context._cmp(context.data.byte(kLocation), 24);
if (!context.flags.z()) goto notedenlob;
@@ -16965,7 +17518,7 @@ notsarters2:
context.bl = 68;
context.bh = 64;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notedenlob:
context._cmp(context.data.byte(kLocation), 34);
if (!context.flags.z()) goto noteden2;
@@ -16975,12 +17528,13 @@ notedenlob:
context.bl = 68;
context.bh = 64;
setuptimeduse(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
noteden2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void entryanims(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.word(kReeltowatch) = -1;
context.data.byte(kWatchmode) = -1;
context._cmp(context.data.byte(kLocation), 33);
@@ -16991,7 +17545,7 @@ void entryanims(Context & context) {
context.data.word(kEndwatchreel) = 76;
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinthebeach:
context._cmp(context.data.byte(kLocation), 44);
if (!context.flags.z()) goto notsparkys;
@@ -17003,7 +17557,7 @@ notinthebeach:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notsparkys:
context._cmp(context.data.byte(kLocation), 22);
if (!context.flags.z()) goto notinthelift;
@@ -17013,13 +17567,13 @@ notsparkys:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notinthelift:
context._cmp(context.data.byte(kLocation), 26);
if (!context.flags.z()) goto notunderchurch;
context.data.byte(kSymboltopnum) = 2;
context.data.byte(kSymbolbotnum) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notunderchurch:
context._cmp(context.data.byte(kLocation), 45);
if (!context.flags.z()) goto notenterdream;
@@ -17030,7 +17584,7 @@ notunderchurch:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notenterdream:
context._cmp(context.data.byte(kReallocation), 46);
if (!context.flags.z()) goto notcrystal;
@@ -17038,7 +17592,7 @@ notenterdream:
if (!context.flags.z()) goto notcrystal;
context.al = 0;
removefreeobject(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notcrystal:
context._cmp(context.data.byte(kLocation), 9);
if (!context.flags.z()) goto nottopchurch;
@@ -17057,7 +17611,7 @@ makedoorsopen:
removesetobject(context);
context.al = 5;
placesetobject(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nottopchurch:
context._cmp(context.data.byte(kLocation), 47);
if (!context.flags.z()) goto notdreamcentre;
@@ -17065,7 +17619,7 @@ nottopchurch:
placesetobject(context);
context.al = 5;
placesetobject(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notdreamcentre:
context._cmp(context.data.byte(kLocation), 38);
if (!context.flags.z()) goto notcarpark;
@@ -17075,7 +17629,7 @@ notdreamcentre:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notcarpark:
context._cmp(context.data.byte(kLocation), 32);
if (!context.flags.z()) goto notalley;
@@ -17085,7 +17639,7 @@ notcarpark:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notalley:
context._cmp(context.data.byte(kLocation), 24);
if (!context.flags.z()) goto notedensagain;
@@ -17094,13 +17648,14 @@ notalley:
context._dec(context.ah);
turnanypathon(context);
notedensagain:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void initialinv(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 24);
if (context.flags.z()) goto isedens;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isedens:
context.al = 11;
context.ah = 5;
@@ -17133,34 +17688,38 @@ isedens:
context.data.byte(kWatchspeed) = 1;
context.data.byte(kSpeedcount) = 1;
switchryanoff(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void pickupob(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kLastinvpos) = context.ah;
context.data.byte(kObjecttype) = 2;
context.data.byte(kItemframe) = context.al;
context.data.byte(kCommand) = context.al;
getanyad(context);
transfertoex(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkforemm(Context & context) {
- return;
+ uint stack_depth = context.stack.size();
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkbasemem(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = context.data.word(kHowmuchalloc);
context._cmp(context.bx, 0x9360);
if (!context.flags.c()) goto enoughmem;
context.data.byte(kGameerror) = 5;
{ quickquit(context); return; };
enoughmem:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void allocatebuffers(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/16;
allocatemem(context);
context.data.word(kExtras) = context.ax;
@@ -17191,10 +17750,11 @@ void allocatebuffers(Context & context) {
context.bx = 2048/16;
allocatemem(context);
context.data.word(kSounddata2) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearbuffers(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.cx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*24)+(6*64)+991-534+68-0)/2;
context.ax = 0;
@@ -17218,10 +17778,11 @@ void clearbuffers(Context & context) {
context.cx = (68-0);
while(context.cx--) context._movsb();
clearchanges(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearchanges(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.cx = (250)*2;
context.ax = 0x0ffff;
@@ -17259,30 +17820,33 @@ void clearchanges(Context & context) {
context.ax = 0;
context.cx = 6;
while(context.cx--) context._stosw();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearbeforeload(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kRoomloaded), 1);
if (!context.flags.z()) goto noclear;
clearreels(context);
clearrest(context);
context.data.byte(kRoomloaded) = 0;
noclear:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearreels(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kReel1);
deallocatemem(context);
context.es = context.data.word(kReel2);
deallocatemem(context);
context.es = context.data.word(kReel3);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void clearrest(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kMapdata);
context.cx = (66*60)/2;
context.ax = 0;
@@ -17306,10 +17870,11 @@ void clearrest(Context & context) {
deallocatemem(context);
context.es = context.data.word(kFreedesc);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void parseblaster(Context & context) {
+ uint stack_depth = context.stack.size();
lookattail:
context.al = context.es.byte(context.bx);
context._cmp(context.al, 0);
@@ -17338,7 +17903,7 @@ lookattail:
if (context.flags.z()) goto isdma;
context._inc(context.bx);
if (--context.cx) goto lookattail;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
issoundint:
context.al = context.es.byte(context.bx+1);
context._sub(context.al, '0');
@@ -17372,10 +17937,11 @@ isnosound:
context._inc(context.bx);
goto lookattail;
endtail:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void startup(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCurrentkey) = 0;
context.data.byte(kMainmode) = 0;
createpanel(context);
@@ -17388,10 +17954,11 @@ void startup(Context & context) {
undertextline(context);
reelsonscreen(context);
atmospheres(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void startup1(Context & context) {
+ uint stack_depth = context.stack.size();
clearpalette(context);
context.data.byte(kThroughdoor) = 0;
context.data.byte(kCurrentkey) = '0';
@@ -17408,10 +17975,11 @@ void startup1(Context & context) {
atmospheres(context);
worktoscreen(context);
fadescreenup(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void screenupdate(Context & context) {
+ uint stack_depth = context.stack.size();
newplace(context);
mainscreen(context);
animpointer(context);
@@ -17456,10 +18024,11 @@ iswatchingmode:
dumpwatch(context);
delpointer(context);
finishearly:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void watchreel(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kReeltowatch), -1);
if (context.flags.z()) goto notplayingreel;
context.al = context.data.byte(kManspath);
@@ -17469,7 +18038,7 @@ void watchreel(Context & context) {
context._cmp(context.al, context.data.byte(kFacing));
if (context.flags.z()) goto notwatchpath;
waitstopwalk:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwatchpath:
context._dec(context.data.byte(kSpeedcount));
context._cmp(context.data.byte(kSpeedcount), -1);
@@ -17497,14 +18066,14 @@ showwatchreel:
context.data.word(kReeltowatch) = context.ax;
checkforshake(context);
nomorereel:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notplayingreel:
context._cmp(context.data.byte(kWatchmode), 1);
if (!context.flags.z()) goto notholdingreel;
context.ax = context.data.word(kReeltohold);
context.data.word(kReelpointer) = context.ax;
plotreel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notholdingreel:
context._cmp(context.data.byte(kWatchmode), 2);
if (!context.flags.z()) goto notreleasehold;
@@ -17524,27 +18093,29 @@ notlastspeed2:
context.data.byte(kDestination) = context.al;
context.data.byte(kFinaldest) = context.al;
autosetwalk(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
ismorereel2:
context.ax = context.data.word(kReeltohold);
context.data.word(kReelpointer) = context.ax;
plotreel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notreleasehold:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkforshake(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 26);
if (!context.flags.z()) goto notstartshake;
context._cmp(context.ax, 104);
if (!context.flags.z()) goto notstartshake;
context.data.byte(kShakecounter) = -1;
notstartshake:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void watchcount(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWatchon), 0);
if (context.flags.z()) goto nowatchworn;
context._inc(context.data.byte(kTimercount));
@@ -17553,7 +18124,7 @@ void watchcount(Context & context) {
context._cmp(context.data.byte(kTimercount), 18);
if (context.flags.z()) goto uptime;
nowatchworn:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
flashdots:
context.ax = 91*3+21;
context.di = 268+4;
@@ -17579,10 +18150,11 @@ finishtime:
showtime(context);
finishwatch:
context.data.byte(kWatchdump) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showtime(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWatchon), 0);
if (context.flags.z()) goto nowatch;
context.al = context.data.byte(kSecondcount);
@@ -17645,10 +18217,11 @@ void showtime(Context & context) {
context.bx = 21;
showframe(context);
nowatch:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpwatch(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWatchdump), 1);
if (!context.flags.z()) goto nodumpwatch;
context.di = 256;
@@ -17658,10 +18231,11 @@ void dumpwatch(Context & context) {
multidump(context);
context.data.byte(kWatchdump) = 0;
nodumpwatch:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showbyte(Context & context) {
+ uint stack_depth = context.stack.size();
context.dl = context.al;
context._shr(context.dl, 1);
context._shr(context.dl, 1);
@@ -17674,21 +18248,23 @@ void showbyte(Context & context) {
onedigit(context);
context.es.byte(context.di+1) = context.dl;
context._add(context.di, 3);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void onedigit(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.dl, 10);
if (!context.flags.c()) goto morethan10;
context._add(context.dl, '0');
- return;
+ {assert(stack_depth == context.stack.size()); return; }
morethan10:
context._sub(context.dl, 10);
context._add(context.dl, 'A');
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void twodigitnum(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = context.cl;
context._dec(context.ah);
numloop1:
@@ -17697,10 +18273,11 @@ numloop1:
if (!context.flags.c()) goto numloop1;
context._add(context.al, 10);
context._add(context.al, context.cl);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showword(Context & context) {
+ uint stack_depth = context.stack.size();
context.ch = 0;
context.bx = 10000;
context.cl = 47;
@@ -17742,10 +18319,11 @@ word4:
context.cl = context.al;
convnum(context);
context.cs.byte(context.di+4) = context.cl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void convnum(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.ch, 0);
if (!context.flags.z()) goto noconvnum;
context._cmp(context.cl, '0');
@@ -17755,10 +18333,11 @@ void convnum(Context & context) {
notzeronum:
context.ch = 1;
noconvnum:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void walkandexamine(Context & context) {
+ uint stack_depth = context.stack.size();
finishedwalking(context);
if (!context.flags.z()) goto noobselect;
context.al = context.data.byte(kWalkexamtype);
@@ -17769,12 +18348,12 @@ void walkandexamine(Context & context) {
context._cmp(context.data.byte(kCommandtype), 5);
if (context.flags.z()) goto noobselect;
examineob(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wantstowalk:
setwalk(context);
context.data.byte(kReasseschanges) = 1;
noobselect:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
diff:
context.data.byte(kCommand) = context.al;
context.data.byte(kCommandtype) = context.ah;
@@ -17814,22 +18393,23 @@ notblock:
context._cmp(context.data.byte(kCommandtype), 5);
if (context.flags.z()) goto isaperson;
examineobtext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
middleofwalk:
blocknametext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isblock:
blocknametext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isaperson:
personnametext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
toofaraway:
walktotext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void mainscreen(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kInmaparea) = 0;
context.bx = 4949;
context._cmp(context.data.byte(kWatchon), 1);
@@ -17841,10 +18421,11 @@ checkmain:
if (context.flags.z()) goto finishmain;
walkandexamine(context);
finishmain:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void madmanrun(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLocation), 14);
if (!context.flags.z()) { identifyob(context); return; };
context._cmp(context.data.byte(kMapx), 22);
@@ -17866,13 +18447,14 @@ alreadyrun:
if (context.flags.z()) goto norun;
context.data.byte(kLastweapon) = 8;
norun:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkcoords(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNewlocation), 255);
if (context.flags.z()) goto loop048;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
loop048:
context.ax = context.cs.word(context.bx);
context._cmp(context.ax, 0x0ffff);
@@ -17893,16 +18475,17 @@ loop048:
__dispatch_call(context, context.ax);
finished:
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
over045:
context.bx = context.pop();
context._add(context.bx, 10);
goto loop048;
nonefound:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void identifyob(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.word(kWatchingtime), 0);
if (!context.flags.z()) { blank(context); return; };
context.ax = context.data.word(kMousex);
@@ -17910,14 +18493,14 @@ void identifyob(Context & context) {
context._cmp(context.ax, 22*8);
if (context.flags.c()) goto notover1;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notover1:
context.bx = context.data.word(kMousey);
context._sub(context.bx, context.data.word(kMapady));
context._cmp(context.bx, 20*8);
if (context.flags.c()) goto notover2;
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notover2:
context.data.byte(kInmaparea) = 1;
context.ah = context.bl;
@@ -17951,13 +18534,14 @@ notover2:
context.ah = 3;
obname(context);
finishidentify:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nothingund:
blank(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkifperson(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
context.cx = 12;
@@ -18004,16 +18588,17 @@ notblankpers:
obname(context);
context.al = 0;
context._cmp(context.al, 1);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notareelid:
context.cx = context.pop();
context._add(context.bx, 5);
context._dec(context.cx);
if (!context.flags.z()) goto identifyreel;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkifset(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32))+(127*5);
context.cx = 127;
@@ -18037,16 +18622,17 @@ identifyset:
obname(context);
context.al = 0;
context._cmp(context.al, 1);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notasetid:
context._sub(context.bx, 5);
context._dec(context.cx);
context._cmp(context.cx, -1);
if (!context.flags.z()) goto identifyset;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkifex(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5))+(99*5);
context.cx = 99;
@@ -18066,16 +18652,17 @@ identifyex:
obname(context);
context.al = 1;
context._cmp(context.al, 0);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notanexid:
context._sub(context.bx, 5);
context._dec(context.cx);
context._cmp(context.cx, -1);
if (!context.flags.z()) goto identifyex;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkiffree(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBuffers);
context.bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5))+(79*5);
context.cx = 79;
@@ -18095,16 +18682,17 @@ identifyfree:
obname(context);
context.al = 0;
context._cmp(context.al, 1);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notafreeid:
context._sub(context.bx, 5);
context._dec(context.cx);
context._cmp(context.cx, -1);
if (!context.flags.z()) goto identifyfree;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void isitdescribed(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.cx);
context.push(context.es);
@@ -18124,10 +18712,11 @@ void isitdescribed(Context & context) {
context.cx = context.pop();
context.ax = context.pop();
context._cmp(context.dl, 0);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findpathofpoint(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.bx = (0);
context.es = context.data.word(kReels);
@@ -18162,10 +18751,11 @@ flunkedit:
if (!context.flags.z()) goto pathloop;
context.dl = 255;
gotvalidpath:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findfirstpath(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.bx = (0);
context.es = context.data.word(kReels);
@@ -18196,13 +18786,14 @@ nofirst:
context._cmp(context.dl, 12);
if (!context.flags.z()) goto fpathloop;
context.al = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
gotfirst:
context.al = context.es.byte(context.bx+6);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void turnpathon(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.ax);
context.cl = 255;
@@ -18222,10 +18813,11 @@ void turnpathon(Context & context) {
context.al = 255;
context.es.byte(context.bx+6) = context.al;
nopathon:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void turnpathoff(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.ax);
context.cl = 0;
@@ -18245,10 +18837,11 @@ void turnpathoff(Context & context) {
context.al = 0;
context.es.byte(context.bx+6) = context.al;
nopathoff:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void turnanypathon(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.ax);
context.cl = 255;
@@ -18271,10 +18864,11 @@ void turnanypathon(Context & context) {
context._add(context.bx, context.ax);
context.al = 255;
context.es.byte(context.bx+6) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void turnanypathoff(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.ax);
context.cl = 0;
@@ -18297,10 +18891,11 @@ void turnanypathoff(Context & context) {
context._add(context.bx, context.ax);
context.al = 0;
context.es.byte(context.bx+6) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkifpathison(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
getroomspaths(context);
context.ax = context.pop();
@@ -18311,10 +18906,11 @@ void checkifpathison(Context & context) {
context._add(context.bx, context.ax);
context.al = context.es.byte(context.bx+6);
context._cmp(context.al, 255);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void afternewroom(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNowinnewroom), 0);
if (context.flags.z()) goto notnew;
context.data.word(kTimecount) = 0;
@@ -18349,10 +18945,11 @@ ryansoff:
reminders(context);
atmospheres(context);
notnew:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void atmospheres(Context & context) {
+ uint stack_depth = context.stack.size();
context.cl = context.data.byte(kMapx);
context.ch = context.data.byte(kMapy);
context.bx = 5073;
@@ -18394,19 +18991,20 @@ playingalready:
fullvol:
context.data.byte(kVolume) = 0;
notlouisvol2:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
louisvol:
context.data.byte(kVolume) = 5;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wrongatmos:
context._add(context.bx, 5);
goto nextatmos;
nomoreatmos:
cancelch0(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void walkintoroom(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLocation), 14);
if (!context.flags.z()) goto notlair;
context._cmp(context.data.byte(kMapx), 22);
@@ -18415,10 +19013,11 @@ void walkintoroom(Context & context) {
context.data.byte(kFinaldest) = 1;
autosetwalk(context);
notlair:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void afterintroroom(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNowinnewroom), 0);
if (context.flags.z()) goto notnewintro;
clearwork(context);
@@ -18431,10 +19030,11 @@ void afterintroroom(Context & context) {
worktoscreen(context);
context.data.byte(kNowinnewroom) = 0;
notnewintro:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void obname(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReasseschanges), 0);
if (context.flags.z()) goto notnewpath;
context.data.byte(kReasseschanges) = 0;
@@ -18467,12 +19067,12 @@ isntblock:
context._cmp(context.data.word(kWatchingtime), 0);
if (!context.flags.z()) goto noobselect;
examineob(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wantstotalk:
context._cmp(context.data.word(kWatchingtime), 0);
if (!context.flags.z()) goto noobselect;
talk(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
walkandexamine:
finishedwalking(context);
if (!context.flags.z()) goto noobselect;
@@ -18484,12 +19084,12 @@ walkandexamine:
context._cmp(context.data.byte(kCommandtype), 5);
if (context.flags.z()) goto noobselect;
examineob(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
wantstowalk:
setwalk(context);
context.data.byte(kReasseschanges) = 1;
noobselect:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
diff:
context.data.byte(kCommand) = context.al;
context.data.byte(kCommandtype) = context.ah;
@@ -18529,39 +19129,42 @@ notblock:
context._cmp(context.data.byte(kCommandtype), 5);
if (context.flags.z()) goto isaperson;
examineobtext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
middleofwalk:
blocknametext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isblock:
blocknametext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isaperson:
personnametext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
toofaraway:
walktotext(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void finishedwalking(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLinepointer), 254);
if (!context.flags.z()) goto iswalking;
context.al = context.data.byte(kFacing);
context._cmp(context.al, context.data.byte(kTurntoface));
iswalking:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void examineobtext(Context & context) {
+ uint stack_depth = context.stack.size();
context.bl = context.data.byte(kCommand);
context.bh = context.data.byte(kCommandtype);
context.al = 1;
commandwithob(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void commandwithob(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.ax);
context.push(context.bx);
@@ -18611,10 +19214,11 @@ noadd:
context.ah = 0;
printdirect(context);
context.data.byte(kNewtextline) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void commandonly(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.push(context.bx);
context.push(context.cx);
@@ -18646,10 +19250,11 @@ void commandonly(Context & context) {
context.ah = 0;
printdirect(context);
context.data.byte(kNewtextline) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printmessage(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.dx);
context.push(context.bx);
context.push(context.di);
@@ -18666,10 +19271,11 @@ void printmessage(Context & context) {
context.al = 0;
context.ah = 0;
printdirect(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void printmessage2(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.dx);
context.push(context.bx);
context.push(context.di);
@@ -18694,35 +19300,39 @@ searchmess:
context.al = 0;
context.ah = 0;
printdirect(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void blocknametext(Context & context) {
+ uint stack_depth = context.stack.size();
context.bl = context.data.byte(kCommand);
context.bh = context.data.byte(kCommandtype);
context.al = 0;
commandwithob(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void personnametext(Context & context) {
+ uint stack_depth = context.stack.size();
context.bl = context.data.byte(kCommand);
context._and(context.bl, 127);
context.bh = context.data.byte(kCommandtype);
context.al = 2;
commandwithob(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void walktotext(Context & context) {
+ uint stack_depth = context.stack.size();
context.bl = context.data.byte(kCommand);
context.bh = context.data.byte(kCommandtype);
context.al = 3;
commandwithob(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getflagunderp(Context & context) {
+ uint stack_depth = context.stack.size();
context.cx = context.data.word(kMousex);
context._sub(context.cx, context.data.word(kMapadx));
context.ax = context.data.word(kMousey);
@@ -18731,10 +19341,11 @@ void getflagunderp(Context & context) {
checkone(context);
context.data.byte(kLastflag) = context.cl;
context.data.byte(kLastflagex) = context.ch;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void setwalk(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kLinepointer), 254);
if (!context.flags.z()) goto alreadywalking;
context.al = context.data.byte(kPointerspath);
@@ -18758,25 +19369,26 @@ void setwalk(Context & context) {
notwalkandexam:
autosetwalk(context);
cantwalk:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
cantwalk2:
facerightway(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
alreadywalking:
context.al = context.data.byte(kPointerspath);
context.data.byte(kFinaldest) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
holdingreel:
context.data.byte(kDestafterhold) = context.al;
context.data.byte(kWatchmode) = 2;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void autosetwalk(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kManspath);
context._cmp(context.data.byte(kFinaldest), context.al);
if (!context.flags.z()) goto notsamealready;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notsamealready:
getroomspaths(context);
checkdest(context);
@@ -18817,13 +19429,14 @@ notsamealready:
context._dec(context.al);
context.data.byte(kLinepointer) = context.al;
context.data.byte(kLinedirection) = 1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
normalline:
context.data.byte(kLinepointer) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void checkdest(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.bx);
context._add(context.bx, 12*8);
context.ah = context.data.byte(kManspath);
@@ -18843,7 +19456,7 @@ checkdestloop:
context._and(context.al, 15);
context.data.byte(kDestination) = context.al;
context.bx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nextcheck:
context.dl = context.es.byte(context.bx);
context._and(context.dl, 0xf0);
@@ -18867,10 +19480,11 @@ nextcheck2:
if (!context.flags.z()) goto checkdestloop;
context.data.byte(kDestination) = context.ch;
context.bx = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void bresenhams(Context & context) {
+ uint stack_depth = context.stack.size();
workoutframes(context);
context.dx = context.data;
context.es = context.dx;
@@ -18980,10 +19594,11 @@ lineexit:
context.ax = context.di;
context._shr(context.ax, 1);
context.data.byte(kLinelength) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void workoutframes(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = context.data.word(kLinestartx);
context._add(context.bx, 32);
context.ax = context.data.word(kLineendx);
@@ -19058,10 +19673,11 @@ success:
context._and(context.dl, 7);
context.data.byte(kTurntoface) = context.dl;
context.data.byte(kTurndirection) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getroomspaths(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kRoomnum);
context.ah = 0;
context.cx = 144;
@@ -19069,10 +19685,11 @@ void getroomspaths(Context & context) {
context.es = context.data.word(kReels);
context.bx = (0);
context._add(context.bx, context.ax);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void copyname(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.di);
findobname(context);
context.di = context.pop();
@@ -19091,13 +19708,14 @@ finishmakename:
context._inc(context.cx);
context.al = 0;
context._stosb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
context.al = 255;
while(context.cx--) context._stosb();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findobname(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ax);
context.ah = 0;
context._add(context.ax, context.ax);
@@ -19118,7 +19736,7 @@ void findobname(Context & context) {
context._add(context.ax, context.cx);
context.si = context.ax;
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notpersonname:
context._cmp(context.ah, 4);
if (!context.flags.z()) goto notextraname;
@@ -19127,7 +19745,7 @@ notpersonname:
context.ax = context.ds.word(context.bx);
context._add(context.ax, (0+2080+30000+(16*114)+((114+2)*2)));
context.si = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notextraname:
context._cmp(context.ah, 2);
if (!context.flags.z()) goto notfreename;
@@ -19136,7 +19754,7 @@ notextraname:
context.ax = context.ds.word(context.bx);
context._add(context.ax, (0+(82*2)));
context.si = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notfreename:
context._cmp(context.ah, 1);
if (!context.flags.z()) goto notsetname;
@@ -19145,17 +19763,18 @@ notfreename:
context.ax = context.ds.word(context.bx);
context._add(context.ax, (0+(130*2)));
context.si = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notsetname:
context.ds = context.data.word(kBlockdesc);
context._add(context.bx, (0));
context.ax = context.ds.word(context.bx);
context._add(context.ax, (0+(98*2)));
context.si = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showicon(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kReallocation), 50);
if (!context.flags.c()) goto isdream1;
showpanel(context);
@@ -19163,7 +19782,7 @@ void showicon(Context & context) {
roomname(context);
panelicons1(context);
zoomicon(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
isdream1:
context.ds = context.data.word(kTempsprites);
context.di = 72;
@@ -19202,10 +19821,11 @@ isdream1:
context.ah = 4;
showframe(context);
middlepanel(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void middlepanel(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kTempsprites);
context.di = 72+47+20;
context.bx = 0;
@@ -19230,10 +19850,11 @@ void middlepanel(Context & context) {
context.al = 47;
context.ah = 4;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showman(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kIcons1);
context.di = 0;
context.bx = 0;
@@ -19255,10 +19876,11 @@ void showman(Context & context) {
context.ah = 0;
showframe(context);
notverycool:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showpanel(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kIcons1);
context.di = 72;
context.bx = 0;
@@ -19271,10 +19893,11 @@ void showpanel(Context & context) {
context.al = 19;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void roomname(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 88;
context.bx = 18;
context.al = 53;
@@ -19305,32 +19928,36 @@ gotpl:
printdirect(context);
context.data.word(kLinespacing) = 10;
usecharset1(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usecharset1(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kCharset1);
context.data.word(kCurrentset) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void usetempcharset(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kTempcharset);
context.data.word(kCurrentset) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showexit(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.data.word(kIcons1);
context.di = 274;
context.bx = 154;
context.al = 11;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void panelicons1(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = 0;
context._cmp(context.data.byte(kWatchon), 1);
if (context.flags.z()) goto watchison;
@@ -19356,10 +19983,11 @@ watchison:
zoomisoff:
context.di = context.pop();
showwatch(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showwatch(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kWatchon), 0);
if (context.flags.z()) goto nowristwatch;
context.ds = context.data.word(kIcons1);
@@ -19370,10 +19998,11 @@ void showwatch(Context & context) {
showframe(context);
showtime(context);
nowristwatch:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void zoomicon(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kZoomon), 0);
if (context.flags.z()) goto nozoom1;
context.ds = context.data.word(kIcons1);
@@ -19383,10 +20012,11 @@ void zoomicon(Context & context) {
context.ah = 0;
showframe(context);
nozoom1:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showblink(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kManisoffscreen), 1);
if (context.flags.z()) goto finblink1;
context._inc(context.data.byte(kBlinkcount));
@@ -19415,12 +20045,13 @@ nomorethan6:
context.ah = 0;
showframe(context);
finblink1:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
eyesshut:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpblink(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kShadeson), 0);
if (!context.flags.z()) goto nodumpeye;
context._cmp(context.data.byte(kBlinkcount), 0);
@@ -19436,37 +20067,41 @@ void dumpblink(Context & context) {
multidump(context);
context.ds = context.pop();
nodumpeye:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void worktoscreenm(Context & context) {
+ uint stack_depth = context.stack.size();
animpointer(context);
readmouse(context);
showpointer(context);
vsync(context);
worktoscreen(context);
delpointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void blank(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 199);
if (context.flags.z()) goto alreadyblnk;
context.data.byte(kCommandtype) = 199;
context.al = 0;
commandonly(context);
alreadyblnk:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void allpointer(Context & context) {
+ uint stack_depth = context.stack.size();
readmouse(context);
showpointer(context);
dumppointer(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hangonp(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.cx);
context._add(context.cx, context.cx);
context.ax = context.pop();
@@ -19507,10 +20142,11 @@ getoutofit:
context.data.byte(kPointerframe) = context.al;
context.data.byte(kPickup) = context.ah;
context.data.byte(kPointermode) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hangonw(Context & context) {
+ uint stack_depth = context.stack.size();
hangloopw:
context.push(context.cx);
delpointer(context);
@@ -19521,10 +20157,11 @@ hangloopw:
dumppointer(context);
context.cx = context.pop();
if (--context.cx) goto hangloopw;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hangoncurs(Context & context) {
+ uint stack_depth = context.stack.size();
monloop1:
context.push(context.cx);
printcurs(context);
@@ -19532,10 +20169,11 @@ monloop1:
delcurs(context);
context.cx = context.pop();
if (--context.cx) goto monloop1;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getunderzoom(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (8)+5;
context.bx = (132)+4;
context.ds = context.data.word(kBuffers);
@@ -19543,10 +20181,11 @@ void getunderzoom(Context & context) {
context.cl = 46;
context.ch = 40;
multiget(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumpzoom(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kZoomon), 1);
if (!context.flags.z()) goto notzoomon;
context.di = (8)+5;
@@ -19555,10 +20194,11 @@ void dumpzoom(Context & context) {
context.ch = 40;
multidump(context);
notzoomon:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void putunderzoom(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = (8)+5;
context.bx = (132)+4;
context.ds = context.data.word(kBuffers);
@@ -19566,10 +20206,11 @@ void putunderzoom(Context & context) {
context.cl = 46;
context.ch = 40;
multiput(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void crosshair(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kCommandtype), 3);
if (context.flags.z()) goto nocross;
context._cmp(context.data.byte(kCommandtype), 10);
@@ -19581,7 +20222,7 @@ void crosshair(Context & context) {
context.al = 9;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nocross:
context.es = context.data.word(kWorkspace);
context.ds = context.data.word(kIcons1);
@@ -19590,10 +20231,11 @@ nocross:
context.al = 29;
context.ah = 0;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void showpointer(Context & context) {
+ uint stack_depth = context.stack.size();
showblink(context);
context.di = context.data.word(kMousex);
context.data.word(kOldpointerx) = context.di;
@@ -19637,7 +20279,7 @@ notsmally:
showframe(context);
context.bx = context.pop();
context.di = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
itsanobject:
context.al = context.data.byte(kItemframe);
context.ds = context.data.word(kExtras);
@@ -19698,10 +20340,11 @@ notsmally2:
context.al = 3;
context.ah = 128;
showframe(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void delpointer(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kOldpointerx);
context._cmp(context.ax, 0x0ffff);
if (context.flags.z()) goto nevershown;
@@ -19718,10 +20361,11 @@ void delpointer(Context & context) {
context.bx = context.data.word(kDelherey);
multiput(context);
nevershown:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumppointer(Context & context) {
+ uint stack_depth = context.stack.size();
dumpblink(context);
context.cl = context.data.byte(kDelxs);
context.ch = context.data.byte(kDelys);
@@ -19739,10 +20383,11 @@ difffound:
context.ch = context.data.byte(kPointerys);
multidump(context);
notboth:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void undertextline(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.data.word(kTextaddressx);
context.bx = context.data.word(kTextaddressy);
context.ds = context.data.word(kBuffers);
@@ -19750,10 +20395,11 @@ void undertextline(Context & context) {
context.cl = (180);
context.ch = (10);
multiget(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void deltextline(Context & context) {
+ uint stack_depth = context.stack.size();
context.di = context.data.word(kTextaddressx);
context.bx = context.data.word(kTextaddressy);
context.ds = context.data.word(kBuffers);
@@ -19761,10 +20407,11 @@ void deltextline(Context & context) {
context.cl = (180);
context.ch = (10);
multiput(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dumptextline(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kNewtextline), 1);
if (!context.flags.z()) goto nodumptextline;
context.data.byte(kNewtextline) = 0;
@@ -19774,10 +20421,11 @@ void dumptextline(Context & context) {
context.ch = (10);
multidump(context);
nodumptextline:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void animpointer(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kPointermode), 2);
if (context.flags.z()) goto combathand;
context._cmp(context.data.byte(kPointermode), 3);
@@ -19785,7 +20433,7 @@ void animpointer(Context & context) {
context._cmp(context.data.word(kWatchingtime), 0);
if (context.flags.z()) goto notwatchpoint;
context.data.byte(kPointerframe) = 11;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
notwatchpoint:
context.data.byte(kPointerframe) = 0;
context._cmp(context.data.byte(kInmaparea), 0);
@@ -19812,7 +20460,7 @@ arrow:
if (!context.flags.z()) goto gothand;
context.data.byte(kPointerframe) = 8;
gothand:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
mousehand:
context._cmp(context.data.byte(kPointerspeed), 0);
if (context.flags.z()) goto rightspeed3;
@@ -19831,7 +20479,7 @@ finflashmouse:
context._add(context.bx, context.ax);
context.al = context.cs.byte(context.bx);
context.data.byte(kPointerframe) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
combathand:
context.data.byte(kPointerframe) = 0;
context._cmp(context.data.byte(kReallocation), 14);
@@ -19840,10 +20488,11 @@ combathand:
if (!context.flags.z()) goto notarrow;
context.data.byte(kPointerframe) = 5;
notarrow:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readmouse(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kMousebutton);
context.data.word(kOldbutton) = context.ax;
context.ax = context.data.word(kMousex);
@@ -19854,10 +20503,11 @@ void readmouse(Context & context) {
context.data.word(kMousex) = context.cx;
context.data.word(kMousey) = context.dx;
context.data.word(kMousebutton) = context.bx;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readmouse1(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kMousex);
context.data.word(kOldx) = context.ax;
context.ax = context.data.word(kMousey);
@@ -19866,10 +20516,11 @@ void readmouse1(Context & context) {
context.data.word(kMousex) = context.cx;
context.data.word(kMousey) = context.dx;
context.data.word(kMousebutton1) = context.bx;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readmouse2(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kMousex);
context.data.word(kOldx) = context.ax;
context.ax = context.data.word(kMousey);
@@ -19878,10 +20529,11 @@ void readmouse2(Context & context) {
context.data.word(kMousex) = context.cx;
context.data.word(kMousey) = context.dx;
context.data.word(kMousebutton2) = context.bx;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readmouse3(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kMousex);
context.data.word(kOldx) = context.ax;
context.ax = context.data.word(kMousey);
@@ -19890,10 +20542,11 @@ void readmouse3(Context & context) {
context.data.word(kMousex) = context.cx;
context.data.word(kMousey) = context.dx;
context.data.word(kMousebutton3) = context.bx;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readmouse4(Context & context) {
+ uint stack_depth = context.stack.size();
context.ax = context.data.word(kMousebutton);
context.data.word(kOldbutton) = context.ax;
context.ax = context.data.word(kMousex);
@@ -19908,10 +20561,11 @@ void readmouse4(Context & context) {
context._or(context.ax, context.data.word(kMousebutton3));
context._or(context.bx, context.ax);
context.data.word(kMousebutton) = context.bx;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readkey(Context & context) {
+ uint stack_depth = context.stack.size();
context.bx = context.data.word(kBufferout);
context._cmp(context.bx, context.data.word(kBufferin));
if (context.flags.z()) goto nokey;
@@ -19922,22 +20576,24 @@ void readkey(Context & context) {
context._add(context.di, context.bx);
context.al = context.cs.byte(context.di);
context.data.byte(kCurrentkey) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
nokey:
context.data.byte(kCurrentkey) = 0;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void convertkey(Context & context) {
+ uint stack_depth = context.stack.size();
context._and(context.al, 127);
context.ah = 0;
context.di = 5731;
context._add(context.di, context.ax);
context.al = context.cs.byte(context.di);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void randomnum1(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ds);
context.push(context.es);
context.push(context.di);
@@ -19949,10 +20605,11 @@ void randomnum1(Context & context) {
context.di = context.pop();
context.es = context.pop();
context.ds = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void randomnum2(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.ds);
context.push(context.es);
context.push(context.di);
@@ -19965,53 +20622,60 @@ void randomnum2(Context & context) {
context.di = context.pop();
context.es = context.pop();
context.ds = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void hangon(Context & context) {
+ uint stack_depth = context.stack.size();
hangonloop:
context.push(context.cx);
vsync(context);
context.cx = context.pop();
if (--context.cx) goto hangonloop;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadtraveltext(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 2234;
standardload(context);
context.data.word(kTraveltext) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadintotemp(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.cs;
standardload(context);
context.data.word(kTempgraphics) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadintotemp2(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.cs;
standardload(context);
context.data.word(kTempgraphics2) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadintotemp3(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.cs;
standardload(context);
context.data.word(kTempgraphics3) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadtempcharset(Context & context) {
+ uint stack_depth = context.stack.size();
standardload(context);
context.data.word(kTempcharset) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void standardload(Context & context) {
+ uint stack_depth = context.stack.size();
openfile(context);
readheader(context);
context.bx = context.es.word(context.di);
@@ -20026,16 +20690,18 @@ void standardload(Context & context) {
readfromfile(context);
closefile(context);
context.ax = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadtemptext(Context & context) {
+ uint stack_depth = context.stack.size();
standardload(context);
context.data.word(kTextfile1) = context.ax;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadroom(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kRoomloaded) = 1;
context.data.word(kTimecount) = 0;
context.data.word(kMaintimer) = 0;
@@ -20052,10 +20718,11 @@ void loadroom(Context & context) {
switchryanon(context);
drawflags(context);
getdimension(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void loadroomssample(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kRoomssample);
context._cmp(context.al, 255);
if (context.flags.z()) goto loadedalready;
@@ -20071,10 +20738,11 @@ void loadroomssample(Context & context) {
context.dx = context.di;
loadsecondsample(context);
loadedalready:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridofreels(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kRoomloaded), 0);
if (context.flags.z()) goto dontgetrid;
context.es = context.data.word(kReel1);
@@ -20084,10 +20752,11 @@ void getridofreels(Context & context) {
context.es = context.data.word(kReel3);
deallocatemem(context);
dontgetrid:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridofall(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kBackdrop);
deallocatemem(context);
context.es = context.data.word(kSetframes);
@@ -20112,10 +20781,11 @@ void getridofall(Context & context) {
deallocatemem(context);
context.es = context.data.word(kFreedesc);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void restorereels(Context & context) {
+ uint stack_depth = context.stack.size();
context._cmp(context.data.byte(kRoomloaded), 0);
if (context.flags.z()) goto dontrestore;
context.al = context.data.byte(kReallocation);
@@ -20144,10 +20814,11 @@ void restorereels(Context & context) {
loadseg(context);
closefile(context);
dontrestore:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void restoreall(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kLocation);
getroomdata(context);
context.dx = context.bx;
@@ -20224,10 +20895,11 @@ void restoreall(Context & context) {
loadseg(context);
closefile(context);
setallchanges(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void sortoutmap(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.di);
context.ds = context.data.word(kWorkspace);
@@ -20246,10 +20918,11 @@ blimey:
if (--context.cx) goto blimey;
context.di = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void startloading(Context & context) {
+ uint stack_depth = context.stack.size();
context.data.byte(kCombatcount) = 0;
context.al = context.cs.byte(context.bx+13);
context.data.byte(kRoomssample) = context.al;
@@ -20381,10 +21054,11 @@ void startloading(Context & context) {
context.bx = context.pop();
dontwalkin:
findxyfrompath(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void disablepath(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.cx);
context._xchg(context.al, context.ah);
context.cx = -6;
@@ -20413,10 +21087,11 @@ lookx2:
context._add(context.bx, context.ax);
context.al = 0;
context.es.byte(context.bx+6) = context.al;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findxyfrompath(Context & context) {
+ uint stack_depth = context.stack.size();
getroomspaths(context);
context.al = context.data.byte(kManspath);
context.ah = 0;
@@ -20429,10 +21104,11 @@ void findxyfrompath(Context & context) {
context._sub(context.ah, 12);
context.data.byte(kRyanx) = context.al;
context.data.byte(kRyany) = context.ah;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void findroominloc(Context & context) {
+ uint stack_depth = context.stack.size();
context.al = context.data.byte(kMapy);
context.cx = -6;
looky:
@@ -20446,29 +21122,32 @@ lookx:
context._sub(context.al, 11);
if (!context.flags.c()) goto lookx;
context.data.byte(kRoomnum) = context.cl;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getroomdata(Context & context) {
+ uint stack_depth = context.stack.size();
context.ah = 0;
context.cx = 32;
context._mul(context.cx);
context.bx = 5958;
context._add(context.bx, context.ax);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readheader(Context & context) {
+ uint stack_depth = context.stack.size();
context.ds = context.cs;
context.dx = 5862;
context.cx = (5958-5862);
readfromfile(context);
context.es = context.cs;
context.di = 5912;
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void allocateload(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.di);
context.bx = context.es.word(context.di);
@@ -20477,10 +21156,11 @@ void allocateload(Context & context) {
allocatemem(context);
context.di = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void fillspace(Context & context) {
+ uint stack_depth = context.stack.size();
context.push(context.es);
context.push(context.ds);
context.push(context.dx);
@@ -20494,46 +21174,53 @@ void fillspace(Context & context) {
context.dx = context.pop();
context.ds = context.pop();
context.es = context.pop();
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridoftemp(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kTempgraphics);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridoftemptext(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kTextfile1);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridoftemp2(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kTempgraphics2);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridoftemp3(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kTempgraphics3);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridoftempcharset(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kTempcharset);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void getridoftempsp(Context & context) {
+ uint stack_depth = context.stack.size();
context.es = context.data.word(kTempsprites);
deallocatemem(context);
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void readsetdata(Context & context) {
+ uint stack_depth = context.stack.size();
context.dx = 1857;
standardload(context);
context.data.word(kCharset1) = context.ax;
@@ -20564,10 +21251,11 @@ void readsetdata(Context & context) {
readfromfile(context);
closefile(context);
novolumeload:
- return;
+ {assert(stack_depth == context.stack.size()); return; }
}
void dreamweb(Context & context) {
+ uint stack_depth = context.stack.size();
seecommandtail(context);
checkbasemem(context);
soundstartup(context);