diff options
author | Eugene Sandulenko | 2013-10-22 00:22:19 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-22 00:41:06 +0300 |
commit | 4bcbd7890945615a62cbee0c6600d9d2c356df5d (patch) | |
tree | 578484fad9dabecb294f4b06d6cecabdec70353c /engines | |
parent | b6bace0fa070985f5301480c36318043ef7b025e (diff) | |
download | scummvm-rg350-4bcbd7890945615a62cbee0c6600d9d2c356df5d.tar.gz scummvm-rg350-4bcbd7890945615a62cbee0c6600d9d2c356df5d.tar.bz2 scummvm-rg350-4bcbd7890945615a62cbee0c6600d9d2c356df5d.zip |
FULLPIPE: Implement MovGraph2::getShortSide()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/motion.cpp | 12 |
1 files 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<MovGraphLink *> *linkList, int idx, Common::Rect *rect, Common::Point *point) { |