aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-08-07 00:43:08 +0300
committerEugene Sandulenko2013-09-06 14:51:11 +0300
commit133a77887f51ba2a01c3a6839606f121326637f9 (patch)
treeeb4210cdcc47a7cc71dbdbe0e8390c0287dd010c /engines
parent8a84a1133fcc21a4115826755bfa1a534b735815 (diff)
downloadscummvm-rg350-133a77887f51ba2a01c3a6839606f121326637f9.tar.gz
scummvm-rg350-133a77887f51ba2a01c3a6839606f121326637f9.tar.bz2
scummvm-rg350-133a77887f51ba2a01c3a6839606f121326637f9.zip
FULLPIPE: Started work on intro
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h1
-rw-r--r--engines/fullpipe/fullpipe.cpp5
-rw-r--r--engines/fullpipe/fullpipe.h4
-rw-r--r--engines/fullpipe/messages.cpp8
-rw-r--r--engines/fullpipe/messages.h6
-rw-r--r--engines/fullpipe/modal.h13
-rw-r--r--engines/fullpipe/scene.h2
-rw-r--r--engines/fullpipe/scenes.cpp27
-rw-r--r--engines/fullpipe/scenes.h44
9 files changed, 93 insertions, 17 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index b609d7b1c6..f578d0c708 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -56,6 +56,7 @@ namespace Fullpipe {
#define PIC_CSR_ITN_RED 5329
#define PIC_CSR_LIFT 5176
#define PIC_CSR_MAP 5339
+#define PIC_IN1_PIPETITLE 5167
#define PIC_INV_MENU 991
#define PIC_MAP_A13 5275
#define PIC_MAP_S01 5223
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index e762331acc..9585f07836 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -33,10 +33,12 @@
#include "fullpipe/behavior.h"
#include "fullpipe/modal.h"
#include "fullpipe/input.h"
+#include "fullpipe/scenes.h"
namespace Fullpipe {
FullpipeEngine *g_fullpipe = 0;
+Vars *g_vars = 0;
FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
// Setup mixer
@@ -61,6 +63,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_soundEnabled = true;
_flgSoundList = true;
+ _sfxVolume = 0;
+
_inputController = 0;
_inputDisabled = false;
@@ -99,6 +103,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_cursorId = 0;
g_fullpipe = this;
+ g_vars = new Vars;
}
FullpipeEngine::~FullpipeEngine() {
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 15bb28ff0e..c76236e43f 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -60,6 +60,7 @@ class NGIArchive;
class Scene;
class SoundList;
class StaticANIObject;
+class Vars;
int global_messageHandler1(ExCommand *cmd);
int global_messageHandler2(ExCommand *cmd);
@@ -126,6 +127,8 @@ public:
bool _soundEnabled;
bool _flgSoundList;
+ int _sfxVolume;
+
GlobalMessageQueueList *_globalMessageQueueList;
MessageHandler *_messageHandlers;
@@ -201,6 +204,7 @@ public:
};
extern FullpipeEngine *g_fullpipe;
+extern Vars *g_vars;
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 9260da6438..0b1fec9bc6 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -62,7 +62,7 @@ bool ExCommand::load(MfcArchive &file) {
_sceneClickY = file.readUint32LE();
_field_20 = file.readUint32LE();
_field_24 = file.readUint32LE();
- _param28 = file.readUint32LE();
+ _keyCode = file.readUint32LE();
_field_2C = file.readUint32LE();
_field_30 = file.readUint32LE();
_field_34 = file.readUint32LE();
@@ -114,7 +114,7 @@ Message::Message() {
_sceneClickY = 0;
_field_20 = 0;
_field_24 = 0;
- _param28 = 0;
+ _keyCode = 0;
_field_2C = 0;
_field_30 = 0;
_field_34 = 0;
@@ -130,7 +130,7 @@ Message::Message(Message *src) {
_sceneClickY = src->_sceneClickY;
_field_20 = src->_field_20;
_field_24 = src->_field_24;
- _param28 = src->_param28;
+ _keyCode = src->_keyCode;
_field_2C = src->_field_2C;
_field_30 = src->_field_30;
_field_34 = src->_field_34;
@@ -146,7 +146,7 @@ Message::Message(int16 parentId, int messageKind, int x, int y, int a6, int a7,
_sceneClickY = sceneClickY;
_field_24 = a7;
_field_20 = a10;
- _param28 = 0;
+ _keyCode = 0;
_field_2C = 0;
_field_30 = 0;
_field_34 = 0;
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index da91fd2189..b59b5947ee 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -42,7 +42,7 @@ class Message : public CObject {
int _sceneClickY;
int _field_20;
int _field_24;
- int _param28;
+ int _keyCode;
int _field_2C;
int _field_30;
int _field_34;
@@ -54,15 +54,13 @@ class Message : public CObject {
};
class ExCommand : public Message {
- friend class CGameLoader;
- friend class MessageQueue;
+ public:
int _messageNum;
int _field_3C;
int _excFlags;
int _parId;
- public:
ExCommand();
ExCommand(ExCommand *src);
ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11);
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index fb2279825e..73236e8e5b 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -41,6 +41,19 @@ class CBaseModalObject {
void saveload();
};
+class CModalIntro : public CBaseModalObject {
+ int _field_8;
+ int _introFlags;
+ int _countDown;
+ int _needRedraw;
+ int _sfxVolume;
+
+ public:
+ CModalIntro();
+
+ virtual bool handleMessage(ExCommand *message);
+};
+
} // End of namespace Fullpipe
#endif /* FULLPIPE_MODAL_H */
diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h
index 2a6fafd037..defa3851e8 100644
--- a/engines/fullpipe/scene.h
+++ b/engines/fullpipe/scene.h
@@ -27,6 +27,8 @@
namespace Fullpipe {
+class MessageQueue;
+
class Scene : public Background {
friend class FullpipeEngine;
friend class SceneTag;
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 68be347402..5af9d98b01 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -35,6 +35,8 @@
#include "fullpipe/behavior.h"
#include "fullpipe/constants.h"
+#include "fullpipe/scenes.h"
+#include "fullpipe/modal.h"
namespace Fullpipe {
@@ -42,6 +44,15 @@ int sceneIntro_updateCursor();
void sceneIntro_initScene(Scene *sc);
int sceneHandlerIntro(ExCommand *cmd);
+Vars::Vars() {
+ sceneIntro_aniin1man = 0;
+ sceneIntro_needSleep = true;
+ sceneIntro_needGetup = false;
+ sceneIntro_skipIntro = true;
+ sceneIntro_playing = false;
+ sceneIntro_needBlackout = false;
+}
+
bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
CGameVar *sceneVar;
Common::Point sceneDim;
@@ -657,20 +668,18 @@ int sceneIntro_updateCursor() {
void sceneIntro_initScene(Scene *sc) {
g_fullpipe->_gameLoader->loadScene(SC_INTRO2);
- warning("STUB: sceneIntro_initScene()");
+ g_vars->sceneIntro_aniin1man = sc->getStaticANIObject1ById(ANI_IN1MAN, -1);
+ g_vars->sceneIntro_needSleep = true;
+ g_vars->sceneIntro_needGetup = false;
+ g_vars->sceneIntro_playing = true;
+ g_vars->sceneIntro_needBlackout = false;
#if 0
- sceneIntro_aniin1man = sc->_getStaticANIObject1ById(ANI_IN1MAN, -1);
- sceneIntro_needSleep = 1;
- sceneIntro_needGetup = 0;
- sceneIntro_dword_477938 = 1;
- sceneIntro_dword_477934 = 0;
-
if (g_fullpipe->_recordEvents || g_fullpipe->_inputArFlag)
- sceneIntro_skipIntro = 0;
+ g_vars->sceneIntro_skipIntro = false;
+#endif
g_fullpipe->_modalObject = new CModalIntro;
-#endif
}
int sceneHandlerIntro(ExCommand *cmd) {
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
new file mode 100644
index 0000000000..9466e14b96
--- /dev/null
+++ b/engines/fullpipe/scenes.h
@@ -0,0 +1,44 @@
+/* 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_SCENES_H
+#define FULLPIPE_SCENES_H
+
+namespace Fullpipe {
+
+class StaticANIObject;
+
+class Vars {
+ public:
+ Vars();
+
+ StaticANIObject *sceneIntro_aniin1man;
+ bool sceneIntro_needSleep;
+ bool sceneIntro_needGetup;
+ bool sceneIntro_skipIntro;
+ bool sceneIntro_playing;
+ bool sceneIntro_needBlackout;
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_SCENES_H */