mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-15 13:11:32 +00:00
FULLPIPE: Further work on sceneSwitcher()
This commit is contained in:
parent
3ab56b0cc8
commit
c76bec2646
@ -30,6 +30,7 @@
|
|||||||
#include "fullpipe/fullpipe.h"
|
#include "fullpipe/fullpipe.h"
|
||||||
#include "fullpipe/objectnames.h"
|
#include "fullpipe/objectnames.h"
|
||||||
#include "fullpipe/objects.h"
|
#include "fullpipe/objects.h"
|
||||||
|
#include "fullpipe/messagequeue.h"
|
||||||
|
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
@ -58,21 +59,32 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
|
|||||||
|
|
||||||
_needQuit = false;
|
_needQuit = false;
|
||||||
|
|
||||||
|
_aniMan = 0;
|
||||||
|
_scene2 = 0;
|
||||||
|
|
||||||
|
_globalMessageQueueList = 0;
|
||||||
|
|
||||||
g_fullpipe = this;
|
g_fullpipe = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FullpipeEngine::~FullpipeEngine() {
|
FullpipeEngine::~FullpipeEngine() {
|
||||||
delete _rnd;
|
delete _rnd;
|
||||||
|
delete _globalMessageQueueList;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FullpipeEngine::initialize() {
|
||||||
|
_globalMessageQueueList = new GlobalMessageQueueList;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Error FullpipeEngine::run() {
|
Common::Error FullpipeEngine::run() {
|
||||||
|
|
||||||
const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
|
const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
|
||||||
// Initialize backend
|
// Initialize backend
|
||||||
initGraphics(800, 600, true, &format);
|
initGraphics(800, 600, true, &format);
|
||||||
|
|
||||||
_backgroundSurface.create(800, 600, format);
|
_backgroundSurface.create(800, 600, format);
|
||||||
|
|
||||||
|
initialize();
|
||||||
|
|
||||||
_isSaveAllowed = false;
|
_isSaveAllowed = false;
|
||||||
|
|
||||||
loadGam("fullpipe.gam");
|
loadGam("fullpipe.gam");
|
||||||
|
@ -49,6 +49,8 @@ class CGameVar;
|
|||||||
class CInventory2;
|
class CInventory2;
|
||||||
class Scene;
|
class Scene;
|
||||||
class NGIArchive;
|
class NGIArchive;
|
||||||
|
class StaticANIObject;
|
||||||
|
class GlobalMessageQueueList;
|
||||||
|
|
||||||
class FullpipeEngine : public ::Engine {
|
class FullpipeEngine : public ::Engine {
|
||||||
protected:
|
protected:
|
||||||
@ -59,6 +61,8 @@ public:
|
|||||||
FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc);
|
FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc);
|
||||||
virtual ~FullpipeEngine();
|
virtual ~FullpipeEngine();
|
||||||
|
|
||||||
|
void initialize();
|
||||||
|
|
||||||
// Detection related functions
|
// Detection related functions
|
||||||
const ADGameDescription *_gameDescription;
|
const ADGameDescription *_gameDescription;
|
||||||
const char *getGameId() const;
|
const char *getGameId() const;
|
||||||
@ -87,6 +91,10 @@ public:
|
|||||||
bool _flgSoundList;
|
bool _flgSoundList;
|
||||||
|
|
||||||
Common::Rect _sceneRect;
|
Common::Rect _sceneRect;
|
||||||
|
Scene *_scene2;
|
||||||
|
StaticANIObject *_aniMan;
|
||||||
|
|
||||||
|
GlobalMessageQueueList *_globalMessageQueueList;
|
||||||
|
|
||||||
bool _needQuit;
|
bool _needQuit;
|
||||||
|
|
||||||
|
@ -162,6 +162,12 @@ bool PictureObject::load(MfcArchive &file, bool bigPicture) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common::Point *PictureObject::getDimensions(Common::Point *p) {
|
||||||
|
_picture->getDimensions(p);
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
GameObject::GameObject() {
|
GameObject::GameObject() {
|
||||||
_field_4 = 0;
|
_field_4 = 0;
|
||||||
_flags = 0;
|
_flags = 0;
|
||||||
@ -273,6 +279,13 @@ void Picture::init() {
|
|||||||
_bitmap->_flags |= 0x1000000;
|
_bitmap->_flags |= 0x1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common::Point *Picture::getDimensions(Common::Point *p) {
|
||||||
|
p->x = _width;
|
||||||
|
p->y = _height;
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
void Picture::getDibInfo() {
|
void Picture::getDibInfo() {
|
||||||
int off = _dataSize & ~0xf;
|
int off = _dataSize & ~0xf;
|
||||||
|
|
||||||
|
@ -82,6 +82,8 @@ class Picture : public MemoryObject {
|
|||||||
|
|
||||||
byte getAlpha() { return (byte)_alpha; }
|
byte getAlpha() { return (byte)_alpha; }
|
||||||
void setAlpha(byte alpha) { _alpha = alpha; }
|
void setAlpha(byte alpha) { _alpha = alpha; }
|
||||||
|
|
||||||
|
Common::Point *getDimensions(Common::Point *p);
|
||||||
};
|
};
|
||||||
|
|
||||||
class BigPicture : public Picture {
|
class BigPicture : public Picture {
|
||||||
@ -118,6 +120,7 @@ class PictureObject : public GameObject {
|
|||||||
public:
|
public:
|
||||||
PictureObject();
|
PictureObject();
|
||||||
bool load(MfcArchive &file, bool bigPicture);
|
bool load(MfcArchive &file, bool bigPicture);
|
||||||
|
Common::Point *getDimensions(Common::Point *p);
|
||||||
};
|
};
|
||||||
|
|
||||||
class Background : public CObject {
|
class Background : public CObject {
|
||||||
|
90
engines/fullpipe/messagequeue.cpp
Normal file
90
engines/fullpipe/messagequeue.cpp
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
/* 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/messagequeue.h"
|
||||||
|
|
||||||
|
namespace Fullpipe {
|
||||||
|
|
||||||
|
MessageQueue::MessageQueue() {
|
||||||
|
_field_14 = 0;
|
||||||
|
_parId = 0;
|
||||||
|
_dataId = 0;
|
||||||
|
_id = 0;
|
||||||
|
_isFinished = 0;
|
||||||
|
_flags = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MessageQueue::load(MfcArchive &file) {
|
||||||
|
debug(5, "MessageQueue::load()");
|
||||||
|
|
||||||
|
_dataId = file.readUint16LE();
|
||||||
|
|
||||||
|
int count = file.readUint16LE();
|
||||||
|
|
||||||
|
assert(g_fullpipe->_gameProjectVersion >= 12);
|
||||||
|
|
||||||
|
_queueName = file.readPascalString();
|
||||||
|
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
CObject *tmp = file.readClass();
|
||||||
|
|
||||||
|
_exCommands.push_back(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
_id = -1;
|
||||||
|
_field_14 = 0;
|
||||||
|
_parId = 0;
|
||||||
|
_isFinished = 0;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) {
|
||||||
|
for (CPtrList::iterator s = begin(); s != end(); ++s) {
|
||||||
|
if (((MessageQueue *)s)->_id == id)
|
||||||
|
return (MessageQueue *)s;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GlobalMessageQueueList::deleteQueueById(int id) {
|
||||||
|
for (uint i = 0; i < size(); i++)
|
||||||
|
if (((MessageQueue *)((*this).operator[](i)))->_id == id) {
|
||||||
|
delete (MessageQueue *)remove_at(i);
|
||||||
|
|
||||||
|
disableQueueById(id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GlobalMessageQueueList::disableQueueById(int id) {
|
||||||
|
for (CPtrList::iterator s = begin(); s != end(); ++s) {
|
||||||
|
if (((MessageQueue *)s)->_parId == id)
|
||||||
|
((MessageQueue *)s)->_parId = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // End of namespace Fullpipe
|
67
engines/fullpipe/messagequeue.h
Normal file
67
engines/fullpipe/messagequeue.h
Normal 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_MESSAGEQUEUE_H
|
||||||
|
#define FULLPIPE_MESSAGEQUEUE_H
|
||||||
|
|
||||||
|
#include "fullpipe/utils.h"
|
||||||
|
#include "fullpipe/inventory.h"
|
||||||
|
#include "fullpipe/gfx.h"
|
||||||
|
#include "fullpipe/sound.h"
|
||||||
|
#include "fullpipe/scene.h"
|
||||||
|
|
||||||
|
namespace Fullpipe {
|
||||||
|
|
||||||
|
class MessageQueue : public CObject {
|
||||||
|
friend class GlobalMessageQueueList;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int _id;
|
||||||
|
int _flags;
|
||||||
|
char *_queueName;
|
||||||
|
int16 _dataId;
|
||||||
|
int16 _field_12;
|
||||||
|
int _field_14;
|
||||||
|
CPtrList _exCommands;
|
||||||
|
int _counter;
|
||||||
|
int _field_38;
|
||||||
|
int _isFinished;
|
||||||
|
int _parId;
|
||||||
|
int _flag1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
MessageQueue();
|
||||||
|
virtual bool load(MfcArchive &file);
|
||||||
|
|
||||||
|
int getFlags() { return _flags; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class GlobalMessageQueueList : public CPtrList {
|
||||||
|
public:
|
||||||
|
MessageQueue *getMessageQueueById(int id);
|
||||||
|
void deleteQueueById(int id);
|
||||||
|
void disableQueueById(int id);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // End of namespace Fullpipe
|
||||||
|
|
||||||
|
#endif /* FULLPIPE_MESSAGEQUEUE_H */
|
@ -5,6 +5,7 @@ MODULE_OBJS = \
|
|||||||
fullpipe.o \
|
fullpipe.o \
|
||||||
gfx.o \
|
gfx.o \
|
||||||
inventory.o \
|
inventory.o \
|
||||||
|
messagequeue.o \
|
||||||
motion.o \
|
motion.o \
|
||||||
ngiarchive.o \
|
ngiarchive.o \
|
||||||
scene.o \
|
scene.o \
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
|
class MessageQueue;
|
||||||
|
|
||||||
class GameProject : public CObject {
|
class GameProject : public CObject {
|
||||||
public:
|
public:
|
||||||
int _field_4;
|
int _field_4;
|
||||||
@ -44,25 +46,6 @@ class GameProject : public CObject {
|
|||||||
virtual bool load(MfcArchive &file);
|
virtual bool load(MfcArchive &file);
|
||||||
};
|
};
|
||||||
|
|
||||||
class MessageQueue : public CObject {
|
|
||||||
int _id;
|
|
||||||
int _flags;
|
|
||||||
char *_queueName;
|
|
||||||
int16 _dataId;
|
|
||||||
int16 _field_12;
|
|
||||||
int _field_14;
|
|
||||||
CPtrList _exCommands;
|
|
||||||
int _counter;
|
|
||||||
int _field_38;
|
|
||||||
int _isFinished;
|
|
||||||
int _parId;
|
|
||||||
int _flag1;
|
|
||||||
|
|
||||||
public:
|
|
||||||
MessageQueue();
|
|
||||||
virtual bool load(MfcArchive &file);
|
|
||||||
};
|
|
||||||
|
|
||||||
class CInteraction : public CObject {
|
class CInteraction : public CObject {
|
||||||
int16 _objectId1;
|
int16 _objectId1;
|
||||||
int16 _objectId2;
|
int16 _objectId2;
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
#include "fullpipe/objects.h"
|
#include "fullpipe/objects.h"
|
||||||
#include "fullpipe/ngiarchive.h"
|
#include "fullpipe/ngiarchive.h"
|
||||||
#include "fullpipe/statics.h"
|
#include "fullpipe/statics.h"
|
||||||
|
#include "fullpipe/messagequeue.h"
|
||||||
|
|
||||||
|
#include "fullpipe/gameobj.h"
|
||||||
|
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
@ -234,6 +237,38 @@ void Scene::init() {
|
|||||||
warning("STUB: Scene::init()");
|
warning("STUB: Scene::init()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StaticANIObject *Scene::getAniMan() {
|
||||||
|
StaticANIObject *aniMan = getStaticANIObject1ById(ANI_MAN, -1);
|
||||||
|
|
||||||
|
deleteStaticANIObject(aniMan);
|
||||||
|
|
||||||
|
return aniMan;
|
||||||
|
}
|
||||||
|
|
||||||
|
StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) {
|
||||||
|
for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) {
|
||||||
|
StaticANIObject *o = (StaticANIObject *)s;
|
||||||
|
if (o->_id == obj && (a3 == -1 || o->_field_4 == a3))
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene::deleteStaticANIObject(StaticANIObject *obj) {
|
||||||
|
for (uint n = 0; n < _staticANIObjectList1.size(); n++)
|
||||||
|
if ((StaticANIObject *)_staticANIObjectList1[n] == obj) {
|
||||||
|
_staticANIObjectList1.remove_at(n);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint n = 0; n < _staticANIObjectList2.size(); n++)
|
||||||
|
if ((StaticANIObject *)_staticANIObjectList2[n] == obj) {
|
||||||
|
_staticANIObjectList2.remove_at(n);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Scene::draw(int par) {
|
void Scene::draw(int par) {
|
||||||
updateScrolling(par);
|
updateScrolling(par);
|
||||||
|
|
||||||
@ -257,9 +292,10 @@ void Scene::draw(int par) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Scene::updateScrolling(int par) {
|
void Scene::updateScrolling(int par) {
|
||||||
|
warning("STUB Scene::updateScrolling()");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene::drawContent(int minPri, int maxPri, bool drawBG) {
|
void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
|
||||||
if (!_picObjList.size() && !_bigPictureArray1Count)
|
if (!_picObjList.size() && !_bigPictureArray1Count)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -45,6 +45,9 @@ class Scene : public Background {
|
|||||||
void draw(int par);
|
void draw(int par);
|
||||||
void drawContent(int minPri, int maxPri, bool drawBG);
|
void drawContent(int minPri, int maxPri, bool drawBG);
|
||||||
void updateScrolling(int par);
|
void updateScrolling(int par);
|
||||||
|
StaticANIObject *getAniMan();
|
||||||
|
StaticANIObject *getStaticANIObject1ById(int obj, int a3);
|
||||||
|
void deleteStaticANIObject(StaticANIObject * obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
class SceneTag : public CObject {
|
class SceneTag : public CObject {
|
||||||
|
@ -24,11 +24,8 @@
|
|||||||
|
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
bool FullPipeEngine::sceneSwitcher(EntranceInfo *entrance) {
|
||||||
EntranceInfo *entrance; // ebx@1
|
|
||||||
Scene *scene; // esi@1
|
|
||||||
CGameVar *sceneVar; // eax@21
|
CGameVar *sceneVar; // eax@21
|
||||||
signed int result; // eax@2
|
|
||||||
POINT *v6; // eax@3
|
POINT *v6; // eax@3
|
||||||
int v7; // eax@3
|
int v7; // eax@3
|
||||||
CInventory2 *v8; // eax@4
|
CInventory2 *v8; // eax@4
|
||||||
@ -46,37 +43,41 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
CNode *v20; // eax@17
|
CNode *v20; // eax@17
|
||||||
Scene *v21; // eax@18
|
Scene *v21; // eax@18
|
||||||
PictureObject *v22; // eax@18
|
PictureObject *v22; // eax@18
|
||||||
POINT point; // [sp+Ch] [bp-8h]@3
|
Common::Point sceneDim;
|
||||||
|
|
||||||
entrance = a1;
|
Scene *scene = accessScene(entrance->_sceneId);
|
||||||
scene = accessScene(a1->_sceneId);
|
|
||||||
|
|
||||||
if (!scene)
|
if (!scene)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
v6 = PictureObject_getDimensions((PictureObject *)scene->bg.picObjList.m_pNodeHead->data, &point);
|
((PictureObject *)_picObjList.front())->getDimensions(&sceneDim);
|
||||||
g_sceneWidth = v6->x;
|
_sceneWidth = sceneDim.x;
|
||||||
v7 = v6->y;
|
_sceneHeight = sceneDim.y;
|
||||||
g_sceneHeight = v7;
|
|
||||||
g_sceneRect.top = 0;
|
_sceneRect.top = 0;
|
||||||
g_sceneRect.left = 0;
|
_sceneRect.left = 0;
|
||||||
g_sceneRect.right = 799;
|
_sceneRect.right = 799;
|
||||||
g_sceneRect.bottom = 599;
|
_sceneRect.bottom = 599;
|
||||||
scene->bg.x = 0;
|
|
||||||
scene->bg.y = 0;
|
scene->_x = 0;
|
||||||
(*(void (__stdcall **)(_DWORD, _DWORD, int))(g_aniMan->GameObject.CObject.vmt + offsetof(GameObjectVmt, setOXY)))(0, 0, a2);
|
scene->_y = 0;
|
||||||
(*(void (**)(void))(g_aniMan->GameObject.CObject.vmt + offsetof(GameObjectVmt, clearFlags)))();
|
|
||||||
g_aniMan->callback2 = 0;
|
_aniMan->setOXY(0, 0);
|
||||||
g_aniMan->callback1 = 0;
|
_aniMan->clearFlags();
|
||||||
g_aniMan->shadowsOn = 1;
|
_aniMan->callback1 = 0;
|
||||||
g_scrollSpeed = 8;
|
_aniMan->callback2 = 0;
|
||||||
savesEnabled = 1;
|
_aniMan->shadowsOn = 1;
|
||||||
updateFlag = 1;
|
|
||||||
flgCanOpenMap = 1;
|
_scrollSpeed = 8;
|
||||||
|
|
||||||
|
_savesEnabled = 1;
|
||||||
|
_updateFlag = 1;
|
||||||
|
_flgCanOpenMap = 1;
|
||||||
|
|
||||||
if (entrance->sceneId == SC_DBGMENU) {
|
if (entrance->sceneId == SC_DBGMENU) {
|
||||||
g_inventoryScene = 0;
|
_inventoryScene = 0;
|
||||||
} else {
|
} else {
|
||||||
CGameLoader_loadScene(g_gameLoader, SC_INV);
|
_gameLoader->loadScene(SC_INV);
|
||||||
v8 = getGameLoaderInventory();
|
v8 = getGameLoaderInventory();
|
||||||
CInventory2_rebuildItemRects(v8);
|
CInventory2_rebuildItemRects(v8);
|
||||||
v9 = getGameLoaderInventory();
|
v9 = getGameLoaderInventory();
|
||||||
@ -146,7 +147,6 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandlerIntro, 2);
|
addMessageHandler(sceneHandlerIntro, 2);
|
||||||
_updateCursorCallback = sceneIntro_updateCursor;
|
_updateCursorCallback = sceneIntro_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_1:
|
case SC_1:
|
||||||
@ -158,8 +158,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_1");
|
scene->initObjectCursors("SC_1");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler01, 2);
|
addMessageHandler(sceneHandler01, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_2:
|
case SC_2:
|
||||||
@ -170,8 +169,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_2");
|
scene->initObjectCursors("SC_2");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler02, 2);
|
addMessageHandler(sceneHandler02, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_3:
|
case SC_3:
|
||||||
@ -183,8 +181,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler03, 2);
|
addMessageHandler(sceneHandler03, 2);
|
||||||
j_Scene_sc03_sub_40F160(scene);
|
j_Scene_sc03_sub_40F160(scene);
|
||||||
g_updateCursorCallback = scene03_updateCursor;
|
_updateCursorCallback = scene03_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_4:
|
case SC_4:
|
||||||
@ -195,8 +192,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_4");
|
scene->initObjectCursors("SC_4");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler04, 2, 2);
|
insertMessageHandler(sceneHandler04, 2, 2);
|
||||||
g_updateCursorCallback = scene04_updateCursor;
|
_updateCursorCallback = scene04_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_5:
|
case SC_5:
|
||||||
@ -207,8 +203,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_5");
|
scene->initObjectCursors("SC_5");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler05, 2, 2);
|
insertMessageHandler(sceneHandler05, 2, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_6:
|
case SC_6:
|
||||||
@ -220,8 +215,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
sub_415300();
|
sub_415300();
|
||||||
insertMessageHandler(sceneHandler06, 2, 2);
|
insertMessageHandler(sceneHandler06, 2, 2);
|
||||||
g_updateCursorCallback = scene06_updateCursor;
|
_updateCursorCallback = scene06_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_7:
|
case SC_7:
|
||||||
@ -232,8 +226,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_7");
|
scene->initObjectCursors("SC_7");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler07, 2);
|
addMessageHandler(sceneHandler07, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_8:
|
case SC_8:
|
||||||
@ -245,8 +238,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
sub_416890();
|
sub_416890();
|
||||||
addMessageHandler(sceneHandler08, 2);
|
addMessageHandler(sceneHandler08, 2);
|
||||||
g_updateCursorCallback = scene08_updateCursor;
|
_updateCursorCallback = scene08_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_9:
|
case SC_9:
|
||||||
@ -257,8 +249,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_9");
|
scene->initObjectCursors("SC_9");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler09, 2, 2);
|
insertMessageHandler(sceneHandler09, 2, 2);
|
||||||
g_updateCursorCallback = scene09_updateCursor;
|
_updateCursorCallback = scene09_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_10:
|
case SC_10:
|
||||||
@ -269,8 +260,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_10");
|
scene->initObjectCursors("SC_10");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler10, 2, 2);
|
insertMessageHandler(sceneHandler10, 2, 2);
|
||||||
g_updateCursorCallback = scene10_updateCursor;
|
_updateCursorCallback = scene10_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_11:
|
case SC_11:
|
||||||
@ -282,8 +272,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler11, 2, 2);
|
insertMessageHandler(sceneHandler11, 2, 2);
|
||||||
scene11_sub_41A980();
|
scene11_sub_41A980();
|
||||||
g_updateCursorCallback = scene11_updateCursor;
|
_updateCursorCallback = scene11_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_12:
|
case SC_12:
|
||||||
@ -294,8 +283,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_12");
|
scene->initObjectCursors("SC_12");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler12, 2);
|
addMessageHandler(sceneHandler12, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_13:
|
case SC_13:
|
||||||
@ -306,8 +294,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_13");
|
scene->initObjectCursors("SC_13");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler13, 2, 2);
|
insertMessageHandler(sceneHandler13, 2, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_14:
|
case SC_14:
|
||||||
@ -319,8 +306,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler14, 2, 2);
|
insertMessageHandler(sceneHandler14, 2, 2);
|
||||||
scene14_sub_41D2B0();
|
scene14_sub_41D2B0();
|
||||||
g_updateCursorCallback = scene14_updateCursor;
|
_updateCursorCallback = scene14_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_15:
|
case SC_15:
|
||||||
@ -331,8 +317,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_15");
|
scene->initObjectCursors("SC_15");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler15, 2, 2);
|
insertMessageHandler(sceneHandler15, 2, 2);
|
||||||
g_updateCursorCallback = scene15_updateCursor;
|
_updateCursorCallback = scene15_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_16:
|
case SC_16:
|
||||||
@ -343,8 +328,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_16");
|
scene->initObjectCursors("SC_16");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler16, 2);
|
addMessageHandler(sceneHandler16, 2);
|
||||||
g_updateCursorCallback = scene16_updateCursor;
|
_updateCursorCallback = scene16_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_17:
|
case SC_17:
|
||||||
@ -356,8 +340,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler17, 2);
|
addMessageHandler(sceneHandler17, 2);
|
||||||
scene17_sub_41F060();
|
scene17_sub_41F060();
|
||||||
g_updateCursorCallback = scene17_updateCursor;
|
_updateCursorCallback = scene17_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_18:
|
case SC_18:
|
||||||
@ -373,8 +356,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_18");
|
scene->initObjectCursors("SC_18");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler18, 2, 2);
|
insertMessageHandler(sceneHandler18, 2, 2);
|
||||||
g_updateCursorCallback = scene18_updateCursor;
|
_updateCursorCallback = scene18_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_19:
|
case SC_19:
|
||||||
@ -399,8 +381,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler19, 2);
|
addMessageHandler(sceneHandler19, 2);
|
||||||
scene19_sub_4211D0(scene);
|
scene19_sub_4211D0(scene);
|
||||||
g_updateCursorCallback = scene19_updateCursor;
|
_updateCursorCallback = scene19_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_20:
|
case SC_20:
|
||||||
@ -411,8 +392,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_20");
|
scene->initObjectCursors("SC_20");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler20, 2);
|
addMessageHandler(sceneHandler20, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_21:
|
case SC_21:
|
||||||
@ -423,8 +403,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_21");
|
scene->initObjectCursors("SC_21");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler21, 2, 2);
|
insertMessageHandler(sceneHandler21, 2, 2);
|
||||||
g_updateCursorCallback = scene21_updateCursor;
|
_updateCursorCallback = scene21_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_22:
|
case SC_22:
|
||||||
@ -436,8 +415,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
scene22_sub_4228A0();
|
scene22_sub_4228A0();
|
||||||
insertMessageHandler(sceneHandler22, 2, 2);
|
insertMessageHandler(sceneHandler22, 2, 2);
|
||||||
g_updateCursorCallback = scene22_updateCursor;
|
_updateCursorCallback = scene22_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_23:
|
case SC_23:
|
||||||
@ -449,8 +427,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler23, 2, 2);
|
insertMessageHandler(sceneHandler23, 2, 2);
|
||||||
scene23_sub_423B00();
|
scene23_sub_423B00();
|
||||||
g_updateCursorCallback = scene23_updateCursor;
|
_updateCursorCallback = scene23_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_24:
|
case SC_24:
|
||||||
@ -462,8 +439,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler24, 2);
|
addMessageHandler(sceneHandler24, 2);
|
||||||
scene24_sub_423DD0();
|
scene24_sub_423DD0();
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_25:
|
case SC_25:
|
||||||
@ -475,8 +451,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler25, 2);
|
addMessageHandler(sceneHandler25, 2);
|
||||||
scene25_sub_4253B0(scene, entrance->field_4);
|
scene25_sub_4253B0(scene, entrance->field_4);
|
||||||
g_updateCursorCallback = scene25_updateCursor;
|
_updateCursorCallback = scene25_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_26:
|
case SC_26:
|
||||||
@ -488,8 +463,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler26, 2, 2);
|
insertMessageHandler(sceneHandler26, 2, 2);
|
||||||
scene26_sub_426140(scene);
|
scene26_sub_426140(scene);
|
||||||
g_updateCursorCallback = scene26_updateCursor;
|
_updateCursorCallback = scene26_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_27:
|
case SC_27:
|
||||||
@ -500,8 +474,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_27");
|
scene->initObjectCursors("SC_27");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler27, 2);
|
addMessageHandler(sceneHandler27, 2);
|
||||||
g_updateCursorCallback = scene27_updateCursor;
|
_updateCursorCallback = scene27_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_28:
|
case SC_28:
|
||||||
@ -512,8 +485,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_28");
|
scene->initObjectCursors("SC_28");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler28, 2, 2);
|
insertMessageHandler(sceneHandler28, 2, 2);
|
||||||
g_updateCursorCallback = scene28_updateCursor;
|
_updateCursorCallback = scene28_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_29:
|
case SC_29:
|
||||||
@ -524,8 +496,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_29");
|
scene->initObjectCursors("SC_29");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler29, 2);
|
addMessageHandler(sceneHandler29, 2);
|
||||||
g_updateCursorCallback = scene29_updateCursor;
|
_updateCursorCallback = scene29_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_30:
|
case SC_30:
|
||||||
@ -536,8 +507,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_30");
|
scene->initObjectCursors("SC_30");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler30, 2);
|
addMessageHandler(sceneHandler30, 2);
|
||||||
g_updateCursorCallback = scene30_updateCursor;
|
_updateCursorCallback = scene30_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_31:
|
case SC_31:
|
||||||
@ -548,8 +518,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_31");
|
scene->initObjectCursors("SC_31");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler31, 2);
|
addMessageHandler(sceneHandler31, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_32:
|
case SC_32:
|
||||||
@ -561,8 +530,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler32, 2, 2);
|
insertMessageHandler(sceneHandler32, 2, 2);
|
||||||
scene32_sub_42C5C0();
|
scene32_sub_42C5C0();
|
||||||
g_updateCursorCallback = scene32_updateCursor;
|
_updateCursorCallback = scene32_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_33:
|
case SC_33:
|
||||||
@ -574,8 +542,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler33, 2, 2);
|
insertMessageHandler(sceneHandler33, 2, 2);
|
||||||
scene33_sub_42CEF0();
|
scene33_sub_42CEF0();
|
||||||
g_updateCursorCallback = scene33_updateCursor;
|
_updateCursorCallback = scene33_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_34:
|
case SC_34:
|
||||||
@ -587,8 +554,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler34, 2, 2);
|
insertMessageHandler(sceneHandler34, 2, 2);
|
||||||
scene34_sub_42DEE0();
|
scene34_sub_42DEE0();
|
||||||
g_updateCursorCallback = scene34_updateCursor;
|
_updateCursorCallback = scene34_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_35:
|
case SC_35:
|
||||||
@ -599,8 +565,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_35");
|
scene->initObjectCursors("SC_35");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler35, 2, 2);
|
insertMessageHandler(sceneHandler35, 2, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_36:
|
case SC_36:
|
||||||
@ -611,8 +576,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_36");
|
scene->initObjectCursors("SC_36");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler36, 2);
|
addMessageHandler(sceneHandler36, 2);
|
||||||
g_updateCursorCallback = scene36_updateCursor;
|
_updateCursorCallback = scene36_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_37:
|
case SC_37:
|
||||||
@ -623,8 +587,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_37");
|
scene->initObjectCursors("SC_37");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
insertMessageHandler(sceneHandler37, 2, 2);
|
insertMessageHandler(sceneHandler37, 2, 2);
|
||||||
g_updateCursorCallback = scene37_updateCursor;
|
_updateCursorCallback = scene37_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_38:
|
case SC_38:
|
||||||
@ -635,8 +598,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_38");
|
scene->initObjectCursors("SC_38");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandler38, 2);
|
addMessageHandler(sceneHandler38, 2);
|
||||||
g_updateCursorCallback = defaultUpdateCursorCallback;
|
_updateCursorCallback = defaultUpdateCursorCallback;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_FINAL1:
|
case SC_FINAL1:
|
||||||
@ -647,8 +609,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
scene->initObjectCursors("SC_FINAL1");
|
scene->initObjectCursors("SC_FINAL1");
|
||||||
setSceneMusicParameters(sceneVar);
|
setSceneMusicParameters(sceneVar);
|
||||||
addMessageHandler(sceneHandlerFinal1, 2);
|
addMessageHandler(sceneHandlerFinal1, 2);
|
||||||
g_updateCursorCallback = sceneFinal1_updateCursor;
|
_updateCursorCallback = sceneFinal1_updateCursor;
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SC_DBGMENU:
|
case SC_DBGMENU:
|
||||||
@ -658,16 +619,14 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) {
|
|||||||
_behaviorManager->initBehavior(scene, sceneVar);
|
_behaviorManager->initBehavior(scene, sceneVar);
|
||||||
scene->initObjectCursors("SC_DBGMENU");
|
scene->initObjectCursors("SC_DBGMENU");
|
||||||
addMessageHandler(sceneHandlerDbgMenu, 2);
|
addMessageHandler(sceneHandlerDbgMenu, 2);
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_behaviorManager->initBehavior(0, 0);
|
_behaviorManager->initBehavior(0, 0);
|
||||||
result = 1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of namespace Fullpipe
|
} // End of namespace Fullpipe
|
||||||
|
@ -101,10 +101,16 @@ bool FullpipeEngine::loadGam(const char *fname) {
|
|||||||
|
|
||||||
_inventory->rebuildItemRects();
|
_inventory->rebuildItemRects();
|
||||||
|
|
||||||
warning("STUB: loadGam()");
|
|
||||||
//for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) {
|
//for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) {
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
//_sceneSwitcher = sceneSwitcher;
|
||||||
|
//_preloadCallback = gameLoaderPreloadCallback
|
||||||
|
//_readSavegameCallback = gameLoaderReadSavegameCallback;
|
||||||
|
_aniMan = accessScene(SC_COMMON)->getAniMan();
|
||||||
|
_scene2 = 0;
|
||||||
|
|
||||||
|
warning("STUB: loadGam()");
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -314,40 +320,6 @@ bool CInteraction::load(MfcArchive &file) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageQueue::MessageQueue() {
|
|
||||||
_field_14 = 0;
|
|
||||||
_parId = 0;
|
|
||||||
_dataId = 0;
|
|
||||||
_id = 0;
|
|
||||||
_isFinished = 0;
|
|
||||||
_flags = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MessageQueue::load(MfcArchive &file) {
|
|
||||||
debug(5, "MessageQueue::load()");
|
|
||||||
|
|
||||||
_dataId = file.readUint16LE();
|
|
||||||
|
|
||||||
int count = file.readUint16LE();
|
|
||||||
|
|
||||||
assert(g_fullpipe->_gameProjectVersion >= 12);
|
|
||||||
|
|
||||||
_queueName = file.readPascalString();
|
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
|
||||||
CObject *tmp = file.readClass();
|
|
||||||
|
|
||||||
_exCommands.push_back(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
_id = -1;
|
|
||||||
_field_14 = 0;
|
|
||||||
_parId = 0;
|
|
||||||
_isFinished = 0;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExCommand::ExCommand() {
|
ExCommand::ExCommand() {
|
||||||
_field_3C = 1;
|
_field_3C = 1;
|
||||||
_messageNum = 0;
|
_messageNum = 0;
|
||||||
|
@ -25,10 +25,42 @@
|
|||||||
#include "fullpipe/objects.h"
|
#include "fullpipe/objects.h"
|
||||||
#include "fullpipe/ngiarchive.h"
|
#include "fullpipe/ngiarchive.h"
|
||||||
#include "fullpipe/statics.h"
|
#include "fullpipe/statics.h"
|
||||||
|
#include "fullpipe/messagequeue.h"
|
||||||
|
|
||||||
#include "fullpipe/gameobj.h"
|
#include "fullpipe/gameobj.h"
|
||||||
|
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
|
CStepArray::CStepArray() {
|
||||||
|
_points = 0;
|
||||||
|
_maxPointIndex = 0;
|
||||||
|
_currPointIndex = 0;
|
||||||
|
_pointsCount = 0;
|
||||||
|
_isEos = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
CStepArray::~CStepArray() {
|
||||||
|
if (_pointsCount) {
|
||||||
|
for (int i = 0; i < _pointsCount; i++)
|
||||||
|
delete _points[i];
|
||||||
|
|
||||||
|
delete _points;
|
||||||
|
|
||||||
|
_points = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CStepArray::clear() {
|
||||||
|
_currPointIndex = 0;
|
||||||
|
_maxPointIndex = 0;
|
||||||
|
_isEos = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < _pointsCount; i++) {
|
||||||
|
_points[i]->x = 0;
|
||||||
|
_points[i]->y = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StaticANIObject::StaticANIObject() {
|
StaticANIObject::StaticANIObject() {
|
||||||
_shadowsOn = 1;
|
_shadowsOn = 1;
|
||||||
_field_30 = 0;
|
_field_30 = 0;
|
||||||
@ -102,6 +134,43 @@ void StaticANIObject::setOXY(int x, int y) {
|
|||||||
_movementObj->setOXY(x, y);
|
_movementObj->setOXY(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StaticANIObject::clearFlags() {
|
||||||
|
_flags = 0;
|
||||||
|
|
||||||
|
deleteFromGlobalMessageQueue();
|
||||||
|
_messageQueueId = 0;
|
||||||
|
_movementObj = 0;
|
||||||
|
_staticsObj = 0;
|
||||||
|
_animExFlag = 0;
|
||||||
|
_counter = 0;
|
||||||
|
_messageNum = 0;
|
||||||
|
_stepArray.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StaticANIObject::deleteFromGlobalMessageQueue() {
|
||||||
|
while (_messageQueueId) {
|
||||||
|
if (g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId)) {
|
||||||
|
if (!isIdle())
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_fullpipe->_globalMessageQueueList->deleteQueueById(_messageQueueId);
|
||||||
|
} else {
|
||||||
|
_messageQueueId = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool StaticANIObject::isIdle() {
|
||||||
|
if (_messageQueueId) {
|
||||||
|
MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
|
||||||
|
|
||||||
|
if (m && m->getFlags() & 1)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Statics *StaticANIObject::getStaticsById(int itemId) {
|
Statics *StaticANIObject::getStaticsById(int itemId) {
|
||||||
for (uint i = 0; i < _staticsList.size(); i++)
|
for (uint i = 0; i < _staticsList.size(); i++)
|
||||||
if (((Statics *)_staticsList[i])->_staticsId == itemId)
|
if (((Statics *)_staticsList[i])->_staticsId == itemId)
|
||||||
|
@ -27,10 +27,17 @@ namespace Fullpipe {
|
|||||||
|
|
||||||
class CStepArray : public CObject {
|
class CStepArray : public CObject {
|
||||||
int _currPointIndex;
|
int _currPointIndex;
|
||||||
int _points;
|
Common::Point **_points;
|
||||||
int _maxPointIndex;
|
int _maxPointIndex;
|
||||||
int _pointsCount;
|
int _pointsCount;
|
||||||
int _isEos;
|
int _isEos;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CStepArray();
|
||||||
|
~CStepArray();
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
int getCurrPointIndex() { return _currPointIndex; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class StaticPhase : public Picture {
|
class StaticPhase : public Picture {
|
||||||
@ -144,6 +151,11 @@ class StaticANIObject : public GameObject {
|
|||||||
Statics *getStaticsById(int id);
|
Statics *getStaticsById(int id);
|
||||||
Movement *getMovementById(int id);
|
Movement *getMovementById(int id);
|
||||||
|
|
||||||
|
void clearFlags();
|
||||||
|
bool isIdle();
|
||||||
|
|
||||||
|
void deleteFromGlobalMessageQueue();
|
||||||
|
|
||||||
Statics *addStatics(Statics *ani);
|
Statics *addStatics(Statics *ani);
|
||||||
void draw();
|
void draw();
|
||||||
void draw2();
|
void draw2();
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "fullpipe/objects.h"
|
#include "fullpipe/objects.h"
|
||||||
#include "fullpipe/motion.h"
|
#include "fullpipe/motion.h"
|
||||||
#include "fullpipe/ngiarchive.h"
|
#include "fullpipe/ngiarchive.h"
|
||||||
|
#include "fullpipe/messagequeue.h"
|
||||||
|
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user