[Scummvm-cvs-logs] scummvm master -> f7269dd7dc8418b014670c71681899db33c8bbcc
sev-
sev at scummvm.org
Mon May 26 14:37:13 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f7269dd7dc FULLPIPE: More work on MovGraph::method28()
Commit: f7269dd7dc8418b014670c71681899db33c8bbcc
https://github.com/scummvm/scummvm/commit/f7269dd7dc8418b014670c71681899db33c8bbcc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-26T15:36:27+03:00
Commit Message:
FULLPIPE: More work on MovGraph::method28()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 3a7551f..ad024ca 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -617,44 +617,36 @@ Common::Array<MovItem *> *MovGraph::method28(StaticANIObject *ani, int x, int y,
_items[idx].movarr._movSteps.clear();
- v15 = ani->_oy;
- point1.x = ani->_ox;
- point1.y = v15;
+ Common::Point point;
+
+ point.x = ani->_ox;
+ point.y = ani->_oy;
- if (!MovGraph_calcChunk(this, idx, ani->_ox, v15, &_items[idx]->movarr, 0))
- MovGraph_findClosestLink(this, idx, &point1, &_items[idx]->movarr);
+ if (!MovGraph_calcChunk(this, idx, ani->_ox, ani->_oy, &_items[idx]->movarr, 0))
+ MovGraph_findClosestLink(this, idx, &point, &_items[idx]->movarr);
_items[idx]->count = 0;
delete _items[idx]->movitems;
_items[idx]->movitems = 0;
- v18 = (int)MovGraph_genMovArr(this, x, y, &arrSize, flag1, 0);
- v26 = v18;
- if (v18) {
- flag1 = 0;
- if (arrSize > 0) {
- v19 = v18;
- x = v18;
- do {
- int sz;
- v20 = MovGraph_calcMovItems(this, _items[idx]->movarr, (MovArr *)v19, &sz);
- Memory = v20;
- if (sz > 0) {
- _items[idx]->movitems = MovGraph_arr16_realloc(_items[idx]->movitems, _items[idx]->count, sz + _items[idx]->count);
- memcpy(_items[idx]->movitems[_items[idx]->count], v20, 16 * sz);
- _items[idx]->count += sz;
- CObjectFree(Memory);
- v19 = x;
- }
- v19 += 32;
- v22 = __OFSUB__(flag1 + 1, arrSize);
- v21 = flag1++ + 1 - arrSize < 0;
- x = v19;
- } while ( v21 ^ v22 );
- v18 = v26;
- }
- CObjectFree((void *)v18);
+ Common::Array<MovArr *> *movarr = genMovArr(x, y, &arrSize, flag1, 0);
+
+ if (movarr) {
+ for (int i = 0; i < arrSize; i++) {
+ int sz;
+ Common::Array<MovItem *> *movitems = calcMovItems(_items[idx]->movarr, movarr[i], &sz);
+
+ if (sz > 0) {
+ _items[idx]->movitems = MovGraph_arr16_realloc(_items[idx]->movitems, _items[idx]->count, sz + _items[idx]->count);
+ memcpy(_items[idx]->movitems[_items[idx]->count], *movitems, 16 * sz);
+ _items[idx]->count += sz;
+
+ delete movitems;
+ }
+ }
+
+ delete movarr;
}
if (_items[idx]->count) {
More information about the Scummvm-git-logs
mailing list