aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2008-12-21 23:43:12 +0000
committerFilippos Karapetis2008-12-21 23:43:12 +0000
commitf3db2bf1c33c763cd8fb998c23af908fabc3487d (patch)
treeda4d9ea42e701f7e135f3cc60f61f28f142811a5 /engines/saga
parentf66bd9c57b4e7ec7342cc3642b6ab73567296411 (diff)
downloadscummvm-rg350-f3db2bf1c33c763cd8fb998c23af908fabc3487d.tar.gz
scummvm-rg350-f3db2bf1c33c763cd8fb998c23af908fabc3487d.tar.bz2
scummvm-rg350-f3db2bf1c33c763cd8fb998c23af908fabc3487d.zip
Added some more stubs for FTA2
svn-id: r35475
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/actor.cpp5
-rw-r--r--engines/saga/interface.cpp5
-rw-r--r--engines/saga/introproc_fta2.cpp69
-rw-r--r--engines/saga/module.mk1
-rw-r--r--engines/saga/saga.cpp24
-rw-r--r--engines/saga/scene.cpp23
-rw-r--r--engines/saga/scene.h3
-rw-r--r--engines/saga/script.cpp5
8 files changed, 126 insertions, 9 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 765692292b..4f97f32189 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -1029,6 +1029,11 @@ bool Actor::getSpriteParams(CommonObjectData *commonObjectData, int &frameNumber
}
void Actor::drawActors() {
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
if (_vm->_anim->hasCutaway()) {
drawSpeech();
return;
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 5d28611139..c1c3b4a1d7 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -161,6 +161,11 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
_verbTypeToPanelButton[i] = NULL;
}
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
for (i = 0; i < _mainPanel.buttonsCount; i++) {
if (_mainPanel.buttons[i].type == kPanelButtonVerb) {
_verbTypeToPanelButton[_mainPanel.buttons[i].id] = &_mainPanel.buttons[i];
diff --git a/engines/saga/introproc_fta2.cpp b/engines/saga/introproc_fta2.cpp
new file mode 100644
index 0000000000..2b7172594e
--- /dev/null
+++ b/engines/saga/introproc_fta2.cpp
@@ -0,0 +1,69 @@
+/* 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$
+ *
+ */
+
+// "Faery Tale Adventure II: Halls of the Dead" Intro sequence scene procedures
+
+#include "saga/saga.h"
+#include "saga/scene.h"
+
+#include "sound/mixer.h"
+#include "graphics/video/smk_player.h"
+
+namespace Saga {
+
+class MoviePlayerSMK : Graphics::SMKPlayer {
+protected:
+ virtual void setPalette(byte *pal);
+public:
+ MoviePlayerSMK(Audio::Mixer *mixer);
+ virtual ~MoviePlayerSMK(void);
+};
+
+MoviePlayerSMK::MoviePlayerSMK(Audio::Mixer *mixer)
+ : SMKPlayer(mixer) {
+ debug(0, "Creating SMK cutscene player");
+}
+
+MoviePlayerSMK::~MoviePlayerSMK(void) {
+ closeFile();
+}
+
+void MoviePlayerSMK::setPalette(byte *pal) {
+ // TODO
+}
+
+int Scene::FTA2StartProc() {
+ // STUB
+
+ MoviePlayerSMK *smkPlayer = new MoviePlayerSMK(_vm->_mixer);
+
+ delete smkPlayer;
+
+ _vm->quitGame();
+
+ return !SUCCESS;
+}
+
+} // End of namespace Saga
diff --git a/engines/saga/module.mk b/engines/saga/module.mk
index e124e642a9..93198055a6 100644
--- a/engines/saga/module.mk
+++ b/engines/saga/module.mk
@@ -16,6 +16,7 @@ MODULE_OBJS := \
interface.o \
introproc_ihnm.o \
introproc_ite.o \
+ introproc_fta2.o \
isomap.o \
itedata.o \
music.o \
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index c8604ce6c0..61fa29ecd1 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -176,18 +176,22 @@ Common::Error SagaEngine::init() {
// TODO: implement differences for SAGA2
if (!isSaga2()) {
_sndRes = new SndRes(this);
- _events = new Events(this);
+ }
+
+ _events = new Events(this);
+
+ if (!isSaga2()) {
_font = new Font(this);
_sprite = new Sprite(this);
_anim = new Anim(this);
- _script = new Script(this);
- _interface = new Interface(this); // requires script module
}
-
+
+ _script = new Script(this);
+ _interface = new Interface(this); // requires script module
_scene = new Scene(this);
+ _actor = new Actor(this);
if (!isSaga2()) {
- _actor = new Actor(this);
_palanim = new PalAnim(this);
if (getGameId() == GID_ITE) {
_isoMap = new IsoMap(this);
@@ -225,12 +229,16 @@ Common::Error SagaEngine::init() {
// Initialize system specific sound
_sound = new Sound(this, _mixer);
- _interface->converseInit();
- _script->setVerb(_script->getVerbType(kVerbWalkTo));
+ if (!isSaga2()) {
+ _interface->converseInit();
+ _script->setVerb(_script->getVerbType(kVerbWalkTo));
+ }
_music->setVolume(_musicVolume, 1);
- _gfx->initPalette();
+ if (!isSaga2()) {
+ _gfx->initPalette();
+ }
if (_voiceFilesExist) {
if (getGameId() == GID_IHNM) {
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index b1e239677c..086ec4be4c 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -140,6 +140,13 @@ Scene::Scene(SagaEngine *vm) : _vm(vm) {
uint32 resourceId;
int i;
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ _inGame = false;
+ _sceneLoaded = false;
+ return;
+ }
+
// Load scene module resource context
_sceneContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
if (_sceneContext == NULL) {
@@ -220,6 +227,11 @@ Scene::Scene(SagaEngine *vm) : _vm(vm) {
}
Scene::~Scene() {
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
delete _actionMap;
delete _objectMap;
free(_sceneLUT);
@@ -277,6 +289,12 @@ void Scene::startScene() {
case GID_IHNM:
IHNMStartProc();
break;
+ case GID_DINO:
+ // TODO
+ break;
+ case GID_FTA2:
+ FTA2StartProc();
+ break;
default:
error("Scene::start(): Error: Can't start game... gametype not supported");
break;
@@ -1146,6 +1164,11 @@ void Scene::processSceneResources() {
}
void Scene::draw() {
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
if (_sceneDescription.flags & kSceneFlagISO) {
_vm->_isoMap->adjustScroll(false);
_vm->_isoMap->draw();
diff --git a/engines/saga/scene.h b/engines/saga/scene.h
index 43b8779e10..96f88c3789 100644
--- a/engines/saga/scene.h
+++ b/engines/saga/scene.h
@@ -408,9 +408,10 @@ class Scene {
TextList _textList;
private:
+ int ITEStartProc();
int IHNMStartProc();
int IHNMCreditsProc();
- int ITEStartProc();
+ int FTA2StartProc();
void IHNMLoadCutaways();
bool checkKey();
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index a8391464fe..e369edabde 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -85,6 +85,11 @@ Script::Script(SagaEngine *vm) : _vm(vm) {
error("Script::Script() resource context not found");
}
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
debug(3, "Loading module LUT from resource %i", _vm->getResourceDescription()->moduleLUTResourceId);
_vm->_resource->loadResource(resourceContext, _vm->getResourceDescription()->moduleLUTResourceId, resourcePointer, resourceLength);