AVALANCHE: Minor repair in Trip, move initialization of the engine into the constructor.

This commit is contained in:
uruk 2013-07-02 15:59:27 +02:00
parent ae1f189370
commit e27948a1a5
3 changed files with 11 additions and 8 deletions

View File

@ -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
}

View File

@ -114,7 +114,8 @@ private:
AvalancheConsole *_console;
Common::Platform _platform;
void initialize();
// From bootstrp:

View File

@ -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) {