diff options
-rw-r--r-- | engines/cge2/cge2.h | 2 | ||||
-rw-r--r-- | engines/cge2/cge2_main.cpp | 28 |
2 files changed, 29 insertions, 1 deletions
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h index bca5d1a62a..82f0faff04 100644 --- a/engines/cge2/cge2.h +++ b/engines/cge2/cge2.h @@ -77,6 +77,8 @@ public: void loadScript(const char *fname); void loadSprite(const char *fname, int ref, int scene, V3D &pos); void badLab(const char *fn); + void caveUp(int cav); + void showBak(int ref); const ADGameDescription *_gameDescription; diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index 38320c4a62..dbf9afef99 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -288,8 +288,9 @@ void CGE2Engine::movie(const char *ext) { if (_resman->exist(fn)) { int now = _now; - _now = atoi(ext + 1); + _now = atoi(ext + 2); loadScript(fn); + caveUp(_now); warning("STUB: CGE2Engine::movie()"); @@ -297,6 +298,31 @@ void CGE2Engine::movie(const char *ext) { } } +void CGE2Engine::caveUp(int cav) { + _now = cav; + int bakRef = _now << 8; + if (_music) + _midiPlayer->loadMidi(bakRef); + showBak(bakRef); + + warning("STUB: CGE2Engine::caveUp()"); +} + +void CGE2Engine::showBak(int ref) { + Sprite *spr = _spare->locate(ref); + if (spr != nullptr) { + _bitmapPalette = _vga->_sysPal; + warning("Check again this ^ !"); + spr->expand(); + _bitmapPalette = NULL; + //spr->show(2); + _vga->copyPage(1, 2); + _spare->dispose(spr); + + warning("STUB: CGE2Engine::showBak()"); + } +} + void CGE2Engine::runGame() { warning("STUB: CGE2Engine::runGame()"); } |