FULLPIPE: CGameLoader -> GameLoader
This commit is contained in:
parent
918d2f175a
commit
4a6ede35e7
4 changed files with 20 additions and 20 deletions
|
@ -45,7 +45,7 @@ enum FullpipeGameFeatures {
|
||||||
|
|
||||||
class BehaviorManager;
|
class BehaviorManager;
|
||||||
class BaseModalObject;
|
class BaseModalObject;
|
||||||
class CGameLoader;
|
class GameLoader;
|
||||||
class GameVar;
|
class GameVar;
|
||||||
class InputController;
|
class InputController;
|
||||||
class Inventory2;
|
class Inventory2;
|
||||||
|
@ -98,7 +98,7 @@ public:
|
||||||
|
|
||||||
Graphics::Surface _backgroundSurface;
|
Graphics::Surface _backgroundSurface;
|
||||||
|
|
||||||
CGameLoader *_gameLoader;
|
GameLoader *_gameLoader;
|
||||||
GameProject *_gameProject;
|
GameProject *_gameProject;
|
||||||
bool loadGam(const char *fname, int scene = 0);
|
bool loadGam(const char *fname, int scene = 0);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ InteractionController *getGameLoaderInteractionController() {
|
||||||
return g_fullpipe->_gameLoader->_interactionController;
|
return g_fullpipe->_gameLoader->_interactionController;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGameLoader::CGameLoader() {
|
GameLoader::GameLoader() {
|
||||||
_interactionController = new InteractionController();
|
_interactionController = new InteractionController();
|
||||||
_inputController = new InputController();
|
_inputController = new InputController();
|
||||||
|
|
||||||
|
@ -74,15 +74,15 @@ CGameLoader::CGameLoader() {
|
||||||
g_fullpipe->_msgId = 0;
|
g_fullpipe->_msgId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGameLoader::~CGameLoader() {
|
GameLoader::~GameLoader() {
|
||||||
free(_gameName);
|
free(_gameName);
|
||||||
delete _gameProject;
|
delete _gameProject;
|
||||||
delete _interactionController;
|
delete _interactionController;
|
||||||
delete _inputController;
|
delete _inputController;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGameLoader::load(MfcArchive &file) {
|
bool GameLoader::load(MfcArchive &file) {
|
||||||
debug(5, "CGameLoader::load()");
|
debug(5, "GameLoader::load()");
|
||||||
|
|
||||||
_gameName = file.readPascalString();
|
_gameName = file.readPascalString();
|
||||||
debug(6, "_gameName: %s", _gameName);
|
debug(6, "_gameName: %s", _gameName);
|
||||||
|
@ -129,7 +129,7 @@ bool CGameLoader::load(MfcArchive &file) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGameLoader::loadScene(int sceneId) {
|
bool GameLoader::loadScene(int sceneId) {
|
||||||
SceneTag *st;
|
SceneTag *st;
|
||||||
|
|
||||||
int idx = getSceneTagBySceneId(sceneId, &st);
|
int idx = getSceneTagBySceneId(sceneId, &st);
|
||||||
|
@ -155,7 +155,7 @@ bool CGameLoader::loadScene(int sceneId) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGameLoader::gotoScene(int sceneId, int entranceId) {
|
bool GameLoader::gotoScene(int sceneId, int entranceId) {
|
||||||
SceneTag *st;
|
SceneTag *st;
|
||||||
|
|
||||||
int sc2idx = getSceneTagBySceneId(sceneId, &st);
|
int sc2idx = getSceneTagBySceneId(sceneId, &st);
|
||||||
|
@ -234,7 +234,7 @@ bool preloadCallback(const PreloadItem &pre, int flag) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGameLoader::preloadScene(int sceneId, int entranceId) {
|
bool GameLoader::preloadScene(int sceneId, int entranceId) {
|
||||||
debug(0, "preloadScene(%d, %d), ", sceneId, entranceId);
|
debug(0, "preloadScene(%d, %d), ", sceneId, entranceId);
|
||||||
|
|
||||||
if (_preloadSceneId != sceneId || _preloadEntranceId != entranceId) {
|
if (_preloadSceneId != sceneId || _preloadEntranceId != entranceId) {
|
||||||
|
@ -289,7 +289,7 @@ bool CGameLoader::preloadScene(int sceneId, int entranceId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGameLoader::unloadScene(int sceneId) {
|
bool GameLoader::unloadScene(int sceneId) {
|
||||||
SceneTag *tag;
|
SceneTag *tag;
|
||||||
int sceneTag = getSceneTagBySceneId(sceneId, &tag);
|
int sceneTag = getSceneTagBySceneId(sceneId, &tag);
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ bool CGameLoader::unloadScene(int sceneId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) {
|
int GameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) {
|
||||||
if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) {
|
if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) {
|
||||||
for (uint i = 0; i < _sc2array.size(); i++) {
|
for (uint i = 0; i < _sc2array.size(); i++) {
|
||||||
if (_sc2array[i]._sceneId == sceneId) {
|
if (_sc2array[i]._sceneId == sceneId) {
|
||||||
|
@ -329,11 +329,11 @@ int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) {
|
void GameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) {
|
||||||
if (picAniInfoCount <= 0)
|
if (picAniInfoCount <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
debug(0, "CGameLoader::applyPicAniInfos(sc, ptr, %d)", picAniInfoCount);
|
debug(0, "GameLoader::applyPicAniInfos(sc, ptr, %d)", picAniInfoCount);
|
||||||
|
|
||||||
PictureObject *pict;
|
PictureObject *pict;
|
||||||
StaticANIObject *ani;
|
StaticANIObject *ani;
|
||||||
|
@ -381,11 +381,11 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameLoader::saveScenePicAniInfos(int sceneId) {
|
void GameLoader::saveScenePicAniInfos(int sceneId) {
|
||||||
warning("STUB: CGameLoader::saveScenePicAniInfos(%d)", sceneId);
|
warning("STUB: GameLoader::saveScenePicAniInfos(%d)", sceneId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameLoader::updateSystems(int counterdiff) {
|
void GameLoader::updateSystems(int counterdiff) {
|
||||||
if (g_fullpipe->_currentScene) {
|
if (g_fullpipe->_currentScene) {
|
||||||
g_fullpipe->_currentScene->update(counterdiff);
|
g_fullpipe->_currentScene->update(counterdiff);
|
||||||
|
|
||||||
|
|
|
@ -72,10 +72,10 @@ class PreloadItems : public Common::Array<PreloadItem *>, public CObject {
|
||||||
virtual bool load(MfcArchive &file);
|
virtual bool load(MfcArchive &file);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGameLoader : public CObject {
|
class GameLoader : public CObject {
|
||||||
public:
|
public:
|
||||||
CGameLoader();
|
GameLoader();
|
||||||
virtual ~CGameLoader();
|
virtual ~GameLoader();
|
||||||
|
|
||||||
virtual bool load(MfcArchive &file);
|
virtual bool load(MfcArchive &file);
|
||||||
bool loadScene(int sceneId);
|
bool loadScene(int sceneId);
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
bool FullpipeEngine::loadGam(const char *fname, int scene) {
|
bool FullpipeEngine::loadGam(const char *fname, int scene) {
|
||||||
_gameLoader = new CGameLoader();
|
_gameLoader = new GameLoader();
|
||||||
|
|
||||||
if (!_gameLoader->loadFile(fname))
|
if (!_gameLoader->loadFile(fname))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue