Add initial support for DOS non-interactive demos of The Feeble Files.
svn-id: r40619
This commit is contained in:
parent
e994b94c81
commit
bce47e7eb6
15 changed files with 544 additions and 82 deletions
|
@ -51,11 +51,6 @@ static const GameSpecificSettings simon2_settings = {
|
|||
"SIMON2", // speech_filename
|
||||
};
|
||||
|
||||
static const GameSpecificSettings feeblefiles_settings = {
|
||||
"", // effects_filename
|
||||
"VOICES", // speech_filename
|
||||
};
|
||||
|
||||
static const GameSpecificSettings puzzlepack_settings = {
|
||||
"", // effects_filename
|
||||
"MUSIC", // speech_filename
|
||||
|
@ -75,12 +70,6 @@ AGOSEngine_PuzzlePack::AGOSEngine_PuzzlePack(OSystem *system)
|
|||
_tSecondCount = 0;
|
||||
}
|
||||
|
||||
AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system)
|
||||
: AGOSEngine_Simon2(system) {
|
||||
|
||||
_vgaCurSpritePriority = 0;
|
||||
}
|
||||
|
||||
AGOSEngine_Simon2::AGOSEngine_Simon2(OSystem *system)
|
||||
: AGOSEngine_Simon1(system) {
|
||||
}
|
||||
|
@ -200,7 +189,6 @@ AGOSEngine::AGOSEngine(OSystem *syst)
|
|||
_lastVgaTick = 0;
|
||||
|
||||
_marks = 0;
|
||||
_omniTV = false;
|
||||
_scanFlag = false;
|
||||
|
||||
_scriptVar2 = 0;
|
||||
|
@ -477,7 +465,6 @@ AGOSEngine::AGOSEngine(OSystem *syst)
|
|||
|
||||
_vgaTickCounter = 0;
|
||||
|
||||
_moviePlayer = 0;
|
||||
_sound = 0;
|
||||
|
||||
_effectsPaused = false;
|
||||
|
@ -717,27 +704,6 @@ void AGOSEngine_PuzzlePack::setupGame() {
|
|||
AGOSEngine::setupGame();
|
||||
}
|
||||
|
||||
void AGOSEngine_Feeble::setupGame() {
|
||||
gss = &feeblefiles_settings;
|
||||
_numVideoOpcodes = 85;
|
||||
_vgaMemSize = 7500000;
|
||||
_itemMemSize = 20000;
|
||||
_tableMemSize = 200000;
|
||||
_frameCount = 1;
|
||||
_vgaBaseDelay = 5;
|
||||
_vgaPeriod = 50;
|
||||
_numBitArray1 = 16;
|
||||
_numBitArray2 = 16;
|
||||
_numBitArray3 = 16;
|
||||
_numItemStore = 10;
|
||||
_numTextBoxes = 40;
|
||||
_numVars = 255;
|
||||
|
||||
_numSpeech = 10000;
|
||||
|
||||
AGOSEngine::setupGame();
|
||||
}
|
||||
|
||||
void AGOSEngine_Simon2::setupGame() {
|
||||
gss = &simon2_settings;
|
||||
_tableIndexBase = 1580 / 4;
|
||||
|
@ -968,7 +934,6 @@ AGOSEngine::~AGOSEngine() {
|
|||
delete[] _windowList;
|
||||
|
||||
delete _debugger;
|
||||
delete _moviePlayer;
|
||||
delete _sound;
|
||||
}
|
||||
|
||||
|
@ -1041,18 +1006,6 @@ Common::Error AGOSEngine::go() {
|
|||
playMusic(0, 0);
|
||||
}
|
||||
|
||||
if ((getPlatform() == Common::kPlatformAmiga || getPlatform() == Common::kPlatformMacintosh) &&
|
||||
getGameType() == GType_FF) {
|
||||
_moviePlayer = makeMoviePlayer(this, (const char *)"epic.dxa");
|
||||
assert(_moviePlayer);
|
||||
|
||||
_moviePlayer->load();
|
||||
_moviePlayer->play();
|
||||
|
||||
delete _moviePlayer;
|
||||
_moviePlayer = NULL;
|
||||
}
|
||||
|
||||
runSubroutine101();
|
||||
permitInput();
|
||||
|
||||
|
|
|
@ -165,9 +165,6 @@ class Debugger;
|
|||
|
||||
class AGOSEngine : public Engine {
|
||||
friend class Debugger;
|
||||
friend class MoviePlayer;
|
||||
friend class MoviePlayerDXA;
|
||||
friend class MoviePlayerSMK;
|
||||
|
||||
// Engine APIs
|
||||
Common::Error init();
|
||||
|
@ -286,7 +283,6 @@ protected:
|
|||
uint32 _lastVgaTick;
|
||||
|
||||
uint16 _marks;
|
||||
bool _omniTV;
|
||||
bool _scanFlag;
|
||||
|
||||
bool _scriptVar2;
|
||||
|
@ -550,7 +546,6 @@ protected:
|
|||
|
||||
int _vgaTickCounter;
|
||||
|
||||
MoviePlayer *_moviePlayer;
|
||||
Audio::SoundHandle _modHandle;
|
||||
|
||||
Sound *_sound;
|
||||
|
@ -791,7 +786,7 @@ protected:
|
|||
void killAllTimers();
|
||||
|
||||
void endCutscene();
|
||||
void runSubroutine101();
|
||||
virtual void runSubroutine101();
|
||||
|
||||
virtual void inventoryUp(WindowBlock *window);
|
||||
virtual void inventoryDown(WindowBlock *window);
|
||||
|
@ -1877,7 +1872,7 @@ protected:
|
|||
class AGOSEngine_Feeble : public AGOSEngine_Simon2 {
|
||||
public:
|
||||
AGOSEngine_Feeble(OSystem *system);
|
||||
//~AGOSEngine_Feeble();
|
||||
~AGOSEngine_Feeble();
|
||||
|
||||
virtual void setupGame();
|
||||
virtual void setupOpcodes();
|
||||
|
@ -1920,6 +1915,10 @@ public:
|
|||
void off_b3NotZero();
|
||||
|
||||
protected:
|
||||
friend class MoviePlayer;
|
||||
friend class MoviePlayerDXA;
|
||||
friend class MoviePlayerSMK;
|
||||
|
||||
typedef void (AGOSEngine_Feeble::*OpcodeProcFeeble) ();
|
||||
struct OpcodeEntryFeeble {
|
||||
OpcodeProcFeeble proc;
|
||||
|
@ -1928,12 +1927,18 @@ protected:
|
|||
|
||||
const OpcodeEntryFeeble *_opcodesFeeble;
|
||||
|
||||
MoviePlayer *_moviePlayer;
|
||||
|
||||
uint8 _interactiveVideo;
|
||||
uint16 _vgaCurSpritePriority;
|
||||
|
||||
virtual uint16 to16Wrapper(uint value);
|
||||
virtual uint16 readUint16Wrapper(const void *src);
|
||||
virtual uint32 readUint32Wrapper(const void *src);
|
||||
|
||||
void playVideo(const char *filename, bool lastSceneUsed = false);
|
||||
void stopInteractiveVideo();
|
||||
|
||||
virtual void drawImage(VC10_state *state);
|
||||
void scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY);
|
||||
|
||||
|
@ -1979,6 +1984,8 @@ protected:
|
|||
void linksUp();
|
||||
void linksDown();
|
||||
|
||||
virtual void runSubroutine101();
|
||||
|
||||
void checkUp(WindowBlock *window);
|
||||
void checkDown(WindowBlock *window);
|
||||
virtual void inventoryUp(WindowBlock *window);
|
||||
|
@ -1997,6 +2004,27 @@ protected:
|
|||
virtual char *genSaveName(int slot);
|
||||
};
|
||||
|
||||
class AGOSEngine_FeebleDemo : public AGOSEngine_Feeble {
|
||||
public:
|
||||
AGOSEngine_FeebleDemo(OSystem *system);
|
||||
|
||||
protected:
|
||||
bool _filmMenuUsed;
|
||||
|
||||
virtual Common::Error go();
|
||||
|
||||
virtual void initMouse();
|
||||
virtual void drawMousePointer();
|
||||
|
||||
void exitMenu();
|
||||
void filmMenu();
|
||||
void handleText();
|
||||
void handleWobble();
|
||||
void mainMenu();
|
||||
void startInteractiveVideo(const char *filename);
|
||||
void waitForSpace();
|
||||
};
|
||||
|
||||
class AGOSEngine_PuzzlePack : public AGOSEngine_Feeble {
|
||||
public:
|
||||
AGOSEngine_PuzzlePack(OSystem *system);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
namespace AGOS {
|
||||
|
||||
MoviePlayer::MoviePlayer(AGOSEngine *vm)
|
||||
MoviePlayer::MoviePlayer(AGOSEngine_Feeble *vm)
|
||||
: _vm(vm) {
|
||||
_mixer = _vm->_mixer;
|
||||
|
||||
|
@ -227,7 +227,7 @@ const char * MoviePlayerDXA::_sequenceList[90] = {
|
|||
"wurbatak"
|
||||
};
|
||||
|
||||
MoviePlayerDXA::MoviePlayerDXA(AGOSEngine *vm, const char *name)
|
||||
MoviePlayerDXA::MoviePlayerDXA(AGOSEngine_Feeble *vm, const char *name)
|
||||
: MoviePlayer(vm) {
|
||||
debug(0, "Creating DXA cutscene player");
|
||||
|
||||
|
@ -316,18 +316,28 @@ void MoviePlayerDXA::startSound() {
|
|||
}
|
||||
|
||||
void MoviePlayerDXA::nextFrame() {
|
||||
if (_vm->_mixer->isSoundHandleActive(_bgSound) && (_vm->_mixer->getSoundElapsedTime(_bgSound) * getFrameRate()) / 1000 < (uint32)getCurFrame()) {
|
||||
if (_bgSoundStream && _vm->_mixer->isSoundHandleActive(_bgSound) && (_vm->_mixer->getSoundElapsedTime(_bgSound) * getFrameRate()) / 1000 < (uint32)getCurFrame()) {
|
||||
copyFrameToBuffer(_vm->getBackBuf(), 465, 222, _vm->_screenWidth);
|
||||
return;
|
||||
}
|
||||
|
||||
if (getCurFrame() < getFrameCount()) {
|
||||
decodeNextFrame();
|
||||
copyFrameToBuffer(_vm->getBackBuf(), 465, 222, _vm->_screenWidth);
|
||||
if (_vm->_interactiveVideo == TYPE_OMNITV) {
|
||||
copyFrameToBuffer(_vm->getBackBuf(), 465, 222, _vm->_screenWidth);
|
||||
} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
|
||||
copyFrameToBuffer(_vm->getBackBuf(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, _vm->_screenWidth);
|
||||
}
|
||||
} else {
|
||||
closeFile();
|
||||
_vm->_omniTV = false;
|
||||
_vm->_variableArray[254] = 6747;
|
||||
if (_vm->_interactiveVideo == TYPE_OMNITV) {
|
||||
closeFile();
|
||||
_vm->_interactiveVideo = 0;
|
||||
_vm->_variableArray[254] = 6747;
|
||||
} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
|
||||
_fileStream->seek(_videoInfo.frameOffs);
|
||||
_videoInfo.currentFrame = 0;
|
||||
startSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -374,7 +384,7 @@ bool MoviePlayerDXA::processFrame() {
|
|||
// sync case for the subsequent frames.
|
||||
_ticks = _vm->_system->getMillis();
|
||||
} else {
|
||||
_ticks += getFrameDelay();
|
||||
_ticks += getFrameWaitTime();
|
||||
while (_vm->_system->getMillis() < _ticks)
|
||||
_vm->_system->delayMillis(10);
|
||||
}
|
||||
|
@ -392,7 +402,7 @@ bool MoviePlayerDXA::processFrame() {
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
MoviePlayerSMK::MoviePlayerSMK(AGOSEngine *vm, const char *name)
|
||||
MoviePlayerSMK::MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name)
|
||||
: MoviePlayer(vm), SmackerDecoder(vm->_mixer) {
|
||||
debug(0, "Creating SMK cutscene player");
|
||||
|
||||
|
@ -436,11 +446,20 @@ void MoviePlayerSMK::handleNextFrame() {
|
|||
void MoviePlayerSMK::nextFrame() {
|
||||
if (getCurFrame() < getFrameCount()) {
|
||||
decodeNextFrame();
|
||||
copyFrameToBuffer(_vm->getBackBuf(), 465, 222, _vm->_screenWidth);
|
||||
if (_vm->_interactiveVideo == TYPE_OMNITV) {
|
||||
copyFrameToBuffer(_vm->getBackBuf(), 465, 222, _vm->_screenWidth);
|
||||
} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
|
||||
copyFrameToBuffer(_vm->getBackBuf(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, _vm->_screenWidth);
|
||||
}
|
||||
} else {
|
||||
closeFile();
|
||||
_vm->_omniTV = false;
|
||||
_vm->_variableArray[254] = 6747;
|
||||
if (_vm->_interactiveVideo == TYPE_OMNITV) {
|
||||
closeFile();
|
||||
_vm->_interactiveVideo = 0;
|
||||
_vm->_variableArray[254] = 6747;
|
||||
} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
|
||||
_fileStream->seek(_videoInfo.frameOffs);
|
||||
_videoInfo.currentFrame = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -481,7 +500,7 @@ bool MoviePlayerSMK::processFrame() {
|
|||
// Factory function for creating the appropriate cutscene player
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MoviePlayer *makeMoviePlayer(AGOSEngine *vm, const char *name) {
|
||||
MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name) {
|
||||
char baseName[40];
|
||||
char filename[20];
|
||||
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
|
||||
namespace AGOS {
|
||||
|
||||
class AGOSEngine;
|
||||
class AGOSEngine_Feeble;
|
||||
|
||||
class MoviePlayer {
|
||||
friend class MoviePlayerDXA;
|
||||
friend class MoviePlayerSMK;
|
||||
|
||||
AGOSEngine *_vm;
|
||||
AGOSEngine_Feeble *_vm;
|
||||
|
||||
Audio::Mixer *_mixer;
|
||||
|
||||
|
@ -56,7 +56,12 @@ class MoviePlayer {
|
|||
|
||||
char baseName[40];
|
||||
public:
|
||||
MoviePlayer(AGOSEngine *vm);
|
||||
enum VideoFlags {
|
||||
TYPE_OMNITV = 1,
|
||||
TYPE_LOOPING = 2
|
||||
};
|
||||
|
||||
MoviePlayer(AGOSEngine_Feeble *vm);
|
||||
virtual ~MoviePlayer();
|
||||
|
||||
virtual bool load() = 0;
|
||||
|
@ -75,7 +80,7 @@ class MoviePlayerDXA : public MoviePlayer, ::Graphics::DXADecoder {
|
|||
static const char *_sequenceList[90];
|
||||
uint8 _sequenceNum;
|
||||
public:
|
||||
MoviePlayerDXA(AGOSEngine *vm, const char *name);
|
||||
MoviePlayerDXA(AGOSEngine_Feeble *vm, const char *name);
|
||||
|
||||
bool load();
|
||||
void playVideo();
|
||||
|
@ -92,7 +97,7 @@ private:
|
|||
|
||||
class MoviePlayerSMK : public MoviePlayer, ::Graphics::SmackerDecoder {
|
||||
public:
|
||||
MoviePlayerSMK(AGOSEngine *vm, const char *name);
|
||||
MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name);
|
||||
|
||||
bool load();
|
||||
void playVideo();
|
||||
|
@ -106,7 +111,7 @@ private:
|
|||
void startSound();
|
||||
};
|
||||
|
||||
MoviePlayer *makeMoviePlayer(AGOSEngine *vm, const char *name);
|
||||
MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name);
|
||||
|
||||
} // End of namespace AGOS
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ static const byte feebleFontSize[208] = {
|
|||
};
|
||||
|
||||
uint AGOSEngine::getFeebleFontSize(byte chr) {
|
||||
if (getGameType() == GType_FF && (getFeatures() & GF_DEMO) && chr == 32)
|
||||
return 4;
|
||||
return feebleFontSize[chr - 32];
|
||||
}
|
||||
|
||||
|
|
|
@ -644,6 +644,11 @@ void AGOSEngine_PuzzlePack::initMouse() {
|
|||
_mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1);
|
||||
}
|
||||
|
||||
void AGOSEngine_FeebleDemo::initMouse() {
|
||||
// TODO: Add larger cursor
|
||||
AGOSEngine_Simon1::initMouse();
|
||||
}
|
||||
|
||||
void AGOSEngine_Feeble::initMouse() {
|
||||
_maxCursorWidth = 40;
|
||||
_maxCursorHeight = 40;
|
||||
|
@ -723,6 +728,11 @@ void AGOSEngine_Feeble::drawMousePart(int image, byte x, byte y) {
|
|||
}
|
||||
}
|
||||
|
||||
void AGOSEngine_FeebleDemo::drawMousePointer() {
|
||||
// TODO: Add larger cursor
|
||||
CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF);
|
||||
}
|
||||
|
||||
void AGOSEngine_Feeble::drawMousePointer() {
|
||||
uint cursor;
|
||||
int image, offs;
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "common/savefile.h"
|
||||
#include "common/system.h"
|
||||
|
||||
#include "agos/intern.h"
|
||||
#include "agos/agos.h"
|
||||
|
||||
namespace AGOS {
|
||||
|
@ -100,6 +101,8 @@ static const ADParams detectionParams = {
|
|||
0
|
||||
};
|
||||
|
||||
using namespace AGOS;
|
||||
|
||||
class AgosMetaEngine : public AdvancedMetaEngine {
|
||||
public:
|
||||
AgosMetaEngine() : AdvancedMetaEngine(detectionParams) {}
|
||||
|
@ -154,7 +157,10 @@ bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
|
|||
*engine = new AGOS::AGOSEngine_Simon2(syst);
|
||||
break;
|
||||
case AGOS::GType_FF:
|
||||
*engine = new AGOS::AGOSEngine_Feeble(syst);
|
||||
if (gd->features & GF_DEMO)
|
||||
*engine = new AGOS::AGOSEngine_FeebleDemo(syst);
|
||||
else
|
||||
*engine = new AGOS::AGOSEngine_Feeble(syst);
|
||||
break;
|
||||
case AGOS::GType_PP:
|
||||
*engine = new AGOS::AGOSEngine_PuzzlePack(syst);
|
||||
|
|
|
@ -2236,6 +2236,46 @@ static const AGOSGameDescription gameDescriptions[] = {
|
|||
GF_TALKIE
|
||||
},
|
||||
|
||||
// The Feeble Files - English DOS Demo
|
||||
{
|
||||
{
|
||||
"feeble",
|
||||
"Demo",
|
||||
|
||||
{
|
||||
{ "MAINMENU.SMK", GAME_VGAFILE, "b62df52fc36f514eb0464120853f22b6", 968808},
|
||||
{ NULL, 0, NULL, 0}
|
||||
},
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformPC,
|
||||
ADGF_DEMO
|
||||
},
|
||||
|
||||
GType_FF,
|
||||
GID_FEEBLEFILES,
|
||||
GF_DEMO
|
||||
},
|
||||
|
||||
// The Feeble Files - German DOS Demo
|
||||
{
|
||||
{
|
||||
"feeble",
|
||||
"Demo",
|
||||
|
||||
{
|
||||
{ "MAINMENU.SMK", GAME_VGAFILE, "e18d365044eabea7352934917bbfd2e4", 976436},
|
||||
{ NULL, 0, NULL, 0}
|
||||
},
|
||||
Common::DE_DEU,
|
||||
Common::kPlatformPC,
|
||||
ADGF_DEMO
|
||||
},
|
||||
|
||||
GType_FF,
|
||||
GID_FEEBLEFILES,
|
||||
GF_DEMO
|
||||
},
|
||||
|
||||
// The Feeble Files - English Amiga CD
|
||||
{
|
||||
{
|
||||
|
|
|
@ -581,13 +581,10 @@ void AGOSEngine_Feeble::timerProc() {
|
|||
}
|
||||
}
|
||||
|
||||
if (getGameType() == GType_FF && _omniTV) {
|
||||
if (getGameType() == GType_FF && _interactiveVideo) {
|
||||
// Controls Omni TV videos
|
||||
if (getBitFlag(42)) {
|
||||
_omniTV = false;
|
||||
_moviePlayer->stopVideo();
|
||||
delete _moviePlayer;
|
||||
_moviePlayer = NULL;
|
||||
stopInteractiveVideo();
|
||||
} else {
|
||||
_moviePlayer->nextFrame();
|
||||
}
|
||||
|
@ -597,7 +594,7 @@ void AGOSEngine_Feeble::timerProc() {
|
|||
}
|
||||
|
||||
if (_displayScreen) {
|
||||
if (getGameType() == GType_FF) {
|
||||
if (getGameType() == GType_FF && !(getFeatures() & GF_DEMO)) {
|
||||
if (!getBitFlag(78)) {
|
||||
oracleLogo();
|
||||
}
|
||||
|
|
396
engines/agos/feeble.cpp
Normal file
396
engines/agos/feeble.cpp
Normal file
|
@ -0,0 +1,396 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/config-manager.h"
|
||||
|
||||
#include "agos/intern.h"
|
||||
#include "agos/agos.h"
|
||||
|
||||
namespace AGOS {
|
||||
|
||||
AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system)
|
||||
: AGOSEngine_Simon2(system) {
|
||||
|
||||
_interactiveVideo = 0;
|
||||
_moviePlayer = 0;
|
||||
_vgaCurSpritePriority = 0;
|
||||
}
|
||||
|
||||
AGOSEngine_Feeble::~AGOSEngine_Feeble() {
|
||||
delete _moviePlayer;
|
||||
}
|
||||
|
||||
static const GameSpecificSettings feeblefiles_settings = {
|
||||
"", // effects_filename
|
||||
"VOICES", // speech_filename
|
||||
};
|
||||
|
||||
void AGOSEngine_Feeble::setupGame() {
|
||||
gss = &feeblefiles_settings;
|
||||
_numVideoOpcodes = 85;
|
||||
_vgaMemSize = 7500000;
|
||||
_itemMemSize = 20000;
|
||||
_tableMemSize = 200000;
|
||||
_frameCount = 1;
|
||||
_vgaBaseDelay = 5;
|
||||
_vgaPeriod = 50;
|
||||
_numBitArray1 = 16;
|
||||
_numBitArray2 = 16;
|
||||
_numBitArray3 = 16;
|
||||
_numItemStore = 10;
|
||||
_numTextBoxes = 40;
|
||||
_numVars = 255;
|
||||
|
||||
_numSpeech = 10000;
|
||||
|
||||
AGOSEngine::setupGame();
|
||||
}
|
||||
|
||||
void AGOSEngine_Feeble::runSubroutine101() {
|
||||
if ((getPlatform() == Common::kPlatformAmiga || getPlatform() == Common::kPlatformMacintosh) &&
|
||||
getGameType() == GType_FF) {
|
||||
playVideo("epic.dxa");
|
||||
}
|
||||
|
||||
AGOSEngine::runSubroutine101();
|
||||
}
|
||||
|
||||
void AGOSEngine_Feeble::playVideo(const char *filename, bool lastSceneUsed) {
|
||||
if (shouldQuit())
|
||||
return;
|
||||
|
||||
if (lastSceneUsed)
|
||||
setBitFlag(41, true);
|
||||
|
||||
_moviePlayer = makeMoviePlayer(this, filename);
|
||||
assert(_moviePlayer);
|
||||
|
||||
_moviePlayer->load();
|
||||
_moviePlayer->play();
|
||||
|
||||
delete _moviePlayer;
|
||||
_moviePlayer = NULL;
|
||||
|
||||
if (lastSceneUsed)
|
||||
setBitFlag(41, false);
|
||||
}
|
||||
|
||||
void AGOSEngine_Feeble::stopInteractiveVideo() {
|
||||
if (_interactiveVideo) {
|
||||
_interactiveVideo = 0;
|
||||
_moviePlayer->stopVideo();
|
||||
delete _moviePlayer;
|
||||
_moviePlayer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
AGOSEngine_FeebleDemo::AGOSEngine_FeebleDemo(OSystem *system)
|
||||
: AGOSEngine_Feeble(system) {
|
||||
|
||||
_filmMenuUsed = 0;
|
||||
}
|
||||
|
||||
Common::Error AGOSEngine_FeebleDemo::go() {
|
||||
// Main menu
|
||||
defineBox( 1, 80, 75, 81, 117, kBFBoxDead, 0, NULL);
|
||||
defineBox( 2, 267, 21, 105, 97, kBFBoxDead, 0, NULL);
|
||||
defineBox( 3, 456, 89, 125, 103, kBFBoxDead, 0, NULL);
|
||||
defineBox( 4, 151, 225, 345, 41, kBFBoxDead, 0, NULL);
|
||||
defineBox( 5, 169, 319, 109, 113, kBFBoxDead, 0, NULL);
|
||||
defineBox( 6, 404, 308, 62, 117, kBFBoxDead, 0, NULL);
|
||||
|
||||
// Film menu
|
||||
defineBox(11, 28, 81, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(12, 182, 81, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(13, 335, 81, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(14, 488, 81, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(15, 28, 201, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(16, 182, 201, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(17, 335, 201, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(18, 488, 201, 123, 93, kBFBoxDead, 0, NULL);
|
||||
defineBox(19, 255, 357, 135, 45, kBFBoxDead, 0, NULL);
|
||||
|
||||
// Exit Menu
|
||||
defineBox(21, 548, 421, 42, 21, kBFBoxDead, 0, NULL);
|
||||
|
||||
// Text Window used by Feeble Files Data section
|
||||
if (_language ==Common::DE_DEU) {
|
||||
_textWindow = openWindow(322, 457, 196, 15, 1, 0, 255);
|
||||
} else {
|
||||
_textWindow = openWindow(444, 452, 196, 15, 1, 0, 255);
|
||||
}
|
||||
|
||||
playVideo("winasoft.smk");
|
||||
playVideo("fbigtalk.smk");
|
||||
|
||||
while (!shouldQuit())
|
||||
mainMenu();
|
||||
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
void AGOSEngine_FeebleDemo::exitMenu() {
|
||||
for (int i = 1; i <= 20; i++)
|
||||
disableBox(i);
|
||||
|
||||
enableBox(21);
|
||||
|
||||
playVideo("fhypno.smk");
|
||||
playVideo("fbye1.smk", true);
|
||||
|
||||
HitArea *ha;
|
||||
while (!shouldQuit()) {
|
||||
_lastHitArea = NULL;
|
||||
_lastHitArea3 = NULL;
|
||||
|
||||
while (!shouldQuit()) {
|
||||
if (_lastHitArea3 != 0)
|
||||
break;
|
||||
delay(1);
|
||||
}
|
||||
|
||||
ha = _lastHitArea;
|
||||
|
||||
if (ha != NULL && ha->id == 21)
|
||||
break;
|
||||
}
|
||||
|
||||
playVideo("fbye2.smk");
|
||||
quitGame();
|
||||
delay(0);
|
||||
}
|
||||
|
||||
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()) {
|
||||
if (_lastHitArea3 != 0)
|
||||
break;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
void AGOSEngine_FeebleDemo::handleText() {
|
||||
if (_lastClickRem == _currentBox)
|
||||
return;
|
||||
|
||||
if (_currentBox && (_currentBox->id >= 1 && _currentBox->id <= 6)) {
|
||||
// TODO: Add the subtitles for menu options
|
||||
}
|
||||
|
||||
_lastClickRem = _currentBox;
|
||||
}
|
||||
|
||||
void AGOSEngine_FeebleDemo::handleWobble() {
|
||||
if (_lastClickRem == _currentBox)
|
||||
return;
|
||||
|
||||
stopInteractiveVideo();
|
||||
|
||||
if (_currentBox && (_currentBox->id >= 11 && _currentBox->id <= 19)) {
|
||||
char filename[15];
|
||||
sprintf(filename, "wobble%d.smk", _currentBox->id - 10);
|
||||
|
||||
startInteractiveVideo(filename);
|
||||
}
|
||||
|
||||
_lastClickRem = _currentBox;
|
||||
}
|
||||
|
||||
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;
|
||||
while (!shouldQuit()) {
|
||||
_lastHitArea = NULL;
|
||||
_lastHitArea3 = NULL;
|
||||
|
||||
while (!shouldQuit()) {
|
||||
if (_lastHitArea3 != 0)
|
||||
break;
|
||||
handleText();
|
||||
delay(1);
|
||||
}
|
||||
|
||||
ha = _lastHitArea;
|
||||
|
||||
if (ha == NULL) {
|
||||
} else if (ha->id >= 1 && ha->id <= 6) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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::startInteractiveVideo(const char *filename) {
|
||||
setBitFlag(40, true);
|
||||
_interactiveVideo = MoviePlayer::TYPE_LOOPING;
|
||||
_moviePlayer = makeMoviePlayer(this, filename);
|
||||
assert(_moviePlayer);
|
||||
_moviePlayer->load();
|
||||
_moviePlayer->play();
|
||||
setBitFlag(40, false);
|
||||
}
|
||||
|
||||
void AGOSEngine_FeebleDemo::waitForSpace() {
|
||||
const char *message;
|
||||
|
||||
if (_language == Common::DE_DEU) {
|
||||
message = "Dr<EFBFBD>cken Sie die <Leertaste>, um fortzufahren...";
|
||||
} else {
|
||||
message = "Press <SPACE> to continue...";
|
||||
}
|
||||
|
||||
windowPutChar(_textWindow, 12);
|
||||
for (; *message; message++)
|
||||
windowPutChar(_textWindow, *message);
|
||||
|
||||
mouseOff();
|
||||
while (!shouldQuit()) {
|
||||
delay(1);
|
||||
if (_keyPressed.keycode == Common::KEYCODE_SPACE)
|
||||
break;
|
||||
}
|
||||
_keyPressed.reset();
|
||||
mouseOn();
|
||||
}
|
||||
|
||||
} // End of namespace AGOS
|
|
@ -12,6 +12,7 @@ MODULE_OBJS := \
|
|||
detection.o \
|
||||
draw.o \
|
||||
event.o \
|
||||
feeble.o \
|
||||
gfx.o \
|
||||
icons.o \
|
||||
input.o \
|
||||
|
|
|
@ -575,7 +575,7 @@ void AGOSEngine_Feeble::off_playVideo() {
|
|||
// Omni TV controls
|
||||
if (_moviePlayer) {
|
||||
setBitFlag(42, false);
|
||||
_omniTV = true;
|
||||
_interactiveVideo = MoviePlayer::TYPE_OMNITV;
|
||||
_moviePlayer->play();
|
||||
} else {
|
||||
_variableArray[254] = 6747;
|
||||
|
|
|
@ -157,6 +157,8 @@ bool DXADecoder::loadFile(const char *fileName) {
|
|||
#endif
|
||||
_videoInfo.currentFrame = 0;
|
||||
|
||||
_videoInfo.frameOffs = _fileStream->pos();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -473,6 +473,8 @@ bool SmackerDecoder::loadFile(const char *fileName) {
|
|||
_palette = (byte *)malloc(3 * 256);
|
||||
memset(_palette, 0, 3 * 256);
|
||||
|
||||
_videoInfo.frameOffs = _fileStream->pos();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -154,6 +154,7 @@ protected:
|
|||
uint32 frameCount;
|
||||
int32 frameRate;
|
||||
int32 frameDelay;
|
||||
uint32 frameOffs;
|
||||
uint32 currentFrame;
|
||||
uint32 startTime;
|
||||
} _videoInfo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue