aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-05 22:05:14 +0200
committerEugene Sandulenko2014-01-05 22:42:14 +0200
commitc58fa780c36a4a142b157c1a638e5a87c4cf8d22 (patch)
tree28fb6f66d4335ab6ed926e5b7219eb4461d5255a /engines/fullpipe
parent6849120a9ec67eda743bd1a7156d8a89550e115e (diff)
downloadscummvm-rg350-c58fa780c36a4a142b157c1a638e5a87c4cf8d22.tar.gz
scummvm-rg350-c58fa780c36a4a142b157c1a638e5a87c4cf8d22.tar.bz2
scummvm-rg350-c58fa780c36a4a142b157c1a638e5a87c4cf8d22.zip
FULLPIPE: Initial code for scene26
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/scenes/scene26.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes/scene26.cpp b/engines/fullpipe/scenes/scene26.cpp
new file mode 100644
index 0000000000..cc6eeb8e7a
--- /dev/null
+++ b/engines/fullpipe/scenes/scene26.cpp
@@ -0,0 +1,70 @@
+/* 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/objectnames.h"
+#include "fullpipe/constants.h"
+
+#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
+#include "fullpipe/scenes.h"
+#include "fullpipe/statics.h"
+
+#include "fullpipe/interaction.h"
+#include "fullpipe/behavior.h"
+
+
+namespace Fullpipe {
+
+void scene26_initScene(Scene *sc) {
+ g_vars->scene26_chhi = sc->getStaticANIObject1ById(ANI_CHHI, -1);
+ g_vars->scene26_drop = sc->getStaticANIObject1ById(ANI_DROP_26, -1);
+ g_vars->scene26_sockPic = sc->getPictureObjectById(PIC_SC26_SOCK, 0);
+ g_vars->scene26_sock = sc->getStaticANIObject1ById(ANI_SOCK_26, -1);
+ g_vars->scene26_var01 = 200;
+ g_vars->scene26_var02 = 200;
+ g_vars->scene26_var03 = 300;
+ g_vars->scene26_var04 = 300;
+
+ if (g_fp->getObjectState(sO_Hatch_26) == g_fp->getObjectEnumState(sO_Hatch_26, sO_WithSock)) {
+ g_fp->setObjectState(sO_Hatch_26, g_fp->getObjectEnumState(sO_Hatch_26, sO_Closed));
+ g_fp->setObjectState(sO_Sock_26, g_fp->getObjectEnumState(sO_Sock_26, sO_HangsOnPipe));
+ }
+
+ Interaction *inter = getGameLoaderInteractionController()->getInteractionByObjectIds(ANI_LUK26, ANI_MAN, ANI_INV_SOCK);
+
+ if (getGameLoaderInventory()->getCountItemsWithId(ANI_INV_VENT) == 0)
+ inter->_flags &= 0xFFFDFFFF;
+ else
+ inter->_flags |= 0x20000;
+
+ if (g_fp->getObjectState(sO_Sock_26) == g_fp->getObjectEnumState(sO_Sock_26, sO_HangsOnPipe))
+ g_vars->scene26_sockPic->_flags |= 4;
+ else
+ g_vars->scene26_sockPic->_flags &= 0xFFFB;
+
+ if (g_fp->getObjectState(sO_Valve1_26) == g_fp->getObjectEnumState(sO_Valve1_26, sO_Opened))
+ g_fp->playSound(SND_26_018, 1);
+}
+
+} // End of namespace Fullpipe