aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-06-28 17:53:15 +0200
committeruruk2013-06-28 17:53:15 +0200
commit44a9dd20832b50ba8a9a3e2f2099977a5c8de325 (patch)
tree00188235d12355b2f463ec620b76f35d9a1b9cfb /engines
parent612582f016f84efb9835d4ff31e0d2d51ba581ca (diff)
downloadscummvm-rg350-44a9dd20832b50ba8a9a3e2f2099977a5c8de325.tar.gz
scummvm-rg350-44a9dd20832b50ba8a9a3e2f2099977a5c8de325.tar.bz2
scummvm-rg350-44a9dd20832b50ba8a9a3e2f2099977a5c8de325.zip
AVALANCHE: Visa: replace namespace with class.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/avalanche.cpp1
-rw-r--r--engines/avalanche/avalanche.h2
-rw-r--r--engines/avalanche/visa2.cpp34
-rw-r--r--engines/avalanche/visa2.h22
4 files changed, 41 insertions, 18 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 6179ae4f1e..f72c12c4fe 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -52,6 +52,7 @@ namespace Avalanche {
_logger.setParent(this);
_pingo.setParent(this);
_scrolls.setParent(this);
+ _visa.setParent(this);
}
AvalancheEngine::~AvalancheEngine() {
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 59dd0090e4..14d2f4e147 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -34,6 +34,7 @@
#include "avalanche/logger2.h"
#include "avalanche/pingo2.h"
#include "avalanche/scrolls2.h"
+#include "avalanche/visa2.h"
#include "engines/engine.h"
#include "engines/advancedDetector.h"
@@ -55,6 +56,7 @@ public:
Logger _logger;
Pingo _pingo;
Scrolls _scrolls;
+ Visa _visa;
AvalancheEngine(OSystem *syst, const AvalancheGameDescription *gd);
diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp
index ee1f761ff9..a14367a6a8 100644
--- a/engines/avalanche/visa2.cpp
+++ b/engines/avalanche/visa2.cpp
@@ -25,6 +25,10 @@
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
*/
+/* VISA The new Sez handler. (Replaces Access.) */
+
+#include "avalanche/avalanche.h"
+
#include "avalanche/visa2.h"
#include "avalanche/gyro2.h"
#include "avalanche/scrolls2.h"
@@ -37,40 +41,38 @@
namespace Avalanche {
- namespace Visa {
-
- const bool bubbling = false;
- const bool report_dixi_errors = true;
+ void Visa::setParent(AvalancheEngine *vm) {
+ _vm = vm;
+ }
- bool went_ok;
+ const bool Visa::bubbling = false;
+ const bool Visa::report_dixi_errors = true;
- void unskrimble() {
- for (uint16 fv = 0; fv < Gyro::bufsize; fv++)
- Gyro::buffer[fv] = (char)((!(Gyro::buffer[fv]) - fv) % 256);
+ void Visa::unskrimble() {
+ for (uint16 fv = 0; fv < _vm->_gyro.bufsize; fv++)
+ _vm->_gyro.buffer[fv] = (char)((!(_vm->_gyro.buffer[fv]) - fv) % 256);
}
- void do_the_bubble() {
- Gyro::bufsize++;
- Gyro::buffer[Gyro::bufsize] = 2;
+ void Visa::do_the_bubble() {
+ _vm->_gyro.bufsize++;
+ _vm->_gyro.buffer[_vm->_gyro.bufsize] = 2;
}
// File handling.
- void dixi(char block, byte point) {
+ void Visa::dixi(char block, byte point) {
warning("STUB: Visa::dixi()");
}
// File handling.
- void speech(byte who, byte subject) {
+ void Visa::speech(byte who, byte subject) {
warning("STUB: Visa::speech()");
}
- void talkto(byte whom) {
+ void Visa::talkto(byte whom) {
byte fv;
bool no_matches;
warning("STUB: Visa::talkto()");
}
- } // End of namespace Visa.
-
} // End of namespace Avalanche.
diff --git a/engines/avalanche/visa2.h b/engines/avalanche/visa2.h
index feda7b60fd..6749a1dbbd 100644
--- a/engines/avalanche/visa2.h
+++ b/engines/avalanche/visa2.h
@@ -25,20 +25,38 @@
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
*/
+/* VISA The new Sez handler. (Replaces Access.) */
+
#ifndef VISA2_H
#define VISA2_H
#include "common/scummsys.h"
namespace Avalanche {
+class AvalancheEngine;
- namespace Visa {
+class Visa {
+public:
+ void Visa::setParent(AvalancheEngine *vm);
void dixi(char block, byte point);
void talkto(byte whom);
- } // End of namespace Visa.
+private:
+ AvalancheEngine *_vm;
+
+ static const bool bubbling;
+ static const bool report_dixi_errors;
+
+ bool went_ok;
+
+ void unskrimble();
+
+ void do_the_bubble();
+
+ void speech(byte who, byte subject);
+};
} // End of namespace Avalanche.