diff options
| author | Eugene Sandulenko | 2013-06-18 17:07:28 -0400 | 
|---|---|---|
| committer | Eugene Sandulenko | 2013-09-06 14:48:13 +0300 | 
| commit | fcf0d240d0266fa89073e12d2a15a045b6bdfe65 (patch) | |
| tree | c294b77048f70316a74b4089b6276303e56064d4 | |
| parent | 195d52e625b1d24ea0cbda3bb8d65043d1b5eea5 (diff) | |
| download | scummvm-rg350-fcf0d240d0266fa89073e12d2a15a045b6bdfe65.tar.gz scummvm-rg350-fcf0d240d0266fa89073e12d2a15a045b6bdfe65.tar.bz2 scummvm-rg350-fcf0d240d0266fa89073e12d2a15a045b6bdfe65.zip | |
FULLPIPE: Finish reading CMctlCompund
| -rw-r--r-- | engines/fullpipe/motion.cpp | 21 | ||||
| -rw-r--r-- | engines/fullpipe/motion.h | 37 | ||||
| -rw-r--r-- | engines/fullpipe/objects.h | 39 | ||||
| -rw-r--r-- | engines/fullpipe/stateloader.cpp | 82 | 
4 files changed, 160 insertions, 19 deletions
| diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 64fbd083de..f10388a98e 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -42,11 +42,26 @@ bool CMotionController::load(MfcArchive &file) {  bool CMctlCompound::load(MfcArchive &file) {  	int count = file.readUint32LE(); -	debug(0, "CMctlCompund::count = %d", count); +	debug(0, "CMctlCompound::count = %d", count);  	for (int i = 0; i < count; i++) { +	  debug(0, "CompoundArray[%d]", i);  	  CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); +	  int count1 = file.readUint32LE(); + +	  for (int j = 0; j < count1; j++) { +		debug(0, "ConnectionPoint[%d]", j); +		CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass(); + +		obj->_connectionPoints.push_back(*obj1); +	  } + +	  obj->_field_20 = file.readUint32LE(); +	  obj->_field_24 = file.readUint32LE(); + +	  obj->_movGraphReactObj = (CMovGraphReact *)file.readClass(); +  	  _motionControllers.push_back(*obj);  	} @@ -56,7 +71,7 @@ bool CMctlCompound::load(MfcArchive &file) {  bool CMctlCompoundArray::load(MfcArchive &file) {  	int count = file.readUint32LE(); -	debug(0, "CMctlCompundArray::count = %d", count); +	debug(0, "CMctlCompoundArray::count = %d", count);  	return true;  } @@ -93,7 +108,9 @@ bool CMovGraphLink::load(MfcArchive &file) {    _flags = file.readUint32LE(); +  debug(0, "GraphNode1");    _movGraphNode1 = (CMovGraphNode *)file.readClass(); +  debug(0, "GraphNode2");    _movGraphNode2 = (CMovGraphNode *)file.readClass();    _distance = file.readDouble(); diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index bbb37f4296..fb7b45446e 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -44,18 +44,6 @@ class CMctlConnectionPointsArray : public Common::Array<CObject>, public CObject  	virtual bool load(MfcArchive &file);  }; -class CMctlCompoundArrayItem : public CObject { -  int _motionControllerObj; -  int _movGraphReactObj; -  CMctlConnectionPointsArray _connectionPoints; -  int _field_20; -  int _field_24; -  int _field_28; - - public: -	CMctlCompoundArrayItem() : _movGraphReactObj(0), _motionControllerObj(0) {} -}; -  class CMctlCompound : public CMotionController {  	CMctlCompoundArray _motionControllers; @@ -88,6 +76,20 @@ class CMovGraphReact : public CObject {      // Empty  }; +class CMctlCompoundArrayItem : public CMotionController { +	friend class CMctlCompound; + +  protected: +	CMovGraphReact *_movGraphReactObj; +	CMctlConnectionPointsArray _connectionPoints; +	int _field_20; +	int _field_24; +	int _field_28; + + public: +  CMctlCompoundArrayItem() : _movGraphReactObj(0) {} +}; +  class CReactParallel : public CMovGraphReact {      //CRgn _rgn;      int _x1; @@ -149,6 +151,17 @@ class CMovGraph : public CMotionController {  	virtual bool load(MfcArchive &file);  }; +class CMctlConnectionPoint : public CObject { +	int _connectionX; +	int _connectionY; +	int _field_C; +	int _field_10; +	int16 _field_14; +	int16 _field_16; +	int _messageQueueObj; +	int _motionControllerObj; +}; +  } // End of namespace Fullpipe  #endif /* FULLPIPE_MOTION_H */ diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index e385acf406..34d117bc24 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -220,6 +220,37 @@ class Scene {  	int libHandle;  }; +struct PicAniInfo { +  int32 type; +  int16 objectId; +  int16 field_6; +  int32 field_8; +  int16 field_C; +  int16 field_E; +  int32 ox; +  int32 oy; +  int32 priority; +  int16 staticsId; +  int16 movementId; +  int16 dynamicPhaseIndex; +  int16 flags; +  int32 field_24; +  int32 someDynamicPhaseIndex; + +  bool load(MfcArchive &file); +}; + +struct EntranceInfo +{ +  int32 sceneId; +  int32 field_4; +  int32 messageQueueId; +  byte gap_C[292]; // FIXME +  int32 field_130; + +  bool load(MfcArchive &file); +}; +  class CMotionController;  class Sc2 : public CObject { @@ -227,14 +258,14 @@ class Sc2 : public CObject {  	int16 _field_2;  	Scene *_scene;  	CMotionController *_motionController; -	int _data1; +	int32 *_data1; // FIXME, could be a struct  	int _count1; -	int _defPicAniInfos; +	PicAniInfo **_defPicAniInfos;  	int _defPicAniInfosCount; -	int _picAniInfos; +	PicAniInfo **_picAniInfos;  	int _picAniInfosCount;  	int _isLoaded; -	int _entranceData; +	EntranceInfo **_entranceData;  	int _entranceDataCount;   public: diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index d5a9fe2102..cda64c46d4 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -117,6 +117,8 @@ bool CGameLoader::load(MfcArchive &file) {  		debug(0, "sc: %d", it->_sceneId);  		_sc2array[i].loadFile((const char *)tmp); + +		debug(0, "sc: %s", tmp);  	}  	_preloadItems.load(file); @@ -258,7 +260,10 @@ bool CInteractionController::load(MfcArchive &file) {  bool CObList::load(MfcArchive &file) {  	int count = file.readCount(); +	debug(0, "CObList::count: %d:", count); +  	for (int i = 0; i < count; i++) { +		debug(0, "CObList::[%d]", i);  		CObject *t = file.readClass();  		push_back(*t); @@ -483,7 +488,7 @@ bool CGameVar::load(MfcArchive &file) {  Sc2::Sc2() {  	_sceneId = 0;  	_field_2 = 0; -	//_scene = 0; +	_scene = 0;  	_motionController = 0;  	_data1 = 0;  	_count1 = 0; @@ -501,6 +506,51 @@ bool Sc2::load(MfcArchive &file) {  	_motionController = (CMotionController *)file.readClass(); +	_count1 = file.readUint32LE(); +	debug(0, "count1: %d", _count1); +	if (_count1 > 0) { +	  _data1 = (int32 *)malloc(_count1 * sizeof(int32)); +	   +	  for (int i = 0; i < _count1; i++) { +		_data1[i] = file.readUint32LE(); +	  } +	} else { +	  _data1 = 0; +	} + +	_defPicAniInfosCount = file.readUint32LE(); +	debug(0, "defPicAniInfos: %d", _defPicAniInfosCount); +	if (_defPicAniInfosCount > 0) { +	  _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *)); + +	  for (int i = 0; i < _defPicAniInfosCount; i++) { +		_defPicAniInfos[i] = new PicAniInfo(); + +		_defPicAniInfos[i]->load(file); +	  } +	} else { +	  _defPicAniInfos = 0; +	} + +	_picAniInfos = 0; +	_picAniInfosCount = 0; + +	_entranceDataCount = file.readUint32LE(); +	debug(0, "_entranceData: %d", _entranceDataCount); + +	if (_entranceDataCount > 0) { +	  _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *)); + +	  for (int i = 0; i < _entranceDataCount; i++) { +		_entranceData[i] = new EntranceInfo(); +		_entranceData[i]->load(file); +	  } +	} else { +	  _entranceData = 0; +	} + +	debug(0, "pos: %d, 0x%x: %d", file.size(), file.pos(), file.size() - file.pos()); +  	return true;  } @@ -520,4 +570,34 @@ bool CDWordArray::load(MfcArchive &file) {  	return true;  } +bool PicAniInfo::load(MfcArchive &file) { +  type = file.readUint32LE(); +  objectId = file.readUint16LE(); +  field_6 = file.readUint16LE(); +  field_8 = file.readUint32LE(); +  field_C = file.readUint16LE(); +  field_E = file.readUint16LE(); +  ox = file.readUint32LE(); +  oy = file.readUint32LE(); +  priority = file.readUint32LE(); +  staticsId = file.readUint16LE(); +  movementId = file.readUint16LE(); +  dynamicPhaseIndex = file.readUint16LE(); +  flags = file.readUint16LE(); +  field_24 = file.readUint32LE(); +  someDynamicPhaseIndex = file.readUint32LE(); + +  return true; +} + +bool EntranceInfo::load(MfcArchive &file) { +  sceneId = file.readUint32LE(); +  field_4 = file.readUint32LE(); +  messageQueueId = file.readUint32LE(); +  file.read(gap_C, 292); // FIXME, Ugh +  field_130 = file.readUint32LE(); + +  return true; +} +  } // End of namespace Fullpipe | 
