diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 12 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 14 insertions, 21 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index b058d1ea9e..0ca442fa59 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -406,6 +406,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'eden', 'edeninbath', 'edenscdplayer', + 'emergencypurge', 'enablesoundint', 'endgame', 'endgameseq', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 6ecbba7995..42c0f71d2e 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -475,26 +475,6 @@ void DreamGenContext::transferConToEx() { ds.byte(si+2) = 255; } -void DreamGenContext::emergencyPurge() { - STACK_CHECK; -checkpurgeagain: - ax = data.word(kExframepos); - _add(ax, 4000); - _cmp(ax, (30000)); - if (flags.c()) - goto notnearframeend; - purgeAnItem(); - goto checkpurgeagain; -notnearframeend: - ax = data.word(kExtextpos); - _add(ax, 400); - _cmp(ax, (18000)); - if (flags.c()) - return /* (notneartextend) */; - purgeAnItem(); - goto checkpurgeagain; -} - void DreamGenContext::purgeAnItem() { STACK_CHECK; es = data.word(kExtras); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 7bb4793d05..d86e0072ef 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -477,7 +477,6 @@ public: void getExAd(); void transferToEx(); void parser(); - void emergencyPurge(); void transferConToEx(); }; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 3a0ca79a1d..4eea0b72b9 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -3701,4 +3701,16 @@ void DreamBase::incRyanPage() { } +void DreamGenContext::emergencyPurge() { + while (true) { + if (data.word(kExframepos) + 4000 < kExframeslen) { + // Not near frame end + if (data.word(kExtextpos) + 400 < kExtextlen) + return; // notneartextend + } + + purgeAnItem(); + } +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 4cc0ee0027..5bb07adbfa 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -199,5 +199,6 @@ void outOfOpen(); void swapWithOpen(); void swapWithInv(); + void emergencyPurge(); #endif |