aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-14 12:47:51 +0000
committerMartin Kiewitz2009-10-14 12:47:51 +0000
commit7ba018898eb0ca349bb500a6280ad707673deee8 (patch)
tree76c705dd8908c7ded276c4b8b8ac859108c2c276 /engines/sci
parent9dff5c53b4841113a4d1edddda8b39c418f11053 (diff)
downloadscummvm-rg350-7ba018898eb0ca349bb500a6280ad707673deee8.tar.gz
scummvm-rg350-7ba018898eb0ca349bb500a6280ad707673deee8.tar.bz2
scummvm-rg350-7ba018898eb0ca349bb500a6280ad707673deee8.zip
SCI/newgui: implemented code to differentiate between EGA and VGA transitions
svn-id: r45073
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/gui/gui.cpp2
-rw-r--r--engines/sci/gui/gui_transitions.cpp37
-rw-r--r--engines/sci/gui/gui_transitions.h9
3 files changed, 32 insertions, 16 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index f31da098cb..146c28c445 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -55,7 +55,7 @@ SciGui::SciGui(EngineState *state, SciGuiScreen *screen, SciGuiPalette *palette,
: _s(state), _screen(screen), _palette(palette), _cursor(cursor) {
_gfx = new SciGuiGfx(_s, _screen, _palette);
- _transitions = new SciGuiTransitions(this, _screen, _palette);
+ _transitions = new SciGuiTransitions(this, _screen, _palette, _s->resMan->isVGA());
_animate = new SciGuiAnimate(_s, _gfx, _screen, _palette);
_windowMgr = new SciGuiWindowMgr(_screen, _gfx, _animate);
// _gui32 = new SciGui32(_s, _screen, _palette, _cursor); // for debug purposes
diff --git a/engines/sci/gui/gui_transitions.cpp b/engines/sci/gui/gui_transitions.cpp
index 7ee269f9fa..0e22f41b5f 100644
--- a/engines/sci/gui/gui_transitions.cpp
+++ b/engines/sci/gui/gui_transitions.cpp
@@ -37,8 +37,8 @@
namespace Sci {
-SciGuiTransitions::SciGuiTransitions(SciGui *gui, SciGuiScreen *screen, SciGuiPalette *palette)
- : _gui(gui), _screen(screen), _palette(palette) {
+SciGuiTransitions::SciGuiTransitions(SciGui *gui, SciGuiScreen *screen, SciGuiPalette *palette, bool isVGA)
+ : _gui(gui), _screen(screen), _palette(palette), _isVGA(isVGA) {
init();
}
@@ -55,17 +55,28 @@ void SciGuiTransitions::setup(int16 number) {
void SciGuiTransitions::doit(Common::Rect picRect) {
_picRect = picRect;
- switch (_number) {
- case SCI_TRANSITIONS_FADEPALETTE:
- fadeOut();
- setNewScreen();
- fadeIn();
- break;
-
- default:
- warning("SciGuiTransitions: %d not implemented", _number);
- setNewPalette();
- setNewScreen();
+ if (_isVGA) {
+ // === VGA transitions
+ switch (_number) {
+ case SCI_TRANSITIONS_VGA_FADEPALETTE:
+ fadeOut(); setNewScreen(); fadeIn();
+ break;
+
+ default:
+ warning("SciGuiTransitions: VGA-%d not implemented", _number);
+ setNewPalette(); setNewScreen();
+ }
+ } else {
+ // === EGA transitions
+ switch (_number) {
+ case SCI_TRANSITIONS_EGA_FADEPALETTE:
+ fadeOut(); setNewScreen(); fadeIn();
+ break;
+
+ default:
+ warning("SciGuiTransitions: VGA-%d not implemented", _number);
+ setNewPalette(); setNewScreen();
+ }
}
_screen->_picNotValid = 0;
}
diff --git a/engines/sci/gui/gui_transitions.h b/engines/sci/gui/gui_transitions.h
index 10090ada3c..10e098e1db 100644
--- a/engines/sci/gui/gui_transitions.h
+++ b/engines/sci/gui/gui_transitions.h
@@ -31,13 +31,17 @@
namespace Sci {
enum {
- SCI_TRANSITIONS_FADEPALETTE = 10
+ SCI_TRANSITIONS_EGA_FADEPALETTE = 30
+};
+
+enum {
+ SCI_TRANSITIONS_VGA_FADEPALETTE = 10
};
class SciGuiScreen;
class SciGuiTransitions {
public:
- SciGuiTransitions(SciGui *gui, SciGuiScreen *screen, SciGuiPalette *palette);
+ SciGuiTransitions(SciGui *gui, SciGuiScreen *screen, SciGuiPalette *palette, bool isVGA);
~SciGuiTransitions();
void setup(int16 number);
@@ -54,6 +58,7 @@ private:
SciGuiScreen *_screen;
SciGuiPalette *_palette;
+ bool _isVGA;
int16 _number;
Common::Rect _picRect;
};