diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 36 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 5 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 3 |
5 files changed, 25 insertions, 40 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 84859b1cd4..8e37b4e851 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -144,6 +144,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'showallfree', 'adjustlen', 'finishedwalking', + 'checkone', ], skip_output = [ # These functions are processed but not output 'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 54428c633c..0ee8c50cd3 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -2076,41 +2076,6 @@ void DreamGenContext::delsprite() { _stosb(cx, true); } -void DreamGenContext::checkone() { - STACK_CHECK; - push(cx); - al = ch; - ah = 0; - cl = 4; - _shr(ax, cl); - dl = al; - cx = pop(); - al = cl; - ah = 0; - cl = 4; - _shr(ax, cl); - ah = dl; - push(ax); - ch = 0; - cl = al; - push(cx); - al = ah; - ah = 0; - cx = 11; - _mul(cx); - cx = pop(); - _add(ax, cx); - cx = 3; - _mul(cx); - si = ax; - ds = data.word(kBuffers); - _add(si, (0+(228*13)+32+60+(32*32))); - _lodsw(); - cx = ax; - _lodsb(); - dx = pop(); -} - void DreamGenContext::checkforexit() { STACK_CHECK; cl = data.byte(kRyanx); @@ -18123,7 +18088,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_addtopeoplelist: addtopeoplelist(); break; case addr_checkspeed: checkspeed(); break; case addr_delsprite: delsprite(); break; - case addr_checkone: checkone(); break; case addr_mainman: mainman(); break; case addr_checkforexit: checkforexit(); break; case addr_adjustdown: adjustdown(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index a20d251c1b..7ed079c00e 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -612,7 +612,6 @@ public: static const uint16 addr_adjustdown = 0xc14c; static const uint16 addr_checkforexit = 0xc148; static const uint16 addr_mainman = 0xc138; - static const uint16 addr_checkone = 0xc12c; static const uint16 addr_delsprite = 0xc11c; static const uint16 addr_checkspeed = 0xc110; static const uint16 addr_addtopeoplelist = 0xc108; @@ -1799,7 +1798,7 @@ public: //void copyname(); void look(); void setmouse(); - //void getdimension(); + //void checkone(); void transferinv(); void candles2(); void pickupob(); @@ -1875,7 +1874,7 @@ public: void grafittidoor(); void input(); void nextdest(); - void checkone(); + //void getdimension(); void makecaps(); void read(); void fadescreenups(); diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index c1a47ae5fc..e9a40d7f8c 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -869,5 +869,25 @@ void DreamGenContext::movemap(uint8 param) { data.byte(kNowinnewroom) = 1; } +void DreamGenContext::checkone() { + uint8 flag, flagEx, type, flagX, flagY; + checkone(cl, ch, &flag, &flagEx, &type, &flagX, &flagY); + + cl = flag; + ch = flagEx; + dl = flagX; + dh = flagY; + al = type; +} + +void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) { + *flagX = x / 16; + *flagY = y / 16; + const uint8 *tileData = segRef(data.word(kBuffers)).ptr(kMapflags + (*flagY * 11 + *flagX) * 3, 3); + *flag = tileData[0]; + *flagEx = tileData[1]; + *type = tileData[2]; +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 5443ee50a3..9d5550be5b 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -169,5 +169,6 @@ void showallfree(); bool finishedwalkingCPP(); void finishedwalking(); - + void checkone(); + void checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY); |