aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-06-20 18:13:18 -0400
committerEugene Sandulenko2013-09-06 14:48:14 +0300
commit77ab4241d99df808b081a30163870ffa0d5688d6 (patch)
tree59a1a13066f81607d040bf78e0fcb4e3314d984e /engines/fullpipe
parent925f41b9c4055d39498c61c8f22388176ee25cce (diff)
downloadscummvm-rg350-77ab4241d99df808b081a30163870ffa0d5688d6.tar.gz
scummvm-rg350-77ab4241d99df808b081a30163870ffa0d5688d6.tar.bz2
scummvm-rg350-77ab4241d99df808b081a30163870ffa0d5688d6.zip
FULLPIPE: Continued work on Scene loading. Pictures
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/fullpipe.cpp4
-rw-r--r--engines/fullpipe/fullpipe.h6
-rw-r--r--engines/fullpipe/gfx.h94
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/scene.cpp8
-rw-r--r--engines/fullpipe/scene.h22
-rw-r--r--engines/fullpipe/stateloader.cpp24
7 files changed, 96 insertions, 63 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index d49fe9a773..c43e14beb6 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -33,10 +33,6 @@
namespace Fullpipe {
-int g_gameProjectVersion = 0;
-int g_gameProjectValue = 0;
-int g_scrollSpeed = 0;
-int g_currSoundListCount = 0;
FullpipeEngine *g_fullpipe = 0;
FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index ce6935c25d..034fda3caf 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -49,11 +49,6 @@ class CGameVar;
class CInventory2;
class Scene;
-extern int g_gameProjectVersion;
-extern int g_gameProjectValue;
-extern int g_scrollSpeed;
-extern int g_currSoundListCount;
-
class FullpipeEngine : public ::Engine {
protected:
@@ -84,6 +79,7 @@ public:
int _gameProjectVersion;
int _gameProjectValue;
int _scrollSpeed;
+ int _currSoundListCount;
void initObjectStates();
void setLevelStates();
diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
index 7ecd4a5c59..e52d9b7f5b 100644
--- a/engines/fullpipe/gfx.h
+++ b/engines/fullpipe/gfx.h
@@ -30,16 +30,70 @@ class ShadowsItemArray : public Common::Array<CObject>, public CObject {
virtual bool load(MfcArchive &file);
};
-class Background {
- CPtrList list;
- int stringObj;
- int x;
- int y;
- int16 messageQueueId;
- int colorMemoryObj;
- int bigPictureArray1Count;
- int bigPictureArray2Count;
- int bigPictureArray;
+class Picture : public MemoryObject {
+ Common::Rect _rect;
+ int _convertedBitmap;
+ int _x;
+ int _y;
+ int _field_44;
+ int _width;
+ int _height;
+ int _bitmap;
+ int _field_54;
+ int _memoryObject2;
+ int _alpha;
+ int _paletteData;
+};
+
+class BigPicture : public Picture {
+
+};
+
+class GameObject : public CObject {
+ friend class PictureObject;
+
+ int16 _field_4;
+ int16 _field_6;
+ int _field_8;
+ int16 _flags;
+ int16 _id;
+ char *_stringObj;
+ int _ox;
+ int _oy;
+ int _priority;
+ int _field_20;
+
+ public:
+ GameObject();
+ virtual bool load(MfcArchive &file);
+};
+
+class PictureObject : public GameObject {
+ Picture *_picture;
+ CPtrList *_pictureObject2List;
+ int _ox2;
+ int _oy2;
+
+ public:
+ PictureObject();
+ bool load(MfcArchive &file, bool bigPicture);
+};
+
+class Background : public CObject {
+ CPtrList _list;
+ char *_stringObj;
+ int _x;
+ int _y;
+ int16 _messageQueueId;
+ int _colorMemoryObj;
+ int _bigPictureArray1Count;
+ int _bigPictureArray2Count;
+ int _bigPictureArray;
+
+ public:
+ Background();
+ virtual bool load(MfcArchive &file);
+ void addPictureObject(PictureObject *pct);
};
class Shadows {
@@ -50,26 +104,6 @@ class Shadows {
ShadowsItemArray items;
};
-class Picture {
- MemoryObject obj;
- Common::Rect rect;
- int convertedBitmap;
- int x;
- int y;
- int field_44;
- int width;
- int height;
- int bitmap;
- int field_54;
- int memoryObject2;
- int alpha;
- int paletteData;
-};
-
-class BigPicture {
- Picture pic;
-};
-
} // End of namespace Fullpipe
#endif /* FULLPIPE_GFX_H */
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index fde81f1df2..a64727af44 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -3,6 +3,7 @@ MODULE := engines/fullpipe
MODULE_OBJS = \
detection.o \
fullpipe.o \
+ gfx.o \
inventory.o \
motion.o \
ngiarchive.o \
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 887647d347..fb0a771376 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -103,10 +103,16 @@ void SceneTag::loadScene() {
}
Scene::Scene() {
+ _sceneId = 0;
+ _field_BC = 0;
+ _shadows = 0;
+ _soundList = 0;
}
bool Scene::load(MfcArchive &file) {
- debug(0, "Scene::load");
+ warning("STUB: Scene::load");
+
+ _bg.load(file);
return true;
}
diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h
index d049267ad4..df532b2355 100644
--- a/engines/fullpipe/scene.h
+++ b/engines/fullpipe/scene.h
@@ -26,17 +26,17 @@
namespace Fullpipe {
class Scene : public CObject {
- Background bg;
- CPtrList staticANIObjectList1;
- CPtrList staticANIObjectList2;
- CPtrList messageQueueList;
- CPtrList faObjectList;
- Shadows *shadows;
- int soundList;
- int16 sceneId;
- int stringObj;
- int field_BC;
- int libHandle;
+ Background _bg;
+ CPtrList _staticANIObjectList1;
+ CPtrList _staticANIObjectList2;
+ CPtrList _messageQueueList;
+ CPtrList _faObjectList;
+ Shadows *_shadows;
+ int _soundList;
+ int16 _sceneId;
+ int _stringObj;
+ int _field_BC;
+ int _libHandle;
public:
Scene();
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index ea3655e763..d7cc9cf00c 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -35,7 +35,7 @@ bool FullpipeEngine::loadGam(const char *fname) {
_gameLoader = new CGameLoader();
if (_gameLoader->loadFile(fname)) {
- g_currSoundListCount = 0;
+ g_fullpipe->_currSoundListCount = 0;
initObjectStates();
//set_g_messageQueueCallback1(messageQueueCallback1);
@@ -93,8 +93,8 @@ bool CGameLoader::load(MfcArchive &file) {
g_fullpipe->_gameProject = _gameProject;
- if (g_gameProjectVersion < 12) {
- error("Old gameProjectVersion: %d", g_gameProjectVersion);
+ if (g_fullpipe->_gameProjectVersion < 12) {
+ error("Old gameProjectVersion: %d", g_fullpipe->_gameProjectVersion);
}
_gameName = file.readPascalString();
@@ -140,25 +140,25 @@ bool GameProject::load(MfcArchive &file) {
_headerFilename = 0;
_field_10 = 12;
- g_gameProjectVersion = file.readUint32LE();
- g_gameProjectValue = file.readUint16LE();
- g_scrollSpeed = file.readUint32LE();
+ g_fullpipe->_gameProjectVersion = file.readUint32LE();
+ g_fullpipe->_gameProjectValue = file.readUint16LE();
+ g_fullpipe->_scrollSpeed = file.readUint32LE();
_headerFilename = file.readPascalString();
- debug(1, "_gameProjectVersion = %d", g_gameProjectVersion);
- debug(1, "_gameProjectValue = %d", g_gameProjectValue);
- debug(1, "_scrollSpeed = %d", g_scrollSpeed);
+ debug(1, "_gameProjectVersion = %d", g_fullpipe->_gameProjectVersion);
+ debug(1, "_gameProjectValue = %d", g_fullpipe->_gameProjectValue);
+ debug(1, "_scrollSpeed = %d", g_fullpipe->_scrollSpeed);
debug(1, "_headerFilename = %s", _headerFilename);
_sceneTagList = new SceneTagList();
_sceneTagList->load(file);
- if (g_gameProjectVersion >= 3)
+ if (g_fullpipe->_gameProjectVersion >= 3)
_field_4 = file.readUint32LE();
- if (g_gameProjectVersion >= 5) {
+ if (g_fullpipe->_gameProjectVersion >= 5) {
file.readUint32LE();
file.readUint32LE();
}
@@ -269,7 +269,7 @@ bool ExCommand::load(MfcArchive &file) {
_field_3C = 0;
- if (g_gameProjectVersion >= 12) {
+ if (g_fullpipe->_gameProjectVersion >= 12) {
_flags = file.readUint32LE();
_parId = file.readUint32LE();
}