From fdf1fc361bf0283785d21827f5cf27d36988e766 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 22 Oct 2013 00:22:19 +0300 Subject: FULLPIPE: Implement MovGraph2::getShortSide() --- engines/fullpipe/motion.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index a6d32cfb48..94635a3b91 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -924,9 +924,17 @@ MovGraphNode *MovGraph2::findNode(int x, int y, int fuzzyMatch) { } int MovGraph2::getShortSide(MovGraphLink *lnk, int x, int y) { - warning("STUB: MovGraph2::getShortSide()"); + bool cond; - return 0; + if (lnk) + cond = abs(lnk->_movGraphNode2->_x - lnk->_movGraphNode1->_x) > abs(lnk->_movGraphNode2->_y - lnk->_movGraphNode1->_y); + else + cond = abs(x) > abs(y); + + if (cond) + return x <= 0; + else + return ((y > 0) + 2); } int MovGraph2::findLink(Common::Array *linkList, int idx, Common::Rect *rect, Common::Point *point) { -- cgit v1.2.3