aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/avalanche/avalot.cpp14
-rw-r--r--engines/avalanche/parser.cpp2
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index c9ffdff987..b6c3f0b1b9 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -264,7 +264,7 @@ Avalot::Avalot(AvalancheEngine *vm) : _fxHidden(false), _clock(vm), _interrogati
// Needed because of Lucerna::load_also()
for (int i = 0; i < 31; i++) {
for (int j = 0; j < 2; j++)
- _also[i][j] = 0;
+ _also[i][j] = nullptr;
}
_totalTime = 0;
@@ -273,9 +273,9 @@ Avalot::Avalot(AvalancheEngine *vm) : _fxHidden(false), _clock(vm), _interrogati
Avalot::~Avalot() {
for (int i = 0; i < 31; i++) {
for (int j = 0; j < 2; j++) {
- if (_also[i][j] != 0) {
+ if (_also[i][j] != nullptr) {
delete _also[i][j];
- _also[i][j] = 0;
+ _also[i][j] = nullptr;
}
}
}
@@ -437,7 +437,7 @@ void Avalot::runAvalot() {
void Avalot::init() {
for (int i = 0; i < 31; i++) {
for (int j = 0; j < 2; j++)
- _also[i][j] = 0;
+ _also[i][j] = nullptr;
}
#if 0
@@ -520,7 +520,7 @@ void Avalot::scram(Common::String &str) {
void Avalot::unScramble() {
for (int i = 0; i < 31; i++) {
for (int j = 0; j < 2; j++) {
- if (_also[i][j] != 0)
+ if (_also[i][j] != nullptr)
scram(*_also[i][j]);
}
}
@@ -531,9 +531,9 @@ void Avalot::unScramble() {
void Avalot::loadAlso(byte num) {
for (int i = 0; i < 31; i++) {
for (int j = 0; j < 2; j++) {
- if (_also[i][j] != 0) {
+ if (_also[i][j] != nullptr) {
delete _also[i][j];
- _also[i][j] = 0;
+ _also[i][j] = nullptr;
}
}
}
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index 4abdb31431..30e08c71c0 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -761,7 +761,7 @@ void Parser::parse() {
// Check also[] first, which contains words about the actual room.
if (!thisword.empty()) {
for (int i = 0; i < 31; i++) {
- if ((_vm->_avalot->_also[i][0] != 0) && (getPos(',' + thisword, *_vm->_avalot->_also[i][0]) > -1)) {
+ if ((_vm->_avalot->_also[i][0]) && (getPos(',' + thisword, *_vm->_avalot->_also[i][0]) > -1)) {
_thats += Common::String(99 + i);
notfound = false;
}