void AGOSEngine_FeebleDemo::exitMenu() { for (int i = 1; i <= 20; i++) disableBox(i); enableBox(21); playVideo("fhypno.smk"); playVideo("fbye1.smk", true); HitArea *ha; do { _lastHitArea = NULL; _lastHitArea3 = NULL; while (!shouldQuit() && _lastHitArea3 == 0) { delay(1); } ha = _lastHitArea; } while (!shouldQuit() && !(ha != NULL && ha->id == 21)); playVideo("fbye2.smk"); quitGame(); delay(0); }
void AGOSEngine::unlightMenuStrip() { byte *src; int w, h, i; mouseOff(); Graphics::Surface *screen = _system->lockScreen(); src = (byte *)screen->pixels + 8 * screen->pitch + 272; w = 48; h = 82; do { for (i = 0; i != w; ++i) { if (src[i] != 0) src[i] = 14; } src += screen->pitch; } while (--h); for (i = 120; i != 130; i++) disableBox(i); _system->unlockScreen(); mouseOn(); }
void AGOSEngine::clearMenuStrip() { int i; for (i = 111; i != 115; i++) disableBox(i); if (getGameType() == GType_WW) { setWindowImageEx(2, 101); } else { setWindowImageEx(2, 102); } }
// Elvira 2 and Waxworks specific void AGOSEngine::doMenuStrip(uint menuNum) { uint i; const uint var = (getGameType() == GType_WW) ? 11 : 1; for (i = 111; i != 115; i++) disableBox(i); for (i = var; i != (var + 5); i++) _variableArray[i] = 0; byte *srcPtr = _menuBase; while (menuNum--) { while (READ_BE_UINT16(srcPtr) != 0) srcPtr += 2; srcPtr += 2; } uint id = 111; uint v = var; while (READ_BE_UINT16(srcPtr) != 0) { uint verb = READ_BE_UINT16(srcPtr); _variableArray[v] = verb; HitArea *ha = findBox(id); if (ha != NULL) { ha->flags &= ~kBFBoxDead; ha->verb = verb; } id++; srcPtr += 2; v++; } _variableArray[var + 4] = id - 111; if (getGameType() == GType_WW) { setWindowImageEx(2, 102); } else { setWindowImageEx(2, 103); } }
void AGOSEngine::o_disableBox() { // 110: set hitarea bit 0x40 disableBox(getVarOrWord()); }
void AGOSEngine_FeebleDemo::mainMenu() { for (int i = 1; i <= 6; i++) enableBox(i); for (int i = 11; i <= 19; i++) disableBox(i); playVideo("mmfadein.smk", true); startInteractiveVideo("mainmenu.smk"); HitArea *ha = 0; do { _lastHitArea = NULL; _lastHitArea3 = NULL; while (_lastHitArea3 == 0) { if (shouldQuit()) return; handleText(); delay(1); } ha = _lastHitArea; } while (ha == NULL || !(ha->id >= 1 && ha->id <= 6)); if (shouldQuit()) return; stopInteractiveVideo(); if (ha->id == 1) { // Feeble Files Data playVideo("ffade5.smk"); playVideo("ftext0.smk"); playVideo("ftext1.smk", true); waitForSpace(); playVideo("ftext2.smk", true); waitForSpace(); playVideo("ftext3.smk", true); waitForSpace(); playVideo("ftext4.smk", true); waitForSpace(); playVideo("ftext5.smk", true); waitForSpace(); } else if (ha->id == 2) { // Opening Sequence playVideo("ffade1.smk"); playVideo("musosp1.smk"); playVideo("newcred.smk"); playVideo("fasall.smk"); playVideo("mus5p2.smk"); playVideo("coach.smk"); playVideo("outmin.smk"); } else if (ha->id == 3) { // Technical Information playVideo("ffade3.smk"); playVideo("idfx4a.smk"); playVideo("idfx4b.smk"); playVideo("idfx4c.smk"); playVideo("idfx4d.smk"); playVideo("idfx4e.smk"); playVideo("idfx4f.smk"); playVideo("idfx4g.smk"); } else if (ha->id == 4) { // About AdventureSoft playVideo("ffade2.smk"); playVideo("fscene3b.smk"); playVideo("fscene3a.smk"); playVideo("fscene3c.smk"); playVideo("fscene3g.smk"); } else if (ha->id == 5) { // Video Clips playVideo("ffade4.smk"); filmMenu(); } else if (ha->id == 6) { // Exit InfoDisk playVideo("ffade6.smk"); exitMenu(); } }
void AGOSEngine_FeebleDemo::filmMenu() { for (int i = 1; i <= 6; i++) disableBox(i); for (int i = 11; i <= 19; i++) enableBox(i); if (!_filmMenuUsed) { playVideo("fclipsin.smk", true); } else { playVideo("fclipin2.smk", true); } _filmMenuUsed = true; HitArea *ha; while (!shouldQuit()) { _lastHitArea = NULL; _lastHitArea3 = NULL; while (!shouldQuit() && _lastHitArea3 == 0) { handleWobble(); delay(1); } ha = _lastHitArea; if (ha == NULL) continue; stopInteractiveVideo(); if (ha->id == 11) { playVideo("fgo1.smk"); playVideo("maze.smk"); } else if (ha->id == 12) { playVideo("fgo2.smk"); playVideo("radioin.smk"); } else if (ha->id == 13) { playVideo("fgo3.smk"); playVideo("pad.smk"); } else if (ha->id == 14) { playVideo("fgo4.smk"); playVideo("bridge.smk"); } else if (ha->id == 15) { playVideo("fgo5.smk"); playVideo("pilldie.smk"); } else if (ha->id == 16) { playVideo("fgo6.smk"); playVideo("bikebust.smk"); } else if (ha->id == 17) { playVideo("fgo7.smk"); playVideo("statue.smk"); } else if (ha->id == 18) { playVideo("fgo8.smk"); playVideo("junkout.smk"); } else if (ha->id == 19) { playVideo("fgo9.smk"); break; } playVideo("fclipin2.smk", true); } }