aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-08-21 20:20:42 +0200
committeruruk2013-08-21 20:20:42 +0200
commitdbd330bf2fdfdae94d4e50e9c4e3fff2162de478 (patch)
tree3a813ee4df6e0ea56bc57b2e16e703929bde5622
parentc43373f7ae714e5640452db026a0195b304c8ec1 (diff)
downloadscummvm-rg350-dbd330bf2fdfdae94d4e50e9c4e3fff2162de478.tar.gz
scummvm-rg350-dbd330bf2fdfdae94d4e50e9c4e3fff2162de478.tar.bz2
scummvm-rg350-dbd330bf2fdfdae94d4e50e9c4e3fff2162de478.zip
AVALANCHE: Rename special() to openBox() in Acci, implement it.
-rw-r--r--engines/avalanche/acci2.cpp29
-rw-r--r--engines/avalanche/acci2.h2
-rw-r--r--engines/avalanche/gyro2.cpp2
-rw-r--r--engines/avalanche/gyro2.h2
4 files changed, 24 insertions, 11 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index baecec9fa6..39dfd88ead 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -671,8 +671,23 @@ bool Acci::holding() {
-void Acci::special(bool before) {
- warning("STUB: Acci::special()");
+void Acci::openBox(bool before) {
+ if ((_vm->_gyro->dna.room == r__yours) && (thing == 54)) {
+ _vm->_celer->show_one(4);
+
+ _vm->_celer->pics_link();
+ _vm->_trip->trippancy_link();
+ _vm->_graphics->refreshScreen();
+
+ _vm->_system->delayMillis(55);
+
+ if (!before) {
+ _vm->_celer->show_one(5);
+ _vm->_celer->pics_link();
+ _vm->_trip->trippancy_link();
+ _vm->_graphics->refreshScreen();
+ }
+ }
}
void Acci::examine() {
@@ -683,9 +698,9 @@ void Acci::examine() {
if ((1 <= thing) && (thing <= 49)) // Standard object
examobj();
else if ((50 <= thing) && (thing <= 100)) { // Also thing
- special(true);
- _vm->_scrolls->display(*_vm->_gyro->also[thing - 51][0]);
- special(false);
+ openBox(true);
+ _vm->_scrolls->display(*_vm->_gyro->also[thing - 50][1]);
+ openBox(false);
}
}
} else if (person != pardon)
@@ -754,8 +769,6 @@ void Acci::lookaround() {
}
void Acci::opendoor() { /* so whaddya THINK this does?! */
- byte fv;
-
switch (_vm->_gyro->dna.room) { /* Special cases. */
case r__yours:
if (_vm->_trip->infield(1)) {
@@ -777,7 +790,7 @@ void Acci::opendoor() { /* so whaddya THINK this does?! */
if ((!_vm->_gyro->dna.user_moves_avvy) && (_vm->_gyro->dna.room != r__lusties))
return; /* No doors can open if you can't move Avvy. */
- for (fv = 8; fv < 15; fv++)
+ for (byte fv = 8; fv < 15; fv++)
if (_vm->_trip->infield(fv)) {
fv -= 8;
diff --git a/engines/avalanche/acci2.h b/engines/avalanche/acci2.h
index 2b174f0a13..a6350721a6 100644
--- a/engines/avalanche/acci2.h
+++ b/engines/avalanche/acci2.h
@@ -177,7 +177,7 @@ private:
bool holding();
- void special(bool before);
+ void openBox(bool before);
void examine();
void inv();
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index 5278a3dc76..82daf2e17b 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -490,7 +490,7 @@ Common::String Gyro::get_better(byte which) {
get_better_result = better[which];
break;
default:
- if ((which < numobjs) && (which > '\0'))
+ if ((which < numobjs) && (which > 0))
get_better_result = better[which];
else
get_better_result = "";
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index 09f5a92caf..aa5a0fdc85 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -109,7 +109,7 @@ struct dnatype { /* here goes... */ /* Ux, uy, & ww now all belong to Trip5 */
bool friar_will_tie_you_up; /* If you're going to get tied up. */
bool tied_up; /* You ARE tied up! */
- char box_contents; /* 0 = money (sixpence), 254 = empty, any
+ byte box_contents; /* 0 = money (sixpence), 254 = empty, any
other number implies the contents of the box. */
bool talked_to_crapulus; /* Pretty self-explanatory. */