diff options
author | Paul Gilbert | 2011-07-13 19:18:23 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-07-13 19:18:23 +1000 |
commit | 6c9719009223947572c8e81fdefe9e4cd17f717f (patch) | |
tree | d27265c2c156410bcfdf773854a990e8590ae93a /engines | |
parent | 4d0f83babb923527c67157204ba0b8b678b6732a (diff) | |
download | scummvm-rg350-6c9719009223947572c8e81fdefe9e4cd17f717f.tar.gz scummvm-rg350-6c9719009223947572c8e81fdefe9e4cd17f717f.tar.bz2 scummvm-rg350-6c9719009223947572c8e81fdefe9e4cd17f717f.zip |
CGE: Fixed initialising of _shadow that was crashing the intro sequence
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/cge.cpp | 3 | ||||
-rw-r--r-- | engines/cge/cge_main.cpp | 1 | ||||
-rw-r--r-- | engines/cge/vga13h.cpp | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 884af2cd46..527b16d288 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -58,6 +58,7 @@ void CGEEngine::setup() { // Initialise fields _lastFrame = 0; _hero = NULL; + _shadow = NULL; // Create debugger console _console = new CGEConsole(this); @@ -81,8 +82,6 @@ void CGEEngine::setup() { _sprite = new Sprite(this, NULL); _miniCave = new Sprite(this, NULL); _miniCave->_flags._kill = false; - _shadow = new Sprite(this, NULL); - _shadow->_flags._kill = false; _horzLine = new HorizLine(this); _infoLine = new InfoLine(this, INFO_W); _cavLight = new CavLight(this); diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 16e21e1f73..6e2721f8fc 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -1629,6 +1629,7 @@ void CGEEngine::runGame() { if ((_shadow = _sprite) != NULL) { _shadow->_ref = 2; _shadow->_flags._tran = true; + _shadow->_flags._kill = false; _hero->_flags._shad = true; _vga->_showQ->insert(_vga->_spareQ->remove(_shadow), _hero); } diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index d0e267ef38..c36d747295 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -880,6 +880,7 @@ void Queue::insert(Sprite *spr, Sprite *nxt) { if (!_tail) _tail = spr; } else { + assert(nxt); spr->_next = nxt; spr->_prev = nxt->_prev; if (spr->_prev) |