aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-02 00:07:22 +0200
committerEugene Sandulenko2014-01-02 00:48:34 +0200
commit4b91d62d6459173b0d7046bbb7ad1a7106cd852e (patch)
treeefaed010578ff074639382d93dbd2d1b4b794ff3
parente92dc6911785660a8e0d9e1db407aa52872f9609 (diff)
downloadscummvm-rg350-4b91d62d6459173b0d7046bbb7ad1a7106cd852e.tar.gz
scummvm-rg350-4b91d62d6459173b0d7046bbb7ad1a7106cd852e.tar.bz2
scummvm-rg350-4b91d62d6459173b0d7046bbb7ad1a7106cd852e.zip
FULLPIPE: Implement sceneHandler17_fillBottle()
-rw-r--r--engines/fullpipe/constants.h9
-rw-r--r--engines/fullpipe/scenes/scene17.cpp22
2 files changed, 29 insertions, 2 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 2ef2b5448c..ef3fa44034 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -689,10 +689,13 @@ namespace Fullpipe {
#define ST_MUG_FULL 1360
// Scene 17
+#define ANI_BOOT_17 4220
#define ANI_HAND17 1446
+#define ANI_INV_BOTTLE 1418
#define ANI_INV_SUGAR 1410
#define ANI_JET_17 2746
#define ANI_MUG_17 2737
+#define ANI_SAMOGONSHCHIK 1397
#define MSG_SC17_DROP 3414
#define MSG_SC17_FILLBOTTLE 1436
#define MSG_SC17_HIDESUGAR 1417
@@ -706,12 +709,18 @@ namespace Fullpipe {
#define QU_HND17_ATTRACT 1455
#define QU_HND17_TOCYCLE 1454
#define QU_JET17_DROP 3295
+#define QU_JET17_FLOW 3294
+#define QU_SC17_FILLBOOT 4237
+#define QU_SC17_FILLBOTTLE 1437
+#define QU_SC17_FILLMUG 2750
#define QU_SC17_FILLMUG_DROP 3415
#define QU_SC17_SHOWBOTTLE 1429
#define QU_SC17_SHOWSUGAR 1415
+#define QU_SMG_FILLBOTTLE 1433
#define ST_HND17_ATTRACT 1451
#define ST_HND17_EMPTY 1448
#define ST_MUG17_EMPTY 2739
+#define ST_SMG_SIT 1399
// Scene 24
#define ANI_DROP_24 3505
diff --git a/engines/fullpipe/scenes/scene17.cpp b/engines/fullpipe/scenes/scene17.cpp
index d7cd25bd6b..2b95c37afb 100644
--- a/engines/fullpipe/scenes/scene17.cpp
+++ b/engines/fullpipe/scenes/scene17.cpp
@@ -62,7 +62,18 @@ void sceneHandler17_drop() {
}
void sceneHandler17_fillBottle() {
- warning("STUB: sceneHandler17_fillBottle()");
+ StaticANIObject *bottle = g_fp->_currentScene->getStaticANIObject1ById(ANI_INV_BOTTLE, -1);
+ StaticANIObject *mug = g_fp->_currentScene->getStaticANIObject1ById(ANI_MUG_17, -1);
+ StaticANIObject *boot = g_fp->_currentScene->getStaticANIObject1ById(ANI_BOOT_17, -1);
+
+ if (bottle && (bottle->_flags & 4))
+ chainQueue(QU_SC17_FILLBOTTLE, 1);
+ else if (mug && (mug->_flags & 4) && mug->_statics->_staticsId == ST_MUG17_EMPTY)
+ chainQueue(QU_SC17_FILLMUG, 1);
+ else if (boot && (boot->_flags & 4))
+ chainQueue(QU_SC17_FILLBOOT, 1);
+ else
+ chainQueue(QU_JET17_FLOW, 1);
}
void sceneHandler17_testTruba() {
@@ -87,7 +98,14 @@ void sceneHandler17_showSugar() {
}
void sceneHandler17_moonshineFill() {
- warning("STUB: sceneHandler17_moonshineFill()");
+ StaticANIObject *moonshiner = g_fp->_currentScene->getStaticANIObject1ById(ANI_SAMOGONSHCHIK, -1);
+
+ if (!(moonshiner->_flags & 0x80)) {
+ moonshiner->changeStatics2(ST_SMG_SIT);
+ chainObjQueue(moonshiner, QU_SMG_FILLBOTTLE, 1);
+
+ g_vars->scene17_var06 = 0;
+ }
}
void sceneHandler17_updateFlies() {