aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-28 14:54:25 +0300
committerEugene Sandulenko2013-09-06 14:51:07 +0300
commit94fedf012872487d6511bbd428980e5706b5caba (patch)
treef9aa5bc2adfea6b9604f1fc70ece58cf24b4a24b
parentad537b1a7e04873c4e3ff3b02ce8893bd6ce12f9 (diff)
downloadscummvm-rg350-94fedf012872487d6511bbd428980e5706b5caba.tar.gz
scummvm-rg350-94fedf012872487d6511bbd428980e5706b5caba.tar.bz2
scummvm-rg350-94fedf012872487d6511bbd428980e5706b5caba.zip
FULLPIPE: Finished stubbing loadGam()
-rw-r--r--engines/fullpipe/fullpipe.cpp32
-rw-r--r--engines/fullpipe/fullpipe.h14
-rw-r--r--engines/fullpipe/gameloader.cpp6
-rw-r--r--engines/fullpipe/gameloader.h3
-rw-r--r--engines/fullpipe/stateloader.cpp10
-rw-r--r--engines/fullpipe/statics.cpp10
-rw-r--r--engines/fullpipe/statics.h8
7 files changed, 77 insertions, 6 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 1e342bc9a8..2563a9ce78 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -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
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 4415115588..0ae837d7b9 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -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;
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 675839f9a6..1641d4d81e 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -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++) {
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index fa1bb33b7c..36c99f20dc 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -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);
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index eb50cfb481..82c72b8eb9 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -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
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 32dbf4a854..1f87721f01 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -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;
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index 83bdc73e8c..8a0f36aa6b 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -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