From cf35f34454ad1f9224481e8cfe027d8fae4b8e76 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 19 Jul 2013 17:59:03 +0300 Subject: FULLPIPE: Beginning of scene drawing --- engines/fullpipe/gfx.cpp | 8 +++++--- engines/fullpipe/gfx.h | 4 ++-- engines/fullpipe/scene.cpp | 12 +++++++++--- engines/fullpipe/scene.h | 1 - engines/fullpipe/stateloader.cpp | 1 - 5 files changed, 16 insertions(+), 10 deletions(-) (limited to 'engines') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 3c0f51550c..71a07d0019 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -51,13 +51,13 @@ Background::Background() { _bigPictureArray1Count = 0; _bigPictureArray2Count = 0; _bigPictureArray = 0; - _stringObj = 0; - _colorMemoryObj = 0; + _bgname = 0; + _palette = 0; } bool Background::load(MfcArchive &file) { debug(5, "Background::load()"); - _stringObj = file.readPascalString(); + _bgname = file.readPascalString(); int count = file.readUint16LE(); @@ -244,7 +244,9 @@ 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 a0f18597f0..e4989cd9e8 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -125,11 +125,11 @@ class Background : public CObject { CPtrList _picObjList; protected: - char *_stringObj; + char *_bgname; int _x; int _y; int16 _messageQueueId; - MemoryObject *_colorMemoryObj; + MemoryObject *_palette; int _bigPictureArray1Count; int _bigPictureArray2Count; BigPicture ***_bigPictureArray; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 37b35607f0..81fa91cca0 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -180,16 +180,16 @@ bool Scene::load(MfcArchive &file) { _libHandle = g_fullpipe->_currArchive; - if (_picObjList.size() > 0 && _stringObj && strlen(_stringObj) > 1) { + if (_picObjList.size() > 0 && _bgname && strlen(_bgname) > 1) { char fname[260]; - strcpy(fname, _stringObj); + strcpy(fname, _bgname); strcpy(strrchr(fname, '.') + 1, "col"); MemoryObject *col = new MemoryObject(); col->loadFile(fname); - _colorMemoryObj = col; + _palette = col; } char *shdname = genFileName(0, _sceneId, "shd"); @@ -260,6 +260,12 @@ void Scene::updateScrolling(int par) { } void Scene::drawContent(int minPri, int maxPri, bool drawBG) { + if (!_picObjList.size() && !_bigPictureArray1Count) + return; + + if (_palette) { + warning("Scene palette is ignored"); + } } } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 1a76d31638..cdb5cf2bb2 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -26,7 +26,6 @@ namespace Fullpipe { class Scene : public Background { - Background _bg; CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; CPtrList _messageQueueList; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index c4ea1cdd29..d1f9e00a6a 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -45,7 +45,6 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->addItem(ANI_INV_MAP, 1); #if 1 - g_fullpipe->accessScene(302); g_fullpipe->accessScene(301); g_fullpipe->accessScene(302); g_fullpipe->accessScene(303); -- cgit v1.2.3