FULLPIPE: Added lots of debug output, Picture::setAOIDs() implementation
This commit is contained in:
parent
f18e318f78
commit
56cb726ebc
11 changed files with 93 additions and 8 deletions
|
@ -47,7 +47,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
|
||||||
_rnd = new Common::RandomSource("fullpipe");
|
_rnd = new Common::RandomSource("fullpipe");
|
||||||
|
|
||||||
_gameProjectVersion = 0;
|
_gameProjectVersion = 0;
|
||||||
_gameProjectValue = 0;
|
_pictureScale = 8;
|
||||||
_scrollSpeed = 0;
|
_scrollSpeed = 0;
|
||||||
_currSoundListCount = 0;
|
_currSoundListCount = 0;
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public:
|
||||||
bool loadGam(const char *fname);
|
bool loadGam(const char *fname);
|
||||||
|
|
||||||
int _gameProjectVersion;
|
int _gameProjectVersion;
|
||||||
int _gameProjectValue;
|
int _pictureScale;
|
||||||
int _scrollSpeed;
|
int _scrollSpeed;
|
||||||
int _currSoundListCount;
|
int _currSoundListCount;
|
||||||
bool _soundEnabled;
|
bool _soundEnabled;
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
void Bitmap::load(Common::ReadStream *s) {
|
void Bitmap::load(Common::ReadStream *s) {
|
||||||
|
debug(5, "Bitmap::load()");
|
||||||
|
|
||||||
x = s->readUint32LE();
|
x = s->readUint32LE();
|
||||||
y = s->readUint32LE();
|
y = s->readUint32LE();
|
||||||
width = s->readUint32LE();
|
width = s->readUint32LE();
|
||||||
|
@ -54,6 +56,7 @@ Background::Background() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Background::load(MfcArchive &file) {
|
bool Background::load(MfcArchive &file) {
|
||||||
|
debug(5, "Background::load()");
|
||||||
_stringObj = file.readPascalString();
|
_stringObj = file.readPascalString();
|
||||||
|
|
||||||
int count = file.readUint16LE();
|
int count = file.readUint16LE();
|
||||||
|
@ -132,6 +135,7 @@ PictureObject::PictureObject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PictureObject::load(MfcArchive &file, bool bigPicture) {
|
bool PictureObject::load(MfcArchive &file, bool bigPicture) {
|
||||||
|
debug(5, "PictureObject::load()");
|
||||||
GameObject::load(file);
|
GameObject::load(file);
|
||||||
|
|
||||||
if (bigPicture)
|
if (bigPicture)
|
||||||
|
@ -170,6 +174,7 @@ GameObject::GameObject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameObject::load(MfcArchive &file) {
|
bool GameObject::load(MfcArchive &file) {
|
||||||
|
debug(5, "GameObject::load()");
|
||||||
_field_4 = 0;
|
_field_4 = 0;
|
||||||
_flags = 0;
|
_flags = 0;
|
||||||
_field_20 = 0;
|
_field_20 = 0;
|
||||||
|
@ -205,6 +210,7 @@ Picture::Picture() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Picture::load(MfcArchive &file) {
|
bool Picture::load(MfcArchive &file) {
|
||||||
|
debug(5, "Picture::load()");
|
||||||
MemoryObject::load(file);
|
MemoryObject::load(file);
|
||||||
|
|
||||||
_x = file.readUint32LE();
|
_x = file.readUint32LE();
|
||||||
|
@ -240,6 +246,17 @@ bool Picture::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Picture::setAOIDs() {
|
void Picture::setAOIDs() {
|
||||||
|
int w = (g_fullpipe->_pictureScale + _width - 1) / g_fullpipe->_pictureScale;
|
||||||
|
int h = (g_fullpipe->_pictureScale + _height - 1) / g_fullpipe->_pictureScale;
|
||||||
|
|
||||||
|
_memoryObject2->_rows = (byte **)malloc(w * sizeof(int *));
|
||||||
|
|
||||||
|
int pitch = 2 * h;
|
||||||
|
byte *ptr = _memoryObject2->getData();
|
||||||
|
for (int i = 0; i < w; i++) {
|
||||||
|
_memoryObject2->_rows[i] = ptr;
|
||||||
|
ptr += pitch;
|
||||||
|
}
|
||||||
warning("STUB: Picture::setAOIDs()");
|
warning("STUB: Picture::setAOIDs()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,6 +285,7 @@ BigPicture::BigPicture() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BigPicture::load(MfcArchive &file) {
|
bool BigPicture::load(MfcArchive &file) {
|
||||||
|
debug(5, "BigPicture::load()");
|
||||||
Picture::load(file);
|
Picture::load(file);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -280,6 +298,7 @@ Shadows::Shadows() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Shadows::load(MfcArchive &file) {
|
bool Shadows::load(MfcArchive &file) {
|
||||||
|
debug(5, "Shadows::load()");
|
||||||
_sceneId = file.readUint32LE();
|
_sceneId = file.readUint32LE();
|
||||||
_staticAniObjectId = file.readUint32LE();
|
_staticAniObjectId = file.readUint32LE();
|
||||||
_movementId = file.readUint32LE();
|
_movementId = file.readUint32LE();
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
namespace Fullpipe {
|
namespace Fullpipe {
|
||||||
|
|
||||||
bool CInventory::load(MfcArchive &file) {
|
bool CInventory::load(MfcArchive &file) {
|
||||||
|
debug(5, "CInventory::load()");
|
||||||
|
|
||||||
_sceneId = file.readUint16LE();
|
_sceneId = file.readUint16LE();
|
||||||
int numInvs = file.readUint32LE();
|
int numInvs = file.readUint32LE();
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,14 @@ namespace Fullpipe {
|
||||||
bool CMotionController::load(MfcArchive &file) {
|
bool CMotionController::load(MfcArchive &file) {
|
||||||
// Is originally empty file.readClass();
|
// Is originally empty file.readClass();
|
||||||
|
|
||||||
|
debug(5, "CMotionController::load()");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMctlCompound::load(MfcArchive &file) {
|
bool CMctlCompound::load(MfcArchive &file) {
|
||||||
|
debug(5, "CMctlCompound::load()");
|
||||||
|
|
||||||
int count = file.readUint32LE();
|
int count = file.readUint32LE();
|
||||||
|
|
||||||
debug(6, "CMctlCompound::count = %d", count);
|
debug(6, "CMctlCompound::count = %d", count);
|
||||||
|
@ -70,6 +73,8 @@ bool CMctlCompound::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMctlCompoundArray::load(MfcArchive &file) {
|
bool CMctlCompoundArray::load(MfcArchive &file) {
|
||||||
|
debug(5, "CMctlCompoundArray::load()");
|
||||||
|
|
||||||
int count = file.readUint32LE();
|
int count = file.readUint32LE();
|
||||||
|
|
||||||
debug(0, "CMctlCompoundArray::count = %d", count);
|
debug(0, "CMctlCompoundArray::count = %d", count);
|
||||||
|
@ -88,6 +93,8 @@ CMovGraph::CMovGraph() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMovGraph::load(MfcArchive &file) {
|
bool CMovGraph::load(MfcArchive &file) {
|
||||||
|
debug(5, "CMovGraph::load()");
|
||||||
|
|
||||||
_links.load(file);
|
_links.load(file);
|
||||||
_nodes.load(file);
|
_nodes.load(file);
|
||||||
|
|
||||||
|
@ -106,6 +113,8 @@ CMovGraphLink::CMovGraphLink() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMovGraphLink::load(MfcArchive &file) {
|
bool CMovGraphLink::load(MfcArchive &file) {
|
||||||
|
debug(5, "CMovGraphLink::load()");
|
||||||
|
|
||||||
_dwordArray1.load(file);
|
_dwordArray1.load(file);
|
||||||
_dwordArray2.load(file);
|
_dwordArray2.load(file);
|
||||||
|
|
||||||
|
@ -128,6 +137,8 @@ bool CMovGraphLink::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMovGraphNode::load(MfcArchive &file) {
|
bool CMovGraphNode::load(MfcArchive &file) {
|
||||||
|
debug(5, "CMovGraphNode::load()");
|
||||||
|
|
||||||
_field_14 = file.readUint32LE();
|
_field_14 = file.readUint32LE();
|
||||||
_x = file.readUint32LE();
|
_x = file.readUint32LE();
|
||||||
_y = file.readUint32LE();
|
_y = file.readUint32LE();
|
||||||
|
@ -147,6 +158,8 @@ CReactParallel::CReactParallel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CReactParallel::load(MfcArchive &file) {
|
bool CReactParallel::load(MfcArchive &file) {
|
||||||
|
debug(5, "CReactParallel::load()");
|
||||||
|
|
||||||
_x1 = file.readUint32LE();
|
_x1 = file.readUint32LE();
|
||||||
_y1 = file.readUint32LE();
|
_y1 = file.readUint32LE();
|
||||||
_x2 = file.readUint32LE();
|
_x2 = file.readUint32LE();
|
||||||
|
@ -192,6 +205,8 @@ CReactPolygonal::CReactPolygonal() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CReactPolygonal::load(MfcArchive &file) {
|
bool CReactPolygonal::load(MfcArchive &file) {
|
||||||
|
debug(5, "CReactPolygonal::load()");
|
||||||
|
|
||||||
_field_C = file.readUint32LE();
|
_field_C = file.readUint32LE();
|
||||||
_field_10 = file.readUint32LE();
|
_field_10 = file.readUint32LE();
|
||||||
_pointCount = file.readUint32LE();
|
_pointCount = file.readUint32LE();
|
||||||
|
|
|
@ -49,6 +49,8 @@ Scene *FullpipeEngine::accessScene(int sceneId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SceneTagList::load(MfcArchive &file) {
|
bool SceneTagList::load(MfcArchive &file) {
|
||||||
|
debug(5, "SceneTagList::load()");
|
||||||
|
|
||||||
int numEntries = file.readUint16LE();
|
int numEntries = file.readUint16LE();
|
||||||
|
|
||||||
for (int i = 0; i < numEntries; i++) {
|
for (int i = 0; i < numEntries; i++) {
|
||||||
|
@ -66,6 +68,8 @@ SceneTag::SceneTag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SceneTag::load(MfcArchive &file) {
|
bool SceneTag::load(MfcArchive &file) {
|
||||||
|
debug(5, "SceneTag::load()");
|
||||||
|
|
||||||
_field_4 = 0;
|
_field_4 = 0;
|
||||||
_scene = 0;
|
_scene = 0;
|
||||||
|
|
||||||
|
@ -113,6 +117,8 @@ Scene::Scene() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Scene::load(MfcArchive &file) {
|
bool Scene::load(MfcArchive &file) {
|
||||||
|
debug(5, "Scene::load()");
|
||||||
|
|
||||||
Background::load(file);
|
Background::load(file);
|
||||||
|
|
||||||
_sceneId = file.readUint16LE();
|
_sceneId = file.readUint16LE();
|
||||||
|
|
|
@ -34,6 +34,8 @@ SoundList::SoundList() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SoundList::load(MfcArchive &file, char *fname) {
|
bool SoundList::load(MfcArchive &file, char *fname) {
|
||||||
|
debug(5, "SoundList::load()");
|
||||||
|
|
||||||
_soundItemsCount = file.readUint32LE();
|
_soundItemsCount = file.readUint32LE();
|
||||||
_soundItems = (Sound **)calloc(_soundItemsCount, sizeof(Sound *));
|
_soundItems = (Sound **)calloc(_soundItemsCount, sizeof(Sound *));
|
||||||
|
|
||||||
|
@ -75,6 +77,8 @@ Sound::Sound() {
|
||||||
|
|
||||||
|
|
||||||
bool Sound::load(MfcArchive &file, NGIArchive *archive) {
|
bool Sound::load(MfcArchive &file, NGIArchive *archive) {
|
||||||
|
debug(5, "Sound::load()");
|
||||||
|
|
||||||
MemoryObject::load(file);
|
MemoryObject::load(file);
|
||||||
|
|
||||||
_id = file.readUint32LE();
|
_id = file.readUint32LE();
|
||||||
|
|
|
@ -144,6 +144,8 @@ CGameLoader::~CGameLoader() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGameLoader::load(MfcArchive &file) {
|
bool CGameLoader::load(MfcArchive &file) {
|
||||||
|
debug(5, "CGameLoader::load()");
|
||||||
|
|
||||||
_gameName = file.readPascalString();
|
_gameName = file.readPascalString();
|
||||||
debug(6, "_gameName: %s", _gameName);
|
debug(6, "_gameName: %s", _gameName);
|
||||||
|
|
||||||
|
@ -229,18 +231,20 @@ GameProject::GameProject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameProject::load(MfcArchive &file) {
|
bool GameProject::load(MfcArchive &file) {
|
||||||
|
debug(5, "GameProject::load()");
|
||||||
|
|
||||||
_field_4 = 0;
|
_field_4 = 0;
|
||||||
_headerFilename = 0;
|
_headerFilename = 0;
|
||||||
_field_10 = 12;
|
_field_10 = 12;
|
||||||
|
|
||||||
g_fullpipe->_gameProjectVersion = file.readUint32LE();
|
g_fullpipe->_gameProjectVersion = file.readUint32LE();
|
||||||
g_fullpipe->_gameProjectValue = file.readUint16LE();
|
g_fullpipe->_pictureScale = file.readUint16LE();
|
||||||
g_fullpipe->_scrollSpeed = file.readUint32LE();
|
g_fullpipe->_scrollSpeed = file.readUint32LE();
|
||||||
|
|
||||||
_headerFilename = file.readPascalString();
|
_headerFilename = file.readPascalString();
|
||||||
|
|
||||||
debug(1, "_gameProjectVersion = %d", g_fullpipe->_gameProjectVersion);
|
debug(1, "_gameProjectVersion = %d", g_fullpipe->_gameProjectVersion);
|
||||||
debug(1, "_gameProjectValue = %d", g_fullpipe->_gameProjectValue);
|
debug(1, "_pictureScale = %d", g_fullpipe->_pictureScale);
|
||||||
debug(1, "_scrollSpeed = %d", g_fullpipe->_scrollSpeed);
|
debug(1, "_scrollSpeed = %d", g_fullpipe->_scrollSpeed);
|
||||||
debug(1, "_headerFilename = %s", _headerFilename);
|
debug(1, "_headerFilename = %s", _headerFilename);
|
||||||
|
|
||||||
|
@ -264,6 +268,8 @@ GameProject::~GameProject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CInteractionController::load(MfcArchive &file) {
|
bool CInteractionController::load(MfcArchive &file) {
|
||||||
|
debug(5, "CInteractionController::load()");
|
||||||
|
|
||||||
return _interactions.load(file);
|
return _interactions.load(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,6 +294,8 @@ CInteraction::CInteraction() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CInteraction::load(MfcArchive &file) {
|
bool CInteraction::load(MfcArchive &file) {
|
||||||
|
debug(5, "CInteraction::load()");
|
||||||
|
|
||||||
_objectId1 = file.readUint16LE();
|
_objectId1 = file.readUint16LE();
|
||||||
_objectId2 = file.readUint16LE();
|
_objectId2 = file.readUint16LE();
|
||||||
_staticsId1 = file.readUint16LE();
|
_staticsId1 = file.readUint16LE();
|
||||||
|
@ -316,6 +324,8 @@ MessageQueue::MessageQueue() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MessageQueue::load(MfcArchive &file) {
|
bool MessageQueue::load(MfcArchive &file) {
|
||||||
|
debug(5, "MessageQueue::load()");
|
||||||
|
|
||||||
_dataId = file.readUint16LE();
|
_dataId = file.readUint16LE();
|
||||||
|
|
||||||
int count = file.readUint16LE();
|
int count = file.readUint16LE();
|
||||||
|
@ -346,6 +356,8 @@ ExCommand::ExCommand() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ExCommand::load(MfcArchive &file) {
|
bool ExCommand::load(MfcArchive &file) {
|
||||||
|
debug(5, "ExCommand::load()");
|
||||||
|
|
||||||
_msg._parentId = file.readUint16LE();
|
_msg._parentId = file.readUint16LE();
|
||||||
_msg._messageKind = file.readUint32LE();
|
_msg._messageKind = file.readUint32LE();
|
||||||
_msg._x = file.readUint32LE();
|
_msg._x = file.readUint32LE();
|
||||||
|
@ -393,6 +405,8 @@ CObjstateCommand::CObjstateCommand() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CObjstateCommand::load(MfcArchive &file) {
|
bool CObjstateCommand::load(MfcArchive &file) {
|
||||||
|
debug(5, "CObjStateCommand::load()");
|
||||||
|
|
||||||
_cmd.load(file);
|
_cmd.load(file);
|
||||||
|
|
||||||
_value = file.readUint32LE();
|
_value = file.readUint32LE();
|
||||||
|
@ -403,6 +417,8 @@ bool CObjstateCommand::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PreloadItems::load(MfcArchive &file) {
|
bool PreloadItems::load(MfcArchive &file) {
|
||||||
|
debug(5, "PreloadItems::load()");
|
||||||
|
|
||||||
int count = file.readCount();
|
int count = file.readCount();
|
||||||
|
|
||||||
resize(count);
|
resize(count);
|
||||||
|
@ -564,6 +580,8 @@ Sc2::Sc2() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sc2::load(MfcArchive &file) {
|
bool Sc2::load(MfcArchive &file) {
|
||||||
|
debug(5, "Sc2::load()");
|
||||||
|
|
||||||
_sceneId = file.readUint16LE();
|
_sceneId = file.readUint16LE();
|
||||||
|
|
||||||
_motionController = (CMotionController *)file.readClass();
|
_motionController = (CMotionController *)file.readClass();
|
||||||
|
@ -617,6 +635,8 @@ bool Sc2::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PicAniInfo::load(MfcArchive &file) {
|
bool PicAniInfo::load(MfcArchive &file) {
|
||||||
|
debug(5, "PicAniInfo::load()");
|
||||||
|
|
||||||
type = file.readUint32LE();
|
type = file.readUint32LE();
|
||||||
objectId = file.readUint16LE();
|
objectId = file.readUint16LE();
|
||||||
field_6 = file.readUint16LE();
|
field_6 = file.readUint16LE();
|
||||||
|
@ -637,6 +657,8 @@ bool PicAniInfo::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EntranceInfo::load(MfcArchive &file) {
|
bool EntranceInfo::load(MfcArchive &file) {
|
||||||
|
debug(5, "EntranceInfo::load()");
|
||||||
|
|
||||||
sceneId = file.readUint32LE();
|
sceneId = file.readUint32LE();
|
||||||
field_4 = file.readUint32LE();
|
field_4 = file.readUint32LE();
|
||||||
messageQueueId = file.readUint32LE();
|
messageQueueId = file.readUint32LE();
|
||||||
|
|
|
@ -47,6 +47,8 @@ StaticANIObject::StaticANIObject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StaticANIObject::load(MfcArchive &file) {
|
bool StaticANIObject::load(MfcArchive &file) {
|
||||||
|
debug(5, "StaticANIObject::load()");
|
||||||
|
|
||||||
GameObject::load(file);
|
GameObject::load(file);
|
||||||
|
|
||||||
int count = file.readUint16LE();
|
int count = file.readUint16LE();
|
||||||
|
@ -128,6 +130,8 @@ Statics::Statics() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Statics::load(MfcArchive &file) {
|
bool Statics::load(MfcArchive &file) {
|
||||||
|
debug(5, "Statics::load()");
|
||||||
|
|
||||||
DynamicPhase::load(file);
|
DynamicPhase::load(file);
|
||||||
|
|
||||||
_staticsId = file.readUint16LE();
|
_staticsId = file.readUint16LE();
|
||||||
|
@ -279,6 +283,8 @@ DynamicPhase::DynamicPhase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DynamicPhase::load(MfcArchive &file) {
|
bool DynamicPhase::load(MfcArchive &file) {
|
||||||
|
debug(5, "DynamicPhase::load()");
|
||||||
|
|
||||||
StaticPhase::load(file);
|
StaticPhase::load(file);
|
||||||
|
|
||||||
_field_7C = file.readUint16LE();
|
_field_7C = file.readUint16LE();
|
||||||
|
@ -309,6 +315,8 @@ StaticPhase::StaticPhase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StaticPhase::load(MfcArchive &file) {
|
bool StaticPhase::load(MfcArchive &file) {
|
||||||
|
debug(5, "StaticPhase::load()");
|
||||||
|
|
||||||
Picture::load(file);
|
Picture::load(file);
|
||||||
|
|
||||||
_initialCountdown = file.readUint16LE();
|
_initialCountdown = file.readUint16LE();
|
||||||
|
|
|
@ -43,6 +43,7 @@ bool CObject::loadFile(const char *fname) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CObList::load(MfcArchive &file) {
|
bool CObList::load(MfcArchive &file) {
|
||||||
|
debug(5, "CObList::load()");
|
||||||
int count = file.readCount();
|
int count = file.readCount();
|
||||||
|
|
||||||
debug(9, "CObList::count: %d:", count);
|
debug(9, "CObList::count: %d:", count);
|
||||||
|
@ -58,6 +59,7 @@ bool CObList::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CObArray::load(MfcArchive &file) {
|
bool CObArray::load(MfcArchive &file) {
|
||||||
|
debug(5, "CObArray::load()");
|
||||||
int count = file.readCount();
|
int count = file.readCount();
|
||||||
|
|
||||||
resize(count);
|
resize(count);
|
||||||
|
@ -72,6 +74,7 @@ bool CObArray::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CDWordArray::load(MfcArchive &file) {
|
bool CDWordArray::load(MfcArchive &file) {
|
||||||
|
debug(5, "CWordArray::load()");
|
||||||
int count = file.readCount();
|
int count = file.readCount();
|
||||||
|
|
||||||
debug(9, "CDWordArray::count: %d", count);
|
debug(9, "CDWordArray::count: %d", count);
|
||||||
|
@ -117,6 +120,7 @@ MemoryObject::MemoryObject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MemoryObject::load(MfcArchive &file) {
|
bool MemoryObject::load(MfcArchive &file) {
|
||||||
|
debug(5, "MemoryObject::load()");
|
||||||
_filename = file.readPascalString();
|
_filename = file.readPascalString();
|
||||||
|
|
||||||
if (g_fullpipe->_currArchive) {
|
if (g_fullpipe->_currArchive) {
|
||||||
|
@ -128,6 +132,7 @@ bool MemoryObject::load(MfcArchive &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemoryObject::loadFile(char *filename) {
|
void MemoryObject::loadFile(char *filename) {
|
||||||
|
debug(0, "MemoryObject::loadFile(<%s>)", filename);
|
||||||
if (!_data) {
|
if (!_data) {
|
||||||
Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename);
|
Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename);
|
||||||
|
|
||||||
|
@ -145,7 +150,7 @@ void MemoryObject::loadFile(char *filename) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void *MemoryObject::getData() {
|
byte *MemoryObject::getData() {
|
||||||
load();
|
load();
|
||||||
|
|
||||||
if (_field_14 || _flags & 1) {
|
if (_field_14 || _flags & 1) {
|
||||||
|
@ -156,10 +161,11 @@ void *MemoryObject::getData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryObject2::MemoryObject2() {
|
MemoryObject2::MemoryObject2() {
|
||||||
_data2 = 0;
|
_rows = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MemoryObject2::load(MfcArchive &file) {
|
bool MemoryObject2::load(MfcArchive &file) {
|
||||||
|
debug(5, "MemoryObject2::load()");
|
||||||
MemoryObject::load(file);
|
MemoryObject::load(file);
|
||||||
|
|
||||||
_flags |= 1;
|
_flags |= 1;
|
||||||
|
|
|
@ -99,11 +99,14 @@ class MemoryObject : CObject {
|
||||||
virtual bool load(MfcArchive &file);
|
virtual bool load(MfcArchive &file);
|
||||||
void loadFile(char *filename);
|
void loadFile(char *filename);
|
||||||
void load() { loadFile(_filename); }
|
void load() { loadFile(_filename); }
|
||||||
void *getData();
|
byte *getData();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MemoryObject2 : public MemoryObject {
|
class MemoryObject2 : public MemoryObject {
|
||||||
void *_data2;
|
friend class Picture;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
byte **_rows;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MemoryObject2();
|
MemoryObject2();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue