aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-11-19 18:53:17 -0800
committerEugene Sandulenko2013-11-19 19:02:31 -0800
commit0ba2fbc2d0f40d0e25dac7ea4c2e043a0ec2bff8 (patch)
treeb2baedb6a94ff133584000ee886d1ea8add96fc9
parent1454408e96641beecaf3021e9ce4fedf01bce7c3 (diff)
downloadscummvm-rg350-0ba2fbc2d0f40d0e25dac7ea4c2e043a0ec2bff8.tar.gz
scummvm-rg350-0ba2fbc2d0f40d0e25dac7ea4c2e043a0ec2bff8.tar.bz2
scummvm-rg350-0ba2fbc2d0f40d0e25dac7ea4c2e043a0ec2bff8.zip
FULLPIPE: More work on scene02
-rw-r--r--engines/fullpipe/constants.h4
-rw-r--r--engines/fullpipe/floaters.cpp45
-rw-r--r--engines/fullpipe/floaters.h67
-rw-r--r--engines/fullpipe/fullpipe.h3
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/scenes.cpp41
6 files changed, 144 insertions, 17 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 358e285a78..a5bf306b49 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -60,6 +60,10 @@ namespace Fullpipe {
#define MSG_SC1_SHOWOSK 1019
#define MSG_SC1_SHOWOSK2 468
#define MSG_SC1_UTRUBACLICK 1100
+#define MSG_SC2_HIDELADDER 1023
+#define MSG_SC2_LADDERCLICK 1101
+#define MSG_SC2_PUTMANUP 1026
+#define MSG_SC2_SHOWLADDER 1027
#define MSG_SC3_HIDEDOMINO 3177
#define MSG_SC3_ONTAKECOIN 5338
#define MSG_SC3_RELEASEEGG 2681
diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp
new file mode 100644
index 0000000000..384bfa2150
--- /dev/null
+++ b/engines/fullpipe/floaters.cpp
@@ -0,0 +1,45 @@
+/* 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/floaters.h"
+
+namespace Fullpipe {
+
+void Floaters::init(GameVar *var) {
+ warning("STUB: Floaters::init()");
+}
+
+void Floaters::genFlies(Scene *sc, int x, int y, int a5, int a6) {
+ warning("STUB: Floaters::genFlies()");
+}
+
+void Floaters::update() {
+ warning("STUB: Floaters::update()");
+}
+
+void Floaters::stopAll() {
+ warning("STUB: Floaters::stopAll()");
+}
+
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/floaters.h b/engines/fullpipe/floaters.h
new file mode 100644
index 0000000000..a4d64dd79d
--- /dev/null
+++ b/engines/fullpipe/floaters.h
@@ -0,0 +1,67 @@
+/* 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_FLOATERS_H
+#define FULLPIPE_FLOATERS_H
+
+namespace Fullpipe {
+
+class StaticANIObject;
+class Scene;
+
+struct FloaterArray1 {
+ int val1;
+ int val2;
+};
+
+struct FloaterArray2 {
+ StaticANIObject *ani;
+ int val2;
+ int val3;
+ int val4;
+ int val5;
+ int val6;
+ int val7;
+ int val8;
+ double val9;
+ double val11;
+ int val13;
+ int countdown;
+ int val15;
+ int fflags;
+};
+
+class Floaters {
+public:
+ //HRGN hRgn;
+ Common::Array<FloaterArray1 *> _array1;
+ Common::Array<FloaterArray2 *> _array2;
+
+ void init(GameVar *var);
+ void genFlies(Scene *sc, int x, int y, int a5, int a6);
+ void update();
+ void stopAll();
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_FLOATERS_H */
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 2cd0f87d32..db6be8082b 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -52,6 +52,7 @@ class Inventory2;
struct CursorInfo;
struct EntranceInfo;
class ExCommand;
+class Floaters;
class GameProject;
class GameObject;
class GlobalMessageQueueList;
@@ -163,6 +164,8 @@ public:
MovTable *_movTable;
+ Floaters *_floaters;
+
void initMap();
void updateMapPiece(int mapId, int update);
void updateScreen();
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index 380f582c08..5b4169b64b 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -3,6 +3,7 @@ MODULE := engines/fullpipe
MODULE_OBJS = \
behavior.o \
detection.o \
+ floaters.o \
fullpipe.o \
gameloader.o \
gfx.o \
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 2d937510cf..ff483a9029 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -39,6 +39,7 @@
#include "fullpipe/scenes.h"
#include "fullpipe/modal.h"
#include "fullpipe/interaction.h"
+#include "fullpipe/floaters.h"
namespace Fullpipe {
@@ -1593,19 +1594,28 @@ void scene02_initScene(Scene *sc) {
g_vars->scene02_boxDelay = 100 * g_fullpipe->_rnd->getRandomNumber(32767) + 150;
}
- //g_fullpipe->_floaters->init(g_fullpipe->_gameLoader->_gameVar->getSubVarByName("SC_2"));
+ g_fullpipe->_floaters->init(g_fullpipe->_gameLoader->_gameVar->getSubVarByName("SC_2"));
+}
+
+void sceneHandler02_ladderClick() {
+ warning("STUB: sceneHandler02_ladderClick()");
+}
+
+void sceneHandler02_showLadder() {
+ warning("STUB: sceneHandler02_showLadder()");
+}
- warning("STUB: scene02_initScene()");
+void sceneHandler02_hideLadder() {
+ warning("STUB: sceneHandler02_hideLadder()");
}
int sceneHandler02(ExCommand *ex) {
int res = 0;
-#if 0
- if (cmd->_messageKind != 17)
+ if (ex->_messageKind != 17)
return 0;
- switch(cmd->_messageNum) {
+ switch(ex->_messageNum) {
case MSG_SC2_LADDERCLICK:
sceneHandler02_ladderClick();
return 0;
@@ -1615,7 +1625,7 @@ int sceneHandler02(ExCommand *ex) {
return 0;
case MSG_SC2_PUTMANUP:
- g_aniMan2->_priority = 0;
+ g_fullpipe->_aniMan2->_priority = 0;
return 0;
case MSG_SC2_HIDELADDER:
@@ -1624,11 +1634,11 @@ int sceneHandler02(ExCommand *ex) {
case 33:
if (g_fullpipe->_aniMan2) {
- if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200) {
+ if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200)
g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
- if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200 )
- g_currentScene->bg.x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
+ g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
res = 1;
}
@@ -1636,29 +1646,26 @@ int sceneHandler02(ExCommand *ex) {
if (g_vars->scene02_boxOpen) {
if (g_vars->scene02_boxDelay >= 1) {
--g_vars->scene02_boxDelay;
- } else if (g_fullpipe->_floaters.size() >= 1) {
- if (g_fullpipe->_floaters->array2[0]->val5 == -50) {
+ } else if (g_fullpipe->_floaters->_array2.size() >= 1) {
+ if (g_fullpipe->_floaters->_array2[0]->val5 == -50) {
g_fullpipe->_floaters->stopAll();
g_vars->scene02_boxOpen = false;
g_vars->scene02_boxDelay = 100 * g_fullpipe->_rnd->getRandomNumber(32767) + 150;
} else {
- g_floaters.array2[0]->val3 = -50;
+ g_fullpipe->_floaters->_array2[0]->val3 = -50;
}
} else {
g_fullpipe->_floaters->genFlies(g_fullpipe->_currentScene, g_fullpipe->_rnd->getRandomNumber(700) + 100, -50, 0, 0);
- g_vars_scene02_boxDelay = 500 * g_fullpipe->_rnd->getRandomNumber(32767) + 1000;
+ g_vars->scene02_boxDelay = 500 * g_fullpipe->_rnd->getRandomNumber(32767) + 1000;
}
}
g_fullpipe->_floaters->update();
g_fullpipe->_behaviorManager->updateBehaviors();
- startSceneTrack();
+ g_fullpipe->startSceneTrack();
}
-#endif
- warning("STUB: sceneHandler02()");
-
return res;
}