diff options
author | Travis Howell | 2003-05-21 11:49:41 +0000 |
---|---|---|
committer | Travis Howell | 2003-05-21 11:49:41 +0000 |
commit | 1294eb35c773c195633474dc2fbb8812f4b949a6 (patch) | |
tree | e0eeac2563ddf835bd7bd8ac8151bb29ae315c6a /simon | |
parent | c062b734222587763f2a84754006a4ba77421c66 (diff) | |
download | scummvm-rg350-1294eb35c773c195633474dc2fbb8812f4b949a6.tar.gz scummvm-rg350-1294eb35c773c195633474dc2fbb8812f4b949a6.tar.bz2 scummvm-rg350-1294eb35c773c195633474dc2fbb8812f4b949a6.zip |
Set midi vars to -1 by default to prevent simon2dos trying to load music during copy protection
Correct vc_62 so it is closer to diasm.
svn-id: r7780
Diffstat (limited to 'simon')
-rw-r--r-- | simon/simon.cpp | 4 | ||||
-rw-r--r-- | simon/vga.cpp | 97 |
2 files changed, 51 insertions, 50 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index 29269a7657..2b1da0fab1 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -322,8 +322,8 @@ SimonState::SimonState(GameDetector *detector, OSystem *syst) _video_var_9 = 0; _midi_sfx = 0; - _last_music_played = 0; - _next_music_to_play = 0; + _last_music_played = -1; + _next_music_to_play = -1; _show_preposition = 0; _showmessage_flag = 0; diff --git a/simon/vga.cpp b/simon/vga.cpp index 4f9c47097a..0c82c4acae 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -1691,62 +1691,63 @@ void SimonState::vc_62_palette_thing() { vc_29_stop_all_sounds(); if (!_video_var_3) { - if (_game & GF_SIMON2) { - if (_next_music_to_play != -1) - loadMusic(_next_music_to_play); - } - } else _video_var_3 = true; - _video_num_pal_colors = 256; - if (_video_palette_mode == 4) - _video_num_pal_colors = 208; + _video_num_pal_colors = 256; + if (_video_palette_mode == 4) + _video_num_pal_colors = 208; - memcpy(_video_buf_1, _palette_backup, _video_num_pal_colors * sizeof(uint32)); - for (i = NUM_PALETTE_FADEOUT; i != 0; --i) { - palette_fadeout((uint32 *)_video_buf_1, _video_num_pal_colors); - _system->set_palette(_video_buf_1, 0, _video_num_pal_colors); - _system->update_screen(); - delay(5); - } + memcpy(_video_buf_1, _palette_backup, _video_num_pal_colors * sizeof(uint32)); + for (i = NUM_PALETTE_FADEOUT; i != 0; --i) { + palette_fadeout((uint32 *)_video_buf_1, _video_num_pal_colors); + _system->set_palette(_video_buf_1, 0, _video_num_pal_colors); + _system->update_screen(); + delay(5); + } - if (!(_game & GF_SIMON2)) { - uint16 params[5]; /* parameters to vc_10_draw */ - VgaSprite *vsp; - VgaPointersEntry *vpe; - - vsp = _vga_sprites; - while (vsp->id != 0) { - if (vsp->id == 128) { - byte *f1 = _cur_vga_file_1; - byte *f2 = _cur_vga_file_2; - uint palmode = _video_palette_mode; - - vpe = &_vga_buffer_pointers[vsp->unk7]; - _cur_vga_file_1 = vpe->vgaFile1; - _cur_vga_file_2 = vpe->vgaFile2; - _video_palette_mode = vsp->unk6; - - params[0] = READ_BE_UINT16_UNALIGNED(&vsp->image); - params[1] = READ_BE_UINT16_UNALIGNED(&vsp->base_color); - params[2] = READ_BE_UINT16_UNALIGNED(&vsp->x); - params[3] = READ_BE_UINT16_UNALIGNED(&vsp->y); - params[4] = READ_BE_UINT16_UNALIGNED(&vsp->unk4); - _vc_ptr = (byte *)params; - vc_10_draw(); - - _video_palette_mode = palmode; - _cur_vga_file_1 = f1; - _cur_vga_file_2 = f2; - break; + if (!(_game & GF_SIMON2)) { + uint16 params[5]; /* parameters to vc_10_draw */ + VgaSprite *vsp; + VgaPointersEntry *vpe; + + vsp = _vga_sprites; + while (vsp->id != 0) { + if (vsp->id == 128) { + byte *f1 = _cur_vga_file_1; + byte *f2 = _cur_vga_file_2; + uint palmode = _video_palette_mode; + + vpe = &_vga_buffer_pointers[vsp->unk7]; + _cur_vga_file_1 = vpe->vgaFile1; + _cur_vga_file_2 = vpe->vgaFile2; + _video_palette_mode = vsp->unk6; + + params[0] = READ_BE_UINT16_UNALIGNED(&vsp->image); + params[1] = READ_BE_UINT16_UNALIGNED(&vsp->base_color); + params[2] = READ_BE_UINT16_UNALIGNED(&vsp->x); + params[3] = READ_BE_UINT16_UNALIGNED(&vsp->y); + params[4] = READ_BE_UINT16_UNALIGNED(&vsp->unk4); + _vc_ptr = (byte *)params; + vc_10_draw(); + + _video_palette_mode = palmode; + _cur_vga_file_1 = f1; + _cur_vga_file_2 = f2; + break; + } + vsp++; } - vsp++; } - } - dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200); + dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200); + + _vc_ptr = vc_ptr_org; + } + if (_game & GF_SIMON2) { + if (_next_music_to_play != -1) + loadMusic(_next_music_to_play); + } - _vc_ptr = vc_ptr_org; } void SimonState::vc_63_palette_thing_2() { |