diff options
author | Filippos Karapetis | 2011-12-06 00:46:06 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-06 00:46:51 +0200 |
commit | 06ef3452b78c2041e8054c10eb6d1929938d1b1b (patch) | |
tree | 0dda36b9426ade50f591cb421cdf4e6c4999268e /engines/dreamweb/sprite.cpp | |
parent | dc62da925f7818056c4880e0d8aa134839e17638 (diff) | |
download | scummvm-rg350-06ef3452b78c2041e8054c10eb6d1929938d1b1b.tar.gz scummvm-rg350-06ef3452b78c2041e8054c10eb6d1929938d1b1b.tar.bz2 scummvm-rg350-06ef3452b78c2041e8054c10eb6d1929938d1b1b.zip |
DREAMWEB: 'clearbeforeload', 'clearreels', 'getridofreels' ported to C++
Diffstat (limited to 'engines/dreamweb/sprite.cpp')
-rw-r--r-- | engines/dreamweb/sprite.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 5eddb1ca57..7628a919d1 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -1148,5 +1148,29 @@ void DreamGenContext::soundOnReels() { data.word(kLastsoundreel) = -1; } +void DreamGenContext::clearBeforeLoad() { + if (data.byte(kRoomloaded) != 1) + return /* (noclear) */; + + clearReels(); + clearRest(); + data.byte(kRoomloaded) = 0; +} + +void DreamGenContext::clearReels() { + deallocateMem(data.word(kReel1)); + deallocateMem(data.word(kReel2)); + deallocateMem(data.word(kReel3)); +} + +void DreamGenContext::getRidOfReels() { + if (data.byte(kRoomloaded) == 0) + return /* (dontgetrid) */; + + deallocateMem(data.word(kReel1)); + deallocateMem(data.word(kReel2)); + deallocateMem(data.word(kReel3)); +} + } /*namespace dreamgen */ |