diff options
author | Eugene Sandulenko | 2013-10-22 00:22:19 +0300 |
---|---|---|
committer | Kamil Zbróg | 2013-10-24 12:59:15 +0100 |
commit | fdf1fc361bf0283785d21827f5cf27d36988e766 (patch) | |
tree | 9c3b886ee02b64414802abc2359fd317a52c093d | |
parent | accb9e10e8ee0c607c9fd2ec048af34b5058336f (diff) | |
download | scummvm-rg350-fdf1fc361bf0283785d21827f5cf27d36988e766.tar.gz scummvm-rg350-fdf1fc361bf0283785d21827f5cf27d36988e766.tar.bz2 scummvm-rg350-fdf1fc361bf0283785d21827f5cf27d36988e766.zip |
FULLPIPE: Implement MovGraph2::getShortSide()
-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) { |