FULLPIPE: More work on scene02

This commit is contained in:
Eugene Sandulenko 2013-11-19 18:53:17 -08:00
parent 1454408e96
commit 0ba2fbc2d0
6 changed files with 144 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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();

View File

@ -3,6 +3,7 @@ MODULE := engines/fullpipe
MODULE_OBJS = \
behavior.o \
detection.o \
floaters.o \
fullpipe.o \
gameloader.o \
gfx.o \

View File

@ -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"));
}
warning("STUB: scene02_initScene()");
void sceneHandler02_ladderClick() {
warning("STUB: sceneHandler02_ladderClick()");
}
void sceneHandler02_showLadder() {
warning("STUB: sceneHandler02_showLadder()");
}
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;
}