mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
FULLPIPE: Finished stubbing loadGam()
This commit is contained in:
parent
ad537b1a7e
commit
94fedf0128
@ -34,6 +34,8 @@
|
||||
#include "fullpipe/messages.h"
|
||||
#include "fullpipe/behavior.h"
|
||||
|
||||
#include "fullpipe/gameobj.h"
|
||||
|
||||
namespace Fullpipe {
|
||||
|
||||
FullpipeEngine *g_fullpipe = 0;
|
||||
@ -63,11 +65,15 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
|
||||
_inputDisabled = false;
|
||||
|
||||
_needQuit = false;
|
||||
_flgPlayIntro = true;
|
||||
|
||||
_musicAllowed = -1;
|
||||
|
||||
_aniMan = 0;
|
||||
_aniMan2 = 0;
|
||||
_currentScene = 0;
|
||||
_scene2 = 0;
|
||||
_movTable = 0;
|
||||
|
||||
_globalMessageQueueList = 0;
|
||||
_messageHandlers = 0;
|
||||
@ -336,4 +342,30 @@ void FullpipeEngine::setObjectState(const char *name, int state) {
|
||||
var->setSubVarAsInt(name, state);
|
||||
}
|
||||
|
||||
void FullpipeEngine::initCursors() {
|
||||
warning("STUB: FullpipeEngine::initCursors()");
|
||||
}
|
||||
|
||||
void FullpipeEngine::initMap() {
|
||||
memset(_mapTable, 0, sizeof(_mapTable));
|
||||
|
||||
updateMapPiece(PIC_MAP_S01, 1);
|
||||
updateMapPiece(PIC_MAP_A13, 1u);
|
||||
}
|
||||
|
||||
void FullpipeEngine::updateMapPiece(int mapId, int update) {
|
||||
for (int i = 0; i < 200; i++) {
|
||||
int hiWord = (_mapTable[i] >> 16) & 0xffff;
|
||||
|
||||
if (hiWord == mapId) {
|
||||
_mapTable[i] |= update;
|
||||
return;
|
||||
}
|
||||
if (!hiWord) {
|
||||
_mapTable[i] = (mapId << 16) | update;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Fullpipe
|
||||
|
@ -52,6 +52,7 @@ class EntranceInfo;
|
||||
class GameProject;
|
||||
class GlobalMessageQueueList;
|
||||
class MessageHandler;
|
||||
struct MovTable;
|
||||
class NGIArchive;
|
||||
class Scene;
|
||||
class SoundList;
|
||||
@ -68,6 +69,8 @@ public:
|
||||
|
||||
void initialize();
|
||||
|
||||
void setMusicAllowed(int val) { _musicAllowed = val; }
|
||||
|
||||
// Detection related functions
|
||||
const ADGameDescription *_gameDescription;
|
||||
const char *getGameId() const;
|
||||
@ -116,16 +119,27 @@ public:
|
||||
|
||||
BehaviorManager *_behaviorManager;
|
||||
|
||||
MovTable *_movTable;
|
||||
|
||||
void initMap();
|
||||
void updateMapPiece(int mapId, int update);
|
||||
|
||||
bool _needQuit;
|
||||
bool _flgPlayIntro;
|
||||
int _musicAllowed;
|
||||
|
||||
void initObjectStates();
|
||||
void setLevelStates();
|
||||
void setSwallowedEggsState();
|
||||
|
||||
void initCursors();
|
||||
|
||||
CGameVar *_swallowedEgg1;
|
||||
CGameVar *_swallowedEgg2;
|
||||
CGameVar *_swallowedEgg3;
|
||||
|
||||
int32 _mapTable[200];
|
||||
|
||||
Scene *_inventoryScene;
|
||||
CInventory2 *_inventory;
|
||||
|
||||
|
@ -155,6 +155,12 @@ bool CGameLoader::loadScene(int sceneId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CGameLoader::gotoScene(int sceneId, int entranceId) {
|
||||
warning("STUB: CGameLoader::gotoScene(%d, %d)", sceneId, entranceId);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) {
|
||||
if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) {
|
||||
for (uint i = 0; i < _sc2array.size(); i++) {
|
||||
|
@ -39,7 +39,8 @@ class CGameLoader : public CObject {
|
||||
virtual ~CGameLoader();
|
||||
|
||||
virtual bool load(MfcArchive &file);
|
||||
bool loadScene(int num);
|
||||
bool loadScene(int sceneId);
|
||||
bool gotoScene(int sceneId, int entranceId);
|
||||
|
||||
int getSceneTagBySceneId(int sceneId, SceneTag **st);
|
||||
void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount);
|
||||
|
@ -106,7 +106,7 @@ bool FullpipeEngine::loadGam(const char *fname) {
|
||||
_inventory->rebuildItemRects();
|
||||
|
||||
for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) {
|
||||
((MemoryObject *)((PicPicturetureObject *)*p)->_picture)->load();
|
||||
((MemoryObject *)((PictureObject *)*p)->_picture)->load();
|
||||
}
|
||||
|
||||
//_sceneSwitcher = sceneSwitcher;
|
||||
@ -114,8 +114,8 @@ bool FullpipeEngine::loadGam(const char *fname) {
|
||||
//_readSavegameCallback = gameLoaderReadSavegameCallback;
|
||||
_aniMan = accessScene(SC_COMMON)->getAniMan();
|
||||
_scene2 = 0;
|
||||
#if 0
|
||||
_movTable = _aniMan->preloadMovements();
|
||||
|
||||
_movTable = _aniMan->countMovements();
|
||||
|
||||
_aniMan->setSpeed(1);
|
||||
|
||||
@ -126,7 +126,7 @@ bool FullpipeEngine::loadGam(const char *fname) {
|
||||
// Not used in full game
|
||||
//_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0);
|
||||
|
||||
initMaps();
|
||||
initMap();
|
||||
initCursors();
|
||||
|
||||
setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED"));
|
||||
@ -138,7 +138,7 @@ bool FullpipeEngine::loadGam(const char *fname) {
|
||||
_gameLoader->loadScene(SC_1);
|
||||
_gameLoader->gotoScene(SC_1, TrubaLeft);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!_currentScene)
|
||||
return false;
|
||||
} else
|
||||
|
@ -238,6 +238,16 @@ void StaticANIObject::draw2() {
|
||||
}
|
||||
}
|
||||
|
||||
MovTable *StaticANIObject::countMovements() {
|
||||
warning("STUB: StaticANIObject::countMovements()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void StaticANIObject::setSpeed(int speed) {
|
||||
warning("STUB: StaticANIObject::setSpeed(%d)", speed);
|
||||
}
|
||||
|
||||
Statics::Statics() {
|
||||
_staticsId = 0;
|
||||
_picture = 0;
|
||||
|
@ -185,6 +185,14 @@ class StaticANIObject : public GameObject {
|
||||
Statics *addReverseStatics(Statics *ani);
|
||||
void draw();
|
||||
void draw2();
|
||||
|
||||
MovTable *countMovements();
|
||||
void setSpeed(int speed);
|
||||
};
|
||||
|
||||
struct MovTable {
|
||||
int count;
|
||||
int16 *movs;
|
||||
};
|
||||
|
||||
} // End of namespace Fullpipe
|
||||
|
Loading…
Reference in New Issue
Block a user