Skip to content

Commit

Permalink
DREAMWEB: Port 'endgame', 'showgun' to C++
Browse files Browse the repository at this point in the history
Also, remove the associated 'endtextname' and 'gungraphic' offsets from
the blob
  • Loading branch information
bluegr committed Dec 9, 2011
1 parent 597ff0b commit 9f2ed38
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 168 deletions.
4 changes: 4 additions & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -143,6 +143,8 @@ p = parser(skip_binary_data = [
'idname',
'samplename',
# 'basicsample', # This can't be removed due to tasm-recover limitations
'endtextname',
'gungraphic',
])
p.strip_path = 3
context = p.parse('dreamweb/dreamweb.asm')
Expand Down Expand Up @@ -296,6 +298,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'edeninbath',
'edenscdplayer',
'enablesoundint',
'endgame',
'endpaltostart',
'entercode',
'entersymbol',
Expand Down Expand Up @@ -623,6 +626,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'showframe',
'showgamereel',
'showgroup',
'showgun',
'showicon',
'showkeypad',
'showleftpage',
Expand Down
215 changes: 73 additions & 142 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -928,60 +928,6 @@ void DreamGenContext::fadeScreenDownHalf() {
data.byte(kNumtofade) = 32;
}

void DreamGenContext::showGun() {
STACK_CHECK;
data.byte(kAddtored) = 0;
data.byte(kAddtogreen) = 0;
data.byte(kAddtoblue) = 0;
palToStartPal();
palToEndPal();
greyscaleSum();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
cx = 130;
hangOn();
endPalToStart();
clearEndPal();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
cx = 200;
hangOn();
data.byte(kRoomssample) = 34;
loadRoomsSample();
data.byte(kVolume) = 0;
dx = 1055;
loadIntoTemp();
createPanel2();
ds = data.word(kTempgraphics);
al = 0;
ah = 0;
di = 100;
bx = 4;
showFrame();
ds = data.word(kTempgraphics);
al = 1;
ah = 0;
di = 158;
bx = 106;
showFrame();
workToScreen();
getRidOfTemp();
fadeScreenUp();
cx = 160;
hangOn();
al = 12;
ah = 0;
playChannel0();
dx = 1029;
loadTempText();
rollEndCredits2();
getRidOfTempText();
}

