diff options
author | uruk | 2013-07-30 19:05:05 +0200 |
---|---|---|
committer | uruk | 2013-07-30 19:05:05 +0200 |
commit | a13d37e5ca26a5a9c6c9435324c89e4eceb1d846 (patch) | |
tree | f5f6f23aa974e803016524195fb5ec6b2253fe07 /engines/avalanche/trip6.cpp | |
parent | 2857f5aad2c4a024c97e43da67d056a2f7a22def (diff) | |
download | scummvm-rg350-a13d37e5ca26a5a9c6c9435324c89e4eceb1d846.tar.gz scummvm-rg350-a13d37e5ca26a5a9c6c9435324c89e4eceb1d846.tar.bz2 scummvm-rg350-a13d37e5ca26a5a9c6c9435324c89e4eceb1d846.zip |
AVALANCHE: Implement Trip::checkfeet(), repair Trip::stopwalking(). Repair Acci::stand_up(). Repair Gyro::newgame().
Diffstat (limited to 'engines/avalanche/trip6.cpp')
-rw-r--r-- | engines/avalanche/trip6.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index d9b33ac95b..47f60751a1 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -488,13 +488,31 @@ byte Trip::checkfeet(int16 x1, int16 x2, int16 oy, int16 y, byte yl) { int16 fv, ff; /* if not alive then begin checkfeet:=0; exit; end;*/ - byte checkfeet_result; a = 0; - warning("STUB: Trip::checkfeet()"); - - checkfeet_result = a; - return checkfeet_result; + //setactivepage(2); + + if (x1 < 0) + x1 = 0; + if (x2 > 639) + x2 = 639; + if (oy < y) + for (fv = x1; fv <= x2; fv ++) + for (ff = oy + yl; ff <= y + yl; ff ++) { + c = *_vm->_graphics->getPixel(fv, ff); + if (c > a) + a = c; + } + else + for (fv = x1; fv <= x2; fv ++) + for (ff = y + yl; ff <= oy + yl; ff ++) { + c = *_vm->_graphics->getPixel(fv, ff); + if (c > a) + a = c; + } + + //setactivepage(1 - cp); + return a; } byte Trip::geida_ped(byte which) { @@ -1414,10 +1432,10 @@ void Trip::get_back_loretta() { } void Trip::stopwalking() { - tr[1].stopwalk(); + tr[0].stopwalk(); _vm->_gyro->dna.rw = stopped; if (_vm->_gyro->alive) - tr[1].step = 1; + tr[0].step = 1; } void Trip::tripkey(char dir) { |