diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 35 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/structs.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 23 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 27 insertions, 38 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 182a4411dd..9fa7f16995 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -7476,40 +7476,6 @@ blankframe: goto showobsloop; } -void DreamGenContext::makebackob() { - STACK_CHECK; - _cmp(data.byte(kNewobs), 0); - if (flags.z()) - return /* (nomake) */; - al = es.byte(si+5); - ah = es.byte(si+8); - push(si); - push(ax); - push(si); - ax = data.word(kObjectx); - bx = data.word(kObjecty); - ah = bl; - si = ax; - cx = 49520; - dx = data.word(kSetframes); - di = (0); - makesprite(); - ax = pop(); - es.word(bx+20) = ax; - ax = pop(); - _cmp(al, 255); - if (!flags.z()) - goto usedpriority; - al = 0; -usedpriority: - es.byte(bx+23) = al; - es.byte(bx+30) = ah; - es.byte(bx+16) = 0; - es.byte(bx+18) = 0; - es.byte(bx+19) = 0; - si = pop(); -} - void DreamGenContext::showallfree() { STACK_CHECK; es = data.word(kBuffers); @@ -21046,7 +21012,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_addlength: addlength(); break; case addr_drawflags: drawflags(); break; case addr_showallobs: showallobs(); break; - case addr_makebackob: makebackob(); break; case addr_showallfree: showallfree(); break; case addr_showallex: showallex(); break; case addr_calcfrframe: calcfrframe(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 130e0f0b5b..2b7149621b 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -505,7 +505,6 @@ public: static const uint16 addr_calcfrframe = 0xc454; static const uint16 addr_showallex = 0xc450; static const uint16 addr_showallfree = 0xc44c; - static const uint16 addr_makebackob = 0xc448; static const uint16 addr_showallobs = 0xc444; static const uint16 addr_drawflags = 0xc43c; static const uint16 addr_addlength = 0xc438; @@ -1559,7 +1558,7 @@ public: void discops(); //void printdirect(); void delthisone(); - void makebackob(); + //void makebackob(); void middlepanel(); void dumpwatch(); void saveload(); diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h index e274375cf4..ac304ae2c2 100644 --- a/engines/dreamweb/structs.h +++ b/engines/dreamweb/structs.h @@ -31,7 +31,8 @@ struct Sprite { uint16 w12; uint8 b14; uint8 b15; - uint16 w16; + uint8 b16; + uint8 b17; uint8 delay; uint8 frame; uint16 obj_data; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 140e278d1d..8c278b5990 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -825,5 +825,28 @@ uint8 *DreamGenContext::getroomspathsCPP() { return (uint8 *)result; } +void DreamGenContext::makebackob() { + if (data.byte(kNewobs) == 0) + return; + uint8 priority = es.byte(si+5); + uint8 type = es.byte(si+8); + Sprite *sprite = makesprite(data.word(kObjectx), data.word(kObjecty), addr_backobject, data.word(kSetframes), 0); + + // Recover es:bx from sprite + es = data.word(kBuffers); + bx = kSpritetable; + Sprite *sprites = (Sprite *)es.ptr(bx, sizeof(Sprite) * 16); + bx += sizeof(Sprite) * (sprite - sprites); + // + WRITE_LE_UINT16(&sprite->obj_data, si); + if (priority == 255) + priority = 0; + sprite->priority = priority; + sprite->type = type; + sprite->b16 = 0; + sprite->delay = 0; + sprite->frame = 0; +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 559c95625d..e72229639b 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -90,6 +90,7 @@ void turnpathoffCPP(uint8 param); void getroomspaths(); uint8 *getroomspathsCPP(); + void makebackob(); void modifychar(); void lockmon(); void cancelch0(); |