aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-07-02 15:59:27 +0200
committeruruk2013-07-02 15:59:27 +0200
commite27948a1a5df08cf698917b0eb50b6b292d2b60a (patch)
tree872aea6445f2841b1d4b5c1096f339baf3ff35a9
parentae1f189370883a6fdda01876b7679f2758b84e63 (diff)
downloadscummvm-rg350-e27948a1a5df08cf698917b0eb50b6b292d2b60a.tar.gz
scummvm-rg350-e27948a1a5df08cf698917b0eb50b6b292d2b60a.tar.bz2
scummvm-rg350-e27948a1a5df08cf698917b0eb50b6b292d2b60a.zip
AVALANCHE: Minor repair in Trip, move initialization of the engine into the constructor.
-rw-r--r--engines/avalanche/avalanche.cpp13
-rw-r--r--engines/avalanche/avalanche.h3
-rw-r--r--engines/avalanche/trip6.cpp3
3 files changed, 11 insertions, 8 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 6c559d84f2..dec0535584 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -45,7 +45,9 @@ namespace Avalanche {
AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription *gd) : Engine(syst), _gameDescription(gd) {
_system = syst;
_console = new AvalancheConsole(this);
- _rnd = 0;
+
+ _rnd = new Common::RandomSource("avalanche");
+ _rnd->setSeed(42);
_gyro.setParent(this);
_enhanced.setParent(this);
@@ -97,12 +99,11 @@ namespace Avalanche {
// _sound->syncVolume();
}
- void AvalancheEngine::initialize() {
- //debugC(1, kDebugEngine, "initialize");
+
+
+
+
- _rnd = new Common::RandomSource("avalanche");
- _rnd->setSeed(42); // Kick random number generator
- }
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 51081a05bf..592df701ee 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -114,7 +114,8 @@ private:
AvalancheConsole *_console;
Common::Platform _platform;
- void initialize();
+
+
// From bootstrp:
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp
index 151e93f444..d41fa10461 100644
--- a/engines/avalanche/trip6.cpp
+++ b/engines/avalanche/trip6.cpp
@@ -319,7 +319,8 @@ void Trip::loadtrip() {
for (gm = 1; gm <= numtr; gm++)
tr[gm].original();
// CHECKME: A 'i++' is missing somewhere, obviously!
- for (int i = 0; i < sizeof(aa); aa[i] = 0);
+ for (int i = 0; i < sizeof(aa); i++)
+ aa[i] = 0;
}
byte Trip::checkfeet(int16 x1, int16 x2, int16 oy, int16 y, byte yl) {