From 0ad51df7d92857d7b526a09b6d1558e34e01f959 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 7 Sep 2013 18:22:59 +0200 Subject: AVALANCHE: Remove 2 variables from Visa2 --- engines/avalanche/visa2.cpp | 14 +++----------- engines/avalanche/visa2.h | 10 +--------- 2 files changed, 4 insertions(+), 20 deletions(-) (limited to 'engines') diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp index bcdf7b73ac..635e14db6e 100644 --- a/engines/avalanche/visa2.cpp +++ b/engines/avalanche/visa2.cpp @@ -45,9 +45,6 @@ Visa::Visa(AvalancheEngine *vm) { _vm = vm; } -bool Visa::bubbling = false; -bool Visa::report_dixi_errors = true; - void Visa::unskrimble() { for (uint16 fv = 0; fv < _vm->_gyro->_bufSize; fv++) _vm->_gyro->_buffer[fv] = (~(_vm->_gyro->_buffer[fv] - (fv + 1))) % 256; @@ -58,7 +55,7 @@ void Visa::do_the_bubble() { _vm->_gyro->_buffer[_vm->_gyro->_bufSize - 1] = 2; } -void Visa::dixi(char block, byte point) { +void Visa::dixi(char block, byte point, bool report, bool bubbling) { Common::File indexfile, sezfile; uint16 idx_offset, sez_offset; bool error = false; @@ -83,7 +80,7 @@ void Visa::dixi(char block, byte point) { went_ok = !error; if (error) { - if (report_dixi_errors) { + if (report) { Common::String todisplay; todisplay.format("%cError accessing scroll %c%s", 7, block, _vm->_gyro->intToStr(point).c_str()); _vm->_scrolls->display(todisplay); @@ -113,12 +110,7 @@ void Visa::speech(byte who, byte subject) { if (subject == 0) { // No subject. - - bubbling = true; - report_dixi_errors = false; - dixi('s', who); - bubbling = false; - report_dixi_errors = true; + dixi('s', who, false, true); } else { // Subject given. diff --git a/engines/avalanche/visa2.h b/engines/avalanche/visa2.h index 37cb177fbe..9d26d7a747 100644 --- a/engines/avalanche/visa2.h +++ b/engines/avalanche/visa2.h @@ -38,23 +38,15 @@ class AvalancheEngine; class Visa { public: Visa(AvalancheEngine *vm); - - void dixi(char block, byte point); - + void dixi(char block, byte point, bool report = true, bool bubbling = false); void talkto(byte whom); private: AvalancheEngine *_vm; - static bool bubbling; - static bool report_dixi_errors; - bool went_ok; - void unskrimble(); - void do_the_bubble(); - void speech(byte who, byte subject); }; -- cgit v1.2.3