diff options
author | Max Horn | 2011-12-08 00:04:48 +0100 |
---|---|---|
committer | Max Horn | 2011-12-08 00:24:24 +0100 |
commit | 25b6496643500f03ba4f8fa59d8998a8c7503cd2 (patch) | |
tree | b7175d7e060e44f346a4e43f3005d9242cf5572b | |
parent | b07edcb8febe6fb73c63d6c4eee3a399b78afa6f (diff) | |
download | scummvm-rg350-25b6496643500f03ba4f8fa59d8998a8c7503cd2.tar.gz scummvm-rg350-25b6496643500f03ba4f8fa59d8998a8c7503cd2.tar.bz2 scummvm-rg350-25b6496643500f03ba4f8fa59d8998a8c7503cd2.zip |
DREAMWEB: Convert doFade()
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 2 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 24 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/vgafades.cpp | 13 |
5 files changed, 15 insertions, 26 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 0388555888..90ff457c9f 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -250,6 +250,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'doblocks', 'dochange', 'dodoor', + 'dofade', 'doload', 'dolook', 'domix', @@ -767,7 +768,6 @@ generator = cpp(context, "DreamGen", blacklist = [ 'advisor' : 'advisor', 'additionaltext' : 'additionalText', 'othersmoker' : 'otherSmoker', - 'dofade' : 'doFade', 'useelevator5' : 'useElevator5', 'useelevator4' : 'useElevator4', 'useelevator1' : 'useElevator1', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index bbc909baae..8a114b570f 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -1184,30 +1184,6 @@ void DreamGenContext::transferMap() { _add(data.word(kExframepos), cx); } -void DreamGenContext::doFade() { - STACK_CHECK; - _cmp(data.byte(kFadedirection), 0); - if (flags.z()) - return /* (finishfade) */; - cl = data.byte(kNumtofade); - ch = 0; - al = data.byte(kColourpos); - ah = 0; - ds = data.word(kBuffers); - si = (0+(228*13)+32+60+(32*32)+(11*10*3)); - _add(si, ax); - _add(si, ax); - _add(si, ax); - showGroup(); - al = data.byte(kNumtofade); - _add(al, data.byte(kColourpos)); - data.byte(kColourpos) = al; - _cmp(al, 0); - if (!flags.z()) - return /* (finishfade) */; - fadeCalculation(); -} - void DreamGenContext::fadeToWhite() { STACK_CHECK; es = data.word(kBuffers); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index d7f8462930..92523076dd 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -668,7 +668,6 @@ public: void drawItAll(); void useStereo(); void showOpBox(); - void doFade(); void dumpCurrent(); void showDiaryKeys(); void rollEndCredits2(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index c601481e9f..87e9143716 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -280,6 +280,7 @@ void endPalToStart(); void startPalToEnd(); void palToEndPal(); + void doFade(); void fadeCalculation(); void watchCount(); void zoomIcon(); diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp index a0d92c59c0..7b483179d1 100644 --- a/engines/dreamweb/vgafades.cpp +++ b/engines/dreamweb/vgafades.cpp @@ -60,6 +60,19 @@ void DreamGenContext::palToEndPal() { memcpy(endPalette(), mainPalette(), 256 * 3); } +void DreamGenContext::doFade() { + if (data.byte(kFadedirection) == 0) + return + + engine->processEvents(); + uint8 *src = startPalette() + 3 * data.byte(kColourpos); + engine->setPalette(src, data.byte(kColourpos), data.byte(kNumtofade)); + + data.byte(kColourpos) += data.byte(kNumtofade); + if (data.byte(kColourpos) == 0) + fadeCalculation(); +} + void DreamGenContext::fadeCalculation() { if (data.byte(kFadecount) == 0) { data.byte(kFadedirection) = 0; |