aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/avalanche/acci2.cpp2
-rw-r--r--engines/avalanche/gyro2.cpp2
-rw-r--r--engines/avalanche/trip6.cpp32
3 files changed, 27 insertions, 9 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index ce236d4f35..86600d62dc 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -940,7 +940,7 @@ void Acci::already() {
void Acci::stand_up() {
switch (_vm->_gyro->dna.room) {
case r__yours: /* Avvy isn't asleep. */
- if (_vm->_gyro->dna.avvy_in_bed) { /* But he's in bed. */
+ if (_vm->_gyro->dna.avvy_is_awake && _vm->_gyro->dna.avvy_in_bed) { /* But he's in bed. */
if (_vm->_gyro->dna.teetotal) {
_vm->_visa->dixi('d', 12);
_vm->_gyro->background(0);
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index 76640739af..9f006afec9 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -384,7 +384,7 @@ void Gyro::newgame() { /* This sets up the DNA for a completely new game. */
seescroll = false;
ppos[0][1] = -177;
- //_vm->_trip->tr[0].appear(300,117,right);
+ _vm->_trip->tr[0].appear(300,117,right); // Needed to initialize Avalot.
//for (gd = 0; gd <= 30; gd ++) for (gm = 0; gm <= 1; gm ++) also[gd][gm] = nil;
/* fillchar(previous^,sizeof(previous^),#0); { blank out array } */
him = 254;
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) {