aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-07-24 18:45:10 +0200
committeruruk2013-07-24 18:45:10 +0200
commitbc9823ad9b45b5314255f11f3732cfb8ac93c05b (patch)
tree5b31f7a550172487ed0cdc1fab71fc048c9d5d7a
parentca51bf19c9dae1474ffacfb1a40f955972c368a8 (diff)
downloadscummvm-rg350-bc9823ad9b45b5314255f11f3732cfb8ac93c05b.tar.gz
scummvm-rg350-bc9823ad9b45b5314255f11f3732cfb8ac93c05b.tar.bz2
scummvm-rg350-bc9823ad9b45b5314255f11f3732cfb8ac93c05b.zip
AVALANCHE: Change _enhanced into pointer, update everything accordingly.
-rw-r--r--engines/avalanche/avalanche.cpp3
-rw-r--r--engines/avalanche/avalanche.h2
-rw-r--r--engines/avalanche/enhanced2.cpp2
-rw-r--r--engines/avalanche/enhanced2.h2
-rw-r--r--engines/avalanche/lucerna2.cpp12
5 files changed, 11 insertions, 10 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 27dd779374..0b522b151c 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -60,6 +60,7 @@ AvalancheEngine::~AvalancheEngine() {
delete _avalot;
delete _gyro;
+ delete _enhanced;
delete _timeout;
}
@@ -68,7 +69,7 @@ Common::ErrorCode AvalancheEngine::initialize() {
_avalot = new Avalot(this);
_gyro = new Gyro(this);
- _enhanced.setParent(this);
+ _enhanced = new Enhanced(this);
_logger.setParent(this);
_pingo.setParent(this);
_scrolls.setParent(this);
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index e9de899c1c..4af8a82edd 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -69,7 +69,7 @@ public:
Avalot *_avalot;
Gyro *_gyro;
- Enhanced _enhanced;
+ Enhanced *_enhanced;
Logger _logger;
Pingo _pingo;
Scrolls _scrolls;
diff --git a/engines/avalanche/enhanced2.cpp b/engines/avalanche/enhanced2.cpp
index f664d82c3c..d6187a0ece 100644
--- a/engines/avalanche/enhanced2.cpp
+++ b/engines/avalanche/enhanced2.cpp
@@ -33,7 +33,7 @@
namespace Avalanche {
-void Enhanced::setParent(AvalancheEngine *vm) {
+Enhanced::Enhanced(AvalancheEngine *vm) {
_vm = vm;
}
diff --git a/engines/avalanche/enhanced2.h b/engines/avalanche/enhanced2.h
index 917ed3c56c..ed7f1e6fb4 100644
--- a/engines/avalanche/enhanced2.h
+++ b/engines/avalanche/enhanced2.h
@@ -43,7 +43,7 @@ public:
bool atbios; // BIOS type
char inchar, extd;
- void setParent(AvalancheEngine *vm);
+ Enhanced(AvalancheEngine *vm);
void readkeye();
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 5034e13f8b..59942ac95e 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -63,7 +63,7 @@ void Lucerna::setParent(AvalancheEngine *vm) {
void Lucerna::init() {
_vm->_gyro->oh = 17717;
_vm->_gyro->om = 17717;
- if (_vm->_enhanced.atbios) _vm->_gyro->atkey = "f1";
+ if (_vm->_enhanced->atbios) _vm->_gyro->atkey = "f1";
else _vm->_gyro->atkey = "alt-";
}
@@ -904,15 +904,15 @@ void Lucerna::inkey() {
if (_vm->_gyro->mousetext == "") {
/* read keyboard */
- _vm->_enhanced.readkeye();
- if ((_vm->_enhanced.inchar == ' ') && ((_vm->_enhanced.shiftstate & 8) > 0)) {
- _vm->_enhanced.inchar = '\0';
- _vm->_enhanced.extd = '#'; /* alt-spacebar = alt-H */
+ _vm->_enhanced->readkeye();
+ if ((_vm->_enhanced->inchar == ' ') && ((_vm->_enhanced->shiftstate & 8) > 0)) {
+ _vm->_enhanced->inchar = '\0';
+ _vm->_enhanced->extd = '#'; /* alt-spacebar = alt-H */
}
} else {
if (_vm->_gyro->mousetext[0] == '`')
_vm->_gyro->mousetext.setChar(13,0); /* Backquote = return in a macro */
- _vm->_enhanced.inchar = _vm->_gyro->mousetext[0];
+ _vm->_enhanced->inchar = _vm->_gyro->mousetext[0];
_vm->_gyro->mousetext = Common::String(_vm->_gyro->mousetext.c_str() + 2, 253);
}
}