diff options
-rw-r--r-- | engines/fullpipe/fullpipe.cpp | 5 | ||||
-rw-r--r-- | engines/fullpipe/gfx.cpp | 8 | ||||
-rw-r--r-- | engines/fullpipe/gfx.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/inventory.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/stateloader.cpp | 35 |
5 files changed, 43 insertions, 9 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index d89e1f35f9..1e342bc9a8 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -90,6 +90,11 @@ FullpipeEngine::~FullpipeEngine() { void FullpipeEngine::initialize() { _globalMessageQueueList = new GlobalMessageQueueList; _behaviorManager = new BehaviorManager; + + _sceneRect.left = 0; + _sceneRect.top = 0; + _sceneRect.right = 799; + _sceneRect.bottom = 599; } Common::Error FullpipeEngine::run() { diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 252333e1f0..2b007bd2e4 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -144,6 +144,10 @@ bool PictureObject::load(MfcArchive &file, bool bigPicture) { _ox2 = _ox; _oy2 = _oy; +#if 0 + _picture->displayPicture(); +#endif + return true; } @@ -300,10 +304,6 @@ bool Picture::load(MfcArchive &file) { debug(5, "Picture::load: <%s>", _memfilename); -#if 0 - displayPicture(); -#endif - return true; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 36ec1bd8d9..bfe21aaed1 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -60,6 +60,7 @@ struct Bitmap { class Picture : public MemoryObject { friend class Movement; friend class DynamicPhase; + friend class PictureObject; Common::Rect _rect; Bitmap *_convertedBitmap; @@ -130,6 +131,7 @@ class GameObject : public CObject { }; class PictureObject : public GameObject { + public: Picture *_picture; CPtrList *_pictureObject2List; int _ox2; diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 0480753bc2..8df06e617e 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -101,7 +101,7 @@ void CInventory2::addItem(int itemId, int value) { } void CInventory2::rebuildItemRects() { - g_fullpipe->accessScene(_sceneId); + _scene = g_fullpipe->accessScene(_sceneId); warning("STUB: CInventory2::rebuildItemRects()"); } diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 00d46198d9..eb50cfb481 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -29,6 +29,7 @@ #include "fullpipe/objects.h" #include "fullpipe/gameloader.h" #include "fullpipe/scene.h" +#include "fullpipe/statics.h" #include "fullpipe/gameobj.h" @@ -104,16 +105,42 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->rebuildItemRects(); - //for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) { - //} + for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) { + ((MemoryObject *)((PicPicturetureObject *)*p)->_picture)->load(); + } //_sceneSwitcher = sceneSwitcher; //_preloadCallback = gameLoaderPreloadCallback //_readSavegameCallback = gameLoaderReadSavegameCallback; _aniMan = accessScene(SC_COMMON)->getAniMan(); _scene2 = 0; - - warning("STUB: loadGam()"); +#if 0 + _movTable = _aniMan->preloadMovements(); + + _aniMan->setSpeed(1); + + PictureObject *pic = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); + + pic->setFlags(pic->_flags & 0xFFFB); + + // Not used in full game + //_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0); + + initMaps(); + 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); + } +#endif + if (!_currentScene) + return false; } else return false; |