aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-23 13:33:28 +0300
committerEugene Sandulenko2013-09-06 14:51:05 +0300
commitf54055d1eece57b4d939e1d0a96cbb379b955b39 (patch)
treed1bb41b37e42ed2c244574eafe29fc7200ef5135 /engines
parent22eedf56002b0d1b92d5bf51ff790cc7ac036151 (diff)
downloadscummvm-rg350-f54055d1eece57b4d939e1d0a96cbb379b955b39.tar.gz
scummvm-rg350-f54055d1eece57b4d939e1d0a96cbb379b955b39.tar.bz2
scummvm-rg350-f54055d1eece57b4d939e1d0a96cbb379b955b39.zip
FULLPIPE: Finished stubbing SceneSwitcher. Added Behavior Manager
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/behavior.cpp39
-rw-r--r--engines/fullpipe/behavior.h66
-rw-r--r--engines/fullpipe/fullpipe.cpp4
-rw-r--r--engines/fullpipe/fullpipe.h4
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/scenes.cpp10
-rw-r--r--engines/fullpipe/sound.cpp4
7 files changed, 127 insertions, 1 deletions
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
new file mode 100644
index 0000000000..e9d4be8207
--- /dev/null
+++ b/engines/fullpipe/behavior.cpp
@@ -0,0 +1,39 @@
+/* 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.
+ *
+ */
+
+#include "fullpipe/fullpipe.h"
+
+#include "fullpipe/objects.h"
+#include "fullpipe/behavior.h"
+
+namespace Fullpipe {
+
+BehaviorManager::BehaviorManager() {
+ _scene = 0;
+ _isActive = 1;
+}
+
+void BehaviorManager::initBehavior(Scene *scene, CGameVar *var) {
+ warning("STUB: initBehavior()");
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h
new file mode 100644
index 0000000000..5e3b09086d
--- /dev/null
+++ b/engines/fullpipe/behavior.h
@@ -0,0 +1,66 @@
+/* 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.
+ *
+ */
+
+#ifndef FULLPIPE_BEHAVIOR_H
+#define FULLPIPE_BEHAVIOR_H
+
+namespace Fullpipe {
+
+class BehaviorManager : public CObject {
+ CObArray _behaviors;
+ Scene *_scene;
+ bool _isActive;
+
+ public:
+ BehaviorManager();
+
+ void initBehavior(Scene *scene, CGameVar *var);
+};
+
+struct BehaviorEntryInfo {
+ int _messageQueue;
+ int _delay;
+ int _percent;
+ int _flags;
+};
+
+struct BehaviorEntry {
+ int _staticsId;
+ int _itemsCount;
+ int _flags;
+ BehaviorEntryInfo *_items;
+};
+
+struct BehaviorInfo {
+ StaticANIObject *_ani;
+ int _staticsId;
+ int _counter;
+ int _counterMax;
+ int _flags;
+ int _subIndex;
+ int _itemsCount;
+ BehaviorEntryInfo *_items;
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_BEHAVIOR_H */
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index bcaca93836..fa332d10d3 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -32,6 +32,7 @@
#include "fullpipe/objects.h"
#include "fullpipe/gameloader.h"
#include "fullpipe/messagequeue.h"
+#include "fullpipe/behavior.h"
namespace Fullpipe {
@@ -74,6 +75,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_updateScreenCallback = 0;
_updateCursorCallback = 0;
+ _behaviorManager = 0;
+
_cursorId = 0;
g_fullpipe = this;
@@ -86,6 +89,7 @@ FullpipeEngine::~FullpipeEngine() {
void FullpipeEngine::initialize() {
_globalMessageQueueList = new GlobalMessageQueueList;
+ _behaviorManager = new BehaviorManager;
}
Common::Error FullpipeEngine::run() {
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index ecc2a0344a..4415115588 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -43,6 +43,7 @@ namespace Fullpipe {
enum FullpipeGameFeatures {
};
+class BehaviorManager;
class CGameLoader;
class CGameVar;
class CInputController;
@@ -113,6 +114,8 @@ public:
GlobalMessageQueueList *_globalMessageQueueList;
MessageHandler *_messageHandlers;
+ BehaviorManager *_behaviorManager;
+
bool _needQuit;
void initObjectStates();
@@ -136,6 +139,7 @@ public:
bool sceneSwitcher(EntranceInfo *entrance);
Scene *accessScene(int sceneId);
+ void setSceneMusicParameters(CGameVar *var);
NGIArchive *_currArchive;
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index 62d9aa3f1c..934d916ed1 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -1,6 +1,7 @@
MODULE := engines/fullpipe
MODULE_OBJS = \
+ behavior.o \
detection.o \
fullpipe.o \
gameloader.o \
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index c0a6a82ec4..9359709b19 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -32,6 +32,7 @@
#include "fullpipe/motion.h"
#include "fullpipe/input.h"
#include "fullpipe/messagequeue.h"
+#include "fullpipe/behavior.h"
#include "fullpipe/gameobj.h"
@@ -39,6 +40,7 @@ namespace Fullpipe {
int sceneIntro_updateCursor();
void sceneIntro_initScene(Scene *sc);
+int sceneHandlerIntro(ExCommand *cmd);
bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
CGameVar *sceneVar;
@@ -631,7 +633,7 @@ int sceneIntro_updateCursor() {
void sceneIntro_initScene(Scene *sc) {
g_fullpipe->_gameLoader->loadScene(SC_INTRO2);
- warning("STUB: FullpipeEngine::sceneIntro_initScene()");
+ warning("STUB: sceneIntro_initScene()");
#if 0
sceneIntro_aniin1man = sc->_getStaticANIObject1ById(ANI_IN1MAN, -1);
@@ -647,4 +649,10 @@ void sceneIntro_initScene(Scene *sc) {
#endif
}
+int sceneHandlerIntro(ExCommand *cmd) {
+ warning("STUB: sceneHandlerIntro()");
+
+ return 0;
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index 8323a57bae..ced3bf1c11 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -106,4 +106,8 @@ void Sound::updateVolume() {
warning("STUB Sound::updateVolume()");
}
+void FullpipeEngine::setSceneMusicParameters(CGameVar *var) {
+ warning("STUB: FullpipeEngine::setSceneMusicParameters()");
+}
+
} // End of namespace Fullpipe