void DreamGenContext::rollEndCredits2() {
STACK_CHECK;
rollEm();
Expand Down Expand Up @@ -1222,24 +1168,11 @@ void DreamGenContext::initialMonCols() {
showGroup();
}

void DreamGenContext::endGame() {
STACK_CHECK;
dx = 1029;
loadTempText();
monkSpeaking();
gettingShot();
getRidOfTempText();
data.byte(kVolumeto) = 7;
data.byte(kVolumedirection) = 1;
cx = 200;
hangOn();
}

void DreamGenContext::monkSpeaking() {
STACK_CHECK;
data.byte(kRoomssample) = 35;
loadRoomsSample();
dx = 1068;
dx = 1042;
loadIntoTemp();
clearWork();
showMonk();
Expand Down Expand Up @@ -3287,14 +3220,14 @@ void DreamGenContext::getDestInfo() {
push(ax);
dx = data;
es = dx;
si = 1433;
si = 1407;
_add(si, ax);
cl = es.byte(si);
ax = pop();
push(cx);
dx = data;
es = dx;
si = 1449;
si = 1423;
_add(si, ax);
ax = pop();
}
Expand Down Expand Up @@ -3346,7 +3279,7 @@ void DreamGenContext::resetLocation() {
bx = ax;
dx = data;
es = dx;
_add(bx, 1433);
_add(bx, 1407);
es.byte(bx) = 0;
}

Expand Down Expand Up @@ -3382,7 +3315,7 @@ void DreamGenContext::execCommand() {
es = cs;
bx = offset_comlist;
ds = cs;
si = 1467;
si = 1441;
al = ds.byte(si);
_cmp(al, 0);
if (!flags.z())
Expand Down Expand Up @@ -3475,7 +3408,7 @@ void DreamGenContext::dirCom() {
si = offset_rootdir;
_inc(si);
es = cs;
di = 1290;
di = 1264;
_inc(di);
cx = 12;
_movsb(cx, true);
Expand Down Expand Up @@ -3577,7 +3510,7 @@ void DreamGenContext::signOn() {
push(bx);
_add(bx, 2);
ds = cs;
si = 1467;
si = 1441;
checkpass:
_lodsw();
ah = es.byte(bx);
Expand Down Expand Up @@ -3648,7 +3581,7 @@ void DreamGenContext::read() {
return;
okcom:
es = cs;
di = 1290;
di = 1264;
ax = data.word(kTextfile1);
data.word(kMonsource) = ax;
ds = ax;
Expand Down Expand Up @@ -3778,7 +3711,7 @@ void DreamGenContext::dirFile() {
ds = cs;
si = offset_operand1+1;
es = cs;
di = 1290+1;
di = 1264+1;
cx = 12;
_movsb(cx, true);
monitorLogo();
Expand Down Expand Up @@ -3905,7 +3838,7 @@ void DreamGenContext::parser() {
al = '=';
_stosb();
ds = cs;
si = 1467;
si = 1441;
notspace1:
_lodsw();
_cmp(al, 32);
Expand Down Expand Up @@ -5739,7 +5672,7 @@ void DreamGenContext::getNamePos() {
_mul(cx);
dx = data;
es = dx;
bx = 1601;
bx = 1575;
_add(bx, ax);
al = data.byte(kCursorpos);
ah = 0;
Expand Down Expand Up @@ -5835,7 +5768,7 @@ void DreamGenContext::showNames() {
STACK_CHECK;
dx = data;
es = dx;
si = 1601+1;
si = 1575+1;
di = (60)+21;
bx = (52)+10;
cl = 0;
Expand Down Expand Up @@ -6211,7 +6144,7 @@ void DreamGenContext::clearChanges() {
di = 0;
_stosw(cx, true);
es = cs;
di = 1433;
di = 1407;
al = 1;
_stosb(2);
al = 0;
Expand Down Expand Up @@ -6532,61 +6465,61 @@ void DreamGenContext::__start() {
//0x03e0: EAMW EB.V 99.D REAM
0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x34, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
//0x03f0: WEB. G14. DREA MWEB
0x2e, 0x54, 0x35, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x38,
//0x0400: .T51 .DRE AMWE B.T8
0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x4f, 0x4c, 0x00, 0x44,
//0x0410: 3.DR EAMW EB.V OL.D
0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41,
//0x0420: REAM WEB. G13. DREA
0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45,
//0x0430: MWEB .G15 .DRE AMWE
0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20,
//0x0440: B.I0 7... EXIT
0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54,
//0x0450: HE LP LIST
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0460: RE AD
0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20,
//0x0470: LOGO N KE YS
0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20,
//0x0480: ..PU BLIC
0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00,
//0x0490: PU BLIC ...
0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e,
//0x04a0: BLAC KDRA GON RYAN
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49,
//0x04b0: . ..HE NDRI
0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x04c0: X LO UIS
0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20,
//0x04d0: ... SEPT IMUS
0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20,
//0x04e0: BECK ETT . ..
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f,
//0x04f0: . "ROO
0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0500: T ."
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00,
//0x0510: . 0000 .00.
0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, 0x34, 0x43, 0x30,
//0x0520: .... $SPE ECHR 24C0
0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e,
//0x0530: 005. RAW. OBJE CT N
0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0540: AME ONE
0x2e, 0x54, 0x35, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x4f,
//0x0400: .T51 .DRE AMWE B.VO
0x4c, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44,
//0x0410: L.DR EAMW EB.G 15.D
0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x45, 0x58,
//0x0420: REAM WEB. I07. ..EX
0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20,
//0x0430: IT HELP
0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44,
//0x0440: LI ST READ
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0450: LO GON
0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c,
//0x0460: KEYS .. PUBL
0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20,
//0x0470: IC PUBL IC
0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f,
//0x0480: . ..BL ACKD RAGO
0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00,
//0x0490: N RY AN ...
0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49,
//0x04a0: HEND RIX LOUI
0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d,
//0x04b0: S . ..SE PTIM
0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20,
//0x04c0: US BE CKET T
0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x04d0: ...
0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
//0x04e0: ."R OOT .
0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30,
//0x04f0: " .00
0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x53, 0x50, 0x45, 0x45, 0x43,
//0x0500: 00.0 0... ..$S PEEC
0x48, 0x52, 0x32, 0x34, 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42,
//0x0510: HR24 C000 5.RA W.OB
0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20,
//0x0520: JECT NAM E ON E
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0550:
0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0560: .... .... .... ....
0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0570: .... .... .D:. ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0530:
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01,
//0x0540: .. .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44,
//0x0550: .... .... .... ...D
0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0560: :... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
//0x0570: .... .... .... ....
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
//0x0580: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00,
//0x0590: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x05a0: .... .... .... ....
0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x05b0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x05c0: .... .... .... ....
Expand All @@ -6600,25 +6533,23 @@ void DreamGenContext::__start() {
//0x0600: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0610: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0620: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0630: .... .... .... ....
0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0640: .... .... .... ....
0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
//0x0650: .... .... .... ....
0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01,
//0x0660: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01,
//0x0670: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01,
//0x0680: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
//0x0690: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x06a0: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, };
0x00, };
ds.assign(src, src + sizeof(src));
dreamweb();
}
Expand Down

0 comments on commit 9f2ed38

Please sign in to comment.