[Scummvm-cvs-logs] SF.net SVN: scummvm:[35475] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Dec 22 00:43:12 CET 2008
Revision: 35475
http://scummvm.svn.sourceforge.net/scummvm/?rev=35475&view=rev
Author: thebluegr
Date: 2008-12-21 23:43:12 +0000 (Sun, 21 Dec 2008)
Log Message:
-----------
Added some more stubs for FTA2
Modified Paths:
--------------
scummvm/trunk/engines/saga/actor.cpp
scummvm/trunk/engines/saga/interface.cpp
scummvm/trunk/engines/saga/module.mk
scummvm/trunk/engines/saga/saga.cpp
scummvm/trunk/engines/saga/scene.cpp
scummvm/trunk/engines/saga/scene.h
scummvm/trunk/engines/saga/script.cpp
Added Paths:
-----------
scummvm/trunk/engines/saga/introproc_fta2.cpp
Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp 2008-12-21 23:10:31 UTC (rev 35474)
+++ scummvm/trunk/engines/saga/actor.cpp 2008-12-21 23:43:12 UTC (rev 35475)
@@ -1029,6 +1029,11 @@
}
void Actor::drawActors() {
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
if (_vm->_anim->hasCutaway()) {
drawSpeech();
return;
Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp 2008-12-21 23:10:31 UTC (rev 35474)
+++ scummvm/trunk/engines/saga/interface.cpp 2008-12-21 23:43:12 UTC (rev 35475)
@@ -161,6 +161,11 @@
_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];
Added: scummvm/trunk/engines/saga/introproc_fta2.cpp
===================================================================
--- scummvm/trunk/engines/saga/introproc_fta2.cpp (rev 0)
+++ scummvm/trunk/engines/saga/introproc_fta2.cpp 2008-12-21 23:43:12 UTC (rev 35475)
@@ -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
Property changes on: scummvm/trunk/engines/saga/introproc_fta2.cpp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
Modified: scummvm/trunk/engines/saga/module.mk
===================================================================
--- scummvm/trunk/engines/saga/module.mk 2008-12-21 23:10:31 UTC (rev 35474)
+++ scummvm/trunk/engines/saga/module.mk 2008-12-21 23:43:12 UTC (rev 35475)
@@ -16,6 +16,7 @@
interface.o \
introproc_ihnm.o \
introproc_ite.o \
+ introproc_fta2.o \
isomap.o \
itedata.o \
music.o \
Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp 2008-12-21 23:10:31 UTC (rev 35474)
+++ scummvm/trunk/engines/saga/saga.cpp 2008-12-21 23:43:12 UTC (rev 35475)
@@ -176,18 +176,22 @@
// 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 @@
// 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) {
Modified: scummvm/trunk/engines/saga/scene.cpp
===================================================================
--- scummvm/trunk/engines/saga/scene.cpp 2008-12-21 23:10:31 UTC (rev 35474)
+++ scummvm/trunk/engines/saga/scene.cpp 2008-12-21 23:43:12 UTC (rev 35475)
@@ -140,6 +140,13 @@
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() {
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
delete _actionMap;
delete _objectMap;
free(_sceneLUT);
@@ -277,6 +289,12 @@
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::draw() {
+ // Do nothing for SAGA2 games for now
+ if (_vm->isSaga2()) {
+ return;
+ }
+
if (_sceneDescription.flags & kSceneFlagISO) {
_vm->_isoMap->adjustScroll(false);
_vm->_isoMap->draw();
Modified: scummvm/trunk/engines/saga/scene.h
===================================================================
--- scummvm/trunk/engines/saga/scene.h 2008-12-21 23:10:31 UTC (rev 35474)
+++ scummvm/trunk/engines/saga/scene.h 2008-12-21 23:43:12 UTC (rev 35475)
@@ -408,9 +408,10 @@
TextList _textList;
private:
+ int ITEStartProc();
int IHNMStartProc();
int IHNMCreditsProc();
- int ITEStartProc();
+ int FTA2StartProc();
void IHNMLoadCutaways();
bool checkKey();
Modified: scummvm/trunk/engines/saga/script.cpp
===================================================================
--- scummvm/trunk/engines/saga/script.cpp 2008-12-21 23:10:31 UTC (rev 35474)
+++ scummvm/trunk/engines/saga/script.cpp 2008-12-21 23:43:12 UTC (rev 35475)
@@ -85,6 +85,11 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list