diff options
author | Eugene Sandulenko | 2013-06-18 10:23:49 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:48:12 +0300 |
commit | 195d52e625b1d24ea0cbda3bb8d65043d1b5eea5 (patch) | |
tree | e1fff970783c49862b7c724b2308a1c33c285d26 /engines/fullpipe/motion.cpp | |
parent | 630d5526ee9618ac1f84021b2306477e81e343d2 (diff) | |
download | scummvm-rg350-195d52e625b1d24ea0cbda3bb8d65043d1b5eea5.tar.gz scummvm-rg350-195d52e625b1d24ea0cbda3bb8d65043d1b5eea5.tar.bz2 scummvm-rg350-195d52e625b1d24ea0cbda3bb8d65043d1b5eea5.zip |
FULLPIPE: Implement loading CReactPolygonal. That completes .sc2 loading
Diffstat (limited to 'engines/fullpipe/motion.cpp')
-rw-r--r-- | engines/fullpipe/motion.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index a25d47505b..64fbd083de 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -164,5 +164,40 @@ void CReactParallel::createRegion() { // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2); } +CReactPolygonal::CReactPolygonal() { + _field_C = 0; + _points = 0; + _pointCount = 0; + _field_10 = 0; +} + +bool CReactPolygonal::load(MfcArchive &file) { + _field_C = file.readUint32LE(); + _field_10 = file.readUint32LE(); + _pointCount = file.readUint32LE(); + + if (_pointCount > 0) { + _points = (Common::Point **)malloc(sizeof(Common::Point *) * _pointCount); + + for (int i = 0; i < _pointCount; i++) { + _points[i] = new Common::Point; + + _points[i]->x = file.readUint32LE(); + _points[i]->y = file.readUint32LE(); + } + + } + + createRegion(); + + return true; +} + +void CReactPolygonal::createRegion() { + if (_points) { + + // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2); + } +} } // End of namespace Fullpipe |