aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/acci2.cpp2
-rw-r--r--engines/avalanche/avalanche.cpp6
-rw-r--r--engines/avalanche/avalanche.h2
-rw-r--r--engines/avalanche/avalot.cpp2
-rw-r--r--engines/avalanche/lucerna2.cpp2
-rw-r--r--engines/avalanche/pingo2.cpp2
-rw-r--r--engines/avalanche/pingo2.h2
-rw-r--r--engines/avalanche/timeout2.cpp4
8 files changed, 12 insertions, 10 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index d9180f49e7..b9958f10b0 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -1294,7 +1294,7 @@ void Acci::do_that() {
"do things I tell you not to?\r\rDon't do it again!");
break;
default:
- _vm->_pingo.zonk();
+ _vm->_pingo->zonk();
_vm->_scrolls.display(Common::String("A crack of lightning shoots from the sky, ") +
"and fries you.\r\r(`Such is the anger of the gods, Avvy!\")");
_vm->_lucerna.gameover();
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index f130089102..e490ace48a 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -61,8 +61,10 @@ AvalancheEngine::~AvalancheEngine() {
delete _avalot;
delete _gyro;
delete _enhanced;
- delete _timeout;
delete _logger;
+ delete _pingo;
+
+ delete _timeout;
}
Common::ErrorCode AvalancheEngine::initialize() {
@@ -72,7 +74,7 @@ Common::ErrorCode AvalancheEngine::initialize() {
_gyro = new Gyro(this);
_enhanced = new Enhanced(this);
_logger = new Logger(this);
- _pingo.setParent(this);
+ _pingo = new Pingo(this);
_scrolls.setParent(this);
_visa.setParent(this);
_lucerna.setParent(this);
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 76873a5af2..66bfd22ae5 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -71,7 +71,7 @@ public:
Gyro *_gyro;
Enhanced *_enhanced;
Logger *_logger;
- Pingo _pingo;
+ Pingo *_pingo;
Scrolls _scrolls;
Visa _visa;
Lucerna _lucerna;
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 856d8b819f..64f679fea0 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -98,7 +98,7 @@ void Avalot::setup() {
_vm->_gyro->enid_filename = ""; /* undefined. */
_vm->_lucerna.toolbar();
_vm->_scrolls.state(2);
- _vm->_graphics->refreshScreen(); //_vm->_pingo.copy03(); Replace it with refreshScreen() since they 'almost' have the same functionality.
+ _vm->_graphics->refreshScreen(); //_vm->_pingo->copy03(); Replace it with refreshScreen() since they 'almost' have the same functionality.
for (byte i = 0; i < 3; i++)
_vm->_gyro->lastscore[i] = -1; /* impossible digits */
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index dd6503caf8..c11a2454bb 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -274,7 +274,7 @@ void Lucerna::load(byte n) { /* Load2, actually */
load_also(xx);
_vm->_celer.load_chunks(xx);
- _vm->_graphics->refreshScreen(); // _vm->_pingo.copy03(); - See Avalot::setup()
+ _vm->_graphics->refreshScreen(); // _vm->_pingo->copy03(); - See Avalot::setup()
bit = *_vm->_graphics->getPixel(0,0);
diff --git a/engines/avalanche/pingo2.cpp b/engines/avalanche/pingo2.cpp
index 1f7c35eea6..7b341678be 100644
--- a/engines/avalanche/pingo2.cpp
+++ b/engines/avalanche/pingo2.cpp
@@ -40,7 +40,7 @@
namespace Avalanche {
-void Pingo::setParent(AvalancheEngine *vm) {
+Pingo::Pingo(AvalancheEngine *vm) {
_vm = vm;
}
diff --git a/engines/avalanche/pingo2.h b/engines/avalanche/pingo2.h
index b6113f8141..9625236660 100644
--- a/engines/avalanche/pingo2.h
+++ b/engines/avalanche/pingo2.h
@@ -38,7 +38,7 @@ class AvalancheEngine;
class Pingo {
public:
- void setParent(AvalancheEngine *vm);
+ Pingo(AvalancheEngine *vm);
void bosskey();
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 420469f920..9deae84585 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -490,7 +490,7 @@ void Timeout::buydrinks() {
_vm->_gyro->dna.malagauche = 0;
_vm->_visa.dixi('D', _vm->_gyro->dna.drinking); /* _vm->_scrolls.display message about it. */
- _vm->_pingo.wobble(); /* Do the special effects. */
+ _vm->_pingo->wobble(); /* Do the special effects. */
_vm->_visa.dixi('D', 1); /* That'll be thruppence. */
if (_vm->_gyro->pennycheck(3)) /* Pay 3d. */
_vm->_visa.dixi('D', 3); /* Tell 'em you paid up. */
@@ -614,7 +614,7 @@ void Timeout::arkata_shouts() {
void Timeout::winning() {
_vm->_visa.dixi('q', 79);
- _vm->_pingo.winning_pic();
+ _vm->_pingo->winning_pic();
do {
_vm->_lucerna.checkclick();