diff options
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 2968a5e9b7..67811f91f9 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -840,12 +840,10 @@ void DreamGenContext::fillspace() { void DreamGenContext::dealwithspecial(uint8 firstParam, uint8 secondParam) { uint8 type = firstParam - 220; if (type == 0) { - al = secondParam; - placesetobject(); + placesetobject(secondParam); data.byte(kHavedoneobs) = 1; } else if (type == 1) { - al = secondParam; - removesetobject(); + removesetobject(secondParam); data.byte(kHavedoneobs) = 1; } else if (type == 2) { al = secondParam; @@ -1115,6 +1113,24 @@ void DreamGenContext::deletetaken() { } } +void DreamGenContext::placesetobject() { + placesetobject(al); +} + +void DreamGenContext::placesetobject(uint8 index) { + findormake(index, 0, 0); + getsetad(index)->b58[0] = 0; +} + +void DreamGenContext::removesetobject() { + removesetobject(al); +} + +void DreamGenContext::removesetobject(uint8 index) { + findormake(index, 0xff, 0); + getsetad(index)->b58[0] = 0xff; +} + bool DreamGenContext::isCD() { // The original sources has two codepaths depending if the game is 'if cd' or not // This is a hack to guess which version to use with the assumption that if we have a cd version |