Skip to content

Commit

Permalink
CGE2: Add caveUp() and showBak().
Browse files Browse the repository at this point in the history
  • Loading branch information
uruk committed May 13, 2014
1 parent 6e50915 commit 86c4e83
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 2 additions & 0 deletions engines/cge2/cge2.h
Expand Up @@ -77,6 +77,8 @@ class CGE2Engine : public Engine {
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;

Expand Down
28 changes: 27 additions & 1 deletion engines/cge2/cge2_main.cpp
Expand Up @@ -288,15 +288,41 @@ 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()");

_now = now;
}
}

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()");
}
Expand Down

0 comments on commit 86c4e83

Please sign in to comment.