aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-25 17:28:51 +0400
committerVladimir Menshakov2011-06-25 18:21:37 +0400
commit375298f69a69e478447feab360fa9296b53e2698 (patch)
tree837dbab3eeeb6f94800ead9b91b3972eea294f37
parent3f2b5b9e8b9196c9d0e573abf8f8350ec4034b1d (diff)
downloadscummvm-rg350-375298f69a69e478447feab360fa9296b53e2698.tar.gz
scummvm-rg350-375298f69a69e478447feab360fa9296b53e2698.tar.bz2
scummvm-rg350-375298f69a69e478447feab360fa9296b53e2698.zip
DREAMWEB: Replaced foreign-guarded code with "foreignrelease" variable, added modifychar stub
-rw-r--r--devtools/tasmrecover/dreamweb/dreamweb.asm18
-rw-r--r--devtools/tasmrecover/dreamweb/monitor.asm18
-rw-r--r--devtools/tasmrecover/dreamweb/newplace.asm13
-rw-r--r--devtools/tasmrecover/dreamweb/object.asm11
-rw-r--r--devtools/tasmrecover/dreamweb/print.asm5
-rw-r--r--devtools/tasmrecover/dreamweb/sprite.asm4
-rw-r--r--devtools/tasmrecover/dreamweb/use.asm23
-rwxr-xr-xdevtools/tasmrecover/tasm-recover3
-rw-r--r--engines/dreamweb/dreamgen.cpp307
-rw-r--r--engines/dreamweb/dreamgen.h52
-rw-r--r--engines/dreamweb/dreamweb.cpp3
-rw-r--r--engines/dreamweb/dreamweb.h2
-rw-r--r--engines/dreamweb/stubs.cpp4
13 files changed, 295 insertions, 168 deletions
diff --git a/devtools/tasmrecover/dreamweb/dreamweb.asm b/devtools/tasmrecover/dreamweb/dreamweb.asm
index edecad783e..c222a63178 100644
--- a/devtools/tasmrecover/dreamweb/dreamweb.asm
+++ b/devtools/tasmrecover/dreamweb/dreamweb.asm
@@ -50,7 +50,7 @@ debuglevel1 equ 0 ;memory debug on
debuglevel2 equ 0 ;debug keys on+shouts
demo equ 0
CD equ 1
-Foreign equ 0
+Foreign equ 1
Spanish equ 0
German equ 0
@@ -4225,9 +4225,10 @@ Undertextline proc near
mov di,textaddressx
mov bx,textaddressy
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub bx,3
- endif
+$1:
mov ds,buffers
mov si,textunder
mov cl,undertextsizex
@@ -4248,9 +4249,10 @@ Deltextline proc near
mov di,textaddressx
mov bx,textaddressy
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub bx,3
- endif
+$1:
mov ds,buffers
mov si,textunder
mov cl,undertextsizex
@@ -4271,9 +4273,10 @@ Dumptextline proc near
mov newtextline,0
mov di,textaddressx
mov bx,textaddressy
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub bx,3
- endif
+$1:
mov cl,undertextsizex
mov ch,undertextsizey
call multidump
@@ -6238,6 +6241,7 @@ Recname db "DREAMWEB.DEM",0
Quitrequested db 0
Subtitles db 0
+ForeignRelease db 0
;-------------------------------------------------------End of code segment----
diff --git a/devtools/tasmrecover/dreamweb/monitor.asm b/devtools/tasmrecover/dreamweb/monitor.asm
index 247ba10f2b..7f3979c2b3 100644
--- a/devtools/tasmrecover/dreamweb/monitor.asm
+++ b/devtools/tasmrecover/dreamweb/monitor.asm
@@ -1425,10 +1425,11 @@ Printcurs proc near
mov bx,curslocy
mov cl,6
mov ch,8
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub bx,3
mov ch,11
- endif
+$1:
mov ds,buffers
mov si,textunder
push di bx
@@ -1449,11 +1450,11 @@ Printcurs proc near
flashcurs: pop di bx
sub di,6
mov cl,12
- if foreign
- mov ch,11
- else
mov ch,8
- endif
+ cmp foreignrelease, 0
+ jz $2
+ mov ch,11
+$2:
call multidump
pop es bx dx ds di si
@@ -1473,10 +1474,11 @@ Delcurs proc near
mov bx,curslocy
mov cl,6
mov ch,8
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub bx,3
mov ch,11
- endif
+$1:
push di bx cx
mov ds,buffers
mov si,textunder
diff --git a/devtools/tasmrecover/dreamweb/newplace.asm b/devtools/tasmrecover/dreamweb/newplace.asm
index ac703f6b11..2bbf4fe498 100644
--- a/devtools/tasmrecover/dreamweb/newplace.asm
+++ b/devtools/tasmrecover/dreamweb/newplace.asm
@@ -158,13 +158,14 @@ alreadyinfo: mov ax,mousebutton
mov di,60
mov bx,72+55
call showframe
- if foreign
+ cmp foreignrelease, 0
+ jz $1
mov al,4
mov ah,0
mov di,60
mov bx,72+55+21
call showframe
- endif
+$1:
pop bx
mov bh,0
@@ -175,11 +176,11 @@ alreadyinfo: mov ax,mousebutton
call findnextcolon
mov di,63
- if foreign
- mov bx,84+4
- else
mov bx,84
- endif
+ cmp foreignrelease, 0
+ jz $2
+ mov bx,84+4
+$2:
mov dl,191
mov al,0
mov ah,0
diff --git a/devtools/tasmrecover/dreamweb/object.asm b/devtools/tasmrecover/dreamweb/object.asm
index bdd043d588..bc73ef5679 100644
--- a/devtools/tasmrecover/dreamweb/object.asm
+++ b/devtools/tasmrecover/dreamweb/object.asm
@@ -670,11 +670,13 @@ Describeob proc near
mov di,33
mov bx,92
- if foreign
+
+ cmp foreignrelease, 0
+ jz notsetd
cmp objecttype,1
jnz notsetd
mov bx,82
-notsetd: endif
+notsetd:
mov dl,241
mov ah,16
mov charshift,91+91
@@ -682,11 +684,12 @@ notsetd: endif
mov charshift,0
mov di,36
mov bx,104
- if foreign
+ cmp foreignrelease, 0
+ jz notsetd2
cmp objecttype,1
jnz notsetd2
mov bx,94
-notsetd2: endif
+notsetd2:
mov dl,241
mov ah,0
call printdirect
diff --git a/devtools/tasmrecover/dreamweb/print.asm b/devtools/tasmrecover/dreamweb/print.asm
index a2052285f0..7cbb45c08b 100644
--- a/devtools/tasmrecover/dreamweb/print.asm
+++ b/devtools/tasmrecover/dreamweb/print.asm
@@ -6,9 +6,10 @@ Printchar proc near
cmp al,255
jz ignoreit
push si bx di
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub bx,3
- endif
+$1:
push ax
sub al,32 ;"A"
mov ah,0
diff --git a/devtools/tasmrecover/dreamweb/sprite.asm b/devtools/tasmrecover/dreamweb/sprite.asm
index fadea3b790..45f807da3f 100644
--- a/devtools/tasmrecover/dreamweb/sprite.asm
+++ b/devtools/tasmrecover/dreamweb/sprite.asm
@@ -4785,12 +4785,12 @@ Reconstruct proc near
call drawfloor
call spriteupdate
call printsprites
- if foreign
+ cmp foreignrelease, 0
+ jz notfudge
cmp reallocation,20
jnz notfudge
call undertextline
notfudge:
- endif
mov havedoneobs,0
noneedtorecon: ret
diff --git a/devtools/tasmrecover/dreamweb/use.asm b/devtools/tasmrecover/dreamweb/use.asm
index 08debfca56..fbbd9c99db 100644
--- a/devtools/tasmrecover/dreamweb/use.asm
+++ b/devtools/tasmrecover/dreamweb/use.asm
@@ -1879,11 +1879,11 @@ Usecashcard proc near
call showman
mov di,114
- if foreign
- mov bx,120-3
- else
mov bx,120
- endif
+ cmp foreignrelease, 0
+ jz $1
+ mov bx,120-3
+$1:
mov ds,tempgraphics
mov al,39
mov ah,0
@@ -3189,9 +3189,10 @@ notinlouiss: ret
Getundertimed proc near
mov al,timedy
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub al,3
- endif
+$1:
mov ah,0
mov bx,ax
mov al,timedx
@@ -3212,9 +3213,10 @@ Getundertimed proc near
Putundertimed proc near
mov al,timedy
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub al,3
- endif
+$1:
mov ah,0
mov bx,ax
mov al,timedx
@@ -3239,9 +3241,10 @@ Dumptimedtext proc near
cmp needtodumptimed,1
jnz nodumptimed
mov al,timedy
- if foreign
+ cmp foreignrelease, 0
+ jz $1
sub al,3
- endif
+$1:
mov ah,0
mov bx,ax
mov al,timedx
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index d6c6a2523f..5f7a528a5b 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -23,6 +23,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'convertkey',
'readabyte',
'readoneblock',
- 'frameoutv'
+ 'frameoutv',
+ 'modifychar'
])
generator.generate('dreamweb') #start routine
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 253b49a8c9..2afd1bc357 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2173,7 +2173,7 @@ forcenext:
void DreamGenContext::clearsprites() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
al = 255;
cx = (32)*16;
_stosb(cx, true);
@@ -2182,7 +2182,7 @@ void DreamGenContext::clearsprites() {
void DreamGenContext::makesprite() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
_tmp17:
_cmp(es.byte(bx+15), 255);
if (flags.z())
@@ -2210,11 +2210,11 @@ void DreamGenContext::delsprite() {
void DreamGenContext::spriteupdate() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
al = data.byte(kRyanon);
es.byte(bx+31) = al;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
cx = 16;
_tmp18:
push(cx);
@@ -2248,7 +2248,7 @@ void DreamGenContext::printsprites() {
priorityloop:
push(cx);
data.byte(kPriority) = cl;
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
cx = 16;
prtspriteloop:
push(cx);
@@ -2346,7 +2346,7 @@ void DreamGenContext::checkone() {
_mul(cx);
si = ax;
ds = data.word(kBuffers);
- _add(si, (0+(180*10)+32+60+(32*32)));
+ _add(si, (0+(228*13)+32+60+(32*32)));
_lodsw();
cx = ax;
_lodsb();
@@ -2810,7 +2810,7 @@ forgotone:
void DreamGenContext::initrain() {
STACK_CHECK;
es = data.word(kBuffers);
- 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));
+ di = (0+(228*13)+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*30));
bx = 1113;
checkmorerain:
al = cs.byte(bx);
@@ -2961,7 +2961,7 @@ void DreamGenContext::showrain() {
ax = ds.word(si+2);
si = ax;
_add(si, 2080);
- 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)+(250*4)+(256*24));
+ bx = (0+(228*13)+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*30));
es = data.word(kBuffers);
_cmp(es.byte(bx), 255);
if (flags.z())
@@ -3519,7 +3519,7 @@ atlast2:
void DreamGenContext::updatepeople() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
data.word(kListpos) = di;
cx = 12*5;
al = 255;
@@ -3674,6 +3674,14 @@ void DreamGenContext::reconstruct() {
drawfloor();
spriteupdate();
printsprites();
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto notfudge;
+ _cmp(data.byte(kReallocation), 20);
+ if (!flags.z())
+ goto notfudge;
+ undertextline();
+notfudge:
data.byte(kHavedoneobs) = 0;
}
@@ -3816,7 +3824,7 @@ bigroom:
void DreamGenContext::dumpeverything() {
STACK_CHECK;
es = data.word(kBuffers);
- 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));
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40));
dumpevery1:
ax = es.word(bx);
cx = es.word(bx+2);
@@ -3847,7 +3855,7 @@ skip1:
_add(bx, 5);
goto dumpevery1;
finishevery1:
- 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))+(40*5);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40))+(40*5);
dumpevery2:
ax = es.word(bx);
cx = es.word(bx+2);
@@ -3888,7 +3896,7 @@ void DreamGenContext::loadpalfromiff() {
readfromfile();
closefile();
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
ds = data.word(kMapstore);
si = 0x30;
cx = 768;
@@ -4520,7 +4528,7 @@ void DreamGenContext::dofade() {
al = data.byte(kColourpos);
ah = 0;
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
_add(si, ax);
_add(si, ax);
_add(si, ax);
@@ -4537,7 +4545,7 @@ void DreamGenContext::dofade() {
void DreamGenContext::clearendpal() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
cx = 768;
al = 0;
_stosb(cx, true);
@@ -4563,11 +4571,11 @@ void DreamGenContext::fadescreenup() {
void DreamGenContext::fadetowhite() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
cx = 768;
al = 63;
_stosb(cx, true);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
al = 0;
_stosb(3);
paltostartpal();
@@ -4580,11 +4588,11 @@ void DreamGenContext::fadetowhite() {
void DreamGenContext::fadefromwhite() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
cx = 768;
al = 63;
_stosb(cx, true);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
al = 0;
_stosb(3);
paltoendpal();
@@ -4610,7 +4618,7 @@ void DreamGenContext::fadescreendownhalf() {
paltoendpal();
cx = 768;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
halfend:
al = es.byte(bx);
_shr(al, 1);
@@ -4620,12 +4628,12 @@ halfend:
goto halfend;
ds = data.word(kBuffers);
es = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3))+(56*3);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768)+(56*3);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(56*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(56*3);
cx = 3*5;
_movsb(cx, true);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3))+(77*3);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768)+(77*3);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(77*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(77*3);
cx = 3*2;
_movsb(cx, true);
data.byte(kFadedirection) = 1;
@@ -4667,7 +4675,7 @@ void DreamGenContext::fadescreendowns() {
void DreamGenContext::clearstartpal() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
cx = 256;
wholeloop1:
ax = 0;
@@ -4838,8 +4846,8 @@ void DreamGenContext::fadecalculation() {
goto nomorefading;
bl = data.byte(kFadecount);
es = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3));
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
cx = 768;
fadecolloop:
al = es.byte(si);
@@ -4873,8 +4881,8 @@ nomorefading:
void DreamGenContext::greyscalesum() {
STACK_CHECK;
es = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
cx = 256;
greysumloop1:
push(cx);
@@ -4932,8 +4940,8 @@ void DreamGenContext::paltostartpal() {
STACK_CHECK;
es = data.word(kBuffers);
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
cx = 768/2;
_movsw(cx, true);
}
@@ -4942,8 +4950,8 @@ void DreamGenContext::endpaltostart() {
STACK_CHECK;
es = data.word(kBuffers);
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
cx = 768/2;
_movsw(cx, true);
}
@@ -4952,8 +4960,8 @@ void DreamGenContext::startpaltoend() {
STACK_CHECK;
es = data.word(kBuffers);
ds = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
cx = 768/2;
_movsw(cx, true);
}
@@ -4962,8 +4970,8 @@ void DreamGenContext::paltoendpal() {
STACK_CHECK;
es = data.word(kBuffers);
ds = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
cx = 768/2;
_movsw(cx, true);
}
@@ -4972,8 +4980,8 @@ void DreamGenContext::allpalette() {
STACK_CHECK;
es = data.word(kBuffers);
ds = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3));
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
cx = 768/2;
_movsw(cx, true);
dumpcurrent();
@@ -4981,7 +4989,7 @@ void DreamGenContext::allpalette() {
void DreamGenContext::dumpcurrent() {
STACK_CHECK;
- si = (0+(180*10)+32+60+(32*32)+(11*10*3));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
ds = data.word(kBuffers);
vsync();
al = 0;
@@ -4998,11 +5006,11 @@ void DreamGenContext::fadedownmon() {
paltostartpal();
paltoendpal();
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768)+(231*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
cx = 3*8;
ax = 0;
_stosb(cx, true);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768)+(246*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
_stosb();
_stosw();
data.byte(kFadedirection) = 1;
@@ -5018,11 +5026,11 @@ void DreamGenContext::fadeupmon() {
paltostartpal();
paltoendpal();
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3))+(231*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(231*3);
cx = 3*8;
ax = 0;
_stosb(cx, true);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3))+(246*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
_stosb();
_stosw();
data.byte(kFadedirection) = 1;
@@ -5038,11 +5046,11 @@ void DreamGenContext::fadeupmonfirst() {
paltostartpal();
paltoendpal();
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3))+(231*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(231*3);
cx = 3*8;
ax = 0;
_stosb(cx, true);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3))+(246*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
_stosb();
_stosw();
data.byte(kFadedirection) = 1;
@@ -5061,11 +5069,11 @@ void DreamGenContext::fadeupyellows() {
STACK_CHECK;
paltoendpal();
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768)+(231*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
cx = 3*8;
ax = 0;
_stosb(cx, true);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768)+(246*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
_stosb();
_stosw();
data.byte(kFadedirection) = 1;
@@ -5080,15 +5088,15 @@ void DreamGenContext::initialmoncols() {
STACK_CHECK;
paltostartpal();
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3))+(230*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
cx = 3*9;
ax = 0;
_stosb(cx, true);
- di = (0+(180*10)+32+60+(32*32)+(11*10*3))+(246*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
_stosb();
_stosw();
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3))+(230*3);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
al = 230;
cx = 18;
showgroup();
@@ -5507,6 +5515,11 @@ void DreamGenContext::printchar() {
push(si);
push(bx);
push(di);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
push(ax);
_sub(al, 32);
ah = 0;
@@ -5578,6 +5591,7 @@ printloopslow5:
push(es);
push(si);
push(ds);
+ modifychar();
printboth();
ds = pop();
si = pop();
@@ -5601,6 +5615,7 @@ printloopslow5:
push(cx);
push(es);
push(si);
+ modifychar();
data.word(kCharshift) = 91;
printboth();
data.word(kCharshift) = 0;
@@ -5714,6 +5729,7 @@ printloop5:
goto finishdirct;
push(cx);
push(es);
+ modifychar();
printchar();
data.word(kLastxpos) = di;
es = pop();
@@ -5770,6 +5786,7 @@ printloop7:
nottrigger:
push(cx);
push(es);
+ modifychar();
printchar();
data.word(kCurslocx) = di;
data.word(kCurslocy) = bx;
@@ -5940,6 +5957,7 @@ getloop:
_cmp(al, 32);
if (flags.z())
goto endword;
+ modifychar();
_cmp(al, 255);
if (flags.z())
goto getloop;
@@ -5968,9 +5986,9 @@ endall:
void DreamGenContext::fillryan() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32);
+ di = (0+(228*13)+32);
findallryan();
- si = (0+(180*10)+32);
+ si = (0+(228*13)+32);
al = data.byte(kRyanpage);
ah = 0;
cx = 20;
@@ -6022,9 +6040,9 @@ lessthanapage:
al = 1;
push(ax);
es = data.word(kBuffers);
- di = (0+(180*10));
+ di = (0+(228*13));
findallopen();
- si = (0+(180*10));
+ si = (0+(228*13));
di = (80);
bx = (58)+96;
cx = pop();
@@ -6508,6 +6526,14 @@ void DreamGenContext::describeob() {
getobtextstart();
di = 33;
bx = 92;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto notsetd;
+ _cmp(data.byte(kObjecttype), 1);
+ if (!flags.z())
+ goto notsetd;
+ bx = 82;
+notsetd:
dl = 241;
ah = 16;
data.word(kCharshift) = 91+91;
@@ -6515,6 +6541,14 @@ void DreamGenContext::describeob() {
data.word(kCharshift) = 0;
di = 36;
bx = 104;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto notsetd2;
+ _cmp(data.byte(kObjecttype), 1);
+ if (!flags.z())
+ goto notsetd2;
+ bx = 94;
+notsetd2:
dl = 241;
ah = 0;
printdirect();
@@ -7349,7 +7383,7 @@ findinv2:
data.byte(kLastinvpos) = al;
_add(bx, bx);
es = data.word(kBuffers);
- _add(bx, (0+(180*10)+32));
+ _add(bx, (0+(228*13)+32));
}
void DreamGenContext::findopenpos() {
@@ -7366,7 +7400,7 @@ findopenp1:
data.byte(kLastinvpos) = al;
_add(bx, bx);
es = data.word(kBuffers);
- _add(bx, (0+(180*10)));
+ _add(bx, (0+(228*13)));
}
void DreamGenContext::dropobject() {
@@ -8317,7 +8351,7 @@ void DreamGenContext::calcmapad() {
void DreamGenContext::getdimension() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32));
+ bx = (0+(228*13)+32+60+(32*32));
ch = 0;
dimloop1:
addalong();
@@ -8327,7 +8361,7 @@ dimloop1:
_inc(ch);
goto dimloop1;
finishdim1:
- bx = (0+(180*10)+32+60+(32*32));
+ bx = (0+(228*13)+32+60+(32*32));
cl = 0;
dimloop2:
push(bx);
@@ -8340,7 +8374,7 @@ dimloop2:
_add(bx, 3);
goto dimloop2;
finishdim2:
- bx = (0+(180*10)+32+60+(32*32))+(11*3*9);
+ bx = (0+(228*13)+32+60+(32*32))+(11*3*9);
dh = 10;
dimloop3:
push(bx);
@@ -8353,7 +8387,7 @@ dimloop3:
_sub(bx, 11*3);
goto dimloop3;
finishdim3:
- bx = (0+(180*10)+32+60+(32*32))+(3*10);
+ bx = (0+(228*13)+32+60+(32*32))+(3*10);
dl = 11;
dimloop4:
push(bx);
@@ -8435,7 +8469,7 @@ gotlength:
void DreamGenContext::drawflags() {
STACK_CHECK;
es = data.word(kBuffers);
- di = (0+(180*10)+32+60+(32*32));
+ di = (0+(228*13)+32+60+(32*32));
al = data.byte(kMapy);
ah = 0;
cx = (66);
@@ -8477,7 +8511,7 @@ void DreamGenContext::eraseoldobs() {
if (flags.z())
return /* (donterase) */;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
cx = 16;
oberase:
push(cx);
@@ -8501,7 +8535,7 @@ notthisob:
void DreamGenContext::showallobs() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32));
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32));
data.word(kListpos) = bx;
di = bx;
cx = 128*5;
@@ -8622,9 +8656,9 @@ usedpriority:
void DreamGenContext::showallfree() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
data.word(kListpos) = bx;
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
cx = 80*5;
al = 255;
_stosb(cx, true);
@@ -8703,9 +8737,9 @@ over138:
void DreamGenContext::showallex() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
data.word(kListpos) = bx;
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
cx = 100*5;
al = 255;
_stosb(cx, true);
@@ -9572,6 +9606,15 @@ alreadyinfo:
di = 60;
bx = 72+55;
showframe();
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ al = 4;
+ ah = 0;
+ di = 60;
+ bx = 72+55+21;
+ showframe();
+_tmp1:
bx = pop();
bh = 0;
_add(bx, bx);
@@ -9581,6 +9624,11 @@ alreadyinfo:
findnextcolon();
di = 63;
bx = 84;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp2;
+ bx = 84+4;
+_tmp2:
dl = 191;
al = 0;
ah = 0;
@@ -11052,6 +11100,7 @@ curfileloop:
return /* (finishfile) */;
_inc(si);
push(si);
+ modifychar();
ds = data.word(kTempcharset);
ah = 0;
printchar();
@@ -11150,6 +11199,12 @@ void DreamGenContext::printcurs() {
bx = data.word(kCurslocy);
cl = 6;
ch = 8;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+ ch = 11;
+_tmp1:
ds = data.word(kBuffers);
si = (0);
push(di);
@@ -11175,6 +11230,11 @@ flashcurs:
_sub(di, 6);
cl = 12;
ch = 8;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp2;
+ ch = 11;
+_tmp2:
multidump();
es = pop();
bx = pop();
@@ -11196,6 +11256,12 @@ void DreamGenContext::delcurs() {
bx = data.word(kCurslocy);
cl = 6;
ch = 8;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+ ch = 11;
+_tmp1:
push(di);
push(bx);
push(cx);
@@ -12654,6 +12720,11 @@ void DreamGenContext::usecashcard() {
showman();
di = 114;
bx = 120;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ bx = 120-3;
+_tmp1:
ds = data.word(kTempgraphics);
al = 39;
ah = 0;
@@ -13595,7 +13666,7 @@ void DreamGenContext::removefreeobject() {
void DreamGenContext::findormake() {
STACK_CHECK;
- 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));
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
push(ax);
es = data.word(kBuffers);
ah = data.byte(kReallocation);
@@ -13635,7 +13706,7 @@ void DreamGenContext::switchryanoff() {
void DreamGenContext::setallchanges() {
STACK_CHECK;
es = data.word(kBuffers);
- 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));
+ bx = (0+(228*13)+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:
ax = es.word(bx);
_cmp(al, 255);
@@ -13769,30 +13840,40 @@ notonsartroof:
void DreamGenContext::getundertimed() {
STACK_CHECK;
al = data.byte(kTimedy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(al, 3);
+_tmp1:
ah = 0;
bx = ax;
al = data.byte(kTimedx);
ah = 0;
di = ax;
- ch = (24);
+ ch = (30);
cl = 240;
ds = data.word(kBuffers);
- 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));
+ si = (0+(228*13)+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();
}
void DreamGenContext::putundertimed() {
STACK_CHECK;
al = data.byte(kTimedy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(al, 3);
+_tmp1:
ah = 0;
bx = ax;
al = data.byte(kTimedx);
ah = 0;
di = ax;
- ch = (24);
+ ch = (30);
cl = 240;
ds = data.word(kBuffers);
- 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));
+ si = (0+(228*13)+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();
}
@@ -13802,13 +13883,18 @@ void DreamGenContext::dumptimedtext() {
if (!flags.z())
return /* (nodumptimed) */;
al = data.byte(kTimedy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(al, 3);
+_tmp1:
ah = 0;
bx = ax;
al = data.byte(kTimedx);
ah = 0;
di = ax;
cl = 240;
- ch = (24);
+ ch = (30);
multidump();
data.byte(kNeedtodumptimed) = 0;
}
@@ -14750,7 +14836,7 @@ void DreamGenContext::getundermenu() {
cl = 48;
ch = 48;
ds = data.word(kBuffers);
- 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));
+ si = (0+(228*13)+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();
}
@@ -14761,7 +14847,7 @@ void DreamGenContext::putundermenu() {
cl = 48;
ch = 48;
ds = data.word(kBuffers);
- 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));
+ si = (0+(228*13)+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();
}
@@ -16586,7 +16672,7 @@ void DreamGenContext::namestoold() {
STACK_CHECK;
ds = cs;
si = 8579;
- di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
es = data.word(kBuffers);
cx = 17*4;
_movsb(cx, true);
@@ -16596,7 +16682,7 @@ void DreamGenContext::oldtonames() {
STACK_CHECK;
es = cs;
di = 8579;
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
ds = data.word(kBuffers);
cx = 17*4;
_movsb(cx, true);
@@ -16639,7 +16725,7 @@ void DreamGenContext::saveposition() {
dx = (0);
saveseg();
ds = data.word(kBuffers);
- dx = (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));
+ dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
saveseg();
dx = data;
ds = dx;
@@ -16688,7 +16774,7 @@ void DreamGenContext::loadposition() {
dx = (0);
loadseg();
ds = data.word(kBuffers);
- dx = (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));
+ dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
loadseg();
dx = data;
ds = dx;
@@ -17625,7 +17711,7 @@ void DreamGenContext::allocatebuffers() {
allocatemem();
data.word(kMapdata) = ax;
trysoundalloc();
- 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)+(250*4)+(256*24)+(6*64)+991-534+68-0)/16;
+ bx = (0+(228*13)+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*30)+(6*64)+991-534+68-0)/16;
allocatemem();
data.word(kBuffers) = ax;
trysoundalloc();
@@ -17652,7 +17738,7 @@ void DreamGenContext::allocatebuffers() {
void DreamGenContext::clearbuffers() {
STACK_CHECK;
es = data.word(kBuffers);
- 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;
+ cx = (0+(228*13)+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*30)+(6*64)+991-534+68-0)/2;
ax = 0;
di = 0;
_stosw(cx, true);
@@ -17662,13 +17748,13 @@ void DreamGenContext::clearbuffers() {
di = 0;
_stosw(cx, true);
es = data.word(kBuffers);
- 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)+(6*64));
+ di = (0+(228*13)+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*30)+(6*64));
ds = cs;
si = 534;
cx = (991-534);
_movsb(cx, true);
es = data.word(kBuffers);
- 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)+(6*64)+991-534);
+ di = (0+(228*13)+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*30)+(6*64)+991-534);
ds = cs;
si = 0;
cx = (68-0);
@@ -17681,16 +17767,16 @@ void DreamGenContext::clearchanges() {
es = data.word(kBuffers);
cx = (250)*2;
ax = 0x0ffff;
- 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));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
_stosw(cx, true);
ds = data.word(kBuffers);
- 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)+(256*24)+(6*64));
+ si = (0+(228*13)+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*30)+(6*64));
es = cs;
di = 534;
cx = (991-534);
_movsb(cx, true);
ds = data.word(kBuffers);
- 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)+(256*24)+(6*64)+991-534);
+ si = (0+(228*13)+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*30)+(6*64)+991-534);
es = cs;
di = 0;
cx = (68-0);
@@ -18478,7 +18564,7 @@ nothingund:
void DreamGenContext::checkifperson() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
cx = 12;
identifyreel:
push(cx);
@@ -18541,7 +18627,7 @@ notareelid:
void DreamGenContext::checkifset() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32))+(127*5);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32))+(127*5);
cx = 127;
identifyset:
_cmp(es.byte(bx+4), 255);
@@ -18582,7 +18668,7 @@ notasetid:
void DreamGenContext::checkifex() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5))+(99*5);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5))+(99*5);
cx = 99;
identifyex:
_cmp(es.byte(bx+4), 255);
@@ -18617,7 +18703,7 @@ notanexid:
void DreamGenContext::checkiffree() {
STACK_CHECK;
es = data.word(kBuffers);
- bx = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5))+(79*5);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5))+(79*5);
cx = 79;
identifyfree:
_cmp(es.byte(bx+4), 255);
@@ -20206,7 +20292,7 @@ void DreamGenContext::getunderzoom() {
di = (8)+5;
bx = (132)+4;
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
cl = 46;
ch = 40;
multiget();
@@ -20229,7 +20315,7 @@ void DreamGenContext::putunderzoom() {
di = (8)+5;
bx = (132)+4;
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
cl = 46;
ch = 40;
multiput();
@@ -20296,7 +20382,7 @@ notsmally:
data.byte(kPointerys) = ch;
push(ds);
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60);
+ si = (0+(228*13)+32+60);
multiget();
ds = pop();
di = pop();
@@ -20359,7 +20445,7 @@ notsmally2:
_sub(data.word(kOldpointery), ax);
_sub(bx, ax);
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60);
+ si = (0+(228*13)+32+60);
multiget();
ds = pop();
di = pop();
@@ -20389,7 +20475,7 @@ void DreamGenContext::delpointer() {
ch = data.byte(kPointerys);
data.byte(kDelys) = ch;
ds = data.word(kBuffers);
- si = (0+(180*10)+32+60);
+ si = (0+(228*13)+32+60);
di = data.word(kDelherex);
bx = data.word(kDelherey);
multiput();
@@ -20421,10 +20507,15 @@ void DreamGenContext::undertextline() {
STACK_CHECK;
di = data.word(kTextaddressx);
bx = data.word(kTextaddressy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
ds = data.word(kBuffers);
si = (0);
- cl = (180);
- ch = (10);
+ cl = (228);
+ ch = (13);
multiget();
}
@@ -20432,10 +20523,15 @@ void DreamGenContext::deltextline() {
STACK_CHECK;
di = data.word(kTextaddressx);
bx = data.word(kTextaddressy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
ds = data.word(kBuffers);
si = (0);
- cl = (180);
- ch = (10);
+ cl = (228);
+ ch = (13);
multiput();
}
@@ -20447,8 +20543,13 @@ void DreamGenContext::dumptextline() {
data.byte(kNewtextline) = 0;
di = data.word(kTextaddressx);
bx = data.word(kTextaddressy);
- cl = (180);
- ch = (10);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
+ cl = (228);
+ ch = (13);
multidump();
}
@@ -21971,7 +22072,7 @@ void DreamGenContext::__start() {
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, 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, 0x00, 0x00, };
+ 0x00, 0x00, 0x00, 0x00, 0x00, };
ds.assign(src, src + sizeof(src));
dreamweb();
}
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 5a60327a43..71c466da24 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -488,7 +488,8 @@ public:
const static uint16 kRecname = 8789;
const static uint16 kQuitrequested = 8802;
const static uint16 kSubtitles = 8803;
- const static uint16 kStak = 8804;
+ const static uint16 kForeignrelease = 8804;
+ const static uint16 kStak = 8805;
const static uint16 kBlocktextdat = (0);
const static uint16 kPersonframes = (0);
const static uint16 kDebuglevel1 = (0);
@@ -502,7 +503,6 @@ public:
const static uint16 kFlags = (0);
const static uint16 kGerman = (0);
const static uint16 kTextunder = (0);
- const static uint16 kForeign = (0);
const static uint16 kPathdata = (0);
const static uint16 kDemo = (0);
const static uint16 kExframedata = (0);
@@ -510,26 +510,26 @@ public:
const static uint16 kFreetextdat = (0);
const static uint16 kFrframedata = (0);
const static uint16 kSettext = (0+(130*2));
- const static uint16 kOpeninvlist = (0+(180*10));
- const static uint16 kRyaninvlist = (0+(180*10)+32);
- const static uint16 kPointerback = (0+(180*10)+32+60);
- const static uint16 kMapflags = (0+(180*10)+32+60+(32*32));
- const static uint16 kStartpal = (0+(180*10)+32+60+(32*32)+(11*10*3));
- const static uint16 kEndpal = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
- const static uint16 kMaingamepal = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768);
- const static uint16 kSpritetable = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768);
- const static uint16 kSetlist = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32));
- const static uint16 kFreelist = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
- const static uint16 kExlist = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
- const static uint16 kPeoplelist = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
- const static uint16 kZoomspace = (0+(180*10)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
- const static uint16 kPrintedlist = (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));
- const static uint16 kListofchanges = (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));
- const static uint16 kUndertimedtext = (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));
- const static uint16 kRainlist = (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));
- const static uint16 kInitialreelrouts = (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));
- const static uint16 kInitialvars = (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);
- const static uint16 kLengthofbuffer = (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);
+ const static uint16 kOpeninvlist = (0+(228*13));
+ const static uint16 kRyaninvlist = (0+(228*13)+32);
+ const static uint16 kPointerback = (0+(228*13)+32+60);
+ const static uint16 kMapflags = (0+(228*13)+32+60+(32*32));
+ const static uint16 kStartpal = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ const static uint16 kEndpal = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ const static uint16 kMaingamepal = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ const static uint16 kSpritetable = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
+ const static uint16 kSetlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32));
+ const static uint16 kFreelist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
+ const static uint16 kExlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
+ const static uint16 kPeoplelist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
+ const static uint16 kZoomspace = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ const static uint16 kPrintedlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40));
+ const static uint16 kListofchanges = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ const static uint16 kUndertimedtext = (0+(228*13)+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));
+ const static uint16 kRainlist = (0+(228*13)+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*30));
+ const static uint16 kInitialreelrouts = (0+(228*13)+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*30)+(6*64));
+ const static uint16 kInitialvars = (0+(228*13)+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*30)+(6*64)+991-534);
+ const static uint16 kLengthofbuffer = (0+(228*13)+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*30)+(6*64)+991-534+68-0);
const static uint16 kReellist = (0+(36*144));
const static uint16 kIntext = (0+(38*2));
const static uint16 kLengthofmap = (0+(66*60));
@@ -546,16 +546,17 @@ public:
const static uint16 kPersontxtdat = (0+24);
const static uint16 kPersontext = (0+24+(1026*2));
const static uint16 kInputport = (0x63);
+ const static uint16 kForeign = (1);
const static uint16 kCd = (1);
- const static uint16 kUndertextsizey = (10);
const static uint16 kNumexobjects = (114);
+ const static uint16 kUndertextsizey = (13);
const static uint16 kZoomy = (132);
const static uint16 kFreedatlen = (16*80);
- const static uint16 kUndertextsizex = (180);
const static uint16 kExtextlen = (18000);
const static uint16 kLenofmapstore = (22*8*20*8);
- const static uint16 kUndertimedysize = (24);
+ const static uint16 kUndertextsizex = (228);
const static uint16 kNumchanges = (250);
+ const static uint16 kUndertimedysize = (30);
const static uint16 kExframeslen = (30000);
const static uint16 kTablesize = (32);
const static uint16 kScreenwidth = (320);
@@ -718,6 +719,7 @@ public:
void addtopeoplelist();
void hangoncurs();
void sparkydrip();
+ void modifychar();
void compare();
void printcurs();
void convertkey();
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 590f071b6b..e8152e9963 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -568,6 +568,9 @@ void DreamWebEngine::loadSounds(uint bank, const Common::String &filename) {
file.close();
}
+uint8 DreamWebEngine::modifyChar(uint8 c) const {
+ return c;
+}
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index e0797bc96b..b1a68dbc20 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -107,6 +107,8 @@ public:
void enableSavingOrLoading(bool enable = true) { _enableSavingOrLoading = enable; }
+ uint8 modifyChar(uint8 c) const;
+
private:
void keyPressed(uint16 ascii);
void setSpeed(uint speed);
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 1869f1b109..55e5fba2ac 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -525,4 +525,8 @@ void DreamGenContext::frameoutv() {
}
}
+void DreamGenContext::modifychar() {
+ al = engine->modifyChar(al);
+}
+
} /*namespace dreamgen */