diff options
author | Travis Howell | 2003-12-23 08:59:30 +0000 |
---|---|---|
committer | Travis Howell | 2003-12-23 08:59:30 +0000 |
commit | 35be4ef55437cdf80396568eadd8a98741e6e389 (patch) | |
tree | f2d80c163812dc1fd0504e390bc0fc0187f3ee75 /simon | |
parent | f68194619298c06b72a016bbfb1486154ccdfd26 (diff) | |
download | scummvm-rg350-35be4ef55437cdf80396568eadd8a98741e6e389.tar.gz scummvm-rg350-35be4ef55437cdf80396568eadd8a98741e6e389.tar.bz2 scummvm-rg350-35be4ef55437cdf80396568eadd8a98741e6e389.zip |
Add var to track current subroutine been used.
Add work around to display one section of Simon the Sorcerer 1 introduction in lower half of screen.
svn-id: r11870
Diffstat (limited to 'simon')
-rw-r--r-- | simon/simon.cpp | 20 | ||||
-rw-r--r-- | simon/simon.h | 2 | ||||
-rw-r--r-- | simon/vga.cpp | 19 |
3 files changed, 32 insertions, 9 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index 1e3a56ea9b..52e6a1ffe4 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -314,6 +314,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) _subroutine_list = 0; _subroutine_list_org = 0; + _subroutine = 0; _dx_surface_pitch = 0; @@ -1237,16 +1238,20 @@ void SimonEngine::playSting(uint a) { Subroutine *SimonEngine::getSubroutineByID(uint subroutine_id) { Subroutine *cur; + _subroutine = subroutine_id; + for (cur = _subroutine_list; cur; cur = cur->next) { - if (cur->id == subroutine_id) + if (cur->id == subroutine_id) { return cur; + } } loadTablesIntoMem(subroutine_id); for (cur = _subroutine_list; cur; cur = cur->next) { - if (cur->id == subroutine_id) + if (cur->id == subroutine_id) { return cur; + } } debug(1,"getSubroutineByID: subroutine %d not found", subroutine_id); @@ -2335,7 +2340,7 @@ void SimonEngine::o_set_video_mode(uint mode, uint vga_res) { } void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) { - uint num; + uint num, num_lines; VgaPointersEntry *vpe; byte *bb, *b; uint16 c; @@ -2403,7 +2408,7 @@ void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) { if (_game & GF_SIMON2) { if (!_dx_use_3_or_4_for_lock) { - uint num_lines = _video_palette_mode == 4 ? 134 : 200; + num_lines = _video_palette_mode == 4 ? 134 : 200; _vga_var8 = num_lines; dx_copy_from_attached_to_2(0, 0, 320, num_lines); dx_copy_from_attached_to_3(num_lines); @@ -2411,7 +2416,12 @@ void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) { } _dx_use_3_or_4_for_lock = false; } else { - uint num_lines = _video_palette_mode == 4 ? 134 : 200; + // Allow one section of Simon the Sorcerer 1 introduction to be displayed + // in lower half of screen + if (_subroutine == 2926) + num_lines = 200; + else + num_lines = _video_palette_mode == 4 ? 134 : 200; _vga_var8 = num_lines; dx_copy_from_attached_to_2(0, 0, 320, num_lines); dx_copy_from_attached_to_3(num_lines); diff --git a/simon/simon.h b/simon/simon.h index cc21a75b84..081a28524e 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -163,6 +163,7 @@ protected: uint _tablesheap_curpos_new; Subroutine *_subroutine_list, *_subroutine_list_org; + uint _subroutine; uint _dx_surface_pitch; @@ -275,7 +276,6 @@ protected: uint _invoke_timer_callback; - uint _vga_sprite_changed; byte *_vga_buf_free_start, *_vga_buf_end, *_vga_buf_start; diff --git a/simon/vga.cpp b/simon/vga.cpp index 095cf199e9..8e60fe335b 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -731,8 +731,16 @@ void SimonEngine::vc_10_draw() { state.surf_pitch = _dx_surface_pitch; { - uint offs = ((vlut[0] - _video_windows[16]) * 2 + state.x) * 8; - uint offs2 = (vlut[1] - _video_windows[17] + state.y); + uint offs, offs2; + // Allow one section of Simon the Sorcerer 1 introduction to be displayed + // in lower half of screen + if (!(_game & GF_SIMON2) && _subroutine == 2926) { + offs = ((vlut[0]) * 2 + state.x) * 8; + offs2 = (vlut[1] + state.y); + } else { + offs = ((vlut[0] - _video_windows[16]) * 2 + state.x) * 8; + offs2 = (vlut[1] - _video_windows[17] + state.y); + } state.surf2_addr += offs + offs2 * state.surf2_pitch; state.surf_addr += offs + offs2 * state.surf_pitch; @@ -1766,7 +1774,12 @@ void SimonEngine::vc_62_palette_thing() { _vc_ptr = vc_ptr_org; } - dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200); + // Allow one section of Simon the Sorcerer 1 introduction to be displayed + // in lower half of screen + if (!(_game & GF_SIMON2) && _subroutine == 2926) + dx_clear_surfaces(200); + else + dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200); } if (_game & GF_SIMON2) { if (_next_music_to_play != -1) |