aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-24 21:45:17 +0000
committerMartin Kiewitz2010-04-24 21:45:17 +0000
commit194bdd9b8375ae6612ef8ee2c733b6349c12d0fe (patch)
tree64421739ff3104aed4d677c2d5619e406ae1a0b1
parent8f9dd90a871dee20ccb61efc2a5727f7a11b4a05 (diff)
downloadscummvm-rg350-194bdd9b8375ae6612ef8ee2c733b6349c12d0fe.tar.gz
scummvm-rg350-194bdd9b8375ae6612ef8ee2c733b6349c12d0fe.tar.bz2
scummvm-rg350-194bdd9b8375ae6612ef8ee2c733b6349c12d0fe.zip
SCI: reverting r48787 port updates were actually introduced (heard that before) in SCI1. I used the outdated wiki before and that one lists qfg2 and xmas90ega being SCI01. They are actually SCI1
svn-id: r48789
-rw-r--r--engines/sci/event.cpp5
-rw-r--r--engines/sci/event.h2
-rw-r--r--engines/sci/graphics/animate.cpp18
-rw-r--r--engines/sci/graphics/animate.h4
-rw-r--r--engines/sci/graphics/gui.cpp4
-rw-r--r--engines/sci/graphics/gui.h2
-rw-r--r--engines/sci/sci.cpp7
7 files changed, 15 insertions, 27 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 5017dc6a63..6477ca0bea 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -36,8 +36,9 @@ namespace Sci {
#define SCANCODE_ROWS_NR 3
-SciEvent::SciEvent(bool fontIsExtended)
- : _fontIsExtended(fontIsExtended) {
+SciEvent::SciEvent(ResourceManager *resMan) {
+ // Check, if font of current game includes extended chars
+ _fontIsExtended = resMan->detectFontExtended();
}
SciEvent::~SciEvent() {
diff --git a/engines/sci/event.h b/engines/sci/event.h
index 4b40834eb6..9301b1ca09 100644
--- a/engines/sci/event.h
+++ b/engines/sci/event.h
@@ -113,7 +113,7 @@ struct sciEvent {
class SciEvent {
public:
- SciEvent(bool fontIsExtended);
+ SciEvent(ResourceManager *resMgr);
~SciEvent();
sciEvent get(unsigned int mask);
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 8c355acb08..a8c4041e8b 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -42,8 +42,8 @@
namespace Sci {
-GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, GfxCursor *cursor, GfxTransitions *transitions, bool fontIsExtended)
- : _s(state), _cache(cache), _ports(ports), _paint16(paint16), _screen(screen), _palette(palette), _cursor(cursor), _transitions(transitions), _fontIsExtended(fontIsExtended) {
+GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, GfxCursor *cursor, GfxTransitions *transitions)
+ : _s(state), _cache(cache), _ports(ports), _paint16(paint16), _screen(screen), _palette(palette), _cursor(cursor), _transitions(transitions) {
init();
}
@@ -66,14 +66,6 @@ void GfxAnimate::init() {
// (found in larry 1)
if (!_s->_segMan->findObjectByName("fastCast").isNull())
_ignoreFastCast = true;
-
- // SCI01 introduced port-update calls, although only the non multilingual games qfg2 and xmas90ega
- // So we enable those for SCI1+ games all the time and for SCI01 games that don't have extended fonts
- _doPortUpdate = false;
- if ((getSciVersion() == SCI_VERSION_01) && (!_fontIsExtended))
- _doPortUpdate = true;
- if (getSciVersion() > SCI_VERSION_01)
- _doPortUpdate = true;
}
void GfxAnimate::disposeLastCast() {
@@ -639,13 +631,13 @@ void GfxAnimate::kernelAnimate(reg_t listReference, bool cycle, int argc, reg_t
fill(old_picNotValid);
if (old_picNotValid) {
- // beginUpdate()/endUpdate() were introduced SCI01 (xmas90ega and qfg2 only), in SCI1+ all the time
+ // beginUpdate()/endUpdate() were introduced SCI1
// calling those for SCI0 will work most of the time but breaks minor stuff like percentage bar of qfg1ega
// at the character skill screen
- if (_doPortUpdate)
+ if (getSciVersion() >= SCI_VERSION_1_EGA)
_ports->beginUpdate(_ports->_picWind);
update();
- if (_doPortUpdate)
+ if (getSciVersion() >= SCI_VERSION_1_EGA)
_ports->endUpdate(_ports->_picWind);
}
diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h
index 5b349c969b..2cc59b1767 100644
--- a/engines/sci/graphics/animate.h
+++ b/engines/sci/graphics/animate.h
@@ -86,7 +86,7 @@ class GfxTransitions;
*/
class GfxAnimate {
public:
- GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, GfxCursor *cursor, GfxTransitions *transitions, bool fontIsExtended);
+ GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, GfxCursor *cursor, GfxTransitions *transitions);
virtual ~GfxAnimate();
// FIXME: Don't store EngineState
@@ -133,8 +133,6 @@ private:
AnimateEntry *_lastCastData;
bool _ignoreFastCast;
- bool _fontIsExtended;
- bool _doPortUpdate;
};
} // End of namespace Sci
diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp
index 02b1101ec2..3316fadb56 100644
--- a/engines/sci/graphics/gui.cpp
+++ b/engines/sci/graphics/gui.cpp
@@ -51,7 +51,7 @@
namespace Sci {
-SciGui::SciGui(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio, bool fontIsExtended)
+SciGui::SciGui(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio)
: _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor), _ports(ports), _audio(audio) {
// FIXME/TODO: If SciGui inits all the stuff below, then it should *own* it,
@@ -66,7 +66,7 @@ SciGui::SciGui(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCa
_paint16 = new GfxPaint16(g_sci->getResMan(), _s->_segMan, g_sci->getKernel(), this, _cache, _ports, _coordAdjuster, _screen, _palette, _transitions);
g_sci->_gfxPaint = _paint16;
g_sci->_gfxPaint16 = _paint16;
- _animate = new GfxAnimate(_s, _cache, _ports, _paint16, _screen, _palette, _cursor, _transitions, fontIsExtended);
+ _animate = new GfxAnimate(_s, _cache, _ports, _paint16, _screen, _palette, _cursor, _transitions);
g_sci->_gfxAnimate = _animate;
_text16 = new GfxText16(g_sci->getResMan(), _cache, _ports, _paint16, _screen);
_controls = new GfxControls(_s->_segMan, _ports, _paint16, _text16, _screen);
diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h
index acab798415..732e195026 100644
--- a/engines/sci/graphics/gui.h
+++ b/engines/sci/graphics/gui.h
@@ -46,7 +46,7 @@ class GfxTransitions;
class SciGui {
public:
- SciGui(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio, bool fontIsExtended);
+ SciGui(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio);
virtual ~SciGui();
virtual void init(bool usesOldGfxFunctions);
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 64c721cdb8..28bc003478 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -182,10 +182,7 @@ Common::Error SciEngine::run() {
_gamestate = new EngineState(_vocabulary, segMan);
- // Detect extended font used in multilingual games
- bool fontIsExtended = _resMan->detectFontExtended();
-
- _gamestate->_event = new SciEvent(fontIsExtended);
+ _gamestate->_event = new SciEvent(_resMan);
if (script_init_engine(_gamestate))
return Common::kUnknownError;
@@ -202,7 +199,7 @@ Common::Error SciEngine::run() {
} else {
#endif
_gfxPorts = new GfxPorts(segMan, screen);
- _gui = new SciGui(_gamestate, screen, palette, cache, cursor, _gfxPorts, _audio, fontIsExtended);
+ _gui = new SciGui(_gamestate, screen, palette, cache, cursor, _gfxPorts, _audio);
#ifdef ENABLE_SCI32
_gui32 = 0;
_gfxFrameout = 0;