diff options
author | Max Horn | 2003-06-21 15:32:35 +0000 |
---|---|---|
committer | Max Horn | 2003-06-21 15:32:35 +0000 |
commit | 0cb2053d9d4a2e9f44edc36e4a87a34962dd3606 (patch) | |
tree | 1c2c3293dc174f60812991c6fd9bc8c2ddee814d | |
parent | ece6f28fd7a0678af09984239e39ced2fa265875 (diff) | |
download | scummvm-rg350-0cb2053d9d4a2e9f44edc36e4a87a34962dd3606.tar.gz scummvm-rg350-0cb2053d9d4a2e9f44edc36e4a87a34962dd3606.tar.bz2 scummvm-rg350-0cb2053d9d4a2e9f44edc36e4a87a34962dd3606.zip |
init some member vars previously not inited
svn-id: r8579
-rw-r--r-- | simon/simon.cpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index c6e31cab75..c86b7a2563 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -173,7 +173,29 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) : Engine(detector, syst), midi (syst) { MidiDriver *driver = detector->createMidi(); + _vc_ptr = 0; + _game_offsets_ptr = 0; + + _game = (byte)detector->_game.features; + + if (_game == GAME_SIMON2MAC) { + gss = &simon2mac_settings; + } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) { + gss = &simon2win_settings; + } else if (_game == GAME_SIMON2DOS) { + gss = &simon2dos_settings; + } else if (_game & GF_AMIGA) { + gss = &simon1amiga_settings; + } else if (_game == GAME_SIMON1DEMO) { + gss = &simon1demo_settings; + } else { + gss = &simon1_settings; + } + + _key_pressed = 0; + _game_file = 0; + _stripped_txt_mem = 0; _text_size = 0; _stringtab_num = 0; @@ -416,8 +438,6 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) if (ret) warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret)); - _game = (byte)detector->_game.features; - // Setup mixer if (!_mixer->bindToSystem(syst)) warning("Sound initialization failed. " @@ -4330,20 +4350,6 @@ void SimonEngine::go() { _sdl_buf = (byte *)calloc(320 * 200, 1); _sdl_buf_attached = (byte *)calloc(320 * 200, 1); - if (_game == GAME_SIMON2MAC) { - gss = &simon2mac_settings; - } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) { - gss = &simon2win_settings; - } else if (_game == GAME_SIMON2DOS) { - gss = &simon2dos_settings; - } else if (_game & GF_AMIGA) { - gss = &simon1amiga_settings; - } else if (_game == GAME_SIMON1DEMO) { - gss = &simon1demo_settings; - } else { - gss = &simon1_settings; - } - allocItemHeap(); allocTablesHeap(); |