FULLPIPE: Implement scene07_initScene()

This commit is contained in:
Eugene Sandulenko 2013-12-19 17:49:27 +02:00
parent 8305183e87
commit 10763d0608
5 changed files with 69 additions and 0 deletions

View File

@ -32,6 +32,7 @@ namespace Fullpipe {
#define ANI_BUTTON 598
#define ANI_BUTTON_6 2988
#define ANI_CLOCK 588
#define ANI_CORNERSITTER 71
#define ANI_DOMINO_3 2732
#define ANI_DADAYASHIK 306
#define ANI_EGGEATER 334
@ -55,6 +56,7 @@ namespace Fullpipe {
#define ANI_NEWBALL 1073
#define ANI_OTMOROZ 419
#define ANI_PLANK 501
#define ANI_PLUSMINUS 2938
#define ANI_SC2_BOX 1020
#define ANI_SC4_BOOT 1035
#define ANI_SC4_COIN 690
@ -351,6 +353,7 @@ namespace Fullpipe {
#define ST_BLK_CLOSED 912
#define ST_BLK_OPEN 913
#define ST_CLK_CLOSED 590
#define ST_CST_HANDLELESS 794
#define ST_DYAS_LIES 318
#define ST_EGTR_MID1 2863
#define ST_EGTR_MID2 2869
@ -402,6 +405,8 @@ namespace Fullpipe {
#define ST_OTM_BOX_LEFT 429
#define ST_OTM_GLS_LEFT 421
#define ST_OTM_VNT_LEFT 434
#define ST_PMS_MINUS 2942
#define ST_PMS_PLUS 2941
#define ST_PNK_WEIGHTLEFT 503
#define ST_PNK_WEIGHTRIGHT 504
#define ST_SPR_UP 544

View File

@ -30,6 +30,7 @@ MODULE_OBJS = \
scenes/scene04.o \
scenes/scene05.o \
scenes/scene06.o \
scenes/scene07.o \
scenes/sceneDbg.o \
scenes/sceneIntro.o

View File

@ -139,6 +139,10 @@ Vars::Vars() {
scene06_mumsyJumpBkPercent = 0;
scene06_mumsyJumpFwPercent = 0;
scene07_lukeAnim = 0;
scene07_lukePercent = 0;
scene07_plusMinus = 0;
selector = 0;
}

View File

@ -177,6 +177,10 @@ public:
int scene06_mumsyJumpBkPercent;
int scene06_mumsyJumpFwPercent;
BehaviorEntryInfo *scene07_lukeAnim;
int scene07_lukePercent;
StaticANIObject *scene07_plusMinus;
PictureObject *selector;
};

View File

@ -0,0 +1,55 @@
/* 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/objectnames.h"
#include "fullpipe/constants.h"
#include "fullpipe/scenes.h"
#include "fullpipe/scene.h"
#include "fullpipe/statics.h"
namespace Fullpipe {
void scene07_initScene(Scene *sc) {
g_vars->scene07_lukeAnim = 0;
g_vars->scene07_lukePercent = 0;
g_vars->scene07_plusMinus = sc->getStaticANIObject1ById(ANI_PLUSMINUS, -1);
if (g_fullpipe->getObjectState(sO_Guard_1) == g_fullpipe->getObjectEnumState(sO_Guard_1, sO_Off))
g_vars->scene07_plusMinus->_statics = g_vars->scene07_plusMinus->getStaticsById(ST_PMS_MINUS);
else
g_vars->scene07_plusMinus->_statics = g_vars->scene07_plusMinus->getStaticsById(ST_PMS_PLUS);
if (g_fullpipe->getObjectState(sO_HareTheNooksiter) == g_fullpipe->getObjectEnumState(sO_HareTheNooksiter, sO_WithoutHandle)) {
Scene *oldsc = g_fullpipe->_currentScene;
g_fullpipe->_currentScene = sc;
sc->getStaticANIObject1ById(ANI_CORNERSITTER, -1)->changeStatics2(ST_CST_HANDLELESS);
g_fullpipe->_currentScene = oldsc;
}
}
} // End of namespace Fullpipe