mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
FULLPIPE: Unstubbed loadGam() and CGameLoader()
This commit is contained in:
parent
d8cca2357e
commit
795a926744
@ -77,6 +77,11 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
|
||||
_updateScreenCallback = 0;
|
||||
_updateCursorCallback = 0;
|
||||
|
||||
_msgX = 0;
|
||||
_msgY = 0;
|
||||
_msgObjectId2 = 0;
|
||||
_msgId = 0;
|
||||
|
||||
_behaviorManager = 0;
|
||||
|
||||
_cursorId = 0;
|
||||
|
@ -50,6 +50,7 @@ class CInputController;
|
||||
class CInventory2;
|
||||
struct CursorInfo;
|
||||
class EntranceInfo;
|
||||
class ExCommand;
|
||||
class GameProject;
|
||||
class GlobalMessageQueueList;
|
||||
class MessageHandler;
|
||||
@ -59,6 +60,11 @@ class Scene;
|
||||
class SoundList;
|
||||
class StaticANIObject;
|
||||
|
||||
int global_messageHandler1(ExCommand *cmd);
|
||||
int global_messageHandler2(ExCommand *cmd);
|
||||
int global_messageHandler3(ExCommand *cmd);
|
||||
int global_messageHandler4(ExCommand *cmd);
|
||||
|
||||
class FullpipeEngine : public ::Engine {
|
||||
protected:
|
||||
|
||||
@ -121,6 +127,11 @@ public:
|
||||
GlobalMessageQueueList *_globalMessageQueueList;
|
||||
MessageHandler *_messageHandlers;
|
||||
|
||||
int _msgX;
|
||||
int _msgY;
|
||||
int _msgObjectId2;
|
||||
int _msgId;
|
||||
|
||||
BehaviorManager *_behaviorManager;
|
||||
|
||||
MovTable *_movTable;
|
||||
|
@ -51,9 +51,9 @@ CGameLoader::CGameLoader() {
|
||||
_gameProject = 0;
|
||||
//_gameName = "untitled";
|
||||
|
||||
//addMessageHandler2(CGameLoader_messageHandler1, 0, 0);
|
||||
//insertMessageHandler(CGameLoader_messageHandler2, 0, 128);
|
||||
//insertMessageHandler(CGameLoader_messageHandler3, 0, 1);
|
||||
addMessageHandlerByIndex(global_messageHandler2, 0, 0);
|
||||
insertMessageHandler(global_messageHandler3, 0, 128);
|
||||
insertMessageHandler(global_messageHandler4, 0, 1);
|
||||
|
||||
_field_FA = 0;
|
||||
_field_F8 = 0;
|
||||
@ -65,13 +65,10 @@ CGameLoader::CGameLoader() {
|
||||
_preloadId2 = 0;
|
||||
_updateCounter = 0;
|
||||
|
||||
//g_x = 0;
|
||||
//g_y = 0;
|
||||
//dword_478480 = 0;
|
||||
//g_objectId2 = 0;
|
||||
//g_id = 0;
|
||||
|
||||
warning("STUB: CGameLoader::CGameLoader()");
|
||||
g_fullpipe->_msgX = 0;
|
||||
g_fullpipe->_msgY = 0;
|
||||
g_fullpipe->_msgObjectId2 = 0;
|
||||
g_fullpipe->_msgId = 0;
|
||||
}
|
||||
|
||||
CGameLoader::~CGameLoader() {
|
||||
|
@ -624,6 +624,30 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int global_messageHandler1(ExCommand *cmd) {
|
||||
warning("STUB: global_messageHandler1()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int global_messageHandler2(ExCommand *cmd) {
|
||||
warning("STUB: global_messageHandler2()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int global_messageHandler3(ExCommand *cmd) {
|
||||
warning("STUB: global_messageHandler3()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int global_messageHandler4(ExCommand *cmd) {
|
||||
warning("STUB: global_messageHandler4()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceneIntro_updateCursor() {
|
||||
g_fullpipe->_cursorId = 0;
|
||||
|
||||
|
@ -38,55 +38,57 @@ namespace Fullpipe {
|
||||
bool FullpipeEngine::loadGam(const char *fname) {
|
||||
_gameLoader = new CGameLoader();
|
||||
|
||||
if (_gameLoader->loadFile(fname)) {
|
||||
g_fullpipe->_currSoundListCount = 0;
|
||||
initObjectStates();
|
||||
if (!_gameLoader->loadFile(fname))
|
||||
return false;
|
||||
|
||||
//set_g_messageQueueCallback1(messageQueueCallback1);
|
||||
//addMessageHandler2(global_messageHandler, 0, 4);
|
||||
_inventory = getGameLoaderInventory();
|
||||
_inventory->setItemFlags(ANI_INV_MAP, 0x10003);
|
||||
_inventory->addItem(ANI_INV_MAP, 1);
|
||||
_currSoundListCount = 0;
|
||||
initObjectStates();
|
||||
// set_g_messageQueueCallback1(messageQueueCallback1);
|
||||
|
||||
_inventory->rebuildItemRects();
|
||||
addMessageHandlerByIndex(global_messageHandler1, 0, 4);
|
||||
|
||||
for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) {
|
||||
((MemoryObject *)((PictureObject *)*p)->_picture)->load();
|
||||
}
|
||||
_inventory = getGameLoaderInventory();
|
||||
_inventory->setItemFlags(ANI_INV_MAP, 0x10003);
|
||||
_inventory->addItem(ANI_INV_MAP, 1);
|
||||
|
||||
//_sceneSwitcher = sceneSwitcher;
|
||||
//_preloadCallback = gameLoaderPreloadCallback
|
||||
//_readSavegameCallback = gameLoaderReadSavegameCallback;
|
||||
_aniMan = accessScene(SC_COMMON)->getAniMan();
|
||||
_scene2 = 0;
|
||||
_inventory->rebuildItemRects();
|
||||
|
||||
_movTable = _aniMan->countMovements();
|
||||
for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) {
|
||||
((MemoryObject *)((PictureObject *)*p)->_picture)->load();
|
||||
}
|
||||
|
||||
_aniMan->setSpeed(1);
|
||||
// _sceneSwitcher = sceneSwitcher;
|
||||
// _preloadCallback = gameLoaderPreloadCallback
|
||||
// _readSavegameCallback = gameLoaderReadSavegameCallback;
|
||||
|
||||
PictureObject *pic = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0);
|
||||
_aniMan = accessScene(SC_COMMON)->getAniMan();
|
||||
_scene2 = 0;
|
||||
|
||||
pic->setFlags(pic->_flags & 0xFFFB);
|
||||
_movTable = _aniMan->countMovements();
|
||||
|
||||
// Not used in full game
|
||||
//_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0);
|
||||
_aniMan->setSpeed(1);
|
||||
|
||||
initMap();
|
||||
initCursors();
|
||||
PictureObject *pic = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0);
|
||||
|
||||
setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED"));
|
||||
pic->setFlags(pic->_flags & 0xFFFB);
|
||||
|
||||
if (_flgPlayIntro) {
|
||||
_gameLoader->loadScene(SC_INTRO1);
|
||||
_gameLoader->gotoScene(SC_INTRO1, TrubaUp);
|
||||
} else {
|
||||
_gameLoader->loadScene(SC_1);
|
||||
_gameLoader->gotoScene(SC_1, TrubaLeft);
|
||||
}
|
||||
// Not used in full game
|
||||
//_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0);
|
||||
|
||||
if (!_currentScene)
|
||||
return false;
|
||||
} else
|
||||
initMap();
|
||||
initCursors();
|
||||
|
||||
setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED"));
|
||||
|
||||
if (_flgPlayIntro) {
|
||||
_gameLoader->loadScene(SC_INTRO1);
|
||||
_gameLoader->gotoScene(SC_INTRO1, TrubaUp);
|
||||
} else {
|
||||
_gameLoader->loadScene(SC_1);
|
||||
_gameLoader->gotoScene(SC_1, TrubaLeft);
|
||||
}
|
||||
|
||||
if (!_currentScene)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user