Skip to content

Commit

Permalink
FULLPIPE: Renames in MovGraph class
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jul 24, 2016
1 parent 27d2909 commit 53c0d28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion engines/fullpipe/messagehandlers.cpp
Expand Up @@ -765,7 +765,7 @@ int MovGraph_messageHandler(ExCommand *cmd) {
point.x = ani->_ox;
point.y = ani->_oy;

double dst = gr->calcDistance(&point, (MovGraphLink *)(*i), 0);
double dst = gr->putToLink(&point, (MovGraphLink *)(*i), 0);
if (dst >= 0.0 && dst < mindistance) {
mindistance = dst;
link = (MovGraphLink *)(*i);
Expand Down
10 changes: 5 additions & 5 deletions engines/fullpipe/motion.cpp
Expand Up @@ -1283,7 +1283,7 @@ MessageQueue *MovGraph::method50(StaticANIObject *ani, MovArr *movarr, int stati
return mq;
}

double MovGraph::calcDistance(Common::Point *point, MovGraphLink *link, int fuzzyMatch) {
double MovGraph::putToLink(Common::Point *point, MovGraphLink *link, int fuzzyMatch) {
int n1x = link->_graphSrc->_x;
int n1y = link->_graphSrc->_y;
int n2x = link->_graphDst->_x;
Expand Down Expand Up @@ -1409,7 +1409,7 @@ Common::Array<MovArr *> *MovGraph::getHitPoints(int x, int y, int *arrSize, int

if (flag1) {
Common::Point point(x, y);
double dist = calcDistance(&point, lnk, 0);
double dist = putToLink(&point, lnk, 0);

if (dist >= 0.0 && dist < 2.0) {
movarr = new MovArr;
Expand Down Expand Up @@ -1450,7 +1450,7 @@ Common::Array<MovArr *> *MovGraph::getHitPoints(int x, int y, int *arrSize, int
movarr->_point.x = x;
movarr->_point.y = y;

calcDistance(&movarr->_point, lnk, 0);
putToLink(&movarr->_point, lnk, 0);

arr->push_back(movarr);
}
Expand Down Expand Up @@ -2261,7 +2261,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int

movInfo1.distance2 = (int)(nod->_z + (dst1 * (double)dst / linkInfoDest.link->_length));

calcDistance(&movInfo1.pt2, linkInfoDest.link, 1);
putToLink(&movInfo1.pt2, linkInfoDest.link, 1);

dx1 = movInfo1.pt1.x;
dy1 = movInfo1.pt1.y;
Expand Down Expand Up @@ -2619,7 +2619,7 @@ MovGraphLink *MovGraph2::findLink1(int x, int y, int idx, int fuzzyMatch) {
if (fuzzyMatch) {
point.x = x;
point.y = y;
double dst = calcDistance(&point, lnk, 0);
double dst = putToLink(&point, lnk, 0);

if (dst >= 0.0 && dst < 2.0)
return lnk;
Expand Down
2 changes: 1 addition & 1 deletion engines/fullpipe/motion.h
Expand Up @@ -302,7 +302,7 @@ class MovGraph : public MotionController {
virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
virtual MessageQueue *method50(StaticANIObject *ani, MovArr *movarr, int staticsId);

double calcDistance(Common::Point *point, MovGraphLink *link, int fuzzyMatch);
double putToLink(Common::Point *point, MovGraphLink *link, int fuzzyMatch);
void recalcLinkParams();
bool getNearestPoint(int unusedArg, Common::Point *p, MovArr *movarr);
MovGraphNode *calcOffset(int ox, int oy);
Expand Down

0 comments on commit 53c0d28

Please sign in to comment.