FULLPIPE: Continued work on Scene loading. Pictures

This commit is contained in:
Eugene Sandulenko 2013-06-20 18:13:18 -04:00
parent 925f41b9c4
commit 77ab4241d9
7 changed files with 96 additions and 63 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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 */

View File

@ -3,6 +3,7 @@ MODULE := engines/fullpipe
MODULE_OBJS = \
detection.o \
fullpipe.o \
gfx.o \
inventory.o \
motion.o \
ngiarchive.o \

View File

@ -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;
}

View File

@ -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();

View File

@ -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();
}