diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 2 |
2 files changed, 20 insertions, 2 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index dc05e455ff..49b0012927 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -942,7 +942,7 @@ void DreamGenContext::backobject(Sprite* sprite) { sprite->delay = objData->delay; if (objData->type == 6) - widedoor(); + widedoor(sprite, objData); else if (objData->type == 5) random(sprite, objData); else if (objData->type == 4) @@ -950,7 +950,7 @@ void DreamGenContext::backobject(Sprite* sprite) { else if (objData->type == 3) liftsprite(sprite, objData); else if (objData->type == 2) - doorway(); + doorway(sprite, objData); else if (objData->type == 1) constant(sprite, objData); else @@ -976,6 +976,22 @@ void DreamGenContext::random(Sprite* sprite, ObjData* objData) { sprite->b15 = objData->b18[r&7]; } +void DreamGenContext::doorway(Sprite* sprite, ObjData* objData) { + data.byte(kDoorcheck1) = -24; + data.byte(kDoorcheck2) = 10; + data.byte(kDoorcheck3) = -30; + data.byte(kDoorcheck4) = 10; + dodoor(sprite, objData); +} + +void DreamGenContext::widedoor(Sprite* sprite, ObjData* objData) { + data.byte(kDoorcheck1) = -24; + data.byte(kDoorcheck2) = 24; + data.byte(kDoorcheck3) = -30; + data.byte(kDoorcheck4) = 24; + dodoor(sprite, objData); +} + void DreamGenContext::dodoor() { Sprite *sprite = (Sprite*)es.ptr(bx, sizeof(Sprite)); ObjData *objData = (ObjData*)ds.ptr(di, 0); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 63a898acc9..4b7f956296 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -35,6 +35,8 @@ void random(Sprite* sprite, ObjData* objData); void dodoor(); void dodoor(Sprite* sprite, ObjData* objData); + void doorway(Sprite* sprite, ObjData* objData); + void widedoor(Sprite* sprite, ObjData* objData); void liftsprite(); void liftsprite(Sprite* sprite, ObjData* objData); void turnpathonCPP(uint8 param); |