FULLPIPE: Unstubbed loadGam() and CGameLoader()

This commit is contained in:
Eugene Sandulenko 2013-07-28 17:22:18 +03:00
parent d8cca2357e
commit 795a926744
5 changed files with 85 additions and 46 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -38,12 +38,15 @@ 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;
_currSoundListCount = 0;
initObjectStates();
// set_g_messageQueueCallback1(messageQueueCallback1);
addMessageHandlerByIndex(global_messageHandler1, 0, 4);
//set_g_messageQueueCallback1(messageQueueCallback1);
//addMessageHandler2(global_messageHandler, 0, 4);
_inventory = getGameLoaderInventory();
_inventory->setItemFlags(ANI_INV_MAP, 0x10003);
_inventory->addItem(ANI_INV_MAP, 1);
@ -54,9 +57,10 @@ bool FullpipeEngine::loadGam(const char *fname) {
((MemoryObject *)((PictureObject *)*p)->_picture)->load();
}
//_sceneSwitcher = sceneSwitcher;
//_preloadCallback = gameLoaderPreloadCallback
//_readSavegameCallback = gameLoaderReadSavegameCallback;
// _sceneSwitcher = sceneSwitcher;
// _preloadCallback = gameLoaderPreloadCallback
// _readSavegameCallback = gameLoaderReadSavegameCallback;
_aniMan = accessScene(SC_COMMON)->getAniMan();
_scene2 = 0;
@ -86,8 +90,6 @@ bool FullpipeEngine::loadGam(const char *fname) {
if (!_currentScene)
return false;
} else
return false;
return true;
}