diff options
author | Vincent Hamm | 2002-04-25 08:53:10 +0000 |
---|---|---|
committer | Vincent Hamm | 2002-04-25 08:53:10 +0000 |
commit | f3aab1ce9c791ee366f70d1678e70e61d4844597 (patch) | |
tree | d31d89b1604f2a85cac6f38801a4e983799fe769 /boxes.cpp | |
parent | d0bb864d354ff10c4d3531b17ed7f6003d505115 (diff) | |
download | scummvm-rg350-f3aab1ce9c791ee366f70d1678e70e61d4844597.tar.gz scummvm-rg350-f3aab1ce9c791ee366f70d1678e70e61d4844597.tar.bz2 scummvm-rg350-f3aab1ce9c791ee366f70d1678e70e61d4844597.zip |
Implemented a few new functions. Now you can control the crane in Full Throttle
svn-id: r4079
Diffstat (limited to 'boxes.cpp')
-rw-r--r-- | boxes.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -74,6 +74,28 @@ Box *Scumm::getBoxBaseAddr(int box) return (Box *) (ptr + box * SIZEOF_BOX + 2); } +int Scumm::getSpecialBox(int param1, int param2) +{ + int i; + int numOfBoxes; + byte flag; + + numOfBoxes = getNumBoxes() - 1; + + for(i=numOfBoxes;i>=0;i--) + { + flag = getBoxFlags(i); + + if(!(flag & 0x80) && (flag & 0x20)) + return(-1); + + if(checkXYInBoxBounds(i,param1,param2)) + return(i); + } + + return(-1); +} + bool Scumm::checkXYInBoxBounds(int b, int x, int y) { BoxCoords box; |