diff options
author | Johannes Schickel | 2009-08-25 23:11:17 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-25 23:11:17 +0000 |
commit | 228ceb3b63cb0e0661259f946faf3fac98d22ee2 (patch) | |
tree | 9f8353a528a7c53a0c3acb76a8c84e09d7245568 | |
parent | b5da8a5cdcd3cd232798ed60f7258bf23e2e9c74 (diff) | |
download | scummvm-rg350-228ceb3b63cb0e0661259f946faf3fac98d22ee2.tar.gz scummvm-rg350-228ceb3b63cb0e0661259f946faf3fac98d22ee2.tar.bz2 scummvm-rg350-228ceb3b63cb0e0661259f946faf3fac98d22ee2.zip |
Fix for bugs #2843081 "FW: Assert starting demo (regression)" and #2843080 "OS: Assert starting demo (regression)".
svn-id: r43743
-rw-r--r-- | engines/cine/cine.cpp | 2 | ||||
-rw-r--r-- | engines/cine/gfx.cpp | 10 | ||||
-rw-r--r-- | engines/cine/gfx.h | 4 |
3 files changed, 16 insertions, 0 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 8756a2fc3c..46aea246bd 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -144,6 +144,8 @@ void CineEngine::initialize() { renderer = new FWRenderer; } + renderer->initialize(); + collisionPage = new byte[320 * 200]; // Clear part buffer as there's nothing loaded into it yet. diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index ddc2d48152..f17c8dd6e1 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -107,6 +107,11 @@ FWRenderer::~FWRenderer() { delete[] _backBuffer; } +bool FWRenderer::initialize() { + _activePal = Palette(kLowPalFormat, kLowPalNumColors); + return true; +} + /* \brief Reset renderer state */ void FWRenderer::clear() { @@ -888,6 +893,11 @@ OSRenderer::~OSRenderer() { } } +bool OSRenderer::initialize() { + _activePal = Palette(kHighPalFormat, kHighPalNumColors); + return true; +} + /*! \brief Reset Operation Stealth renderer state */ void OSRenderer::clear() { diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index f1503a4c46..f65bc31d1a 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -109,6 +109,8 @@ public: FWRenderer(); virtual ~FWRenderer(); + virtual bool initialize(); + /*! \brief Test if renderer is ready to draw */ virtual bool ready() { return _background != NULL; } @@ -167,6 +169,8 @@ public: OSRenderer(); ~OSRenderer(); + bool initialize(); + /*! \brief Test if renderer is ready to draw */ bool ready() { return _bgTable[_currentBg].bg != NULL; } |