aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS17
-rw-r--r--README28
-rw-r--r--backends/events/default/default-events.cpp26
-rw-r--r--backends/events/default/default-events.h1
-rw-r--r--backends/events/sdl/sdl-events.cpp56
-rw-r--r--backends/events/sdl/sdl-events.h20
-rw-r--r--backends/fs/riscos/riscos-fs-factory.cpp46
-rw-r--r--backends/fs/riscos/riscos-fs-factory.h40
-rw-r--r--backends/fs/riscos/riscos-fs.cpp323
-rw-r--r--backends/fs/riscos/riscos-fs.h105
-rw-r--r--backends/graphics/default-palette.h2
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp90
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.h37
-rw-r--r--backends/graphics/gph/gph-graphics.cpp81
-rw-r--r--backends/graphics/gph/gph-graphics.h37
-rw-r--r--backends/graphics/graphics.h22
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp1
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h24
-rw-r--r--backends/graphics/maemosdl/maemosdl-graphics.h2
-rw-r--r--backends/graphics/null/null-graphics.h76
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp248
-rw-r--r--backends/graphics/opengl/opengl-graphics.h234
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp113
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.h41
-rw-r--r--backends/graphics/openpandora/op-graphics.cpp13
-rw-r--r--backends/graphics/openpandora/op-graphics.h4
-rw-r--r--backends/graphics/psp2sdl/psp2sdl-graphics.cpp76
-rw-r--r--backends/graphics/psp2sdl/psp2sdl-graphics.h22
-rw-r--r--backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp4
-rw-r--r--backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h6
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp198
-rw-r--r--backends/graphics/sdl/sdl-graphics.h96
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp931
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.h179
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.cpp2
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.h10
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.cpp4
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.h4
-rw-r--r--backends/graphics/windowed.h337
-rw-r--r--backends/midi/coreaudio.cpp4
-rw-r--r--backends/midi/coremidi.cpp64
-rw-r--r--backends/modular-backend.cpp5
-rw-r--r--backends/modular-backend.h1
-rw-r--r--backends/module.mk6
-rw-r--r--backends/platform/3ds/osystem-graphics.cpp2
-rw-r--r--backends/platform/3ds/osystem.h2
-rw-r--r--backends/platform/android/android.h2
-rw-r--r--backends/platform/android/gfx.cpp2
-rw-r--r--backends/platform/dc/dc.h2
-rw-r--r--backends/platform/dc/display.cpp2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h2
-rw-r--r--backends/platform/ios7/ios7_app_delegate.mm15
-rw-r--r--backends/platform/ios7/ios7_common.h1
-rw-r--r--backends/platform/ios7/ios7_osys_main.cpp4
-rw-r--r--backends/platform/ios7/ios7_osys_main.h2
-rw-r--r--backends/platform/ios7/ios7_osys_video.mm47
-rw-r--r--backends/platform/ios7/ios7_video.mm19
-rw-r--r--backends/platform/iphone/osys_main.h2
-rw-r--r--backends/platform/iphone/osys_video.mm2
-rw-r--r--backends/platform/n64/osys_n64.h2
-rw-r--r--backends/platform/n64/osys_n64_base.cpp2
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp2
-rw-r--r--backends/platform/ps2/Gs2dScreen.h2
-rw-r--r--backends/platform/ps2/systemps2.cpp2
-rw-r--r--backends/platform/ps2/systemps2.h2
-rw-r--r--backends/platform/psp/default_display_client.h6
-rw-r--r--backends/platform/psp/display_client.cpp6
-rw-r--r--backends/platform/psp/display_client.h42
-rw-r--r--backends/platform/psp/osys_psp.cpp2
-rw-r--r--backends/platform/psp/osys_psp.h2
-rw-r--r--backends/platform/psp/psppixelformat.cpp2
-rw-r--r--backends/platform/psp/psppixelformat.h14
-rw-r--r--backends/platform/sdl/riscos/riscos.cpp12
-rw-r--r--backends/platform/sdl/sdl-window.cpp52
-rw-r--r--backends/platform/sdl/sdl-window.h20
-rw-r--r--backends/platform/sdl/sdl.cpp12
-rw-r--r--backends/platform/sdl/sdl.h2
-rw-r--r--backends/platform/wii/osystem.h2
-rw-r--r--backends/platform/wii/osystem_gfx.cpp2
-rw-r--r--common/array.h59
-rw-r--r--common/events.h5
-rw-r--r--common/memory.h4
-rw-r--r--common/ptr.h13
-rw-r--r--common/system.h13
-rw-r--r--common/util.h3
-rwxr-xr-xconfigure71
-rw-r--r--devtools/create_project/xcode.cpp31
-rw-r--r--devtools/create_titanic/create_titanic_dat.cpp107
-rw-r--r--devtools/create_titanic/script_quotes.cpp55
-rw-r--r--devtools/create_titanic/script_quotes.h7
-rw-r--r--dists/engine-data/titanic.datbin2793322 -> 3197968 bytes
-rw-r--r--doc/de/LIESMICH264
-rw-r--r--doc/de/NEUES26
-rw-r--r--engines/access/access.cpp2
-rw-r--r--engines/adl/adl.cpp2
-rw-r--r--engines/agi/graphics.cpp2
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/avalanche/graphics.cpp6
-rw-r--r--engines/bbvs/bbvs.cpp2
-rw-r--r--engines/bbvs/videoplayer.cpp4
-rw-r--r--engines/bladerunner/bladerunner.cpp2
-rw-r--r--engines/cge/cge.cpp2
-rw-r--r--engines/cge2/cge2.cpp2
-rw-r--r--engines/chewy/chewy.cpp4
-rw-r--r--engines/cine/cine.cpp10
-rw-r--r--engines/composer/composer.cpp2
-rw-r--r--engines/cruise/cruise.cpp2
-rw-r--r--engines/cryo/cryo.cpp2
-rw-r--r--engines/director/graphics.cpp2
-rw-r--r--engines/director/score.cpp2
-rw-r--r--engines/dm/dm.cpp2
-rw-r--r--engines/draci/draci.cpp2
-rw-r--r--engines/drascula/drascula.cpp2
-rw-r--r--engines/dreamweb/stubs.cpp6
-rw-r--r--engines/dreamweb/titles.cpp4
-rw-r--r--engines/dreamweb/vgagrafx.cpp2
-rw-r--r--engines/engine.cpp88
-rw-r--r--engines/fullpipe/fullpipe.cpp2
-rw-r--r--engines/gnap/gnap.cpp2
-rw-r--r--engines/gob/gob.cpp12
-rw-r--r--engines/gob/inter_v2.cpp4
-rw-r--r--engines/gob/inter_v5.cpp4
-rw-r--r--engines/gob/video.cpp6
-rw-r--r--engines/gob/video.h2
-rw-r--r--engines/groovie/groovie.cpp4
-rw-r--r--engines/hopkins/graphics.cpp2
-rw-r--r--engines/hugo/hugo.cpp2
-rw-r--r--engines/kyra/screen.cpp4
-rw-r--r--engines/lab/lab.cpp4
-rw-r--r--engines/lastexpress/lastexpress.cpp2
-rw-r--r--engines/lure/lure.cpp2
-rw-r--r--engines/macventure/macventure.cpp2
-rw-r--r--engines/made/made.cpp2
-rw-r--r--engines/mads/mads.cpp2
-rw-r--r--engines/mohawk/cstime_graphics.cpp2
-rw-r--r--engines/mohawk/detection_tables.h17
-rw-r--r--engines/mohawk/livingbooks_graphics.cpp2
-rw-r--r--engines/mohawk/myst_graphics.cpp4
-rw-r--r--engines/mohawk/riven_graphics.cpp2
-rw-r--r--engines/mortevielle/mortevielle.cpp2
-rw-r--r--engines/neverhood/neverhood.cpp2
-rw-r--r--engines/parallaction/graphics.cpp2
-rw-r--r--engines/pegasus/graphics.cpp2
-rw-r--r--engines/plumbers/plumbers.cpp2
-rw-r--r--engines/prince/graphics.cpp2
-rw-r--r--engines/prince/videoplayer.cpp6
-rw-r--r--engines/queen/queen.cpp2
-rw-r--r--engines/saga/gfx.cpp2
-rw-r--r--engines/sci/console.cpp13
-rw-r--r--engines/sci/detection_tables.h8
-rw-r--r--engines/sci/engine/features.cpp9
-rw-r--r--engines/sci/engine/features.h2
-rw-r--r--engines/sci/engine/guest_additions.cpp2
-rw-r--r--engines/sci/engine/kernel_tables.h4
-rw-r--r--engines/sci/engine/kfile.cpp7
-rw-r--r--engines/sci/engine/kgraphics32.cpp84
-rw-r--r--engines/sci/engine/klists.cpp8
-rw-r--r--engines/sci/engine/ksound.cpp24
-rw-r--r--engines/sci/engine/kvideo.cpp10
-rw-r--r--engines/sci/engine/object.h1
-rw-r--r--engines/sci/engine/savegame.cpp42
-rw-r--r--engines/sci/engine/script_patches.cpp336
-rw-r--r--engines/sci/engine/scriptdebug.cpp19
-rw-r--r--engines/sci/engine/segment.h13
-rw-r--r--engines/sci/engine/selector.cpp4
-rw-r--r--engines/sci/engine/selector.h5
-rw-r--r--engines/sci/engine/workarounds.cpp781
-rw-r--r--engines/sci/engine/workarounds.h3
-rw-r--r--engines/sci/event.cpp4
-rw-r--r--engines/sci/graphics/celobj32.cpp126
-rw-r--r--engines/sci/graphics/celobj32.h292
-rw-r--r--engines/sci/graphics/controls32.cpp88
-rw-r--r--engines/sci/graphics/controls32.h164
-rw-r--r--engines/sci/graphics/cursor32.cpp206
-rw-r--r--engines/sci/graphics/cursor32.h140
-rw-r--r--engines/sci/graphics/frameout.cpp162
-rw-r--r--engines/sci/graphics/frameout.h403
-rw-r--r--engines/sci/graphics/helpers.h42
-rw-r--r--engines/sci/graphics/lists32.h12
-rw-r--r--engines/sci/graphics/paint32.cpp13
-rw-r--r--engines/sci/graphics/palette32.cpp121
-rw-r--r--engines/sci/graphics/palette32.h14
-rw-r--r--engines/sci/graphics/plane32.cpp40
-rw-r--r--engines/sci/graphics/plane32.h309
-rw-r--r--engines/sci/graphics/remap32.cpp50
-rw-r--r--engines/sci/graphics/remap32.h217
-rw-r--r--engines/sci/graphics/screen.cpp6
-rw-r--r--engines/sci/graphics/screen_item32.cpp102
-rw-r--r--engines/sci/graphics/screen_item32.h191
-rw-r--r--engines/sci/graphics/text32.cpp171
-rw-r--r--engines/sci/graphics/text32.h110
-rw-r--r--engines/sci/graphics/transitions32.cpp62
-rw-r--r--engines/sci/graphics/transitions32.h229
-rw-r--r--engines/sci/graphics/video32.cpp116
-rw-r--r--engines/sci/graphics/video32.h13
-rw-r--r--engines/sci/sound/audio32.cpp281
-rw-r--r--engines/sci/sound/audio32.h231
-rw-r--r--engines/sci/sound/decoders/sol.cpp9
-rw-r--r--engines/sci/sound/decoders/sol.h3
-rw-r--r--engines/sci/sound/drivers/midi.cpp22
-rw-r--r--engines/sci/sound/drivers/mididriver.h2
-rw-r--r--engines/sci/sound/midiparser_sci.cpp2
-rw-r--r--engines/sci/sound/music.cpp29
-rw-r--r--engines/sci/sound/soundcmd.cpp12
-rw-r--r--engines/sci/video/robot_decoder.cpp44
-rw-r--r--engines/sci/video/robot_decoder.h495
-rw-r--r--engines/scumm/scumm.cpp12
-rw-r--r--engines/sherlock/scalpel/scalpel.cpp6
-rw-r--r--engines/sherlock/tattoo/tattoo.cpp2
-rw-r--r--engines/sky/sky.cpp2
-rw-r--r--engines/sludge/graphics.cpp2
-rw-r--r--engines/sword1/animation.cpp6
-rw-r--r--engines/sword1/sword1.cpp2
-rw-r--r--engines/sword2/animation.cpp6
-rw-r--r--engines/sword2/sword2.cpp2
-rw-r--r--engines/sword25/sword25.cpp2
-rw-r--r--engines/teenagent/teenagent.cpp2
-rw-r--r--engines/testbed/testbed.cpp2
-rw-r--r--engines/tinsel/tinsel.cpp6
-rw-r--r--engines/titanic/configure.engine2
-rw-r--r--engines/titanic/core/game_object.cpp8
-rw-r--r--engines/titanic/core/game_object.h16
-rw-r--r--engines/titanic/detection_tables.h4
-rw-r--r--engines/titanic/game/bridge_view.cpp2
-rw-r--r--engines/titanic/game/code_wheel.cpp88
-rw-r--r--engines/titanic/game/code_wheel.h5
-rw-r--r--engines/titanic/game/computer_screen.cpp2
-rw-r--r--engines/titanic/game/credits.cpp6
-rw-r--r--engines/titanic/game/ear_sweet_bowl.cpp4
-rw-r--r--engines/titanic/game/emma_control.cpp2
-rw-r--r--engines/titanic/game/end_credit_text.cpp4
-rw-r--r--engines/titanic/game/end_credits.cpp4
-rw-r--r--engines/titanic/game/end_explode_ship.cpp4
-rw-r--r--engines/titanic/game/end_sequence_control.cpp4
-rw-r--r--engines/titanic/game/missiveomat.cpp3
-rw-r--r--engines/titanic/game/phonograph.cpp6
-rw-r--r--engines/titanic/game/season_background.cpp41
-rw-r--r--engines/titanic/game/sgt/sgt_nav.cpp17
-rw-r--r--engines/titanic/game/sgt/sgt_state_room.cpp10
-rw-r--r--engines/titanic/game/transport/lift.cpp36
-rw-r--r--engines/titanic/game/transport/pellerator.cpp7
-rw-r--r--engines/titanic/game/transport/service_elevator.cpp4
-rw-r--r--engines/titanic/game_manager.h2
-rw-r--r--engines/titanic/gfx/music_slider_pitch.cpp2
-rw-r--r--engines/titanic/messages/messages.h5
-rw-r--r--engines/titanic/npcs/bilge_succubus.cpp4
-rw-r--r--engines/titanic/npcs/deskbot.cpp5
-rw-r--r--engines/titanic/npcs/parrot.cpp6
-rw-r--r--engines/titanic/npcs/succubus.cpp8
-rw-r--r--engines/titanic/pet_control/pet_control.h6
-rw-r--r--engines/titanic/pet_control/pet_frame.cpp27
-rw-r--r--engines/titanic/pet_control/pet_rooms.cpp7
-rw-r--r--engines/titanic/pet_control/pet_rooms.h5
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.cpp7
-rw-r--r--engines/titanic/pet_control/pet_translation.cpp8
-rw-r--r--engines/titanic/room_flags.cpp13
-rw-r--r--engines/titanic/room_flags.h28
-rw-r--r--engines/titanic/sound/audio_buffer.h12
-rw-r--r--engines/titanic/sound/auto_music_player.cpp6
-rw-r--r--engines/titanic/sound/auto_music_player_base.cpp41
-rw-r--r--engines/titanic/sound/auto_music_player_base.h2
-rw-r--r--engines/titanic/sound/music_player.cpp41
-rw-r--r--engines/titanic/sound/music_room_handler.cpp27
-rw-r--r--engines/titanic/sound/music_room_handler.h2
-rw-r--r--engines/titanic/sound/music_room_instrument.cpp12
-rw-r--r--engines/titanic/sound/music_room_instrument.h2
-rw-r--r--engines/titanic/sound/node_auto_sound_player.cpp4
-rw-r--r--engines/titanic/sound/restricted_auto_music_player.cpp4
-rw-r--r--engines/titanic/sound/seasonal_music_player.cpp36
-rw-r--r--engines/titanic/sound/titania_speech.cpp17
-rw-r--r--engines/titanic/sound/trigger_auto_music_player.cpp4
-rw-r--r--engines/titanic/sound/view_auto_sound_player.cpp4
-rw-r--r--engines/titanic/sound/wave_file.cpp2
-rw-r--r--engines/titanic/support/avi_surface.cpp10
-rw-r--r--engines/titanic/support/direct_draw.cpp2
-rw-r--r--engines/titanic/support/files_manager.cpp2
-rw-r--r--engines/titanic/support/mouse_cursor.cpp64
-rw-r--r--engines/titanic/support/mouse_cursor.h5
-rw-r--r--engines/titanic/support/strings.h4
-rw-r--r--engines/titanic/true_talk/barbot_script.cpp258
-rw-r--r--engines/titanic/true_talk/barbot_script.h7
-rw-r--r--engines/titanic/true_talk/bellbot_script.cpp34
-rw-r--r--engines/titanic/true_talk/bellbot_script.h2
-rw-r--r--engines/titanic/true_talk/deskbot_script.cpp49
-rw-r--r--engines/titanic/true_talk/deskbot_script.h2
-rw-r--r--engines/titanic/true_talk/doorbot_script.cpp28
-rw-r--r--engines/titanic/true_talk/doorbot_script.h7
-rw-r--r--engines/titanic/true_talk/liftbot_script.cpp28
-rw-r--r--engines/titanic/true_talk/liftbot_script.h2
-rw-r--r--engines/titanic/true_talk/maitred_script.cpp31
-rw-r--r--engines/titanic/true_talk/maitred_script.h2
-rw-r--r--engines/titanic/true_talk/script_support.cpp7
-rw-r--r--engines/titanic/true_talk/script_support.h10
-rw-r--r--engines/titanic/true_talk/true_talk_manager.cpp2
-rw-r--r--engines/titanic/true_talk/tt_npc_script.cpp57
-rw-r--r--engines/titanic/true_talk/tt_npc_script.h7
-rw-r--r--engines/titanic/true_talk/tt_parser.cpp26
-rw-r--r--engines/titanic/true_talk/tt_sentence.cpp17
-rw-r--r--engines/titanic/true_talk/tt_sentence.h4
-rw-r--r--engines/titanic/true_talk/tt_vocab.cpp16
-rw-r--r--engines/titanic/true_talk/tt_vocab.h4
-rw-r--r--engines/toltecs/toltecs.cpp2
-rw-r--r--engines/tony/window.cpp2
-rw-r--r--engines/toon/toon.cpp2
-rw-r--r--engines/touche/touche.cpp2
-rw-r--r--engines/tsage/tsage.cpp2
-rw-r--r--engines/tucker/tucker.cpp2
-rw-r--r--engines/util.h22
-rw-r--r--engines/voyeur/screen.cpp2
-rw-r--r--engines/wage/wage.cpp2
-rw-r--r--engines/wintermute/wintermute.cpp2
-rw-r--r--engines/xeen/xeen.cpp2
-rw-r--r--engines/zvision/zvision.cpp4
-rw-r--r--graphics/cursorman.cpp7
-rw-r--r--graphics/mode.h50
-rw-r--r--graphics/palette.h2
-rw-r--r--gui/themes/translations.datbin707329 -> 704280 bytes
-rw-r--r--gui/updates-dialog.cpp67
-rw-r--r--gui/updates-dialog.h4
-rw-r--r--po/be_BY.po115
-rw-r--r--po/ca_ES.po109
-rw-r--r--po/cs_CZ.po115
-rw-r--r--po/da_DK.po111
-rw-r--r--po/de_DE.po121
-rw-r--r--po/el.po117
-rw-r--r--po/es_ES.po116
-rw-r--r--po/eu.po111
-rw-r--r--po/fi_FI.po125
-rw-r--r--po/fr_FR.po117
-rw-r--r--po/gl_ES.po115
-rw-r--r--po/hu_HU.po123
-rw-r--r--po/it_IT.po122
-rw-r--r--po/nb_NO.po115
-rw-r--r--po/nl_NL.po121
-rw-r--r--po/nn_NO.po111
-rw-r--r--po/pl_PL.po115
-rw-r--r--po/pt_BR.po111
-rw-r--r--po/pt_PT.po106
-rw-r--r--po/ru_RU.po115
-rw-r--r--po/scummvm.pot106
-rw-r--r--po/sv_SE.po115
-rw-r--r--po/uk_UA.po115
-rw-r--r--po/zh-Latn_CN.po111
-rw-r--r--ports.mk7
-rw-r--r--test/common/array.h57
-rw-r--r--video/bink_decoder.cpp53
-rw-r--r--video/bink_decoder.h5
348 files changed, 8263 insertions, 6921 deletions
diff --git a/NEWS b/NEWS
index 1bd9668a23..02e95d7431 100644
--- a/NEWS
+++ b/NEWS
@@ -11,7 +11,6 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added support for Riven.
- Added support for Starship Titanic.
-
New Games (Sierra SCI2 - SCI3):
- Added support for Gabriel Knight.
- Added support for Gabriel Knight 2.
@@ -40,6 +39,9 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added support for on-the-fly GUI language switching.
- Updated Munt MT-32 emulation code to version 2.0.3.
- Improved handling of joysticks.
+ - Improved audio latency.
+ - Improved management of the ScummVM window in games that switch display
+ modes.
AGOS:
- Fixed subtitle speed setting in the Hebrew version of Simon the Sorcerer 1.
@@ -55,10 +57,19 @@ For a more comprehensive changelog of the latest experimental code, see:
MADE:
- Fixed badly distorted sound (bug #9753).
- SCI
+ SCI:
+ - Improved startup speed when using the MT-32 emulator.
+ - Improved handling of MT-32 reverb in SCI0 games.
+ - Improved selection of synthesized sound effects in SCI0 games.
+ - Improved selection of digital audio in SQ4.
+ - Improved resource bounds checking.
+ - Improved error handling of corrupt MIDI data.
+ - Fixed slow leak of small amounts of data into save games over time.
+ - Fixed broken day/night cycle in QFG3.
- Fixed a script bug in Police Quest 3 to now grant 10 points when giving the
locket to Marie. Now it's possible to beat the game with a perfect score.
- This bug is also present, when using the original interpreter.
+ This bug is also present when using the original interpreter.
+ - Fixed various other script bugs.
1.9.1 (YYYY-MM-DD)
General:
diff --git a/README b/README
index cd3cd76726..3dd12e8b66 100644
--- a/README
+++ b/README
@@ -33,19 +33,21 @@ Table of Contents:
* 3.12 Inherit the Earth: Quest for the Orb notes
* 3.13 Maniac Mansion Apple II/NES notes
* 3.14 Mickey's Space Adventure notes
- * 3.15 Nippon Safes Inc. Amiga notes
- * 3.16 Simon the Sorcerer notes
- * 3.17 Starship Titanic notes
- * 3.18 The Curse of Monkey Island notes
- * 3.19 The Feeble Files notes
- * 3.20 The Legend of Kyrandia notes
- * 3.21 Troll's Tale notes
- * 3.22 Winnie the Pooh notes
- * 3.23 Sierra AGI games: Predictive Input Dialog notes
- * 3.24 Sierra SCI games: Simultaneous speech and subtitles
- * 3.25 Zork games notes
- * 3.26 Commodore64 games notes
- * 3.27 Macintosh games notes
+ * 3.15 Myst notes
+ * 3.16 Nippon Safes Inc. Amiga notes
+ * 3.17 Riven notes
+ * 3.18 Simon the Sorcerer notes
+ * 3.19 Starship Titanic notes
+ * 3.20 The Curse of Monkey Island notes
+ * 3.21 The Feeble Files notes
+ * 3.22 The Legend of Kyrandia notes
+ * 3.23 Troll's Tale notes
+ * 3.24 Winnie the Pooh notes
+ * 3.25 Sierra AGI games: Predictive Input Dialog notes
+ * 3.26 Sierra SCI games: Simultaneous speech and subtitles
+ * 3.27 Zork games notes
+ * 3.28 Commodore64 games notes
+ * 3.29 Macintosh games notes
4.0) Supported Platforms
5.0) Running ScummVM
* 5.1 Command Line Options
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index c7c39da069..667914b023 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -254,4 +254,30 @@ void DefaultEventManager::pushEvent(const Common::Event &event) {
_artificialEventSource.addEvent(event);
}
+void DefaultEventManager::purgeMouseEvents() {
+ _dispatcher.dispatch();
+
+ Common::Queue<Common::Event> filteredQueue;
+ while (!_eventQueue.empty()) {
+ Common::Event event = _eventQueue.pop();
+ switch (event.type) {
+ case Common::EVENT_MOUSEMOVE:
+ case Common::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONDOWN:
+ case Common::EVENT_RBUTTONUP:
+ case Common::EVENT_WHEELUP:
+ case Common::EVENT_WHEELDOWN:
+ case Common::EVENT_MBUTTONDOWN:
+ case Common::EVENT_MBUTTONUP:
+ // do nothing
+ break;
+ default:
+ filteredQueue.push(event);
+ break;
+ }
+ }
+ _eventQueue = filteredQueue;
+}
+
#endif // !defined(DISABLE_DEFAULT_EVENTMANAGER)
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index f378fb9ff0..38406c25aa 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -80,6 +80,7 @@ public:
virtual void init();
virtual bool pollEvent(Common::Event &event);
virtual void pushEvent(const Common::Event &event);
+ virtual void purgeMouseEvents() override;
virtual Common::Point getMousePos() const { return _mousePos; }
virtual int getButtonState() const { return _buttonState; }
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index fb5a4c9b09..91ca0f5df6 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -75,7 +75,7 @@ static uint32 convUTF8ToUTF32(const char *src) {
#endif
SdlEventSource::SdlEventSource()
- : EventSource(), _scrollLock(false), _joystick(0), _lastScreenID(0), _graphicsManager(0)
+ : EventSource(), _scrollLock(false), _joystick(0), _lastScreenID(0), _graphicsManager(0), _queuedFakeMouseMove(false)
#if SDL_VERSION_ATLEAST(2, 0, 0)
, _queuedFakeKeyUp(false), _fakeKeyUp()
#endif
@@ -158,7 +158,7 @@ int SdlEventSource::mapKey(SDLKey sdlKey, SDLMod mod, Uint16 unicode) {
} else if (key >= Common::KEYCODE_UP && key <= Common::KEYCODE_PAGEDOWN) {
return key;
} else if (unicode) {
- // Return unicode in case it's stil set and wasn't filtered.
+ // Return unicode in case it's still set and wasn't filtered.
return unicode;
} else if (key >= 'a' && key <= 'z' && (mod & KMOD_SHIFT)) {
return key & ~0x20;
@@ -169,14 +169,15 @@ int SdlEventSource::mapKey(SDLKey sdlKey, SDLMod mod, Uint16 unicode) {
}
}
-void SdlEventSource::processMouseEvent(Common::Event &event, int x, int y) {
+bool SdlEventSource::processMouseEvent(Common::Event &event, int x, int y) {
event.mouse.x = x;
event.mouse.y = y;
if (_graphicsManager) {
- _graphicsManager->notifyMousePos(Common::Point(x, y));
- _graphicsManager->transformMouseCoordinates(event.mouse);
+ return _graphicsManager->notifyMousePosition(event.mouse);
}
+
+ return true;
}
bool SdlEventSource::handleKbdMouse(Common::Event &event) {
@@ -308,8 +309,7 @@ bool SdlEventSource::handleKbdMouse(Common::Event &event) {
if (_km.x != oldKmX || _km.y != oldKmY) {
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
- return true;
+ return processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
}
}
}
@@ -508,6 +508,12 @@ bool SdlEventSource::pollEvent(Common::Event &event) {
return true;
}
+ if (_queuedFakeMouseMove) {
+ event = _fakeMouseMove;
+ _queuedFakeMouseMove = false;
+ return true;
+ }
+
SDL_Event ev;
while (SDL_PollEvent(&ev)) {
preprocessEvents(&ev);
@@ -549,7 +555,9 @@ bool SdlEventSource::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) {
// with a mouse wheel event. However, SDL2 does not supply
// these, thus we use whatever we got last time. It seems
// these are always stored in _km.x, _km.y.
- processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
+ if (!processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER)) {
+ return false;
+ }
if (yDir < 0) {
event.type = Common::EVENT_WHEELDOWN;
return true;
@@ -740,12 +748,12 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
bool SdlEventSource::handleMouseMotion(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, ev.motion.x, ev.motion.y);
+
// update KbdMouse
_km.x = ev.motion.x * MULTIPLIER;
_km.y = ev.motion.y * MULTIPLIER;
- return true;
+ return processMouseEvent(event, ev.motion.x, ev.motion.y);
}
bool SdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
@@ -766,12 +774,11 @@ bool SdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event)
else
return false;
- processMouseEvent(event, ev.button.x, ev.button.y);
// update KbdMouse
_km.x = ev.button.x * MULTIPLIER;
_km.y = ev.button.y * MULTIPLIER;
- return true;
+ return processMouseEvent(event, ev.button.x, ev.button.y);
}
bool SdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
@@ -785,21 +792,21 @@ bool SdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
#endif
else
return false;
- processMouseEvent(event, ev.button.x, ev.button.y);
+
// update KbdMouse
_km.x = ev.button.x * MULTIPLIER;
_km.y = ev.button.y * MULTIPLIER;
- return true;
+ return processMouseEvent(event, ev.button.x, ev.button.y);
}
bool SdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
if (ev.jbutton.button == JOY_BUT_LMOUSE) {
event.type = Common::EVENT_LBUTTONDOWN;
- processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
+ return processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
} else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
event.type = Common::EVENT_RBUTTONDOWN;
- processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
+ return processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
} else {
event.type = Common::EVENT_KEYDOWN;
switch (ev.jbutton.button) {
@@ -820,17 +827,17 @@ bool SdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
event.kbd.ascii = mapKey(SDLK_F5, (SDLMod)ev.key.keysym.mod, 0);
break;
}
+ return true;
}
- return true;
}
bool SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
if (ev.jbutton.button == JOY_BUT_LMOUSE) {
event.type = Common::EVENT_LBUTTONUP;
- processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
+ return processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
} else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
event.type = Common::EVENT_RBUTTONUP;
- processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
+ return processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER);
} else {
event.type = Common::EVENT_KEYUP;
switch (ev.jbutton.button) {
@@ -851,8 +858,8 @@ bool SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
event.kbd.ascii = mapKey(SDLK_F5, (SDLMod)ev.key.keysym.mod, 0);
break;
}
+ return true;
}
- return true;
}
bool SdlEventSource::handleJoyAxisMotion(SDL_Event &ev, Common::Event &event) {
@@ -968,9 +975,8 @@ bool SdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
event.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
}
- // Nap center (space) to tab (default action )
+ // Map center (space) to tab (default action)
// I wanted to map the calendar button but the calendar comes up
- //
else if (ev.key.keysym.sym == SDLK_SPACE) {
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = Common::KEYCODE_TAB;
@@ -1003,6 +1009,12 @@ void SdlEventSource::resetKeyboardEmulation(int16 x_max, int16 y_max) {
_km.joy_y = 0;
}
+void SdlEventSource::fakeWarpMouse(const int x, const int y) {
+ _queuedFakeMouseMove = true;
+ _fakeMouseMove.type = Common::EVENT_MOUSEMOVE;
+ _fakeMouseMove.mouse = Common::Point(x, y);
+}
+
bool SdlEventSource::handleResizeEvent(Common::Event &event, int w, int h) {
if (_graphicsManager) {
_graphicsManager->notifyResize(w, h);
diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index cf445e9e2c..5fd3cb7ea5 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -51,6 +51,12 @@ public:
*/
virtual void resetKeyboardEmulation(int16 x_max, int16 y_max);
+ /**
+ * Emulates a mouse movement that would normally be caused by a mouse warp
+ * of the system mouse.
+ */
+ void fakeWarpMouse(const int x, const int y);
+
protected:
/** @name Keyboard mouse emulation
* Disabled by fingolfin 2004-12-18.
@@ -117,7 +123,7 @@ protected:
* Assigns the mouse coords to the mouse event. Furthermore notify the
* graphics manager about the position change.
*/
- virtual void processMouseEvent(Common::Event &event, int x, int y);
+ virtual bool processMouseEvent(Common::Event &event, int x, int y);
/**
* Remaps key events. This allows platforms to configure
@@ -156,6 +162,18 @@ protected:
*/
SDLKey obtainKeycode(const SDL_keysym keySym);
+ /**
+ * Whether _fakeMouseMove contains an event we need to send.
+ */
+ bool _queuedFakeMouseMove;
+
+ /**
+ * A fake mouse motion event sent when the graphics manager is told to warp
+ * the mouse but the system mouse is unable to be warped (e.g. because the
+ * window is not focused).
+ */
+ Common::Event _fakeMouseMove;
+
#if SDL_VERSION_ATLEAST(2, 0, 0)
/**
* Whether _fakeKeyUp contains an event we need to send.
diff --git a/backends/fs/riscos/riscos-fs-factory.cpp b/backends/fs/riscos/riscos-fs-factory.cpp
new file mode 100644
index 0000000000..b698bcb908
--- /dev/null
+++ b/backends/fs/riscos/riscos-fs-factory.cpp
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if defined(RISCOS)
+
+// Re-enable some forbidden symbols to avoid clashes with stat.h and unistd.h.
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+#include "backends/fs/riscos/riscos-fs-factory.h"
+#include "backends/fs/riscos/riscos-fs.h"
+
+#include <unistd.h>
+
+AbstractFSNode *RISCOSFilesystemFactory::makeRootFileNode() const {
+ return new RISCOSFilesystemNode("/");
+}
+
+AbstractFSNode *RISCOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
+ char buf[MAXPATHLEN];
+ return getcwd(buf, MAXPATHLEN) ? new RISCOSFilesystemNode(buf) : NULL;
+}
+
+AbstractFSNode *RISCOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+ assert(!path.empty());
+ return new RISCOSFilesystemNode(path);
+}
+#endif
diff --git a/backends/fs/riscos/riscos-fs-factory.h b/backends/fs/riscos/riscos-fs-factory.h
new file mode 100644
index 0000000000..4bed2b5f08
--- /dev/null
+++ b/backends/fs/riscos/riscos-fs-factory.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef RISCOS_FILESYSTEM_FACTORY_H
+#define RISCOS_FILESYSTEM_FACTORY_H
+
+#include "backends/fs/fs-factory.h"
+
+/**
+ * Creates RISCOSFilesystemNode objects.
+ *
+ * Parts of this class are documented in the base interface class, FilesystemFactory.
+ */
+class RISCOSFilesystemFactory : public FilesystemFactory {
+protected:
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
+};
+
+#endif /*RISCOS_FILESYSTEM_FACTORY_H*/
diff --git a/backends/fs/riscos/riscos-fs.cpp b/backends/fs/riscos/riscos-fs.cpp
new file mode 100644
index 0000000000..38d150e572
--- /dev/null
+++ b/backends/fs/riscos/riscos-fs.cpp
@@ -0,0 +1,323 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if defined(RISCOS)
+
+// Re-enable some forbidden symbols to avoid clashes with stat.h and unistd.h.
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+
+#include "backends/fs/riscos/riscos-fs.h"
+#include "backends/fs/stdiostream.h"
+#include "common/algorithm.h"
+
+#include <limits.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include <unixlib/local.h>
+#include <kernel.h>
+#include <swis.h>
+
+bool RISCOSFilesystemNode::exists() const {
+ return access(_path.c_str(), F_OK) == 0;
+}
+
+bool RISCOSFilesystemNode::isReadable() const {
+ return access(_path.c_str(), R_OK) == 0;
+}
+
+bool RISCOSFilesystemNode::isWritable() const {
+ return access(_path.c_str(), W_OK) == 0;
+}
+
+RISCOSFilesystemNode::RISCOSFilesystemNode(const Common::String &p) {
+ _path = p;
+ if (p == "/") {
+ _isDirectory = true;
+ _isValid = true;
+ } else {
+ int type = _swi(OS_File, _INR(0,1)|_RETURN(0), 20, toRISCOS(_path).c_str());
+ if (type == 0) {
+ _isDirectory = false;
+ _isValid = false;
+ } else if (type == 2) {
+ _isDirectory = true;
+ _isValid = true;
+ } else {
+ _isDirectory = false;
+ _isValid = true;
+ }
+ }
+}
+
+Common::String RISCOSFilesystemNode::toRISCOS(Common::String &path) {
+ char start[PATH_MAX];
+ char *end = __riscosify_std(path.c_str(), 0, start, PATH_MAX, 0);
+ return Common::String(start, end);
+}
+
+Common::String RISCOSFilesystemNode::toUnix(Common::String &path) {
+ Common::String out = Common::String(path);
+ uint32 start = 0;
+ if (out.contains("$")) {
+ char *x = strstr(out.c_str(), "$");
+ start = x ? x - out.c_str() : -1;
+ }
+
+ for (uint32 ptr = start; ptr < out.size(); ptr += 1) {
+ switch (out.c_str()[ptr]) {
+ case '.':
+ out.setChar('/', ptr);
+ break;
+ case '/':
+ out.setChar('.', ptr);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (out.contains("$"))
+ out = "/" + out;
+
+ return out;
+}
+
+AbstractFSNode *RISCOSFilesystemNode::getChild(const Common::String &n) const {
+ assert(!_path.empty());
+ assert(_isDirectory);
+
+ // Make sure the string contains no slashes
+ assert(!n.contains('/'));
+
+ // We assume here that _path is already normalized (hence don't bother to call
+ // Common::normalizePath on the final path).
+ Common::String newPath(_path);
+ if (_path.lastChar() != '/')
+ newPath += '/';
+ newPath += n;
+
+ return makeNode(newPath);
+}
+
+bool RISCOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
+ assert(_isDirectory);
+
+ if (_path == "/") {
+ // Special case for the root dir: List all drives
+ char fsname[PATH_MAX] = "";
+ for (int fsNum = 0; fsNum < 256; fsNum += 1) {
+ _swi(OS_FSControl, _INR(0,3), 33, fsNum, fsname, sizeof(fsname));
+ if (strcmp(fsname, "") != 0) {
+ if (!(fsNum == 46 || fsNum == 53 || fsNum == 99)) {
+ int drives = 9;
+ if (fsNum == 193)
+ drives = 23;
+
+ for (int discnum = 0; discnum <= drives; discnum += 1) {
+ const Common::String path = Common::String::format("%s::%d.$", fsname, discnum);
+ char outpath[PATH_MAX] = "";
+ if(_swix(OS_FSControl, _INR(0,2)|_IN(5), 37, path.c_str(), outpath, sizeof(outpath)) == NULL) {
+ int exist;
+ if (_swix(OS_File, _INR(0,1)|_OUT(0), 23, outpath, &exist) != NULL || exist != 2)
+ continue;
+
+ RISCOSFilesystemNode *entry = new RISCOSFilesystemNode();
+ entry->_isDirectory = true;
+ entry->_isValid = true;
+ entry->_path = Common::String::format("/%s", outpath);
+ entry->_displayName = outpath;
+ myList.push_back(entry);
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ int count = 0;
+ int read = 0;
+ char file[PATH_MAX];
+ Common::String dir = _path;
+
+ while (count != -1) {
+ _swix(OS_GBPB, _INR(0,5)|_OUTR(3,4), 9, toRISCOS(dir).c_str(), file, 1, count, sizeof(file), &read, &count);
+
+ if (count == -1)
+ continue;
+
+ // Start with a clone of this node, with the correct path set
+ RISCOSFilesystemNode entry(*this);
+ entry._displayName = file;
+ entry._displayName = toUnix(entry._displayName);
+ if (_path.lastChar() != '/')
+ entry._path += '/';
+ entry._path += entry._displayName;
+
+ int type = _swi(OS_File, _INR(0,1)|_RETURN(0), 20, toRISCOS(entry._path).c_str());
+ if (type == 0) {
+ continue;
+ } else if (type == 2) {
+ entry._isDirectory = true;
+ } else {
+ entry._isDirectory = false;
+ }
+
+ // Honor the chosen mode
+ if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
+ continue;
+
+ myList.push_back(new RISCOSFilesystemNode(entry));
+ }
+
+ return true;
+}
+
+AbstractFSNode *RISCOSFilesystemNode::getParent() const {
+ if (_path == "/")
+ return 0; // The filesystem root has no parent
+
+ const char *start = _path.c_str();
+ const char *end = start + _path.size();
+
+ // Strip of the last component. We make use of the fact that at this
+ // point, _path is guaranteed to be normalized
+ while (end > start && *(end-1) != '/')
+ end--;
+
+ if (end == start) {
+ // This only happens if we were called with a relative path, for which
+ // there simply is no parent.
+ // TODO: We could also resolve this by assuming that the parent is the
+ // current working directory, and returning a node referring to that.
+ return 0;
+ }
+
+ if (*(end-1) == '/' && end != start + 1)
+ end--;
+
+ return makeNode(Common::String(start, end));
+}
+
+Common::SeekableReadStream *RISCOSFilesystemNode::createReadStream() {
+ return StdioStream::makeFromPath(getPath(), false);
+}
+
+Common::WriteStream *RISCOSFilesystemNode::createWriteStream() {
+ return StdioStream::makeFromPath(getPath(), true);
+}
+
+bool RISCOSFilesystemNode::create(bool isDirectoryFlag) {
+ bool success;
+
+ if (isDirectoryFlag) {
+ success = _swix(OS_File, _INR(0,1), 8, toRISCOS(_path).c_str()) == NULL;
+ } else {
+ int fd = open(_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0755);
+ success = fd >= 0;
+
+ if (fd >= 0) {
+ close(fd);
+ }
+ }
+
+ if (success) {
+ if (exists()) {
+ _isDirectory = _swi(OS_File, _INR(0,1)|_RETURN(0), 20, toRISCOS(_path).c_str()) == 2;
+ if (_isDirectory != isDirectoryFlag) warning("failed to create %s: got %s", isDirectoryFlag ? "directory" : "file", _isDirectory ? "directory" : "file");
+ return _isDirectory == isDirectoryFlag;
+ }
+
+ warning("RISCOSFilesystemNode: Attempting to create a %s was a success, but access indicates there is no such %s",
+ isDirectoryFlag ? "directory" : "file", isDirectoryFlag ? "directory" : "file");
+ return false;
+ }
+
+ return false;
+}
+
+namespace Riscos {
+
+bool assureDirectoryExists(const Common::String &dir, const char *prefix) {
+ AbstractFSNode *node;
+
+ // Check whether the prefix exists if one is supplied.
+ if (prefix) {
+ node = new RISCOSFilesystemNode(prefix);
+ if (!node->isDirectory()) {
+ return false;
+ }
+ }
+
+ // Obtain absolute path.
+ Common::String path;
+ if (prefix) {
+ path = prefix;
+ path += '/';
+ path += dir;
+ } else {
+ path = dir;
+ }
+
+ path = Common::normalizePath(path, '/');
+
+ const Common::String::iterator end = path.end();
+ Common::String::iterator cur = path.begin();
+ if (*cur == '/')
+ ++cur;
+
+ do {
+ if (cur + 1 != end) {
+ if (*cur != '/') {
+ continue;
+ }
+
+ // It is kind of ugly and against the purpose of Common::String to
+ // insert 0s inside, but this is just for a local string and
+ // simplifies the code a lot.
+ *cur = '\0';
+ }
+
+ node = new RISCOSFilesystemNode(path);
+ if (!node->create(true)) {
+ if (node->exists()) {
+ if (!node->isDirectory()) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ *cur = '/';
+ } while (cur++ != end);
+
+ return true;
+}
+
+} // End of namespace RISCOS
+
+#endif //#if defined(RISCOS)
diff --git a/backends/fs/riscos/riscos-fs.h b/backends/fs/riscos/riscos-fs.h
new file mode 100644
index 0000000000..b02f30bce7
--- /dev/null
+++ b/backends/fs/riscos/riscos-fs.h
@@ -0,0 +1,105 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef RISCOS_FILESYSTEM_H
+#define RISCOS_FILESYSTEM_H
+
+#include "backends/fs/abstract-fs.h"
+
+/**
+ * Implementation of the ScummVM file system API.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class RISCOSFilesystemNode : public AbstractFSNode {
+protected:
+ Common::String _displayName;
+ Common::String _path;
+ bool _isDirectory;
+ bool _isValid;
+
+ virtual AbstractFSNode *makeNode(const Common::String &path) const {
+ return new RISCOSFilesystemNode(path);
+ }
+
+ /**
+ * Plain constructor, for internal use only (hence protected).
+ */
+ RISCOSFilesystemNode() : _isDirectory(false), _isValid(false) {}
+public:
+ /**
+ * Creates a RISCOSFilesystemNode for a given path.
+ *
+ * @param path the path the new node should point to.
+ */
+ RISCOSFilesystemNode(const Common::String &path);
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
+ virtual bool isDirectory() const { return _isDirectory; }
+ virtual bool isReadable() const;
+ virtual bool isWritable() const;
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+ virtual bool create(bool isDirectoryFlag);
+
+private:
+ /**
+ * Converts a Unix style path to a RISC OS style path.
+ *
+ * @param str Unix style path to convert.
+ * @return RISC OS style path.
+ */
+ static Common::String toRISCOS(Common::String &path);
+
+ /**
+ * Converts a RISC OS style path to a Unix style path.
+ *
+ * @param str RISC OS style path to convert.
+ * @return Unix style path.
+ */
+ static Common::String toUnix(Common::String &path);
+
+};
+
+namespace Riscos {
+
+/**
+ * Assure that a directory path exists.
+ *
+ * @param dir The path which is required to exist.
+ * @param prefix An (optional) prefix which should not be created if non existent.
+ * prefix is prepended to dir if supplied.
+ * @return true in case the directoy exists (or was created), false otherwise.
+ */
+bool assureDirectoryExists(const Common::String &dir, const char *prefix = nullptr);
+
+} // End of namespace RISCOS
+
+#endif
diff --git a/backends/graphics/default-palette.h b/backends/graphics/default-palette.h
index a66e1862b7..e1b4c5cb22 100644
--- a/backends/graphics/default-palette.h
+++ b/backends/graphics/default-palette.h
@@ -51,7 +51,7 @@ public:
memcpy(_palette + 3 * start, colors, 3 * num);
setPaletteIntern(colors, start, num);
}
- void grabPalette(byte *colors, uint start, uint num) {
+ void grabPalette(byte *colors, uint start, uint num) const {
assert(start + num <= 256);
memcpy(colors, _palette + 3 * start, 3 * num);
}
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index 9e75dd10f4..7d5f542ac0 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -75,7 +75,6 @@ bool DINGUXSdlGraphicsManager::setGraphicsMode(int mode) {
return false;
}
- _transactionDetails.normal1xScaler = (mode == GFX_NORMAL);
if (_oldVideoMode.setup && _oldVideoMode.scaleFactor != newScaleFactor)
_transactionDetails.needHotswap = true;
@@ -107,11 +106,11 @@ void DINGUXSdlGraphicsManager::setGraphicsModeIntern() {
_scalerProc = newScalerProc;
- if (!_screen || !_hwscreen)
+ if (!_screen || !_hwScreen)
return;
// Blit everything to the screen
- _forceFull = true;
+ _forceRedraw = true;
// Even if the old and new scale factors are the same, we may have a
// different scaler for the cursor now.
@@ -137,7 +136,7 @@ void DINGUXSdlGraphicsManager::initSize(uint w, uint h) {
}
void DINGUXSdlGraphicsManager::drawMouse() {
- if (!_mouseVisible || !_mouseSurface) {
+ if (!_cursorVisible || !_mouseSurface) {
_mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0;
return;
}
@@ -147,11 +146,11 @@ void DINGUXSdlGraphicsManager::drawMouse() {
int hotX, hotY;
if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
- dst.x = _mouseCurState.x / 2;
- dst.y = _mouseCurState.y / 2;
+ dst.x = _cursorX / 2;
+ dst.y = _cursorY / 2;
} else {
- dst.x = _mouseCurState.x;
- dst.y = _mouseCurState.y;
+ dst.x = _cursorX;
+ dst.y = _cursorY;
}
if (!_overlayVisible) {
@@ -194,7 +193,7 @@ void DINGUXSdlGraphicsManager::drawMouse() {
// Note that SDL_BlitSurface() and addDirtyRect() will both perform any
// clipping necessary
- if (SDL_BlitSurface(_mouseSurface, NULL, _hwscreen, &dst) != 0)
+ if (SDL_BlitSurface(_mouseSurface, NULL, _hwScreen, &dst) != 0)
error("SDL_BlitSurface failed: %s", SDL_GetError());
// The screen will be updated using real surface coordinates, i.e.
@@ -227,8 +226,8 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
int scale1;
#if defined(DEBUG) && ! defined(_WIN32_WCE) // definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?)
- assert(_hwscreen != NULL);
- assert(_hwscreen->map->sw_data != NULL);
+ assert(_hwScreen != NULL);
+ assert(_hwScreen->map->sw_data != NULL);
#endif
// If the shake position changed, fill the dirty area with blackness
@@ -238,11 +237,11 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
blackrect.h = real2Aspect(blackrect.h - 1) + 1;
- SDL_FillRect(_hwscreen, &blackrect, 0);
+ SDL_FillRect(_hwScreen, &blackrect, 0);
_currentShakePos = _newShakePos;
- _forceFull = true;
+ _forceRedraw = true;
}
// Check whether the palette was changed in the meantime and update the
@@ -254,7 +253,7 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
_paletteDirtyEnd = 0;
- _forceFull = true;
+ _forceRedraw = true;
}
if (!_overlayVisible) {
@@ -275,7 +274,7 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
// Add the area covered by the mouse cursor to the list of dirty rects if
// we have to redraw the mouse.
- if (_mouseNeedsRedraw)
+ if (_cursorNeedsRedraw)
undrawMouse();
#ifdef USE_OSD
@@ -283,7 +282,7 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
#endif
// Force a full redraw if requested
- if (_forceFull) {
+ if (_forceRedraw) {
_numDirtyRects = 1;
_dirtyRectList[0].x = 0;
_dirtyRectList[0].y = 0;
@@ -292,7 +291,7 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
}
// Only draw anything if necessary
- if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
+ if (_numDirtyRects > 0 || _cursorNeedsRedraw) {
SDL_Rect *r;
SDL_Rect dst;
uint32 srcPitch, dstPitch;
@@ -308,10 +307,10 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
}
SDL_LockSurface(srcSurf);
- SDL_LockSurface(_hwscreen);
+ SDL_LockSurface(_hwScreen);
srcPitch = srcSurf->pitch;
- dstPitch = _hwscreen->pitch;
+ dstPitch = _hwScreen->pitch;
for (r = _dirtyRectList; r != lastRect; ++r) {
register int dst_y = r->y + _currentShakePos;
@@ -351,11 +350,11 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
dst_y = dst_y / 2;
scalerProc((byte *)srcSurf->pixels + (src_x * 2 + 2) + (src_y + 1) * srcPitch, srcPitch,
- (byte *)_hwscreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h);
+ (byte *)_hwScreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h);
} else {
scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
- (byte *)_hwscreen->pixels + r->x * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
+ (byte *)_hwScreen->pixels + r->x * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
}
}
@@ -373,17 +372,17 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
- r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
+ r->h = stretch200To240((uint8 *) _hwScreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
#endif
}
SDL_UnlockSurface(srcSurf);
- SDL_UnlockSurface(_hwscreen);
+ SDL_UnlockSurface(_hwScreen);
// Readjust the dirty rect list in case we are doing a full update.
// This is necessary if shaking is active.
- if (_forceFull) {
+ if (_forceRedraw) {
_dirtyRectList[0].y = 0;
- _dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? effectiveScreenHeight() / 2 : effectiveScreenHeight();
+ _dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? _videoMode.hardwareHeight / 2 : _videoMode.hardwareHeight;
}
drawMouse();
@@ -392,26 +391,26 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
drawOSD();
#endif
// Finally, blit all our changes to the screen
- SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
+ SDL_UpdateRects(_hwScreen, _numDirtyRects, _dirtyRectList);
}
_numDirtyRects = 0;
- _forceFull = false;
- _mouseNeedsRedraw = false;
+ _forceRedraw = false;
+ _cursorNeedsRedraw = false;
}
void DINGUXSdlGraphicsManager::showOverlay() {
if (_videoMode.mode == GFX_HALF) {
- _mouseCurState.x = _mouseCurState.x / 2;
- _mouseCurState.y = _mouseCurState.y / 2;
+ _cursorX = _cursorX / 2;
+ _cursorY = _cursorY / 2;
}
SurfaceSdlGraphicsManager::showOverlay();
}
void DINGUXSdlGraphicsManager::hideOverlay() {
if (_videoMode.mode == GFX_HALF) {
- _mouseCurState.x = _mouseCurState.x * 2;
- _mouseCurState.y = _mouseCurState.y * 2;
+ _cursorX = _cursorX * 2;
+ _cursorY = _cursorY * 2;
}
SurfaceSdlGraphicsManager::hideOverlay();
}
@@ -440,22 +439,25 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() {
_videoMode.overlayHeight = _videoMode.screenHeight / 2;
_videoMode.fullscreen = true;
} else {
-
_videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
_videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
- if (_videoMode.aspectRatioCorrection)
- _videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);
+ if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400)
+ _videoMode.aspectRatioCorrection = false;
_videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
- _videoMode.hardwareHeight = effectiveScreenHeight();
- }
+ _videoMode.hardwareHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
+ if (_videoMode.aspectRatioCorrection) {
+ _videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);
+ _videoMode.hardwareHeight = real2Aspect(_videoMode.hardwareHeight);
+ }
+ }
return SurfaceSdlGraphicsManager::loadGFXMode();
}
-bool DINGUXSdlGraphicsManager::hasFeature(OSystem::Feature f) {
+bool DINGUXSdlGraphicsManager::hasFeature(OSystem::Feature f) const {
return
(f == OSystem::kFeatureAspectRatioCorrection) ||
(f == OSystem::kFeatureCursorPalette);
@@ -475,7 +477,7 @@ void DINGUXSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
}
}
-bool DINGUXSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool DINGUXSdlGraphicsManager::getFeatureState(OSystem::Feature f) const {
assert(_transactionMode == kTransactionNone);
switch (f) {
@@ -488,16 +490,8 @@ bool DINGUXSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
}
}
-SurfaceSdlGraphicsManager::MousePos *DINGUXSdlGraphicsManager::getMouseCurState() {
- return &_mouseCurState;
-}
-
-SurfaceSdlGraphicsManager::VideoState *DINGUXSdlGraphicsManager::getVideoMode() {
- return &_videoMode;
-}
-
void DINGUXSdlGraphicsManager::warpMouse(int x, int y) {
- if (_mouseCurState.x != x || _mouseCurState.y != y) {
+ if (_cursorX != x || _cursorY != y) {
if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
x = x / 2;
y = y / 2;
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.h b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
index 8a356106ad..3a2a299a2f 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
@@ -36,26 +36,23 @@ class DINGUXSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
DINGUXSdlGraphicsManager(SdlEventSource *boss, SdlWindow *window);
- bool hasFeature(OSystem::Feature f);
- void setFeatureState(OSystem::Feature f, bool enable);
- bool getFeatureState(OSystem::Feature f);
- int getDefaultGraphicsMode() const;
-
- void initSize(uint w, uint h);
- const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- bool setGraphicsMode(const char *name);
- bool setGraphicsMode(int mode);
- void setGraphicsModeIntern();
- void internUpdateScreen();
- void showOverlay();
- void hideOverlay();
- bool loadGFXMode();
- void drawMouse();
- void undrawMouse();
- virtual void warpMouse(int x, int y);
-
- SurfaceSdlGraphicsManager::MousePos *getMouseCurState();
- SurfaceSdlGraphicsManager::VideoState *getVideoMode();
+ bool hasFeature(OSystem::Feature f) const override;
+ void setFeatureState(OSystem::Feature f, bool enable) override;
+ bool getFeatureState(OSystem::Feature f) const override;
+ int getDefaultGraphicsMode() const override;
+
+ void initSize(uint w, uint h) override;
+ const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
+ bool setGraphicsMode(const char *name) override;
+ bool setGraphicsMode(int mode) override;
+ void setGraphicsModeIntern() override;
+ void internUpdateScreen() override;
+ void showOverlay() override;
+ void hideOverlay() override;
+ bool loadGFXMode() override;
+ void drawMouse() override;
+ void undrawMouse() override;
+ void warpMouse(int x, int y) override;
virtual void transformMouseCoordinates(Common::Point &point);
};
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index a19512110f..9a97e97aa5 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -69,7 +69,6 @@ bool GPHGraphicsManager::setGraphicsMode(int mode) {
return false;
}
- _transactionDetails.normal1xScaler = (mode == GFX_NORMAL);
if (_oldVideoMode.setup && _oldVideoMode.scaleFactor != newScaleFactor)
_transactionDetails.needHotswap = true;
@@ -99,11 +98,11 @@ void GPHGraphicsManager::setGraphicsModeIntern() {
_scalerProc = newScalerProc;
- if (!_screen || !_hwscreen)
+ if (!_screen || !_hwScreen)
return;
// Blit everything to the screen
- _forceFull = true;
+ _forceRedraw = true;
// Even if the old and new scale factors are the same, we may have a
// different scaler for the cursor now.
@@ -151,7 +150,7 @@ void GPHGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *f
}
void GPHGraphicsManager::drawMouse() {
- if (!_mouseVisible || !_mouseSurface) {
+ if (!_cursorVisible || !_mouseSurface) {
_mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0;
return;
}
@@ -162,11 +161,11 @@ void GPHGraphicsManager::drawMouse() {
int hotX, hotY;
if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
- dst.x = _mouseCurState.x / 2;
- dst.y = _mouseCurState.y / 2;
+ dst.x = _cursorX / 2;
+ dst.y = _cursorY / 2;
} else {
- dst.x = _mouseCurState.x;
- dst.y = _mouseCurState.y;
+ dst.x = _cursorX;
+ dst.y = _cursorY;
}
if (!_overlayVisible) {
@@ -213,7 +212,7 @@ void GPHGraphicsManager::drawMouse() {
// Note that SDL_BlitSurface() and addDirtyRect() will both perform any
// clipping necessary
- if (SDL_BlitSurface(_mouseSurface, NULL, _hwscreen, &dst) != 0)
+ if (SDL_BlitSurface(_mouseSurface, NULL, _hwScreen, &dst) != 0)
error("SDL_BlitSurface failed: %s", SDL_GetError());
// The screen will be updated using real surface coordinates, i.e.
@@ -246,23 +245,23 @@ void GPHGraphicsManager::internUpdateScreen() {
int scale1;
#if defined(DEBUG)
- assert(_hwscreen != NULL);
- assert(_hwscreen->map->sw_data != NULL);
+ assert(_hwScreen != NULL);
+ assert(_hwScreen->map->sw_data != NULL);
#endif
// If the shake position changed, fill the dirty area with blackness
if (_currentShakePos != _newShakePos ||
- (_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
+ (_cursorNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
SDL_Rect blackrect = {0, 0, _videoMode.screenWidth *_videoMode.scaleFactor, _newShakePos *_videoMode.scaleFactor};
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
blackrect.h = real2Aspect(blackrect.h - 1) + 1;
- SDL_FillRect(_hwscreen, &blackrect, 0);
+ SDL_FillRect(_hwScreen, &blackrect, 0);
_currentShakePos = _newShakePos;
- _forceFull = true;
+ _forceRedraw = true;
}
// Check whether the palette was changed in the meantime and update the
@@ -274,7 +273,7 @@ void GPHGraphicsManager::internUpdateScreen() {
_paletteDirtyEnd = 0;
- _forceFull = true;
+ _forceRedraw = true;
}
if (!_overlayVisible) {
@@ -296,7 +295,7 @@ void GPHGraphicsManager::internUpdateScreen() {
// Add the area covered by the mouse cursor to the list of dirty rects if
// we have to redraw the mouse.
- if (_mouseNeedsRedraw)
+ if (_cursorNeedsRedraw)
undrawMouse();
#ifdef USE_OSD
@@ -304,7 +303,7 @@ void GPHGraphicsManager::internUpdateScreen() {
#endif
// Force a full redraw if requested
- if (_forceFull) {
+ if (_forceRedraw) {
_numDirtyRects = 1;
_dirtyRectList[0].x = 0;
_dirtyRectList[0].y = 0;
@@ -312,11 +311,11 @@ void GPHGraphicsManager::internUpdateScreen() {
_dirtyRectList[0].h = height;
// HACK: Make sure the full hardware screen is wiped clean.
- SDL_FillRect(_hwscreen, NULL, 0);
+ SDL_FillRect(_hwScreen, NULL, 0);
}
// Only draw anything if necessary
- if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
+ if (_numDirtyRects > 0 || _cursorNeedsRedraw) {
SDL_Rect *r;
SDL_Rect dst;
uint32 srcPitch, dstPitch;
@@ -332,10 +331,10 @@ void GPHGraphicsManager::internUpdateScreen() {
}
SDL_LockSurface(srcSurf);
- SDL_LockSurface(_hwscreen);
+ SDL_LockSurface(_hwScreen);
srcPitch = srcSurf->pitch;
- dstPitch = _hwscreen->pitch;
+ dstPitch = _hwScreen->pitch;
for (r = _dirtyRectList; r != lastRect; ++r) {
register int dst_y = r->y + _currentShakePos;
@@ -375,10 +374,10 @@ void GPHGraphicsManager::internUpdateScreen() {
dst_y = dst_y / 2;
scalerProc((byte *)srcSurf->pixels + (src_x * 2 + 2) + (src_y + 1) * srcPitch, srcPitch,
- (byte *)_hwscreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h);
+ (byte *)_hwScreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h);
} else {
scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
- (byte *)_hwscreen->pixels + r->x * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
+ (byte *)_hwScreen->pixels + r->x * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
}
}
@@ -396,17 +395,17 @@ void GPHGraphicsManager::internUpdateScreen() {
#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
- r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
+ r->h = stretch200To240((uint8 *) _hwScreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
#endif
}
SDL_UnlockSurface(srcSurf);
- SDL_UnlockSurface(_hwscreen);
+ SDL_UnlockSurface(_hwScreen);
// Readjust the dirty rect list in case we are doing a full update.
// This is necessary if shaking is active.
- if (_forceFull) {
+ if (_forceRedraw) {
_dirtyRectList[0].y = 0;
- _dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? effectiveScreenHeight() / 2 : effectiveScreenHeight();
+ _dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? _videoMode.hardwareHeight / 2 : _videoMode.hardwareHeight;
}
drawMouse();
@@ -416,26 +415,26 @@ void GPHGraphicsManager::internUpdateScreen() {
#endif
// Finally, blit all our changes to the screen
- SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
+ SDL_UpdateRects(_hwScreen, _numDirtyRects, _dirtyRectList);
}
_numDirtyRects = 0;
- _forceFull = false;
- _mouseNeedsRedraw = false;
+ _forceRedraw = false;
+ _cursorNeedsRedraw = false;
}
void GPHGraphicsManager::showOverlay() {
if (_videoMode.mode == GFX_HALF) {
- _mouseCurState.x = _mouseCurState.x / 2;
- _mouseCurState.y = _mouseCurState.y / 2;
+ _cursorX = _cursorX / 2;
+ _cursorY = _cursorY / 2;
}
SurfaceSdlGraphicsManager::showOverlay();
}
void GPHGraphicsManager::hideOverlay() {
if (_videoMode.mode == GFX_HALF) {
- _mouseCurState.x = _mouseCurState.x * 2;
- _mouseCurState.y = _mouseCurState.y * 2;
+ _cursorX = _cursorX * 2;
+ _cursorY = _cursorY * 2;
}
SurfaceSdlGraphicsManager::hideOverlay();
}
@@ -478,7 +477,7 @@ bool GPHGraphicsManager::loadGFXMode() {
return true;
}
-bool GPHGraphicsManager::hasFeature(OSystem::Feature f) {
+bool GPHGraphicsManager::hasFeature(OSystem::Feature f) const {
return
(f == OSystem::kFeatureAspectRatioCorrection) ||
(f == OSystem::kFeatureCursorPalette);
@@ -498,7 +497,7 @@ void GPHGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
}
}
-bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) const {
assert(_transactionMode == kTransactionNone);
switch (f) {
@@ -511,16 +510,8 @@ bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) {
}
}
-SurfaceSdlGraphicsManager::MousePos *GPHGraphicsManager::getMouseCurState() {
- return &_mouseCurState;
-}
-
-SurfaceSdlGraphicsManager::VideoState *GPHGraphicsManager::getVideoMode() {
- return &_videoMode;
-}
-
void GPHGraphicsManager::warpMouse(int x, int y) {
- if (_mouseCurState.x != x || _mouseCurState.y != y) {
+ if (_cursorX != x || _cursorY != y) {
if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
x = x / 2;
y = y / 2;
diff --git a/backends/graphics/gph/gph-graphics.h b/backends/graphics/gph/gph-graphics.h
index 152d29ddf4..69e3b8947f 100644
--- a/backends/graphics/gph/gph-graphics.h
+++ b/backends/graphics/gph/gph-graphics.h
@@ -35,26 +35,23 @@ class GPHGraphicsManager : public SurfaceSdlGraphicsManager {
public:
GPHGraphicsManager(SdlEventSource *boss, SdlWindow *window);
- bool hasFeature(OSystem::Feature f);
- void setFeatureState(OSystem::Feature f, bool enable);
- bool getFeatureState(OSystem::Feature f);
- int getDefaultGraphicsMode() const;
-
- void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
- const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- bool setGraphicsMode(const char *name);
- bool setGraphicsMode(int mode);
- void setGraphicsModeIntern();
- void internUpdateScreen();
- void showOverlay();
- void hideOverlay();
- bool loadGFXMode();
- void drawMouse();
- void undrawMouse();
- virtual void warpMouse(int x, int y);
-
- SurfaceSdlGraphicsManager::MousePos *getMouseCurState();
- SurfaceSdlGraphicsManager::VideoState *getVideoMode();
+ bool hasFeature(OSystem::Feature f) const override;
+ void setFeatureState(OSystem::Feature f, bool enable) override;
+ bool getFeatureState(OSystem::Feature f) const;
+ int getDefaultGraphicsMode() const override;
+
+ void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL) override;
+ const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
+ bool setGraphicsMode(const char *name) override;
+ bool setGraphicsMode(int mode) override;
+ void setGraphicsModeIntern() override;
+ void internUpdateScreen() override;
+ void showOverlay() override;
+ void hideOverlay() override;
+ bool loadGFXMode() override;
+ void drawMouse() override;
+ void undrawMouse() override;
+ void warpMouse(int x, int y) override;
virtual void transformMouseCoordinates(Common::Point &point);
};
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index 35f2fa1cb6..d5c36c13c4 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -27,6 +27,7 @@
#include "common/noncopyable.h"
#include "common/keyboard.h"
+#include "graphics/mode.h"
#include "graphics/palette.h"
/**
@@ -37,9 +38,9 @@ class GraphicsManager : public PaletteManager {
public:
virtual ~GraphicsManager() {}
- virtual bool hasFeature(OSystem::Feature f) = 0;
+ virtual bool hasFeature(OSystem::Feature f) const = 0;
virtual void setFeatureState(OSystem::Feature f, bool enable) = 0;
- virtual bool getFeatureState(OSystem::Feature f) = 0;
+ virtual bool getFeatureState(OSystem::Feature f) const = 0;
virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const = 0;
virtual int getDefaultGraphicsMode() const = 0;
@@ -58,15 +59,16 @@ public:
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0;
#endif
virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) = 0;
+ virtual void initSizeHint(const Graphics::ModeList &modes) {}
virtual int getScreenChangeID() const = 0;
virtual void beginGFXTransaction() = 0;
virtual OSystem::TransactionError endGFXTransaction() = 0;
- virtual int16 getHeight() = 0;
- virtual int16 getWidth() = 0;
+ virtual int16 getHeight() const = 0;
+ virtual int16 getWidth() const = 0;
virtual void setPalette(const byte *colors, uint start, uint num) = 0;
- virtual void grabPalette(byte *colors, uint start, uint num) = 0;
+ virtual void grabPalette(byte *colors, uint start, uint num) const = 0;
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) = 0;
virtual Graphics::Surface *lockScreen() = 0;
virtual void unlockScreen() = 0;
@@ -80,10 +82,10 @@ public:
virtual void hideOverlay() = 0;
virtual Graphics::PixelFormat getOverlayFormat() const = 0;
virtual void clearOverlay() = 0;
- virtual void grabOverlay(void *buf, int pitch) = 0;
- virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h)= 0;
- virtual int16 getOverlayHeight() = 0;
- virtual int16 getOverlayWidth() = 0;
+ virtual void grabOverlay(void *buf, int pitch) const = 0;
+ virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) = 0;
+ virtual int16 getOverlayHeight() const = 0;
+ virtual int16 getOverlayWidth() const = 0;
virtual bool showMouse(bool visible) = 0;
virtual void warpMouse(int x, int y) = 0;
@@ -96,7 +98,7 @@ public:
// Graphics::PaletteManager interface
//virtual void setPalette(const byte *colors, uint start, uint num) = 0;
- //virtual void grabPalette(byte *colors, uint start, uint num) = 0;
+ //virtual void grabPalette(byte *colors, uint start, uint num) const = 0;
};
#endif
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index 6a920e9eae..b61ee690bb 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -79,7 +79,6 @@ bool LinuxmotoSdlGraphicsManager::setGraphicsMode(int mode) {
return false;
}
- _transactionDetails.normal1xScaler = (mode == GFX_NORMAL);
if (_oldVideoMode.setup && _oldVideoMode.scaleFactor != newScaleFactor)
_transactionDetails.needHotswap = true;
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
index d7a13b1cb4..e7f96e877c 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
@@ -29,18 +29,18 @@ class LinuxmotoSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
LinuxmotoSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
- virtual void initSize(uint w, uint h);
- virtual void setGraphicsModeIntern();
- virtual bool setGraphicsMode(int mode);
- virtual void internUpdateScreen();
- virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- virtual int getDefaultGraphicsMode() const;
- virtual bool loadGFXMode();
- virtual void drawMouse();
- virtual void undrawMouse();
- virtual void showOverlay();
- virtual void hideOverlay();
- virtual void warpMouse(int x, int y);
+ virtual void initSize(uint w, uint h) override;
+ virtual void setGraphicsModeIntern() override;
+ virtual bool setGraphicsMode(int mode) override;
+ virtual void internUpdateScreen() override;
+ virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
+ virtual int getDefaultGraphicsMode() const override;
+ virtual bool loadGFXMode() override;
+ virtual void drawMouse() override;
+ virtual void undrawMouse() override;
+ virtual void showOverlay() override;
+ virtual void hideOverlay() override;
+ virtual void warpMouse(int x, int y) override;
virtual void transformMouseCoordinates(Common::Point &point);
};
diff --git a/backends/graphics/maemosdl/maemosdl-graphics.h b/backends/graphics/maemosdl/maemosdl-graphics.h
index 4cb84c81ee..ff4278b48c 100644
--- a/backends/graphics/maemosdl/maemosdl-graphics.h
+++ b/backends/graphics/maemosdl/maemosdl-graphics.h
@@ -32,7 +32,7 @@ public:
MaemoSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
protected:
- virtual bool loadGFXMode();
+ virtual bool loadGFXMode() override;
};
#endif
diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h
index 67306c29f3..4c628568ff 100644
--- a/backends/graphics/null/null-graphics.h
+++ b/backends/graphics/null/null-graphics.h
@@ -31,55 +31,55 @@ class NullGraphicsManager : public GraphicsManager {
public:
virtual ~NullGraphicsManager() {}
- bool hasFeature(OSystem::Feature f) { return false; }
- void setFeatureState(OSystem::Feature f, bool enable) {}
- bool getFeatureState(OSystem::Feature f) { return false; }
+ bool hasFeature(OSystem::Feature f) const override { return false; }
+ void setFeatureState(OSystem::Feature f, bool enable) override {}
+ bool getFeatureState(OSystem::Feature f) const override { return false; }
- const OSystem::GraphicsMode *getSupportedGraphicsModes() const { return s_noGraphicsModes; }
- int getDefaultGraphicsMode() const { return 0; }
- bool setGraphicsMode(int mode) { return true; }
- void resetGraphicsScale(){}
- int getGraphicsMode() const { return 0; }
- inline Graphics::PixelFormat getScreenFormat() const {
+ const OSystem::GraphicsMode *getSupportedGraphicsModes() const override { return s_noGraphicsModes; }
+ int getDefaultGraphicsMode() const override { return 0; }
+ bool setGraphicsMode(int mode) override { return true; }
+ void resetGraphicsScale() override {}
+ int getGraphicsMode() const override { return 0; }
+ inline Graphics::PixelFormat getScreenFormat() const override {
return Graphics::PixelFormat::createFormatCLUT8();
}
- inline Common::List<Graphics::PixelFormat> getSupportedFormats() const {
+ inline Common::List<Graphics::PixelFormat> getSupportedFormats() const override {
Common::List<Graphics::PixelFormat> list;
list.push_back(Graphics::PixelFormat::createFormatCLUT8());
return list;
}
- void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) {}
- virtual int getScreenChangeID() const { return 0; }
+ void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) override {}
+ virtual int getScreenChangeID() const override { return 0; }
- void beginGFXTransaction() {}
- OSystem::TransactionError endGFXTransaction() { return OSystem::kTransactionSuccess; }
+ void beginGFXTransaction() override {}
+ OSystem::TransactionError endGFXTransaction() override { return OSystem::kTransactionSuccess; }
- int16 getHeight() { return 0; }
- int16 getWidth() { return 0; }
- void setPalette(const byte *colors, uint start, uint num) {}
- void grabPalette(byte *colors, uint start, uint num) {}
- void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) {}
- Graphics::Surface *lockScreen() { return NULL; }
- void unlockScreen() {}
- void fillScreen(uint32 col) {}
- void updateScreen() {}
- void setShakePos(int shakeOffset) {}
- void setFocusRectangle(const Common::Rect& rect) {}
- void clearFocusRectangle() {}
+ int16 getHeight() const override { return 0; }
+ int16 getWidth() const override { return 0; }
+ void setPalette(const byte *colors, uint start, uint num) override {}
+ void grabPalette(byte *colors, uint start, uint num) const override {}
+ void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) override {}
+ Graphics::Surface *lockScreen() override { return NULL; }
+ void unlockScreen() override {}
+ void fillScreen(uint32 col) override {}
+ void updateScreen() override {}
+ void setShakePos(int shakeOffset) override {}
+ void setFocusRectangle(const Common::Rect& rect) override {}
+ void clearFocusRectangle() override {}
- void showOverlay() {}
- void hideOverlay() {}
- Graphics::PixelFormat getOverlayFormat() const { return Graphics::PixelFormat(); }
- void clearOverlay() {}
- void grabOverlay(void *buf, int pitch) {}
- void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) {}
- int16 getOverlayHeight() { return 0; }
- int16 getOverlayWidth() { return 0; }
+ void showOverlay() override {}
+ void hideOverlay() override {}
+ Graphics::PixelFormat getOverlayFormat() const override { return Graphics::PixelFormat(); }
+ void clearOverlay() override {}
+ void grabOverlay(void *buf, int pitch) const override {}
+ void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override {}
+ int16 getOverlayHeight() const override { return 0; }
+ int16 getOverlayWidth() const override { return 0; }
- bool showMouse(bool visible) { return !visible; }
- void warpMouse(int x, int y) {}
- void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) {}
- void setCursorPalette(const byte *colors, uint start, uint num) {}
+ bool showMouse(bool visible) override { return !visible; }
+ void warpMouse(int x, int y) override {}
+ void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) override {}
+ void setCursorPalette(const byte *colors, uint start, uint num) override {}
};
#endif
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 28ca110d91..7bac4c85cb 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -53,14 +53,12 @@ namespace OpenGL {
OpenGLGraphicsManager::OpenGLGraphicsManager()
: _currentState(), _oldState(), _transactionMode(kTransactionNone), _screenChangeID(1 << (sizeof(int) * 8 - 2)),
_pipeline(nullptr),
- _outputScreenWidth(0), _outputScreenHeight(0), _displayX(0), _displayY(0),
- _displayWidth(0), _displayHeight(0), _defaultFormat(), _defaultFormatAlpha(),
+ _defaultFormat(), _defaultFormatAlpha(),
_gameScreen(nullptr), _gameScreenShakeOffset(0), _overlay(nullptr),
- _overlayVisible(false), _cursor(nullptr),
- _cursorX(0), _cursorY(0), _cursorDisplayX(0),_cursorDisplayY(0), _cursorHotspotX(0), _cursorHotspotY(0),
+ _cursor(nullptr),
+ _cursorHotspotX(0), _cursorHotspotY(0),
_cursorHotspotXScaled(0), _cursorHotspotYScaled(0), _cursorWidthScaled(0), _cursorHeightScaled(0),
- _cursorKeyColor(0), _cursorVisible(false), _cursorDontScale(false), _cursorPaletteEnabled(false),
- _forceRedraw(false)
+ _cursorKeyColor(0), _cursorDontScale(false), _cursorPaletteEnabled(false)
#ifdef USE_OSD
, _osdMessageChangeRequest(false), _osdMessageAlpha(0), _osdMessageFadeStartTime(0), _osdMessageSurface(nullptr),
_osdIconSurface(nullptr)
@@ -83,7 +81,7 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() {
#endif
}
-bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) {
+bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) const {
switch (f) {
case OSystem::kFeatureAspectRatioCorrection:
case OSystem::kFeatureCursorPalette:
@@ -129,7 +127,7 @@ void OpenGLGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
}
}
-bool OpenGLGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool OpenGLGraphicsManager::getFeatureState(OSystem::Feature f) const {
switch (f) {
case OSystem::kFeatureAspectRatioCorrection:
return _currentState.aspectRatioCorrection;
@@ -220,10 +218,9 @@ OSystem::TransactionError OpenGLGraphicsManager::endGFXTransaction() {
#endif
do {
- uint requestedWidth = _currentState.gameWidth;
- uint requestedHeight = _currentState.gameHeight;
- const uint desiredAspect = getDesiredGameScreenAspect();
- requestedHeight = intToFrac(requestedWidth) / desiredAspect;
+ const uint desiredAspect = getDesiredGameAspectRatio();
+ const uint requestedWidth = _currentState.gameWidth;
+ const uint requestedHeight = intToFrac(requestedWidth) / desiredAspect;
if (!loadVideoMode(requestedWidth, requestedHeight,
#ifdef USE_RGB_COLOR
@@ -317,7 +314,7 @@ OSystem::TransactionError OpenGLGraphicsManager::endGFXTransaction() {
// Update our display area and cursor scaling. This makes sure we pick up
// aspect ratio correction and game screen changes correctly.
- recalculateDisplayArea();
+ recalculateDisplayAreas();
recalculateCursorScaling();
// Something changed, so update the screen change ID.
@@ -347,11 +344,11 @@ void OpenGLGraphicsManager::initSize(uint width, uint height, const Graphics::Pi
_currentState.gameHeight = height;
}
-int16 OpenGLGraphicsManager::getWidth() {
+int16 OpenGLGraphicsManager::getWidth() const {
return _currentState.gameWidth;
}
-int16 OpenGLGraphicsManager::getHeight() {
+int16 OpenGLGraphicsManager::getHeight() const {
return _currentState.gameHeight;
}
@@ -392,6 +389,7 @@ void OpenGLGraphicsManager::updateScreen() {
// We only update the screen when there actually have been any changes.
if ( !_forceRedraw
+ && !_cursorNeedsRedraw
&& !_gameScreen->isDirty()
&& !(_overlayVisible && _overlay->isDirty())
&& !(_cursorVisible && _cursor && _cursor->isDirty())
@@ -401,7 +399,6 @@ void OpenGLGraphicsManager::updateScreen() {
) {
return;
}
- _forceRedraw = false;
// Update changes to textures.
_gameScreen->updateGLTexture();
@@ -420,14 +417,14 @@ void OpenGLGraphicsManager::updateScreen() {
_backBuffer.enableScissorTest(true);
}
- const GLfloat shakeOffset = _gameScreenShakeOffset * (GLfloat)_displayHeight / _gameScreen->getHeight();
+ const GLfloat shakeOffset = _gameScreenShakeOffset * (GLfloat)_gameDrawRect.height() / _gameScreen->getHeight();
// First step: Draw the (virtual) game screen.
- g_context.getActivePipeline()->drawTexture(_gameScreen->getGLTexture(), _displayX, _displayY + shakeOffset, _displayWidth, _displayHeight);
+ g_context.getActivePipeline()->drawTexture(_gameScreen->getGLTexture(), _gameDrawRect.left, _gameDrawRect.top + shakeOffset, _gameDrawRect.width(), _gameDrawRect.height());
// Second step: Draw the overlay if visible.
if (_overlayVisible) {
- g_context.getActivePipeline()->drawTexture(_overlay->getGLTexture(), 0, 0, _outputScreenWidth, _outputScreenHeight);
+ g_context.getActivePipeline()->drawTexture(_overlay->getGLTexture(), 0, 0, _overlayDrawRect.width(), _overlayDrawRect.height());
}
// Third step: Draw the cursor if visible.
@@ -437,8 +434,8 @@ void OpenGLGraphicsManager::updateScreen() {
const GLfloat cursorOffset = _overlayVisible ? 0 : shakeOffset;
g_context.getActivePipeline()->drawTexture(_cursor->getGLTexture(),
- _cursorDisplayX - _cursorHotspotXScaled,
- _cursorDisplayY - _cursorHotspotYScaled + cursorOffset,
+ _cursorX - _cursorHotspotXScaled,
+ _cursorY - _cursorHotspotYScaled + cursorOffset,
_cursorWidthScaled, _cursorHeightScaled);
}
@@ -464,8 +461,8 @@ void OpenGLGraphicsManager::updateScreen() {
// Set the OSD transparency.
g_context.getActivePipeline()->setColor(1.0f, 1.0f, 1.0f, _osdMessageAlpha / 100.0f);
- int dstX = (_outputScreenWidth - _osdMessageSurface->getWidth()) / 2;
- int dstY = (_outputScreenHeight - _osdMessageSurface->getHeight()) / 2;
+ int dstX = (_windowWidth - _osdMessageSurface->getWidth()) / 2;
+ int dstY = (_windowHeight - _osdMessageSurface->getHeight()) / 2;
// Draw the OSD texture.
g_context.getActivePipeline()->drawTexture(_osdMessageSurface->getGLTexture(),
@@ -481,7 +478,7 @@ void OpenGLGraphicsManager::updateScreen() {
}
if (_osdIconSurface) {
- int dstX = _outputScreenWidth - _osdIconSurface->getWidth() - kOSDIconRightMargin;
+ int dstX = _windowWidth - _osdIconSurface->getWidth() - kOSDIconRightMargin;
int dstY = kOSDIconTopMargin;
// Draw the OSD icon texture.
@@ -490,6 +487,8 @@ void OpenGLGraphicsManager::updateScreen() {
}
#endif
+ _cursorNeedsRedraw = false;
+ _forceRedraw = false;
refreshScreen();
}
@@ -507,7 +506,7 @@ void OpenGLGraphicsManager::setFocusRectangle(const Common::Rect& rect) {
void OpenGLGraphicsManager::clearFocusRectangle() {
}
-int16 OpenGLGraphicsManager::getOverlayWidth() {
+int16 OpenGLGraphicsManager::getOverlayWidth() const {
if (_overlay) {
return _overlay->getWidth();
} else {
@@ -515,7 +514,7 @@ int16 OpenGLGraphicsManager::getOverlayWidth() {
}
}
-int16 OpenGLGraphicsManager::getOverlayHeight() {
+int16 OpenGLGraphicsManager::getOverlayHeight() const {
if (_overlay) {
return _overlay->getHeight();
} else {
@@ -523,22 +522,6 @@ int16 OpenGLGraphicsManager::getOverlayHeight() {
}
}
-void OpenGLGraphicsManager::showOverlay() {
- _overlayVisible = true;
- _forceRedraw = true;
-
- // Update cursor position.
- setMousePosition(_cursorX, _cursorY);
-}
-
-void OpenGLGraphicsManager::hideOverlay() {
- _overlayVisible = false;
- _forceRedraw = true;
-
- // Update cursor position.
- setMousePosition(_cursorX, _cursorY);
-}
-
Graphics::PixelFormat OpenGLGraphicsManager::getOverlayFormat() const {
return _overlay->getFormat();
}
@@ -551,7 +534,7 @@ void OpenGLGraphicsManager::clearOverlay() {
_overlay->fill(0);
}
-void OpenGLGraphicsManager::grabOverlay(void *buf, int pitch) {
+void OpenGLGraphicsManager::grabOverlay(void *buf, int pitch) const {
const Graphics::Surface *overlayData = _overlay->getSurface();
const byte *src = (const byte *)overlayData->getPixels();
@@ -564,55 +547,6 @@ void OpenGLGraphicsManager::grabOverlay(void *buf, int pitch) {
}
}
-bool OpenGLGraphicsManager::showMouse(bool visible) {
- // In case the mouse cursor visibility changed we need to redraw the whole
- // screen even when nothing else changed.
- if (_cursorVisible != visible) {
- _forceRedraw = true;
- }
-
- bool last = _cursorVisible;
- _cursorVisible = visible;
- return last;
-}
-
-void OpenGLGraphicsManager::warpMouse(int x, int y) {
- int16 currentX = _cursorX;
- int16 currentY = _cursorY;
- adjustMousePosition(currentX, currentY);
-
- // Check whether the (virtual) coordinate actually changed. If not, then
- // simply do nothing. This avoids ugly "jittering" due to the actual
- // output screen having a bigger resolution than the virtual coordinates.
- if (currentX == x && currentY == y) {
- return;
- }
-
- // Scale the virtual coordinates into actual physical coordinates.
- if (_overlayVisible) {
- if (!_overlay) {
- return;
- }
-
- // It might be confusing that we actually have to handle something
- // here when the overlay is visible. This is because for very small
- // resolutions we have a minimal overlay size and have to adjust
- // for that.
- x = (x * _outputScreenWidth) / _overlay->getWidth();
- y = (y * _outputScreenHeight) / _overlay->getHeight();
- } else {
- if (!_gameScreen) {
- return;
- }
-
- x = (x * _outputScreenWidth) / _gameScreen->getWidth();
- y = (y * _outputScreenHeight) / _gameScreen->getHeight();
- }
-
- setMousePosition(x, y);
- setInternalMousePosition(x, y);
-}
-
namespace {
template<typename DstPixel, typename SrcPixel>
void applyColorKey(DstPixel *dst, const SrcPixel *src, uint w, uint h, uint dstPitch, uint srcPitch, SrcPixel keyColor, DstPixel alphaMask) {
@@ -633,6 +567,18 @@ void applyColorKey(DstPixel *dst, const SrcPixel *src, uint w, uint h, uint dstP
} // End of anonymous namespace
void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
+
+ _cursorKeyColor = keycolor;
+ _cursorHotspotX = hotspotX;
+ _cursorHotspotY = hotspotY;
+ _cursorDontScale = dontScale;
+
+ if (!w || !h) {
+ delete _cursor;
+ _cursor = nullptr;
+ return;
+ }
+
Graphics::PixelFormat inputFormat;
#ifdef USE_RGB_COLOR
if (format) {
@@ -668,11 +614,6 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int
_cursor->enableLinearFiltering(_currentState.filtering);
}
- _cursorKeyColor = keycolor;
- _cursorHotspotX = hotspotX;
- _cursorHotspotY = hotspotY;
- _cursorDontScale = dontScale;
-
_cursor->allocate(w, h);
if (inputFormat.bytesPerPixel == 1) {
// For CLUT8 cursors we can simply copy the input data into the
@@ -720,7 +661,6 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int
updateCursorPalette();
}
- // Update the scaling.
recalculateCursorScaling();
}
@@ -765,8 +705,8 @@ void OpenGLGraphicsManager::osdMessageUpdateSurface() {
}
// Clip the rect
- width = MIN<uint>(width, _displayWidth);
- height = MIN<uint>(height, _displayHeight);
+ width = MIN<uint>(width, _gameDrawRect.width());
+ height = MIN<uint>(height, _gameDrawRect.height());
delete _osdMessageSurface;
_osdMessageSurface = nullptr;
@@ -849,16 +789,13 @@ void OpenGLGraphicsManager::setPalette(const byte *colors, uint start, uint num)
updateCursorPalette();
}
-void OpenGLGraphicsManager::grabPalette(byte *colors, uint start, uint num) {
+void OpenGLGraphicsManager::grabPalette(byte *colors, uint start, uint num) const {
assert(_gameScreen->hasPalette());
memcpy(colors, _gamePalette + start * 3, num * 3);
}
-void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) {
- _outputScreenWidth = width;
- _outputScreenHeight = height;
-
+void OpenGLGraphicsManager::handleResizeImpl(const int width, const int height) {
// Setup backbuffer size.
_backBuffer.setDimensions(width, height);
@@ -873,7 +810,7 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) {
// anyway. Thus, it should not be a real issue for modern hardware.
if ( overlayWidth > (uint)g_context.maxTextureSize
|| overlayHeight > (uint)g_context.maxTextureSize) {
- const frac_t outputAspect = intToFrac(_outputScreenWidth) / _outputScreenHeight;
+ const frac_t outputAspect = intToFrac(_windowWidth) / _windowHeight;
if (outputAspect > (frac_t)FRAC_ONE) {
overlayWidth = g_context.maxTextureSize;
@@ -906,7 +843,7 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) {
_overlay->fill(0);
// Re-setup the scaling for the screen and cursor
- recalculateDisplayArea();
+ recalculateDisplayAreas();
recalculateCursorScaling();
// Something changed, so update the screen change ID.
@@ -960,8 +897,8 @@ void OpenGLGraphicsManager::notifyContextCreate(const Graphics::PixelFormat &def
GL_CALL(glPixelStorei(GL_PACK_ALIGNMENT, 4));
// Refresh the output screen dimensions if some are set up.
- if (_outputScreenWidth != 0 && _outputScreenHeight != 0) {
- setActualScreenSize(_outputScreenWidth, _outputScreenHeight);
+ if (_windowWidth != 0 && _windowHeight != 0) {
+ handleResize(_windowWidth, _windowHeight);
}
// TODO: Should we try to convert textures into one of those formats if
@@ -1031,46 +968,6 @@ void OpenGLGraphicsManager::notifyContextDestroy() {
g_context.reset();
}
-void OpenGLGraphicsManager::adjustMousePosition(int16 &x, int16 &y) {
- if (_overlayVisible) {
- // It might be confusing that we actually have to handle something
- // here when the overlay is visible. This is because for very small
- // resolutions we have a minimal overlay size and have to adjust
- // for that.
- // This can also happen when the overlay is smaller than the actual
- // display size because of texture size limitations.
- if (_overlay) {
- x = (x * _overlay->getWidth()) / _outputScreenWidth;
- y = (y * _overlay->getHeight()) / _outputScreenHeight;
- }
- } else if (_gameScreen) {
- const int16 width = _gameScreen->getWidth();
- const int16 height = _gameScreen->getHeight();
-
- x = (x * width) / (int)_outputScreenWidth;
- y = (y * height) / (int)_outputScreenHeight;
- }
-}
-
-void OpenGLGraphicsManager::setMousePosition(int x, int y) {
- // Whenever the mouse position changed we force a screen redraw to reflect
- // changes properly.
- if (_cursorX != x || _cursorY != y) {
- _forceRedraw = true;
- }
-
- _cursorX = x;
- _cursorY = y;
-
- if (_overlayVisible) {
- _cursorDisplayX = x;
- _cursorDisplayY = y;
- } else {
- _cursorDisplayX = _displayX + (x * _displayWidth) / _outputScreenWidth;
- _cursorDisplayY = _displayY + (y * _displayHeight) / _outputScreenHeight;
- }
-}
-
Surface *OpenGLGraphicsManager::createSurface(const Graphics::PixelFormat &format, bool wantAlpha) {
GLenum glIntFormat, glFormat, glType;
if (format.bytesPerPixel == 1) {
@@ -1191,51 +1088,34 @@ bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelF
}
}
-frac_t OpenGLGraphicsManager::getDesiredGameScreenAspect() const {
- const uint width = _currentState.gameWidth;
- const uint height = _currentState.gameHeight;
-
+bool OpenGLGraphicsManager::gameNeedsAspectRatioCorrection() const {
if (_currentState.aspectRatioCorrection) {
+ const uint width = getWidth();
+ const uint height = getHeight();
+
// In case we enable aspect ratio correction we force a 4/3 ratio.
// But just for 320x200 and 640x400 games, since other games do not need
// this.
- if ((width == 320 && height == 200) || (width == 640 && height == 400)) {
- return intToFrac(4) / 3;
- }
+ return (width == 320 && height == 200) || (width == 640 && height == 400);
}
- return intToFrac(width) / height;
+ return false;
}
-void OpenGLGraphicsManager::recalculateDisplayArea() {
- if (!_gameScreen || _outputScreenHeight == 0) {
+void OpenGLGraphicsManager::recalculateDisplayAreas() {
+ if (!_gameScreen) {
return;
}
- const frac_t outputAspect = intToFrac(_outputScreenWidth) / _outputScreenHeight;
- const frac_t desiredAspect = getDesiredGameScreenAspect();
-
- _displayWidth = _outputScreenWidth;
- _displayHeight = _outputScreenHeight;
-
- // Adjust one dimension for mantaining the aspect ratio.
- if (outputAspect < desiredAspect) {
- _displayHeight = intToFrac(_displayWidth) / desiredAspect;
- } else if (outputAspect > desiredAspect) {
- _displayWidth = fracToInt(_displayHeight * desiredAspect);
- }
-
- // We center the screen in the middle for now.
- _displayX = (_outputScreenWidth - _displayWidth ) / 2;
- _displayY = (_outputScreenHeight - _displayHeight) / 2;
+ WindowedGraphicsManager::recalculateDisplayAreas();
// Setup drawing limitation for game graphics.
// This involves some trickery because OpenGL's viewport coordinate system
// is upside down compared to ours.
- _backBuffer.setScissorBox(_displayX,
- _outputScreenHeight - _displayHeight - _displayY,
- _displayWidth,
- _displayHeight);
+ _backBuffer.setScissorBox(_gameDrawRect.left,
+ _windowHeight - _gameDrawRect.height() - _gameDrawRect.top,
+ _gameDrawRect.width(),
+ _gameDrawRect.height());
// Update the cursor position to adjust for new display area.
setMousePosition(_cursorX, _cursorY);
@@ -1272,8 +1152,8 @@ void OpenGLGraphicsManager::recalculateCursorScaling() {
// In case scaling is actually enabled we will scale the cursor according
// to the game screen.
if (!_cursorDontScale) {
- const frac_t screenScaleFactorX = intToFrac(_displayWidth) / _gameScreen->getWidth();
- const frac_t screenScaleFactorY = intToFrac(_displayHeight) / _gameScreen->getHeight();
+ const frac_t screenScaleFactorX = intToFrac(_gameDrawRect.width()) / _gameScreen->getWidth();
+ const frac_t screenScaleFactorY = intToFrac(_gameDrawRect.height()) / _gameScreen->getHeight();
_cursorHotspotXScaled = fracToInt(_cursorHotspotXScaled * screenScaleFactorX);
_cursorWidthScaled = fracToInt(_cursorWidthScaled * screenScaleFactorX);
@@ -1284,14 +1164,14 @@ void OpenGLGraphicsManager::recalculateCursorScaling() {
}
#ifdef USE_OSD
-const Graphics::Font *OpenGLGraphicsManager::getFontOSD() {
+const Graphics::Font *OpenGLGraphicsManager::getFontOSD() const {
return FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
}
#endif
bool OpenGLGraphicsManager::saveScreenshot(const Common::String &filename) const {
- const uint width = _outputScreenWidth;
- const uint height = _outputScreenHeight;
+ const uint width = _windowWidth;
+ const uint height = _windowHeight;
// A line of a BMP image must have a size divisible by 4.
// We calculate the padding bytes needed here.
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index e02137bba7..df968aa67e 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -25,7 +25,7 @@
#include "backends/graphics/opengl/opengl-sys.h"
#include "backends/graphics/opengl/framebuffer.h"
-#include "backends/graphics/graphics.h"
+#include "backends/graphics/windowed.h"
#include "common/frac.h"
#include "common/mutex.h"
@@ -53,74 +53,69 @@ enum {
GFX_OPENGL = 0
};
-class OpenGLGraphicsManager : virtual public GraphicsManager {
+class OpenGLGraphicsManager : virtual public WindowedGraphicsManager {
public:
OpenGLGraphicsManager();
virtual ~OpenGLGraphicsManager();
// GraphicsManager API
- virtual bool hasFeature(OSystem::Feature f);
- virtual void setFeatureState(OSystem::Feature f, bool enable);
- virtual bool getFeatureState(OSystem::Feature f);
+ virtual bool hasFeature(OSystem::Feature f) const override;
+ virtual void setFeatureState(OSystem::Feature f, bool enable) override;
+ virtual bool getFeatureState(OSystem::Feature f) const override;
- virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- virtual int getDefaultGraphicsMode() const;
- virtual bool setGraphicsMode(int mode);
- virtual int getGraphicsMode() const;
+ virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
+ virtual int getDefaultGraphicsMode() const override;
+ virtual bool setGraphicsMode(int mode) override;
+ virtual int getGraphicsMode() const override;
- virtual void resetGraphicsScale() {}
+ virtual void resetGraphicsScale() override {}
#ifdef USE_RGB_COLOR
- virtual Graphics::PixelFormat getScreenFormat() const;
- virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0;
+ virtual Graphics::PixelFormat getScreenFormat() const override;
+ virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override = 0;
#endif
- virtual void beginGFXTransaction();
- virtual OSystem::TransactionError endGFXTransaction();
+ virtual void beginGFXTransaction() override;
+ virtual OSystem::TransactionError endGFXTransaction() override;
- virtual int getScreenChangeID() const;
+ virtual int getScreenChangeID() const override;
- virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format);
+ virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format) override;
- virtual int16 getWidth();
- virtual int16 getHeight();
+ virtual int16 getWidth() const override;
+ virtual int16 getHeight() const override;
- virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
- virtual void fillScreen(uint32 col);
+ virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) override;
+ virtual void fillScreen(uint32 col) override;
- virtual void setShakePos(int shakeOffset);
+ virtual void setShakePos(int shakeOffset) override;
- virtual void updateScreen();
+ virtual void updateScreen() override;
- virtual Graphics::Surface *lockScreen();
- virtual void unlockScreen();
+ virtual Graphics::Surface *lockScreen() override;
+ virtual void unlockScreen() override;
- virtual void setFocusRectangle(const Common::Rect& rect);
- virtual void clearFocusRectangle();
+ virtual void setFocusRectangle(const Common::Rect& rect) override;
+ virtual void clearFocusRectangle() override;
- virtual int16 getOverlayWidth();
- virtual int16 getOverlayHeight();
+ virtual int16 getOverlayWidth() const override;
+ virtual int16 getOverlayHeight() const override;
- virtual void showOverlay();
- virtual void hideOverlay();
+ virtual Graphics::PixelFormat getOverlayFormat() const override;
- virtual Graphics::PixelFormat getOverlayFormat() const;
+ virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override;
+ virtual void clearOverlay() override;
+ virtual void grabOverlay(void *buf, int pitch) const override;
- virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);
- virtual void clearOverlay();
- virtual void grabOverlay(void *buf, int pitch);
+ virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) override;
+ virtual void setCursorPalette(const byte *colors, uint start, uint num) override;
- virtual bool showMouse(bool visible);
- virtual void warpMouse(int x, int y);
- virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format);
- virtual void setCursorPalette(const byte *colors, uint start, uint num);
-
- virtual void displayMessageOnOSD(const char *msg);
- virtual void displayActivityIconOnOSD(const Graphics::Surface *icon);
+ virtual void displayMessageOnOSD(const char *msg) override;
+ virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
// PaletteManager interface
- virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void setPalette(const byte *colors, uint start, uint num) override;
+ virtual void grabPalette(byte *colors, uint start, uint num) const override;
protected:
/**
@@ -129,15 +124,6 @@ protected:
bool isGLESContext() const { return g_context.type == kContextGLES || g_context.type == kContextGLES2; }
/**
- * Set up the actual screen size available for the OpenGL code to do any
- * drawing.
- *
- * @param width The width of the screen.
- * @param height The height of the screen.
- */
- void setActualScreenSize(uint width, uint height);
-
- /**
* Sets the OpenGL (ES) type the graphics manager shall work with.
*
* This needs to be called at least once (and before ever calling
@@ -167,33 +153,6 @@ protected:
void notifyContextDestroy();
/**
- * Adjust the physical mouse coordinates according to the currently visible screen.
- */
- void adjustMousePosition(int16 &x, int16 &y);
-
- /**
- * Set up the mouse position for graphics output.
- *
- * @param x X coordinate in physical coordinates.
- * @param y Y coordinate in physical coordinates.
- */
- void setMousePosition(int x, int y);
-
- /**
- * Query the mouse position in physical coordinates.
- */
- void getMousePosition(int16 &x, int16 &y) const { x = _cursorX; y = _cursorY; }
-
- /**
- * Set up the mouse position for the (event) system.
- *
- * @param x X coordinate in physical coordinates.
- * @param y Y coordinate in physical coordinates.
- */
- virtual void setInternalMousePosition(int x, int y) = 0;
-
-private:
- /**
* Create a surface with the specified pixel format.
*
* @param format The pixel format the Surface object should accept as
@@ -241,7 +200,7 @@ private:
};
/**
- * The currently setup video state.
+ * The currently set up video state.
*/
VideoState _currentState;
@@ -292,8 +251,7 @@ protected:
virtual void refreshScreen() = 0;
/**
- * Save a screenshot of the full display as BMP to the given file. This
- * uses Common::DumpFile for writing the screenshot.
+ * Saves a screenshot of the entire window, excluding window decorations.
*
* @param filename The output filename.
* @return true on success, false otherwise
@@ -334,7 +292,6 @@ protected:
*/
virtual void *getProcAddress(const char *name) const = 0;
-private:
/**
* Try to determine the internal parameters for a given pixel format.
*
@@ -342,49 +299,9 @@ private:
*/
bool getGLPixelFormat(const Graphics::PixelFormat &pixelFormat, GLenum &glIntFormat, GLenum &glFormat, GLenum &glType) const;
- //
- // Actual hardware screen
- //
-
- /**
- * The width of the physical output.
- */
- uint _outputScreenWidth;
-
- /**
- * The height of the physical output.
- */
- uint _outputScreenHeight;
-
- /**
- * @return The desired aspect of the game screen.
- */
- frac_t getDesiredGameScreenAspect() const;
-
- /**
- * Recalculates the area used to display the game screen.
- */
- void recalculateDisplayArea();
-
- /**
- * The X coordinate of the game screen.
- */
- uint _displayX;
-
- /**
- * The Y coordinate of the game screen.
- */
- uint _displayY;
-
- /**
- * The width of the game screen in physical coordinates.
- */
- uint _displayWidth;
-
- /**
- * The height of the game screen in physical coordinates.
- */
- uint _displayHeight;
+ virtual bool gameNeedsAspectRatioCorrection() const override;
+ virtual void recalculateDisplayAreas() override;
+ virtual void handleResizeImpl(const int width, const int height) override;
/**
* The default pixel format of the backend.
@@ -396,12 +313,8 @@ private:
*/
Graphics::PixelFormat _defaultFormatAlpha;
- //
- // Game screen
- //
-
/**
- * The virtual game screen.
+ * The rendering surface for the virtual game screen.
*/
Surface *_gameScreen;
@@ -420,15 +333,10 @@ private:
//
/**
- * The overlay screen.
+ * The rendering surface for the overlay.
*/
Surface *_overlay;
- /**
- * Whether the overlay is visible or not.
- */
- bool _overlayVisible;
-
//
// Cursor
//
@@ -439,37 +347,17 @@ private:
void updateCursorPalette();
/**
- * The cursor image.
+ * The rendering surface for the mouse cursor.
*/
Surface *_cursor;
/**
- * X coordinate of the cursor in phyiscal coordinates.
- */
- int _cursorX;
-
- /**
- * Y coordinate of the cursor in physical coordinates.
- */
- int _cursorY;
-
- /**
- * X coordinate used for drawing the cursor.
- */
- int _cursorDisplayX;
-
- /**
- * Y coordinate used for drawing the cursor.
- */
- int _cursorDisplayY;
-
- /**
- * The X offset for the cursor hotspot in unscaled coordinates.
+ * The X offset for the cursor hotspot in unscaled game coordinates.
*/
int _cursorHotspotX;
/**
- * The Y offset for the cursor hotspot in unscaled coordinates.
+ * The Y offset for the cursor hotspot in unscaled game coordinates.
*/
int _cursorHotspotY;
@@ -480,22 +368,24 @@ private:
void recalculateCursorScaling();
/**
- * The X offset for the cursor hotspot in scaled coordinates.
+ * The X offset for the cursor hotspot in scaled game display area
+ * coordinates.
*/
int _cursorHotspotXScaled;
/**
- * The Y offset for the cursor hotspot in scaled coordinates.
+ * The Y offset for the cursor hotspot in scaled game display area
+ * coordinates.
*/
int _cursorHotspotYScaled;
/**
- * The width of the cursor scaled coordinates.
+ * The width of the cursor in scaled game display area coordinates.
*/
uint _cursorWidthScaled;
/**
- * The height of the cursor scaled coordinates.
+ * The height of the cursor in scaled game display area coordinates.
*/
uint _cursorHeightScaled;
@@ -505,11 +395,6 @@ private:
uint32 _cursorKeyColor;
/**
- * Whether the cursor is actually visible.
- */
- bool _cursorVisible;
-
- /**
* Whether no cursor scaling should be applied.
*/
bool _cursorDontScale;
@@ -524,15 +409,6 @@ private:
*/
byte _cursorPalette[3 * 256];
- //
- // Misc
- //
-
- /**
- * Whether the screen contents shall be forced to redrawn.
- */
- bool _forceRedraw;
-
#ifdef USE_OSD
//
// OSD
@@ -541,7 +417,7 @@ protected:
/**
* Returns the font used for on screen display
*/
- virtual const Graphics::Font *getFontOSD();
+ virtual const Graphics::Font *getFontOSD() const;
private:
/**
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index f664314862..c77e9dafc5 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -21,8 +21,10 @@
*/
#include "backends/graphics/openglsdl/openglsdl-graphics.h"
+#include "backends/graphics/opengl/texture.h"
#include "backends/events/sdl/sdl-events.h"
#include "backends/platform/sdl/sdl.h"
+#include "graphics/scaler/aspect.h"
#include "common/textconsole.h"
#include "common/config-manager.h"
@@ -35,7 +37,7 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(uint desktopWidth, uint deskt
#if SDL_VERSION_ATLEAST(2, 0, 0)
_glContext(),
#else
- _lastVideoModeLoad(0), _hwScreen(nullptr),
+ _lastVideoModeLoad(0),
#endif
_graphicsScale(2), _ignoreLoadVideoMode(false), _gotResize(false), _wantsFullScreen(false), _ignoreResizeEvents(0),
_desiredFullscreenWidth(0), _desiredFullscreenHeight(0) {
@@ -46,20 +48,22 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(uint desktopWidth, uint deskt
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- // Setup proper SDL OpenGL context creation.
+ // Set up proper SDL OpenGL context creation.
#if SDL_VERSION_ATLEAST(2, 0, 0)
OpenGL::ContextType glContextType;
// Context version 1.4 is choosen arbitrarily based on what most shader
// extensions were written against.
-#define DEFAULT_GL_MAJOR 1
-#define DEFAULT_GL_MINOR 4
+ enum {
+ DEFAULT_GL_MAJOR = 1,
+ DEFAULT_GL_MINOR = 4,
-#define DEFAULT_GLES_MAJOR 1
-#define DEFAULT_GLES_MINOR 1
+ DEFAULT_GLES_MAJOR = 1,
+ DEFAULT_GLES_MINOR = 1,
-#define DEFAULT_GLES2_MAJOR 2
-#define DEFAULT_GLES2_MINOR 0
+ DEFAULT_GLES2_MAJOR = 2,
+ DEFAULT_GLES2_MINOR = 0
+ };
#if USE_FORCED_GL
glContextType = OpenGL::kContextGL;
@@ -127,12 +131,6 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(uint desktopWidth, uint deskt
} else {
glContextType = OpenGL::kContextGL;
}
-#undef DEFAULT_GL_MAJOR
-#undef DEFAULT_GL_MINOR
-#undef DEFAULT_GLES_MAJOR
-#undef DEFAULT_GLES_MINOR
-#undef DEFAULT_GLES2_MAJOR
-#undef DEFAULT_GLES2_MINOR
#endif
setContextType(glContextType);
@@ -217,7 +215,7 @@ void OpenGLSdlGraphicsManager::deactivateManager() {
SdlGraphicsManager::deactivateManager();
}
-bool OpenGLSdlGraphicsManager::hasFeature(OSystem::Feature f) {
+bool OpenGLSdlGraphicsManager::hasFeature(OSystem::Feature f) const {
switch (f) {
case OSystem::kFeatureFullscreenMode:
case OSystem::kFeatureIconifyWindow:
@@ -246,7 +244,7 @@ void OpenGLSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
}
}
-bool OpenGLSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool OpenGLSdlGraphicsManager::getFeatureState(OSystem::Feature f) const {
switch (f) {
case OSystem::kFeatureFullscreenMode:
#if SDL_VERSION_ATLEAST(2, 0, 0)
@@ -268,22 +266,19 @@ bool OpenGLSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
}
}
-bool OpenGLSdlGraphicsManager::setGraphicsMode(int mode) {
+void OpenGLSdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *format) {
// HACK: This is stupid but the SurfaceSDL backend defaults to 2x. This
// assures that the launcher (which requests 320x200) has a reasonable
// size. It also makes small games have a reasonable size (i.e. at least
// 640x400). We follow the same logic here until we have a better way to
// give hints to our backend for that.
- _graphicsScale = 2;
-
- return OpenGLGraphicsManager::setGraphicsMode(mode);
-}
-
-void OpenGLSdlGraphicsManager::resetGraphicsScale() {
- OpenGLGraphicsManager::resetGraphicsScale();
+ if (w > 320) {
+ _graphicsScale = 1;
+ } else {
+ _graphicsScale = 2;
+ }
- // HACK: See OpenGLSdlGraphicsManager::setGraphicsMode.
- _graphicsScale = 1;
+ return OpenGLGraphicsManager::initSize(w, h, format);
}
#ifdef USE_RGB_COLOR
@@ -347,7 +342,7 @@ void OpenGLSdlGraphicsManager::updateScreen() {
void OpenGLSdlGraphicsManager::notifyVideoExpose() {
}
-void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height) {
+void OpenGLSdlGraphicsManager::notifyResize(const int width, const int height) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
// We sometime get outdated resize events from SDL2. So check that the size we get
// is the actual current window size. If not ignore the resize.
@@ -357,11 +352,10 @@ void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height)
// causes a SDL_WINDOWEVENT_RESIZED event with the old resolution to be sent, and this
// event is processed after recreating the window at the new resolution.
int currentWidth, currentHeight;
- getWindowDimensions(&currentWidth, &currentHeight);
- if (width != (uint)currentWidth || height != (uint)currentHeight)
+ getWindowSizeFromSdl(&currentWidth, &currentHeight);
+ if (width != currentWidth || height != currentHeight)
return;
- setActualScreenSize(width, height);
- _eventSource->resetKeyboardEmulation(width - 1, height - 1);
+ handleResize(width, height);
#else
if (!_ignoreResizeEvents && _hwScreen && !(_hwScreen->flags & SDL_FULLSCREEN)) {
// We save that we handled a resize event here. We need to know this
@@ -376,18 +370,6 @@ void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height)
#endif
}
-void OpenGLSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) {
- adjustMousePosition(point.x, point.y);
-}
-
-void OpenGLSdlGraphicsManager::notifyMousePos(Common::Point mouse) {
- setMousePosition(mouse.x, mouse.y);
-}
-
-void OpenGLSdlGraphicsManager::setInternalMousePosition(int x, int y) {
- _window->warpMouseInWindow(x, y);
-}
-
bool OpenGLSdlGraphicsManager::loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format) {
// In some cases we might not want to load the requested video mode. This
// will assure that the window size is not altered.
@@ -425,6 +407,11 @@ void *OpenGLSdlGraphicsManager::getProcAddress(const char *name) const {
return SDL_GL_GetProcAddress(name);
}
+void OpenGLSdlGraphicsManager::handleResizeImpl(const int width, const int height) {
+ OpenGLGraphicsManager::handleResizeImpl(width, height);
+ SdlGraphicsManager::handleResizeImpl(width, height);
+}
+
bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
// In case we request a fullscreen mode we will use the mode the user
// has chosen last time or the biggest mode available.
@@ -509,16 +496,8 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, _glContextMajor);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, _glContextMinor);
- if (!_window->createOrUpdateWindow(width, height, flags)) {
- // We treat fullscreen requests as a "hint" for now. This means in
- // case it is not available we simply ignore it.
- if (_wantsFullScreen) {
- _window->createOrUpdateWindow(width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
- }
-
- if (!_window->getSDLWindow()) {
- return false;
- }
+ if (!createOrUpdateWindow(width, height, flags)) {
+ return false;
}
_glContext = SDL_GL_CreateContext(_window->getSDLWindow());
@@ -528,9 +507,8 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
notifyContextCreate(rgba8888, rgba8888);
int actualWidth, actualHeight;
- getWindowDimensions(&actualWidth, &actualHeight);
- setActualScreenSize(actualWidth, actualHeight);
- _eventSource->resetKeyboardEmulation(actualWidth - 1, actualHeight - 1);
+ getWindowSizeFromSdl(&actualWidth, &actualHeight);
+ handleResize(actualWidth, actualHeight);
return true;
#else
// WORKAROUND: Working around infamous SDL bugs when switching
@@ -577,8 +555,7 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
if (_hwScreen) {
notifyContextCreate(rgba8888, rgba8888);
- setActualScreenSize(_hwScreen->w, _hwScreen->h);
- _eventSource->resetKeyboardEmulation(_hwScreen->w - 1, _hwScreen->h - 1);
+ handleResize(_hwScreen->w, _hwScreen->h);
}
// Ignore resize events (from SDL) for a few frames, if this isn't
@@ -591,20 +568,6 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
#endif
}
-void OpenGLSdlGraphicsManager::getWindowDimensions(int *width, int *height) {
-#if SDL_VERSION_ATLEAST(2, 0, 0)
- SDL_GetWindowSize(_window->getSDLWindow(), width, height);
-#else
- if (width) {
- *width = _hwScreen->w;
- }
-
- if (height) {
- *height = _hwScreen->h;
- }
-#endif
-}
-
bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
switch (event.type) {
case Common::EVENT_KEYUP:
@@ -718,7 +681,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
// current scale setting in case the user resized the
// window. Then we apply the direction change.
int windowWidth = 0, windowHeight = 0;
- getWindowDimensions(&windowWidth, &windowHeight);
+ getWindowSizeFromSdl(&windowWidth, &windowHeight);
_graphicsScale = MAX<int>(windowWidth / _lastRequestedWidth, windowHeight / _lastRequestedHeight);
_graphicsScale = MAX<int>(_graphicsScale + direction, 1);
@@ -736,7 +699,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
#ifdef USE_OSD
int windowWidth = 0, windowHeight = 0;
- getWindowDimensions(&windowWidth, &windowHeight);
+ getWindowSizeFromSdl(&windowWidth, &windowHeight);
const Common::String osdMsg = Common::String::format(_("Resolution: %dx%d"), windowWidth, windowHeight);
displayMessageOnOSD(osdMsg.c_str());
#endif
@@ -796,7 +759,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
}
}
-bool OpenGLSdlGraphicsManager::isHotkey(const Common::Event &event) {
+bool OpenGLSdlGraphicsManager::isHotkey(const Common::Event &event) const {
if (event.kbd.hasFlags(Common::KBD_ALT)) {
return event.kbd.keycode == Common::KEYCODE_RETURN
|| event.kbd.keycode == (Common::KeyCode)SDLK_KP_ENTER
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.h b/backends/graphics/openglsdl/openglsdl-graphics.h
index 51edcb4363..954c7215a4 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.h
+++ b/backends/graphics/openglsdl/openglsdl-graphics.h
@@ -36,39 +36,39 @@ public:
virtual ~OpenGLSdlGraphicsManager();
// GraphicsManager API
- virtual void activateManager();
- virtual void deactivateManager();
+ virtual void activateManager() override;
+ virtual void deactivateManager() override;
- virtual bool hasFeature(OSystem::Feature f);
- virtual void setFeatureState(OSystem::Feature f, bool enable);
- virtual bool getFeatureState(OSystem::Feature f);
+ virtual bool hasFeature(OSystem::Feature f) const override;
+ virtual void setFeatureState(OSystem::Feature f, bool enable) override;
+ virtual bool getFeatureState(OSystem::Feature f) const override;
- virtual bool setGraphicsMode(int mode);
- virtual void resetGraphicsScale();
+ virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format) override;
#ifdef USE_RGB_COLOR
- virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
+ virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override;
#endif
- virtual void updateScreen();
+ virtual void updateScreen() override;
// EventObserver API
- virtual bool notifyEvent(const Common::Event &event);
+ virtual bool notifyEvent(const Common::Event &event) override;
// SdlGraphicsManager API
- virtual void notifyVideoExpose();
- virtual void notifyResize(const uint width, const uint height);
- virtual void transformMouseCoordinates(Common::Point &point);
- virtual void notifyMousePos(Common::Point mouse);
+ virtual void notifyVideoExpose() override;
+ virtual void notifyResize(const int width, const int height) override;
protected:
- virtual void setInternalMousePosition(int x, int y);
+ virtual bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format) override;
- virtual bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format);
+ virtual void refreshScreen() override;
- virtual void refreshScreen();
+ virtual void *getProcAddress(const char *name) const override;
+
+ virtual void handleResizeImpl(const int width, const int height) override;
+
+ virtual int getGraphicsModeScale(int mode) const override { return 1; }
- virtual void *getProcAddress(const char *name) const;
private:
bool setupMode(uint width, uint height);
@@ -77,11 +77,8 @@ private:
SDL_GLContext _glContext;
#else
uint32 _lastVideoModeLoad;
- SDL_Surface *_hwScreen;
#endif
- void getWindowDimensions(int *width, int *height);
-
uint _lastRequestedWidth;
uint _lastRequestedHeight;
uint _graphicsScale;
@@ -121,7 +118,7 @@ private:
uint _desiredFullscreenWidth;
uint _desiredFullscreenHeight;
- virtual bool isHotkey(const Common::Event &event);
+ bool isHotkey(const Common::Event &event) const;
};
#endif
diff --git a/backends/graphics/openpandora/op-graphics.cpp b/backends/graphics/openpandora/op-graphics.cpp
index f4c9dc16cc..d6c16462e8 100644
--- a/backends/graphics/openpandora/op-graphics.cpp
+++ b/backends/graphics/openpandora/op-graphics.cpp
@@ -54,19 +54,6 @@ bool OPGraphicsManager::loadGFXMode() {
SDL_SetCursor(hiddenCursor);
_videoMode.fullscreen = true;
-
- _videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
- _videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
-
- if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400)
- _videoMode.aspectRatioCorrection = false;
-
- if (_videoMode.aspectRatioCorrection)
- _videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);
-
- _videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
- _videoMode.hardwareHeight = effectiveScreenHeight();
-
return SurfaceSdlGraphicsManager::loadGFXMode();
}
diff --git a/backends/graphics/openpandora/op-graphics.h b/backends/graphics/openpandora/op-graphics.h
index 50994072bb..56777dc892 100644
--- a/backends/graphics/openpandora/op-graphics.h
+++ b/backends/graphics/openpandora/op-graphics.h
@@ -34,8 +34,8 @@ class OPGraphicsManager : public SurfaceSdlGraphicsManager {
public:
OPGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
- bool loadGFXMode();
- void unloadGFXMode();
+ bool loadGFXMode() override;
+ void unloadGFXMode() override;
};
#endif /* BACKENDS_GRAPHICS_OP_H */
diff --git a/backends/graphics/psp2sdl/psp2sdl-graphics.cpp b/backends/graphics/psp2sdl/psp2sdl-graphics.cpp
index b56f13e27a..affcf9d8f5 100644
--- a/backends/graphics/psp2sdl/psp2sdl-graphics.cpp
+++ b/backends/graphics/psp2sdl/psp2sdl-graphics.cpp
@@ -111,8 +111,8 @@ PSP2SdlGraphicsManager::~PSP2SdlGraphicsManager() {
}
_vitatex_hwscreen = NULL;
}
- if (_hwscreen) {
- _hwscreen->pixels = _sdlpixels_hwscreen;
+ if (_hwScreen) {
+ _hwScreen->pixels = _sdlpixels_hwscreen;
}
_sdlpixels_hwscreen = nullptr;
}
@@ -153,7 +153,7 @@ void PSP2SdlGraphicsManager::unloadGFXMode() {
deinitializeRenderer();
- if (_hwscreen) {
+ if (_hwScreen) {
if (_vitatex_hwscreen) {
vita2d_free_texture(_vitatex_hwscreen);
for (int i = 0; i < 6; i++) {
@@ -162,7 +162,7 @@ void PSP2SdlGraphicsManager::unloadGFXMode() {
}
_vitatex_hwscreen = NULL;
}
- _hwscreen->pixels = _sdlpixels_hwscreen;
+ _hwScreen->pixels = _sdlpixels_hwscreen;
}
SurfaceSdlGraphicsManager::unloadGFXMode();
}
@@ -172,7 +172,7 @@ bool PSP2SdlGraphicsManager::hotswapGFXMode() {
return false;
// Release the HW screen surface
- if (_hwscreen) {
+ if (_hwScreen) {
if (_vitatex_hwscreen) {
vita2d_free_texture(_vitatex_hwscreen);
for (int i = 0; i < 6; i++) {
@@ -181,7 +181,7 @@ bool PSP2SdlGraphicsManager::hotswapGFXMode() {
}
_vitatex_hwscreen = NULL;
}
- _hwscreen->pixels = _sdlpixels_hwscreen;
+ _hwScreen->pixels = _sdlpixels_hwscreen;
}
return SurfaceSdlGraphicsManager::hotswapGFXMode();
}
@@ -222,23 +222,23 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
// definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?)
#if defined(DEBUG)
- assert(_hwscreen != NULL);
- assert(_hwscreen->map->sw_data != NULL);
+ assert(_hwScreen != NULL);
+ assert(_hwScreen->map->sw_data != NULL);
#endif
// If the shake position changed, fill the dirty area with blackness
if (_currentShakePos != _newShakePos ||
- (_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
+ (_cursorNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_newShakePos * _videoMode.scaleFactor)};
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
blackrect.h = real2Aspect(blackrect.h - 1) + 1;
- SDL_FillRect(_hwscreen, &blackrect, 0);
+ SDL_FillRect(_hwScreen, &blackrect, 0);
_currentShakePos = _newShakePos;
- _forceFull = true;
+ _forceRedraw = true;
}
// Check whether the palette was changed in the meantime and update the
@@ -250,7 +250,7 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
_paletteDirtyEnd = 0;
- _forceFull = true;
+ _forceRedraw = true;
}
if (!_overlayVisible) {
@@ -272,7 +272,7 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
// Add the area covered by the mouse cursor to the list of dirty rects if
// we have to redraw the mouse.
- if (_mouseNeedsRedraw)
+ if (_cursorNeedsRedraw)
undrawMouse();
#ifdef USE_OSD
@@ -280,7 +280,7 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
#endif
// Force a full redraw if requested
- if (_forceFull) {
+ if (_forceRedraw) {
_numDirtyRects = 1;
_dirtyRectList[0].x = 0;
_dirtyRectList[0].y = 0;
@@ -289,7 +289,7 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
}
// Only draw anything if necessary
- if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
+ if (_numDirtyRects > 0 || _cursorNeedsRedraw) {
SDL_Rect *r;
SDL_Rect dst;
uint32 srcPitch, dstPitch;
@@ -306,7 +306,7 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
SDL_LockSurface(srcSurf);
srcPitch = srcSurf->pitch;
- dstPitch = _hwscreen->pitch;
+ dstPitch = _hwScreen->pitch;
for (r = _dirtyRectList; r != lastRect; ++r) {
register int dst_y = r->y + _currentShakePos;
@@ -331,7 +331,7 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
assert(scalerProc != NULL);
scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
- (byte *)_hwscreen->pixels + rx1 * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
+ (byte *)_hwScreen->pixels + rx1 * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
}
r->x = rx1;
@@ -341,15 +341,15 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
- r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
+ r->h = stretch200To240((uint8 *) _hwScreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
#endif
}
SDL_UnlockSurface(srcSurf);
// Readjust the dirty rect list in case we are doing a full update.
// This is necessary if shaking is active.
- if (_forceFull) {
+ if (_forceRedraw) {
_dirtyRectList[0].y = 0;
- _dirtyRectList[0].h = effectiveScreenHeight();
+ _dirtyRectList[0].h = _videoMode.hardwareHeight;
}
drawMouse();
@@ -380,15 +380,15 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
if (h > 0 && w > 0) {
// Use white as color for now.
- Uint32 rectColor = SDL_MapRGB(_hwscreen->format, 0xFF, 0xFF, 0xFF);
+ Uint32 rectColor = SDL_MapRGB(_hwScreen->format, 0xFF, 0xFF, 0xFF);
// First draw the top and bottom lines
// then draw the left and right lines
- if (_hwscreen->format->BytesPerPixel == 2) {
- uint16 *top = (uint16 *)((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 2);
- uint16 *bottom = (uint16 *)((byte *)_hwscreen->pixels + (y + h) * _hwscreen->pitch + x * 2);
- byte *left = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 2);
- byte *right = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + (x + w - 1) * 2);
+ if (_hwScreen->format->BytesPerPixel == 2) {
+ uint16 *top = (uint16 *)((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 2);
+ uint16 *bottom = (uint16 *)((byte *)_hwScreen->pixels + (y + h) * _hwScreen->pitch + x * 2);
+ byte *left = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 2);
+ byte *right = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + (x + w - 1) * 2);
while (w--) {
*top++ = rectColor;
@@ -399,14 +399,14 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
*(uint16 *)left = rectColor;
*(uint16 *)right = rectColor;
- left += _hwscreen->pitch;
- right += _hwscreen->pitch;
+ left += _hwScreen->pitch;
+ right += _hwScreen->pitch;
}
- } else if (_hwscreen->format->BytesPerPixel == 4) {
- uint32 *top = (uint32 *)((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 4);
- uint32 *bottom = (uint32 *)((byte *)_hwscreen->pixels + (y + h) * _hwscreen->pitch + x * 4);
- byte *left = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 4);
- byte *right = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + (x + w - 1) * 4);
+ } else if (_hwScreen->format->BytesPerPixel == 4) {
+ uint32 *top = (uint32 *)((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 4);
+ uint32 *bottom = (uint32 *)((byte *)_hwScreen->pixels + (y + h) * _hwScreen->pitch + x * 4);
+ byte *left = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 4);
+ byte *right = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + (x + w - 1) * 4);
while (w--) {
*top++ = rectColor;
@@ -417,8 +417,8 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
*(uint32 *)left = rectColor;
*(uint32 *)right = rectColor;
- left += _hwscreen->pitch;
- right += _hwscreen->pitch;
+ left += _hwScreen->pitch;
+ right += _hwScreen->pitch;
}
}
}
@@ -428,13 +428,13 @@ void PSP2SdlGraphicsManager::internUpdateScreen() {
// Finally, blit all our changes to the screen
if (!_displayDisabled) {
- PSP2_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
+ PSP2_UpdateRects(_hwScreen, _numDirtyRects, _dirtyRectList);
}
}
_numDirtyRects = 0;
- _forceFull = false;
- _mouseNeedsRedraw = false;
+ _forceRedraw = false;
+ _cursorNeedsRedraw = false;
}
void PSP2SdlGraphicsManager::setAspectRatioCorrection(bool enable) {
diff --git a/backends/graphics/psp2sdl/psp2sdl-graphics.h b/backends/graphics/psp2sdl/psp2sdl-graphics.h
index 638437c9a6..0cabeb094d 100644
--- a/backends/graphics/psp2sdl/psp2sdl-graphics.h
+++ b/backends/graphics/psp2sdl/psp2sdl-graphics.h
@@ -30,19 +30,19 @@ class PSP2SdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
PSP2SdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
virtual ~PSP2SdlGraphicsManager();
-
- virtual OSystem::TransactionError endGFXTransaction();
- virtual const OSystem::GraphicsMode *getSupportedShaders() const;
+
+ virtual OSystem::TransactionError endGFXTransaction() override;
+ virtual const OSystem::GraphicsMode *getSupportedShaders() const override;
protected:
- virtual void setGraphicsModeIntern();
- virtual void unloadGFXMode();
- virtual bool hotswapGFXMode();
-
- virtual void internUpdateScreen();
- virtual void updateShader();
- virtual void setAspectRatioCorrection(bool enable);
- virtual SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);
+ virtual void setGraphicsModeIntern() override;
+ virtual void unloadGFXMode() override;
+ virtual bool hotswapGFXMode() override;
+
+ virtual void internUpdateScreen() override;
+ virtual void updateShader() override;
+ virtual void setAspectRatioCorrection(bool enable) override;
+ virtual SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) override;
void PSP2_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects);
void PSP2_UpdateFiltering();
diff --git a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
index 0c98462891..befa793263 100644
--- a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
+++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
@@ -32,7 +32,7 @@ SamsungTVSdlGraphicsManager::SamsungTVSdlGraphicsManager(SdlEventSource *sdlEven
: SurfaceSdlGraphicsManager(sdlEventSource, window) {
}
-bool SamsungTVSdlGraphicsManager::hasFeature(OSystem::Feature f) {
+bool SamsungTVSdlGraphicsManager::hasFeature(OSystem::Feature f) const {
return
(f == OSystem::kFeatureAspectRatioCorrection) ||
(f == OSystem::kFeatureCursorPalette);
@@ -48,7 +48,7 @@ void SamsungTVSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enabl
}
}
-bool SamsungTVSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool SamsungTVSdlGraphicsManager::getFeatureState(OSystem::Feature f) const {
switch (f) {
case OSystem::kFeatureAspectRatioCorrection:
return SurfaceSdlGraphicsManager::getFeatureState(f);
diff --git a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
index 8699d77bc8..b86ebe2c45 100644
--- a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
+++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
@@ -31,9 +31,9 @@ class SamsungTVSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
SamsungTVSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
- bool hasFeature(OSystem::Feature f);
- void setFeatureState(OSystem::Feature f, bool enable);
- bool getFeatureState(OSystem::Feature f);
+ bool hasFeature(OSystem::Feature f) const override;
+ void setFeatureState(OSystem::Feature f, bool enable) override;
+ bool getFeatureState(OSystem::Feature f) const override;
};
#endif
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index a13ca45477..0e0a45a38f 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -21,17 +21,18 @@
*/
#include "backends/graphics/sdl/sdl-graphics.h"
-
#include "backends/platform/sdl/sdl-sys.h"
#include "backends/events/sdl/sdl-events.h"
+#include "common/config-manager.h"
#include "common/textconsole.h"
+#include "graphics/scaler/aspect.h"
SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *source, SdlWindow *window)
- : _eventSource(source), _window(window) {
-}
-
-SdlGraphicsManager::~SdlGraphicsManager() {
-}
+ : _eventSource(source), _window(window), _hwScreen(nullptr)
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ , _allowWindowSizeReset(false), _hintedWidth(0), _hintedHeight(0), _lastFlags(0)
+#endif
+{}
void SdlGraphicsManager::activateManager() {
_eventSource->setGraphicsManager(this);
@@ -41,7 +42,7 @@ void SdlGraphicsManager::deactivateManager() {
_eventSource->setGraphicsManager(0);
}
-SdlGraphicsManager::State SdlGraphicsManager::getState() {
+SdlGraphicsManager::State SdlGraphicsManager::getState() const {
State state;
state.screenWidth = getWidth();
@@ -60,7 +61,7 @@ bool SdlGraphicsManager::setState(const State &state) {
#ifdef USE_RGB_COLOR
initSize(state.screenWidth, state.screenHeight, &state.pixelFormat);
#else
- initSize(state.screenWidth, state.screenHeight, 0);
+ initSize(state.screenWidth, state.screenHeight, nullptr);
#endif
setFeatureState(OSystem::kFeatureAspectRatioCorrection, state.aspectRatio);
setFeatureState(OSystem::kFeatureFullscreenMode, state.fullscreen);
@@ -73,3 +74,184 @@ bool SdlGraphicsManager::setState(const State &state) {
}
}
+bool SdlGraphicsManager::defaultGraphicsModeConfig() const {
+ const Common::ConfigManager::Domain *transientDomain = ConfMan.getDomain(Common::ConfigManager::kTransientDomain);
+ if (transientDomain && transientDomain->contains("gfx_mode")) {
+ const Common::String &mode = transientDomain->getVal("gfx_mode");
+ if (!mode.equalsIgnoreCase("normal") && !mode.equalsIgnoreCase("default")) {
+ return false;
+ }
+ }
+
+ const Common::ConfigManager::Domain *gameDomain = ConfMan.getActiveDomain();
+ if (gameDomain && gameDomain->contains("gfx_mode")) {
+ const Common::String &mode = gameDomain->getVal("gfx_mode");
+ if (!mode.equalsIgnoreCase("normal") && !mode.equalsIgnoreCase("default")) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+int SdlGraphicsManager::getGraphicsModeIdByName(const Common::String &name) const {
+ const OSystem::GraphicsMode *mode = getSupportedGraphicsModes();
+ while (mode && mode->name != nullptr) {
+ if (name.equalsIgnoreCase(mode->name)) {
+ return mode->id;
+ }
+ ++mode;
+ }
+ return -1;
+}
+
+void SdlGraphicsManager::initSizeHint(const Graphics::ModeList &modes) {
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ const bool useDefault = defaultGraphicsModeConfig();
+
+ int scale = getGraphicsModeScale(getGraphicsModeIdByName(ConfMan.get("gfx_mode")));
+ if (scale == -1) {
+ warning("Unknown scaler; defaulting to 1");
+ scale = 1;
+ }
+
+ int16 bestWidth = 0, bestHeight = 0;
+ const Graphics::ModeList::const_iterator end = modes.end();
+ for (Graphics::ModeList::const_iterator it = modes.begin(); it != end; ++it) {
+ int16 width = it->width, height = it->height;
+
+ // TODO: Normalize AR correction by passing a PAR in the mode list
+ // instead of checking the dimensions here like this, since not all
+ // 320x200/640x400 uses are with non-square pixels (e.g. DreamWeb).
+ if (ConfMan.getBool("aspect_ratio")) {
+ if ((width == 320 && height == 200) || (width == 640 && height == 400)) {
+ height = real2Aspect(height);
+ }
+ }
+
+ if (!useDefault || width <= 320) {
+ width *= scale;
+ height *= scale;
+ }
+
+ if (bestWidth < width) {
+ bestWidth = width;
+ }
+
+ if (bestHeight < height) {
+ bestHeight = height;
+ }
+ }
+
+ _hintedWidth = bestWidth;
+ _hintedHeight = bestHeight;
+#endif
+}
+
+bool SdlGraphicsManager::showMouse(const bool visible) {
+ if (visible == _cursorVisible) {
+ return visible;
+ }
+
+ int showCursor = SDL_DISABLE;
+ if (visible) {
+ // _cursorX and _cursorY are currently always clipped to the active
+ // area, so we need to ask SDL where the system's mouse cursor is
+ // instead
+ int x, y;
+ SDL_GetMouseState(&x, &y);
+ if (!_activeArea.drawRect.contains(Common::Point(x, y))) {
+ showCursor = SDL_ENABLE;
+ }
+ }
+ SDL_ShowCursor(showCursor);
+
+ return WindowedGraphicsManager::showMouse(visible);
+}
+
+bool SdlGraphicsManager::notifyMousePosition(Common::Point &mouse) {
+ int showCursor = SDL_DISABLE;
+ bool valid = true;
+ if (_activeArea.drawRect.contains(mouse)) {
+ _cursorLastInActiveArea = true;
+ } else {
+ mouse.x = CLIP<int>(mouse.x, _activeArea.drawRect.left, _activeArea.drawRect.right - 1);
+ mouse.y = CLIP<int>(mouse.y, _activeArea.drawRect.top, _activeArea.drawRect.bottom - 1);
+
+ if (_window->mouseIsGrabbed() ||
+ // Keep the mouse inside the game area during dragging to prevent an
+ // event mismatch where the mouseup event gets lost because it is
+ // performed outside of the game area
+ (_cursorLastInActiveArea && SDL_GetMouseState(nullptr, nullptr) != 0)) {
+ setSystemMousePosition(mouse.x, mouse.y);
+ } else {
+ // Allow the in-game mouse to get a final movement event to the edge
+ // of the window if the mouse was moved out of the game area
+ if (_cursorLastInActiveArea) {
+ _cursorLastInActiveArea = false;
+ } else if (_cursorVisible) {
+ // Keep sending events to the game if the cursor is invisible,
+ // since otherwise if a game lets you skip a cutscene by
+ // clicking and the user moved the mouse outside the active
+ // area, the clicks wouldn't do anything, which would be
+ // confusing
+ valid = false;
+ }
+
+ if (_cursorVisible) {
+ showCursor = SDL_ENABLE;
+ }
+ }
+ }
+
+ SDL_ShowCursor(showCursor);
+ if (valid) {
+ setMousePosition(mouse.x, mouse.y);
+ mouse = convertWindowToVirtual(mouse.x, mouse.y);
+ }
+ return valid;
+}
+
+void SdlGraphicsManager::setSystemMousePosition(const int x, const int y) {
+ assert(_window);
+ if (!_window->warpMouseInWindow(x, y)) {
+ _eventSource->fakeWarpMouse(x, y);
+ }
+}
+
+void SdlGraphicsManager::handleResizeImpl(const int width, const int height) {
+ _eventSource->resetKeyboardEmulation(width - 1, height - 1);
+ _forceRedraw = true;
+}
+
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+bool SdlGraphicsManager::createOrUpdateWindow(int width, int height, const Uint32 flags) {
+ if (!_window) {
+ return false;
+ }
+
+ // We only update the actual window when flags change (which usually means
+ // fullscreen mode is entered/exited), when updates are forced so that we
+ // do not reset the window size whenever a game makes a call to change the
+ // size or pixel format of the internal game surface (since a user may have
+ // resized the game window), or when the launcher is visible (since a user
+ // may change the scaler, which should reset the window size)
+ if (!_window->getSDLWindow() || _lastFlags != flags || _overlayVisible || _allowWindowSizeReset) {
+ if (_hintedWidth) {
+ width = _hintedWidth;
+ }
+ if (_hintedHeight) {
+ height = _hintedHeight;
+ }
+
+ if (!_window->createOrUpdateWindow(width, height, flags)) {
+ return false;
+ }
+
+ _lastFlags = flags;
+ _allowWindowSizeReset = false;
+ }
+
+ return true;
+}
+#endif
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 7f8790a9b4..526306270b 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -23,7 +23,7 @@
#ifndef BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H
#define BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H
-#include "backends/graphics/graphics.h"
+#include "backends/graphics/windowed.h"
#include "backends/platform/sdl/sdl-window.h"
#include "common/rect.h"
@@ -32,13 +32,11 @@ class SdlEventSource;
/**
* Base class for a SDL based graphics manager.
- *
- * It features a few extra a few extra features required by SdlEventSource.
*/
-class SdlGraphicsManager : virtual public GraphicsManager {
+class SdlGraphicsManager : virtual public WindowedGraphicsManager {
public:
SdlGraphicsManager(SdlEventSource *source, SdlWindow *window);
- virtual ~SdlGraphicsManager();
+ virtual ~SdlGraphicsManager() {}
/**
* Makes this graphics manager active. That means it should be ready to
@@ -62,10 +60,10 @@ public:
virtual void notifyVideoExpose() = 0;
/**
- * Notify the graphics manager about an resize event.
+ * Notify the graphics manager about a resize event.
*
* It is noteworthy that the requested width/height should actually be set
- * up as is and not changed by the graphics manager, since else it might
+ * up as is and not changed by the graphics manager, since otherwise it may
* lead to odd behavior for certain window managers.
*
* It is only required to overwrite this method in case you want a
@@ -74,27 +72,28 @@ public:
* @param width Requested window width.
* @param height Requested window height.
*/
- virtual void notifyResize(const uint width, const uint height) {}
+ virtual void notifyResize(const int width, const int height) {}
/**
- * Transforms real screen coordinates into the current active screen
- * coordinates (may be either game screen or overlay).
+ * Notifies the graphics manager about a mouse position change.
*
- * @param point Mouse coordinates to transform.
- */
- virtual void transformMouseCoordinates(Common::Point &point) = 0;
-
- /**
- * Notifies the graphics manager about a position change according to the
- * real screen coordinates.
+ * The passed point *must* be converted from window coordinates to virtual
+ * coordinates in order for the event to be processed correctly by the game
+ * engine. Just use `convertWindowToVirtual` for this unless you need to do
+ * something special.
*
- * @param mouse Mouse position.
+ * @param mouse The mouse position in window coordinates, which must be
+ * converted synchronously to virtual coordinates.
+ * @returns true if the mouse was in a valid position for the game and
+ * should cause the event to be sent to the game.
*/
- virtual void notifyMousePos(Common::Point mouse) = 0;
+ virtual bool notifyMousePosition(Common::Point &mouse);
+
+ virtual bool showMouse(const bool visible) override;
/**
* A (subset) of the graphic manager's state. This is used when switching
- * between different SDL graphic managers on runtime.
+ * between different SDL graphic managers at runtime.
*/
struct State {
int screenWidth, screenHeight;
@@ -108,21 +107,70 @@ public:
};
/**
- * Queries the current state of the graphic manager.
+ * Gets the current state of the graphics manager.
*/
- State getState();
+ State getState() const;
/**
- * Setup a basic state of the graphic manager.
+ * Sets up a basic state of the graphics manager.
*/
bool setState(const State &state);
/**
- * Queries the SDL window.
+ * @returns the SDL window.
*/
SdlWindow *getWindow() const { return _window; }
+ virtual void initSizeHint(const Graphics::ModeList &modes) override;
+
+protected:
+ virtual int getGraphicsModeScale(int mode) const = 0;
+
+ bool defaultGraphicsModeConfig() const;
+ int getGraphicsModeIdByName(const Common::String &name) const;
+
+ /**
+ * Gets the dimensions of the window directly from SDL instead of from the
+ * values stored by the graphics manager.
+ */
+ void getWindowSizeFromSdl(int *width, int *height) const {
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ assert(_window);
+ SDL_GetWindowSize(_window->getSDLWindow(), width, height);
+#else
+ assert(_hwScreen);
+
+ if (width) {
+ *width = _hwScreen->w;
+ }
+
+ if (height) {
+ *height = _hwScreen->h;
+ }
+#endif
+ }
+
+ virtual void setSystemMousePosition(const int x, const int y) override;
+
+ virtual void handleResizeImpl(const int width, const int height) override;
+
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+public:
+ void unlockWindowSize() {
+ _allowWindowSizeReset = true;
+ _hintedWidth = 0;
+ _hintedHeight = 0;
+ }
+
protected:
+ Uint32 _lastFlags;
+ bool _allowWindowSizeReset;
+ int _hintedWidth, _hintedHeight;
+
+ bool createOrUpdateWindow(const int width, const int height, const Uint32 flags);
+#endif
+
+ SDL_Surface *_hwScreen;
SdlEventSource *_eventSource;
SdlWindow *_window;
};
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 983b71ab28..262ea84096 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -23,7 +23,6 @@
#include "common/scummsys.h"
#if defined(SDL_BACKEND)
-
#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
#include "backends/events/sdl/sdl-events.h"
#include "backends/platform/sdl/sdl.h"
@@ -133,24 +132,19 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou
_osdMessageSurface(nullptr), _osdMessageAlpha(SDL_ALPHA_TRANSPARENT), _osdMessageFadeStartTime(0),
_osdIconSurface(nullptr),
#endif
- _hwscreen(0),
#if SDL_VERSION_ATLEAST(2, 0, 0)
_renderer(nullptr), _screenTexture(nullptr),
- _viewport(), _windowWidth(1), _windowHeight(1),
#endif
#if defined(WIN32) && !SDL_VERSION_ATLEAST(2, 0, 0)
_originalBitsPerPixel(0),
#endif
_screen(0), _tmpscreen(0),
-#ifdef USE_RGB_COLOR
_screenFormat(Graphics::PixelFormat::createFormatCLUT8()),
_cursorFormat(Graphics::PixelFormat::createFormatCLUT8()),
-#endif
- _overlayVisible(false),
_overlayscreen(0), _tmpscreen2(0),
_scalerProc(0), _screenChangeCount(0),
- _mouseVisible(false), _mouseNeedsRedraw(false), _mouseData(0), _mouseSurface(0),
- _mouseOrigSurface(0), _cursorDontScale(false), _cursorPaletteDisabled(true),
+ _mouseData(nullptr), _mouseSurface(nullptr),
+ _mouseOrigSurface(nullptr), _cursorDontScale(false), _cursorPaletteDisabled(true),
_currentShakePos(0), _newShakePos(0),
_paletteDirtyStart(0), _paletteDirtyEnd(0),
_screenIsLocked(false),
@@ -214,21 +208,19 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou
SurfaceSdlGraphicsManager::~SurfaceSdlGraphicsManager() {
unloadGFXMode();
-#if SDL_VERSION_ATLEAST(2, 0, 0)
- if (_window)
- _window->destroyWindow();
-#endif
- if (_mouseSurface)
- SDL_FreeSurface(_mouseSurface);
- _mouseSurface = 0;
- if (_mouseOrigSurface)
+ if (_mouseOrigSurface) {
SDL_FreeSurface(_mouseOrigSurface);
- _mouseOrigSurface = 0;
+ if (_mouseOrigSurface == _mouseSurface) {
+ _mouseSurface = nullptr;
+ }
+ }
+ if (_mouseSurface) {
+ SDL_FreeSurface(_mouseSurface);
+ }
g_system->deleteMutex(_graphicsMutex);
-
free(_currentPalette);
free(_cursorPalette);
- free(_mouseData);
+ delete[] _mouseData;
}
void SurfaceSdlGraphicsManager::activateManager() {
@@ -247,7 +239,7 @@ void SurfaceSdlGraphicsManager::deactivateManager() {
SdlGraphicsManager::deactivateManager();
}
-bool SurfaceSdlGraphicsManager::hasFeature(OSystem::Feature f) {
+bool SurfaceSdlGraphicsManager::hasFeature(OSystem::Feature f) const {
return
(f == OSystem::kFeatureFullscreenMode) ||
(f == OSystem::kFeatureAspectRatioCorrection) ||
@@ -284,7 +276,7 @@ void SurfaceSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
}
}
-bool SurfaceSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool SurfaceSdlGraphicsManager::getFeatureState(OSystem::Feature f) const {
// We need to allow this to be called from within a transaction, since we
// currently use it to retreive the graphics state, when switching from
// SDL->OpenGL mode for example.
@@ -332,7 +324,6 @@ void SurfaceSdlGraphicsManager::beginGFXTransaction() {
_transactionDetails.needHotswap = false;
_transactionDetails.needUpdatescreen = false;
- _transactionDetails.normal1xScaler = false;
#if SDL_VERSION_ATLEAST(2, 0, 0)
_transactionDetails.needTextureUpdate = false;
#endif
@@ -556,16 +547,16 @@ void SurfaceSdlGraphicsManager::detectSupportedFormats() {
Graphics::PixelFormat(2, 4, 4, 4, 4, 4, 8, 12, 0)
};
- if (_hwscreen) {
+ if (_hwScreen) {
// Get our currently set hardware format
- Graphics::PixelFormat hwFormat(_hwscreen->format->BytesPerPixel,
- 8 - _hwscreen->format->Rloss, 8 - _hwscreen->format->Gloss,
- 8 - _hwscreen->format->Bloss, 8 - _hwscreen->format->Aloss,
- _hwscreen->format->Rshift, _hwscreen->format->Gshift,
- _hwscreen->format->Bshift, _hwscreen->format->Ashift);
+ Graphics::PixelFormat hwFormat(_hwScreen->format->BytesPerPixel,
+ 8 - _hwScreen->format->Rloss, 8 - _hwScreen->format->Gloss,
+ 8 - _hwScreen->format->Bloss, 8 - _hwScreen->format->Aloss,
+ _hwScreen->format->Rshift, _hwScreen->format->Gshift,
+ _hwScreen->format->Bshift, _hwScreen->format->Ashift);
// Workaround to SDL not providing an accurate Aloss value on Mac OS X.
- if (_hwscreen->format->Amask == 0)
+ if (_hwScreen->format->Amask == 0)
hwFormat.aLoss = 8;
_supportedFormats.push_back(hwFormat);
@@ -580,7 +571,7 @@ void SurfaceSdlGraphicsManager::detectSupportedFormats() {
// Push some RGB formats
for (i = 0; i < ARRAYSIZE(RGBList); i++) {
- if (_hwscreen && (RGBList[i].bytesPerPixel > format.bytesPerPixel))
+ if (_hwScreen && (RGBList[i].bytesPerPixel > format.bytesPerPixel))
continue;
if (RGBList[i] != format)
_supportedFormats.push_back(RGBList[i]);
@@ -588,7 +579,7 @@ void SurfaceSdlGraphicsManager::detectSupportedFormats() {
// Push some BGR formats
for (i = 0; i < ARRAYSIZE(BGRList); i++) {
- if (_hwscreen && (BGRList[i].bytesPerPixel > format.bytesPerPixel))
+ if (_hwScreen && (BGRList[i].bytesPerPixel > format.bytesPerPixel))
continue;
if (BGRList[i] != format)
_supportedFormats.push_back(BGRList[i]);
@@ -599,65 +590,55 @@ void SurfaceSdlGraphicsManager::detectSupportedFormats() {
}
#endif
-bool SurfaceSdlGraphicsManager::setGraphicsMode(int mode) {
- Common::StackLock lock(_graphicsMutex);
-
- assert(_transactionMode == kTransactionActive);
-
- if (_oldVideoMode.setup && _oldVideoMode.mode == mode)
- return true;
-
- int newScaleFactor = 1;
-
+int SurfaceSdlGraphicsManager::getGraphicsModeScale(int mode) const {
+ int scale;
switch (mode) {
case GFX_NORMAL:
- newScaleFactor = 1;
+ scale = 1;
break;
#ifdef USE_SCALERS
case GFX_DOUBLESIZE:
- newScaleFactor = 2;
- break;
- case GFX_TRIPLESIZE:
- newScaleFactor = 3;
- break;
-
case GFX_2XSAI:
- newScaleFactor = 2;
- break;
case GFX_SUPER2XSAI:
- newScaleFactor = 2;
- break;
case GFX_SUPEREAGLE:
- newScaleFactor = 2;
- break;
case GFX_ADVMAME2X:
- newScaleFactor = 2;
- break;
- case GFX_ADVMAME3X:
- newScaleFactor = 3;
- break;
+ case GFX_TV2X:
+ case GFX_DOTMATRIX:
#ifdef USE_HQ_SCALERS
case GFX_HQ2X:
- newScaleFactor = 2;
+#endif
+ scale = 2;
break;
+ case GFX_TRIPLESIZE:
+ case GFX_ADVMAME3X:
+#ifdef USE_HQ_SCALERS
case GFX_HQ3X:
- newScaleFactor = 3;
- break;
#endif
- case GFX_TV2X:
- newScaleFactor = 2;
- break;
- case GFX_DOTMATRIX:
- newScaleFactor = 2;
+ scale = 3;
break;
-#endif // USE_SCALERS
-
+#endif
default:
+ scale = -1;
+ }
+
+ return scale;
+}
+
+bool SurfaceSdlGraphicsManager::setGraphicsMode(int mode) {
+ Common::StackLock lock(_graphicsMutex);
+
+ assert(_transactionMode == kTransactionActive);
+
+ if (_oldVideoMode.setup && _oldVideoMode.mode == mode)
+ return true;
+
+ int newScaleFactor = getGraphicsModeScale(mode);
+
+ if (newScaleFactor == -1) {
warning("unknown gfx mode %d", mode);
return false;
}
- _transactionDetails.normal1xScaler = (mode == GFX_NORMAL);
if (_oldVideoMode.setup && _oldVideoMode.scaleFactor != newScaleFactor)
_transactionDetails.needHotswap = true;
@@ -733,11 +714,11 @@ void SurfaceSdlGraphicsManager::setGraphicsModeIntern() {
}
}
- if (!_screen || !_hwscreen)
+ if (!_screen || !_hwScreen)
return;
// Blit everything to the screen
- _forceFull = true;
+ _forceRedraw = true;
// Even if the old and new scale factors are the same, we may have a
// different scaler for the cursor now.
@@ -784,9 +765,23 @@ void SurfaceSdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFo
}
#endif
- // Avoid redundant res changes
+#if !SDL_VERSION_ATLEAST(2, 0, 0)
+ // Avoid redundant res changes, only in SDL1. In SDL2, redundancies may not
+ // actually be redundant if ScummVM is switching between game engines and
+ // the screen dimensions are being reinitialized, since window resizing is
+ // supposed to reset when this happens
if ((int)w == _videoMode.screenWidth && (int)h == _videoMode.screenHeight)
return;
+#endif
+
+ if ((int)w != _videoMode.screenWidth || (int)h != _videoMode.screenHeight) {
+ const bool useDefault = defaultGraphicsModeConfig();
+ if (useDefault && w > 320) {
+ resetGraphicsScale();
+ } else {
+ setGraphicsMode(getGraphicsModeIdByName(ConfMan.get("gfx_mode")));
+ }
+ }
_videoMode.screenWidth = w;
_videoMode.screenHeight = h;
@@ -794,13 +789,6 @@ void SurfaceSdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFo
_transactionDetails.sizeChanged = true;
}
-int SurfaceSdlGraphicsManager::effectiveScreenHeight() const {
- return _videoMode.scaleFactor *
- (_videoMode.aspectRatioCorrection
- ? real2Aspect(_videoMode.screenHeight)
- : _videoMode.screenHeight);
-}
-
static void fixupResolutionForAspectRatio(AspectRatio desiredAspectRatio, int &width, int &height) {
assert(&width != &height);
@@ -861,20 +849,23 @@ static void fixupResolutionForAspectRatio(AspectRatio desiredAspectRatio, int &w
}
bool SurfaceSdlGraphicsManager::loadGFXMode() {
- _forceFull = true;
+ _forceRedraw = true;
-#if !defined(__MAEMO__) && !defined(DINGUX) && !defined(GPH_DEVICE) && !defined(LINUXMOTO) && !defined(OPENPANDORA)
+#if !defined(__MAEMO__) && !defined(DINGUX) && !defined(GPH_DEVICE) && !defined(LINUXMOTO)
_videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
_videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400)
_videoMode.aspectRatioCorrection = false;
- if (_videoMode.aspectRatioCorrection)
+ _videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
+ _videoMode.hardwareHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
+
+ if (_videoMode.aspectRatioCorrection) {
_videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);
+ _videoMode.hardwareHeight = real2Aspect(_videoMode.hardwareHeight);
+ }
- _videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
- _videoMode.hardwareHeight = effectiveScreenHeight();
// On GPH devices ALL the _videoMode.hardware... are setup in GPHGraphicsManager::loadGFXMode()
#elif !defined(GPH_DEVICE)
_videoMode.hardwareWidth = _videoMode.overlayWidth;
@@ -884,22 +875,20 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
//
// Create the surface that contains the 8 bit game data
//
-#ifdef USE_RGB_COLOR
+
+ const Graphics::PixelFormat &format = _screenFormat;
+ const Uint32 rMask = ((0xFF >> format.rLoss) << format.rShift);
+ const Uint32 gMask = ((0xFF >> format.gLoss) << format.gShift);
+ const Uint32 bMask = ((0xFF >> format.bLoss) << format.bShift);
+ const Uint32 aMask = ((0xFF >> format.aLoss) << format.aShift);
_screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight,
- _screenFormat.bytesPerPixel << 3,
- ((1 << _screenFormat.rBits()) - 1) << _screenFormat.rShift ,
- ((1 << _screenFormat.gBits()) - 1) << _screenFormat.gShift ,
- ((1 << _screenFormat.bBits()) - 1) << _screenFormat.bShift ,
- ((1 << _screenFormat.aBits()) - 1) << _screenFormat.aShift );
+ _screenFormat.bytesPerPixel * 8, rMask, gMask, bMask, aMask);
if (_screen == NULL)
error("allocating _screen failed");
+#ifdef USE_RGB_COLOR
// Avoid having SDL_SRCALPHA set even if we supplied an alpha-channel in the format.
SDL_SetAlpha(_screen, 0, 255);
-#else
- _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight, 8, 0, 0, 0, 0);
- if (_screen == NULL)
- error("allocating _screen failed");
#endif
// SDL 1.2 palettes default to all black,
@@ -921,7 +910,7 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
_displayDisabled = ConfMan.getBool("disable_display");
if (_displayDisabled) {
- _hwscreen = g_eventRec.getSurface(_videoMode.hardwareWidth, _videoMode.hardwareHeight);
+ _hwScreen = g_eventRec.getSurface(_videoMode.hardwareWidth, _videoMode.hardwareHeight);
} else
#endif
{
@@ -934,7 +923,7 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
}
#endif
- _hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
+ _hwScreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
_videoMode.fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
);
}
@@ -943,9 +932,9 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
detectSupportedFormats();
#endif
- if (_hwscreen == NULL) {
+ if (_hwScreen == NULL) {
// DON'T use error(), as this tries to bring up the debug
- // console, which WON'T WORK now that _hwscreen is hosed.
+ // console, which WON'T WORK now that _hwScreen is hosed.
if (!_oldVideoMode.setup) {
warning("SDL_SetVideoMode says we can't switch to that mode (%s)", SDL_GetError());
@@ -955,6 +944,10 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
}
}
+#if !SDL_VERSION_ATLEAST(2, 0, 0)
+ handleResize(_videoMode.hardwareWidth, _videoMode.hardwareHeight);
+#endif
+
//
// Create the surface used for the graphics in 16 bit before scaling, and also the overlay
//
@@ -962,20 +955,20 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
// Need some extra bytes around when using 2xSaI
_tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth + 3, _videoMode.screenHeight + 3,
16,
- _hwscreen->format->Rmask,
- _hwscreen->format->Gmask,
- _hwscreen->format->Bmask,
- _hwscreen->format->Amask);
+ _hwScreen->format->Rmask,
+ _hwScreen->format->Gmask,
+ _hwScreen->format->Bmask,
+ _hwScreen->format->Amask);
if (_tmpscreen == NULL)
error("allocating _tmpscreen failed");
_overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.overlayWidth, _videoMode.overlayHeight,
16,
- _hwscreen->format->Rmask,
- _hwscreen->format->Gmask,
- _hwscreen->format->Bmask,
- _hwscreen->format->Amask);
+ _hwScreen->format->Rmask,
+ _hwScreen->format->Gmask,
+ _hwScreen->format->Bmask,
+ _hwScreen->format->Amask);
if (_overlayscreen == NULL)
error("allocating _overlayscreen failed");
@@ -994,25 +987,16 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
_tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.overlayWidth + 3, _videoMode.overlayHeight + 3,
16,
- _hwscreen->format->Rmask,
- _hwscreen->format->Gmask,
- _hwscreen->format->Bmask,
- _hwscreen->format->Amask);
+ _hwScreen->format->Rmask,
+ _hwScreen->format->Gmask,
+ _hwScreen->format->Bmask,
+ _hwScreen->format->Amask);
if (_tmpscreen2 == NULL)
error("allocating _tmpscreen2 failed");
-#if !SDL_VERSION_ATLEAST(2, 0, 0)
- // For SDL2 the output resolution might differ from the requested
- // resolution. We handle resetting the keyboard emulation properly inside
- // our SDL_SetVideoMode wrapper for SDL2.
- _eventSource->resetKeyboardEmulation(
- _videoMode.screenWidth * _videoMode.scaleFactor - 1,
- effectiveScreenHeight() - 1);
-#endif
-
// Distinguish 555 and 565 mode
- if (_hwscreen->format->Rmask == 0x7C00)
+ if (_hwScreen->format->Rmask == 0x7C00)
InitScalers(555);
else
InitScalers(565);
@@ -1030,9 +1014,9 @@ void SurfaceSdlGraphicsManager::unloadGFXMode() {
deinitializeRenderer();
#endif
- if (_hwscreen) {
- SDL_FreeSurface(_hwscreen);
- _hwscreen = NULL;
+ if (_hwScreen) {
+ SDL_FreeSurface(_hwScreen);
+ _hwScreen = NULL;
}
if (_tmpscreen) {
@@ -1084,9 +1068,9 @@ bool SurfaceSdlGraphicsManager::hotswapGFXMode() {
_overlayscreen = NULL;
// Release the HW screen surface
- if (_hwscreen) {
- SDL_FreeSurface(_hwscreen);
- _hwscreen = NULL;
+ if (_hwScreen) {
+ SDL_FreeSurface(_hwScreen);
+ _hwScreen = NULL;
}
if (_tmpscreen) {
SDL_FreeSurface(_tmpscreen);
@@ -1136,14 +1120,14 @@ void SurfaceSdlGraphicsManager::updateScreen() {
}
void SurfaceSdlGraphicsManager::updateShader() {
-// shader init code goes here
-// currently only used on Vita port
-// the user-selected shaderID should be obtained via ConfMan.getInt("shader")
-// and the corresponding shader should then be activated here
-// this way the user can combine any software scaling (scalers)
-// with any hardware shading (shaders). The shaders could provide
-// scanline masks, overlays, but could also serve for
-// hardware-based up-scaling (sharp-bilinear-simple, etc.)
+ // shader init code goes here
+ // currently only used on Vita port
+ // the user-selected shaderID should be obtained via ConfMan.getInt("shader")
+ // and the corresponding shader should then be activated here
+ // this way the user can combine any software scaling (scalers)
+ // with any hardware shading (shaders). The shaders could provide
+ // scanline masks, overlays, but could also serve for
+ // hardware-based up-scaling (sharp-bilinear-simple, etc.)
}
void SurfaceSdlGraphicsManager::internUpdateScreen() {
@@ -1152,25 +1136,19 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
ScalerProc *scalerProc;
int scale1;
- // definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?)
-#if defined(DEBUG) && !defined(WIN32) && !defined(_WIN32_WCE)
- assert(_hwscreen != NULL);
- assert(_hwscreen->map->sw_data != NULL);
-#endif
-
// If the shake position changed, fill the dirty area with blackness
if (_currentShakePos != _newShakePos ||
- (_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
+ (_cursorNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_newShakePos * _videoMode.scaleFactor)};
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
blackrect.h = real2Aspect(blackrect.h - 1) + 1;
- SDL_FillRect(_hwscreen, &blackrect, 0);
+ SDL_FillRect(_hwScreen, &blackrect, 0);
_currentShakePos = _newShakePos;
- _forceFull = true;
+ _forceRedraw = true;
}
// Check whether the palette was changed in the meantime and update the
@@ -1182,7 +1160,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
_paletteDirtyEnd = 0;
- _forceFull = true;
+ _forceRedraw = true;
}
if (!_overlayVisible) {
@@ -1203,8 +1181,10 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
}
// Add the area covered by the mouse cursor to the list of dirty rects if
- // we have to redraw the mouse.
- if (_mouseNeedsRedraw)
+ // we have to redraw the mouse, or if the cursor is alpha-blended since
+ // alpha-blended cursors will happily blend into themselves if the surface
+ // under the cursor is not reset first
+ if (_cursorNeedsRedraw || _cursorFormat.bytesPerPixel == 4)
undrawMouse();
#ifdef USE_OSD
@@ -1212,7 +1192,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
#endif
// Force a full redraw if requested
- if (_forceFull) {
+ if (_forceRedraw) {
_numDirtyRects = 1;
_dirtyRectList[0].x = 0;
_dirtyRectList[0].y = 0;
@@ -1221,7 +1201,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
}
// Only draw anything if necessary
- if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
+ if (_numDirtyRects > 0 || _cursorNeedsRedraw) {
SDL_Rect *r;
SDL_Rect dst;
uint32 srcPitch, dstPitch;
@@ -1237,10 +1217,10 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
}
SDL_LockSurface(srcSurf);
- SDL_LockSurface(_hwscreen);
+ SDL_LockSurface(_hwScreen);
srcPitch = srcSurf->pitch;
- dstPitch = _hwscreen->pitch;
+ dstPitch = _hwScreen->pitch;
for (r = _dirtyRectList; r != lastRect; ++r) {
register int dst_y = r->y + _currentShakePos;
@@ -1265,7 +1245,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
assert(scalerProc != NULL);
scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
- (byte *)_hwscreen->pixels + rx1 * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
+ (byte *)_hwScreen->pixels + rx1 * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
}
r->x = rx1;
@@ -1275,17 +1255,17 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
- r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
+ r->h = stretch200To240((uint8 *) _hwScreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
#endif
}
SDL_UnlockSurface(srcSurf);
- SDL_UnlockSurface(_hwscreen);
+ SDL_UnlockSurface(_hwScreen);
// Readjust the dirty rect list in case we are doing a full update.
// This is necessary if shaking is active.
- if (_forceFull) {
+ if (_forceRedraw) {
_dirtyRectList[0].y = 0;
- _dirtyRectList[0].h = effectiveScreenHeight();
+ _dirtyRectList[0].h = _videoMode.hardwareHeight;
}
drawMouse();
@@ -1315,18 +1295,18 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
y = real2Aspect(y);
if (h > 0 && w > 0) {
- SDL_LockSurface(_hwscreen);
+ SDL_LockSurface(_hwScreen);
// Use white as color for now.
- Uint32 rectColor = SDL_MapRGB(_hwscreen->format, 0xFF, 0xFF, 0xFF);
+ Uint32 rectColor = SDL_MapRGB(_hwScreen->format, 0xFF, 0xFF, 0xFF);
// First draw the top and bottom lines
// then draw the left and right lines
- if (_hwscreen->format->BytesPerPixel == 2) {
- uint16 *top = (uint16 *)((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 2);
- uint16 *bottom = (uint16 *)((byte *)_hwscreen->pixels + (y + h) * _hwscreen->pitch + x * 2);
- byte *left = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 2);
- byte *right = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + (x + w - 1) * 2);
+ if (_hwScreen->format->BytesPerPixel == 2) {
+ uint16 *top = (uint16 *)((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 2);
+ uint16 *bottom = (uint16 *)((byte *)_hwScreen->pixels + (y + h) * _hwScreen->pitch + x * 2);
+ byte *left = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 2);
+ byte *right = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + (x + w - 1) * 2);
while (w--) {
*top++ = rectColor;
@@ -1337,14 +1317,14 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
*(uint16 *)left = rectColor;
*(uint16 *)right = rectColor;
- left += _hwscreen->pitch;
- right += _hwscreen->pitch;
+ left += _hwScreen->pitch;
+ right += _hwScreen->pitch;
}
- } else if (_hwscreen->format->BytesPerPixel == 4) {
- uint32 *top = (uint32 *)((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 4);
- uint32 *bottom = (uint32 *)((byte *)_hwscreen->pixels + (y + h) * _hwscreen->pitch + x * 4);
- byte *left = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + x * 4);
- byte *right = ((byte *)_hwscreen->pixels + y * _hwscreen->pitch + (x + w - 1) * 4);
+ } else if (_hwScreen->format->BytesPerPixel == 4) {
+ uint32 *top = (uint32 *)((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 4);
+ uint32 *bottom = (uint32 *)((byte *)_hwScreen->pixels + (y + h) * _hwScreen->pitch + x * 4);
+ byte *left = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + x * 4);
+ byte *right = ((byte *)_hwScreen->pixels + y * _hwScreen->pitch + (x + w - 1) * 4);
while (w--) {
*top++ = rectColor;
@@ -1355,12 +1335,12 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
*(uint32 *)left = rectColor;
*(uint32 *)right = rectColor;
- left += _hwscreen->pitch;
- right += _hwscreen->pitch;
+ left += _hwScreen->pitch;
+ right += _hwScreen->pitch;
}
}
- SDL_UnlockSurface(_hwscreen);
+ SDL_UnlockSurface(_hwScreen);
}
}
}
@@ -1368,17 +1348,17 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
// Finally, blit all our changes to the screen
if (!_displayDisabled) {
- SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
+ SDL_UpdateRects(_hwScreen, _numDirtyRects, _dirtyRectList);
}
}
_numDirtyRects = 0;
- _forceFull = false;
- _mouseNeedsRedraw = false;
+ _forceRedraw = false;
+ _cursorNeedsRedraw = false;
}
bool SurfaceSdlGraphicsManager::saveScreenshot(const char *filename) {
- assert(_hwscreen != NULL);
+ assert(_hwScreen != NULL);
Common::StackLock lock(_graphicsMutex);
#ifdef USE_PNG
@@ -1388,12 +1368,12 @@ bool SurfaceSdlGraphicsManager::saveScreenshot(const char *filename) {
}
#if SDL_VERSION_ATLEAST(2, 0, 0)
- SDL_Surface *rgbScreen = SDL_ConvertSurfaceFormat(_hwscreen, SDL_PIXELFORMAT_RGB24, 0);
+ SDL_Surface *rgbScreen = SDL_ConvertSurfaceFormat(_hwScreen, SDL_PIXELFORMAT_RGB24, 0);
#else
// This block of code was taken mostly as-is from SDL 1.2's SDL_SaveBMP_RW
SDL_Surface *rgbScreen = SDL_CreateRGBSurface(SDL_SWSURFACE,
- _hwscreen->w,
- _hwscreen->h,
+ _hwScreen->w,
+ _hwScreen->h,
24,
#ifdef SCUMM_LITTLE_ENDIAN
0x0000FF, 0x00FF00, 0xFF0000,
@@ -1408,9 +1388,9 @@ bool SurfaceSdlGraphicsManager::saveScreenshot(const char *filename) {
SDL_Rect bounds;
bounds.x = bounds.y = 0;
- bounds.w = _hwscreen->w;
- bounds.h = _hwscreen->h;
- if (SDL_LowerBlit(_hwscreen, &bounds, rgbScreen, &bounds) < 0) {
+ bounds.w = _hwScreen->w;
+ bounds.h = _hwScreen->h;
+ if (SDL_LowerBlit(_hwScreen, &bounds, rgbScreen, &bounds) < 0) {
SDL_FreeSurface(rgbScreen);
rgbScreen = nullptr;
}
@@ -1438,7 +1418,7 @@ bool SurfaceSdlGraphicsManager::saveScreenshot(const char *filename) {
return success;
#else
- return SDL_SaveBMP(_hwscreen, filename) == 0;
+ return SDL_SaveBMP(_hwScreen, filename) == 0;
#endif
}
@@ -1502,7 +1482,6 @@ void SurfaceSdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int
if (SDL_LockSurface(_screen) == -1)
error("SDL_LockSurface failed: %s", SDL_GetError());
-#ifdef USE_RGB_COLOR
byte *dst = (byte *)_screen->pixels + y * _screen->pitch + x * _screenFormat.bytesPerPixel;
if (_videoMode.screenWidth == w && pitch == _screen->pitch) {
memcpy(dst, buf, h*pitch);
@@ -1514,19 +1493,6 @@ void SurfaceSdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int
dst += _screen->pitch;
} while (--h);
}
-#else
- byte *dst = (byte *)_screen->pixels + y * _screen->pitch + x;
- if (_screen->pitch == pitch && pitch == w) {
- memcpy(dst, buf, h*w);
- } else {
- const byte *src = (const byte *)buf;
- do {
- memcpy(dst, src, w);
- src += pitch;
- dst += _screen->pitch;
- } while (--h);
- }
-#endif
// Unlock the screen surface
SDL_UnlockSurface(_screen);
@@ -1546,13 +1512,7 @@ Graphics::Surface *SurfaceSdlGraphicsManager::lockScreen() {
if (SDL_LockSurface(_screen) == -1)
error("SDL_LockSurface failed: %s", SDL_GetError());
- _framebuffer.init(_screen->w, _screen->h, _screen->pitch, _screen->pixels,
-#ifdef USE_RGB_COLOR
- _screenFormat
-#else
- Graphics::PixelFormat::createFormatCLUT8()
-#endif
- );
+ _framebuffer.init(_screen->w, _screen->h, _screen->pitch, _screen->pixels, _screenFormat);
return &_framebuffer;
}
@@ -1568,7 +1528,7 @@ void SurfaceSdlGraphicsManager::unlockScreen() {
SDL_UnlockSurface(_screen);
// Trigger a full screen update
- _forceFull = true;
+ _forceRedraw = true;
// Finally unlock the graphics mutex
g_system->unlockMutex(_graphicsMutex);
@@ -1582,11 +1542,11 @@ void SurfaceSdlGraphicsManager::fillScreen(uint32 col) {
}
void SurfaceSdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool realCoordinates) {
- if (_forceFull)
+ if (_forceRedraw)
return;
if (_numDirtyRects == NUM_DIRTY_RECT) {
- _forceFull = true;
+ _forceRedraw = true;
return;
}
@@ -1605,8 +1565,8 @@ void SurfaceSdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool re
if (!realCoordinates) {
x--;
y--;
- w+=2;
- h+=2;
+ w += 2;
+ h += 2;
}
// clip
@@ -1617,7 +1577,7 @@ void SurfaceSdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool re
if (y < 0) {
h += y;
- y=0;
+ y = 0;
}
if (w > width - x) {
@@ -1635,7 +1595,7 @@ void SurfaceSdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool re
#endif
if (w == width && h == height) {
- _forceFull = true;
+ _forceRedraw = true;
return;
}
@@ -1649,20 +1609,17 @@ void SurfaceSdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool re
}
}
-int16 SurfaceSdlGraphicsManager::getHeight() {
+int16 SurfaceSdlGraphicsManager::getHeight() const {
return _videoMode.screenHeight;
}
-int16 SurfaceSdlGraphicsManager::getWidth() {
+int16 SurfaceSdlGraphicsManager::getWidth() const {
return _videoMode.screenWidth;
}
void SurfaceSdlGraphicsManager::setPalette(const byte *colors, uint start, uint num) {
assert(colors);
-
-#ifdef USE_RGB_COLOR
assert(_screenFormat.bytesPerPixel == 1);
-#endif
// Setting the palette before _screen is created is allowed - for now -
// since we don't actually set the palette until the screen is updated.
@@ -1694,12 +1651,9 @@ void SurfaceSdlGraphicsManager::setPalette(const byte *colors, uint start, uint
blitCursor();
}
-void SurfaceSdlGraphicsManager::grabPalette(byte *colors, uint start, uint num) {
+void SurfaceSdlGraphicsManager::grabPalette(byte *colors, uint start, uint num) const {
assert(colors);
-
-#ifdef USE_RGB_COLOR
assert(_screenFormat.bytesPerPixel == 1);
-#endif
const SDL_Color *base = _currentPalette + start;
@@ -1774,56 +1728,7 @@ void SurfaceSdlGraphicsManager::clearFocusRectangle() {
#pragma mark --- Overlays ---
#pragma mark -
-void SurfaceSdlGraphicsManager::showOverlay() {
- assert(_transactionMode == kTransactionNone);
-
- int x, y;
-
- if (_overlayVisible)
- return;
-
- _overlayVisible = true;
-
- // Since resolution could change, put mouse to adjusted position
- // Fixes bug #1349059
- x = _mouseCurState.x * _videoMode.scaleFactor;
- if (_videoMode.aspectRatioCorrection)
- y = real2Aspect(_mouseCurState.y) * _videoMode.scaleFactor;
- else
- y = _mouseCurState.y * _videoMode.scaleFactor;
-
- warpMouse(x, y);
-
- clearOverlay();
-}
-
-void SurfaceSdlGraphicsManager::hideOverlay() {
- assert(_transactionMode == kTransactionNone);
-
- if (!_overlayVisible)
- return;
-
- int x, y;
-
- _overlayVisible = false;
-
- // Since resolution could change, put mouse to adjusted position
- // Fixes bug #1349059
- x = _mouseCurState.x / _videoMode.scaleFactor;
- y = _mouseCurState.y / _videoMode.scaleFactor;
- if (_videoMode.aspectRatioCorrection)
- y = aspect2Real(y);
-
- warpMouse(x, y);
-
- clearOverlay();
-
- _forceFull = true;
-}
-
void SurfaceSdlGraphicsManager::clearOverlay() {
- //assert(_transactionMode == kTransactionNone);
-
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
if (!_overlayVisible)
@@ -1851,10 +1756,10 @@ void SurfaceSdlGraphicsManager::clearOverlay() {
SDL_UnlockSurface(_tmpscreen);
SDL_UnlockSurface(_overlayscreen);
- _forceFull = true;
+ _forceRedraw = true;
}
-void SurfaceSdlGraphicsManager::grabOverlay(void *buf, int pitch) {
+void SurfaceSdlGraphicsManager::grabOverlay(void *buf, int pitch) const {
assert(_transactionMode == kTransactionNone);
if (_overlayscreen == NULL)
@@ -1928,143 +1833,201 @@ void SurfaceSdlGraphicsManager::copyRectToOverlay(const void *buf, int pitch, in
#pragma mark --- Mouse ---
#pragma mark -
-bool SurfaceSdlGraphicsManager::showMouse(bool visible) {
- if (_mouseVisible == visible)
- return visible;
+void SurfaceSdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keyColor, bool dontScale, const Graphics::PixelFormat *format) {
+ if (format) {
+#ifndef USE_RGB_COLOR
+ assert(format->bytesPerPixel == 1);
+#endif
+ _cursorFormat = *format;
+ } else {
+ _cursorFormat = Graphics::PixelFormat::createFormatCLUT8();
+ }
- bool last = _mouseVisible;
- _mouseVisible = visible;
- _mouseNeedsRedraw = true;
+ if (_cursorFormat.bytesPerPixel == 4) {
+ assert(keyColor == 0);
+ } else {
+ assert(keyColor < 1U << (_cursorFormat.bytesPerPixel * 8));
+ }
- return last;
-}
+ _mouseCurState.hotX = hotspotX;
+ _mouseCurState.hotY = hotspotY;
-void SurfaceSdlGraphicsManager::setMousePos(int x, int y) {
- if (x != _mouseCurState.x || y != _mouseCurState.y) {
- _mouseNeedsRedraw = true;
- _mouseCurState.x = x;
- _mouseCurState.y = y;
- }
-}
+ _mouseKeyColor = keyColor;
-void SurfaceSdlGraphicsManager::warpMouse(int x, int y) {
- // Don't change actual mouse position, when mouse is outside of our window (in case of windowed mode)
- if (!_window->hasMouseFocus()) {
- setMousePos(x, y); // but change game cursor position
- return;
- }
+ _cursorDontScale = dontScale;
- int x1 = x, y1 = y;
- if (_videoMode.aspectRatioCorrection && !_overlayVisible)
- y1 = real2Aspect(y1);
+ if (_mouseCurState.w != (int)w || _mouseCurState.h != (int)h) {
+ _mouseCurState.w = w;
+ _mouseCurState.h = h;
- if (_mouseCurState.x != x || _mouseCurState.y != y) {
- if (!_overlayVisible) {
- x1 *= _videoMode.scaleFactor;
- y1 *= _videoMode.scaleFactor;
+ if (!w || !h) {
+ return;
}
-#if SDL_VERSION_ATLEAST(2, 0, 0)
- // Transform our coordinates in "virtual" output coordinate space into
- // actual output coordinate space.
- x1 = x1 * _windowWidth / _videoMode.hardwareWidth;
- y1 = y1 * _windowHeight / _videoMode.hardwareHeight;
-#endif
+ if (_mouseOrigSurface) {
+ SDL_FreeSurface(_mouseOrigSurface);
- _window->warpMouseInWindow(x1, y1);
+ if (_mouseSurface == _mouseOrigSurface) {
+ _mouseSurface = nullptr;
+ }
+ }
- // SDL_WarpMouse() generates a mouse movement event, so
- // setMousePos() would be called eventually. However, the
- // cannon script in CoMI calls this function twice each time
- // the cannon is reloaded. Unless we update the mouse position
- // immediately the second call is ignored, causing the cannon
- // to change its aim.
+ if (_cursorFormat.bytesPerPixel == 4) {
+ if (_mouseSurface != _mouseOrigSurface) {
+ SDL_FreeSurface(_mouseSurface);
+ }
- setMousePos(x, y);
+ const Uint32 rMask = ((0xFF >> format->rLoss) << format->rShift);
+ const Uint32 gMask = ((0xFF >> format->gLoss) << format->gShift);
+ const Uint32 bMask = ((0xFF >> format->bLoss) << format->bShift);
+ const Uint32 aMask = ((0xFF >> format->aLoss) << format->aShift);
+ _mouseSurface = _mouseOrigSurface = SDL_CreateRGBSurfaceFrom(const_cast<void *>(buf), w, h, format->bytesPerPixel * 8, w * format->bytesPerPixel, rMask, gMask, bMask, aMask);
+ } else {
+ // Allocate bigger surface because AdvMame2x adds black pixel at [0,0]
+ _mouseOrigSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
+ _mouseCurState.w + 2,
+ _mouseCurState.h + 2,
+ 16,
+ _hwScreen->format->Rmask,
+ _hwScreen->format->Gmask,
+ _hwScreen->format->Bmask,
+ _hwScreen->format->Amask);
+ }
+
+ if (_mouseOrigSurface == nullptr) {
+ error("Allocating _mouseOrigSurface failed");
+ }
+
+ if (_cursorFormat.bytesPerPixel < 4) {
+ SDL_SetColorKey(_mouseOrigSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
+ }
}
+
+ delete[] _mouseData;
+ if (_cursorFormat.bytesPerPixel == 4) {
+ _mouseData = nullptr;
+ } else {
+ _mouseData = new byte[w * h * _cursorFormat.bytesPerPixel];
+ assert(_mouseData);
+ memcpy(_mouseData, buf, w * h * _cursorFormat.bytesPerPixel);
+ }
+
+ blitCursor();
}
-void SurfaceSdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
-#ifdef USE_RGB_COLOR
- if (!format)
- _cursorFormat = Graphics::PixelFormat::createFormatCLUT8();
- else if (format->bytesPerPixel <= _screenFormat.bytesPerPixel)
- _cursorFormat = *format;
+void SurfaceSdlGraphicsManager::blitCursor() {
+ const int w = _mouseCurState.w;
+ const int h = _mouseCurState.h;
- if (_cursorFormat.bytesPerPixel < 4)
- assert(keycolor < (uint)(1 << (_cursorFormat.bytesPerPixel << 3)));
-#else
- assert(keycolor <= 0xFF);
-#endif
+ if (!w || !h || !_mouseOrigSurface) {
+ return;
+ }
- if (w == 0 || h == 0)
+ if (_cursorFormat.bytesPerPixel != 4 && !_mouseData) {
return;
+ }
- _mouseCurState.hotX = hotspot_x;
- _mouseCurState.hotY = hotspot_y;
+ _cursorNeedsRedraw = true;
- _mouseKeyColor = keycolor;
+ int cursorScale;
+ if (_cursorDontScale) {
+ // Don't scale the cursor at all if the user requests this behavior.
+ cursorScale = 1;
+ } else {
+ // Scale the cursor with the game screen scale factor.
+ cursorScale = _videoMode.scaleFactor;
+ }
- _cursorDontScale = dontScale;
+ // Adapt the real hotspot according to the scale factor.
+ int rW = w * cursorScale;
+ int rH = h * cursorScale;
+ _mouseCurState.rHotX = _mouseCurState.hotX * cursorScale;
+ _mouseCurState.rHotY = _mouseCurState.hotY * cursorScale;
- if (_mouseCurState.w != (int)w || _mouseCurState.h != (int)h) {
- _mouseCurState.w = w;
- _mouseCurState.h = h;
+ // The virtual dimensions will be the same as the original.
- if (_mouseOrigSurface)
- SDL_FreeSurface(_mouseOrigSurface);
+ _mouseCurState.vW = w;
+ _mouseCurState.vH = h;
+ _mouseCurState.vHotX = _mouseCurState.hotX;
+ _mouseCurState.vHotY = _mouseCurState.hotY;
- // Allocate bigger surface because AdvMame2x adds black pixel at [0,0]
- _mouseOrigSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
- _mouseCurState.w + 2,
- _mouseCurState.h + 2,
- 16,
- _hwscreen->format->Rmask,
- _hwscreen->format->Gmask,
- _hwscreen->format->Bmask,
- _hwscreen->format->Amask);
+#ifdef USE_SCALERS
+ // store original to pass to aspect-correction function later
+ const int rH1 = rH;
+#endif
- if (_mouseOrigSurface == NULL)
- error("allocating _mouseOrigSurface failed");
- SDL_SetColorKey(_mouseOrigSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
+ if (!_cursorDontScale && _videoMode.aspectRatioCorrection) {
+ rH = real2Aspect(rH - 1) + 1;
+ _mouseCurState.rHotY = real2Aspect(_mouseCurState.rHotY);
}
- free(_mouseData);
-#ifdef USE_RGB_COLOR
- _mouseData = (byte *)malloc(w * h * _cursorFormat.bytesPerPixel);
- memcpy(_mouseData, buf, w * h * _cursorFormat.bytesPerPixel);
-#else
- _mouseData = (byte *)malloc(w * h);
- memcpy(_mouseData, buf, w * h);
-#endif
-
- blitCursor();
-}
+ bool sizeChanged = false;
+ if (_mouseCurState.rW != rW || _mouseCurState.rH != rH) {
+ _mouseCurState.rW = rW;
+ _mouseCurState.rH = rH;
+ sizeChanged = true;
+ }
-void SurfaceSdlGraphicsManager::blitCursor() {
- byte *dstPtr;
- const byte *srcPtr = _mouseData;
-#ifdef USE_RGB_COLOR
- uint32 color;
-#else
- byte color;
-#endif
- int w, h, i, j;
+ if (_cursorFormat.bytesPerPixel == 4) {
+ if (_mouseSurface != _mouseOrigSurface) {
+ SDL_FreeSurface(_mouseSurface);
+ }
- if (!_mouseOrigSurface || !_mouseData)
- return;
+ if (cursorScale == 1) {
+ _mouseSurface = _mouseOrigSurface;
+ return;
+ }
- _mouseNeedsRedraw = true;
+ SDL_PixelFormat *format = _mouseOrigSurface->format;
+ _mouseSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_SRCALPHA,
+ rW, rH,
+ format->BitsPerPixel,
+ format->Rmask,
+ format->Gmask,
+ format->Bmask,
+ format->Amask);
+
+ // At least SDL 2.0.4 on Windows apparently has a broken SDL_BlitScaled
+ // implementation, and SDL 1 has no such API at all, and our other
+ // scalers operate exclusively at 16bpp, so here is a scrappy 32bpp
+ // point scaler
+ SDL_LockSurface(_mouseOrigSurface);
+ SDL_LockSurface(_mouseSurface);
+
+ const byte *src = (const byte *)_mouseOrigSurface->pixels;
+ byte *dst = (byte *)_mouseSurface->pixels;
+ for (int y = 0; y < _mouseOrigSurface->h; ++y) {
+ uint32 *rowDst = (uint32 *)dst;
+ const uint32 *rowSrc = (const uint32 *)src;
+ for (int x = 0; x < _mouseOrigSurface->w; ++x) {
+ for (int scaleX = 0; scaleX < cursorScale; ++scaleX) {
+ *rowDst++ = *rowSrc;
+ }
+ ++rowSrc;
+ }
+ for (int scaleY = 0; scaleY < cursorScale - 1; ++scaleY) {
+ memcpy(dst + _mouseSurface->pitch, dst, _mouseSurface->pitch);
+ dst += _mouseSurface->pitch;
+ }
+ dst += _mouseSurface->pitch;
+ src += _mouseOrigSurface->pitch;
+ }
- w = _mouseCurState.w;
- h = _mouseCurState.h;
+ SDL_UnlockSurface(_mouseSurface);
+ SDL_UnlockSurface(_mouseOrigSurface);
+ return;
+ }
SDL_LockSurface(_mouseOrigSurface);
+ byte *dstPtr;
+ const byte *srcPtr = _mouseData;
+ uint32 color;
+
// Make whole surface transparent
- for (i = 0; i < h + 2; i++) {
+ for (int i = 0; i < h + 2; i++) {
dstPtr = (byte *)_mouseOrigSurface->pixels + _mouseOrigSurface->pitch * i;
- for (j = 0; j < w + 2; j++) {
+ for (int j = 0; j < w + 2; j++) {
*(uint16 *)dstPtr = kMouseColorKey;
dstPtr += 2;
}
@@ -2080,75 +2043,31 @@ void SurfaceSdlGraphicsManager::blitCursor() {
else
palette = _cursorPalette;
- for (i = 0; i < h; i++) {
- for (j = 0; j < w; j++) {
-#ifdef USE_RGB_COLOR
- if (_cursorFormat.bytesPerPixel > 1) {
- if (_cursorFormat.bytesPerPixel == 2)
- color = *(const uint16 *)srcPtr;
- else
- color = *(const uint32 *)srcPtr;
- if (color != _mouseKeyColor) { // transparent, don't draw
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ if (_cursorFormat.bytesPerPixel == 2) {
+ color = *(const uint16 *)srcPtr;
+ if (color != _mouseKeyColor) {
uint8 r, g, b;
_cursorFormat.colorToRGB(color, r, g, b);
- *(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format,
- r, g, b);
+ *(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format, r, g, b);
}
dstPtr += 2;
srcPtr += _cursorFormat.bytesPerPixel;
} else {
-#endif
color = *srcPtr;
- if (color != _mouseKeyColor) { // transparent, don't draw
+ if (color != _mouseKeyColor) {
*(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format,
palette[color].r, palette[color].g, palette[color].b);
}
dstPtr += 2;
srcPtr++;
-#ifdef USE_RGB_COLOR
}
-#endif
}
dstPtr += _mouseOrigSurface->pitch - w * 2;
}
- int rW, rH;
- int cursorScale;
-
- if (_cursorDontScale) {
- // Don't scale the cursor at all if the user requests this behavior.
- cursorScale = 1;
- } else {
- // Scale the cursor with the game screen scale factor.
- cursorScale = _videoMode.scaleFactor;
- }
-
- // Adapt the real hotspot according to the scale factor.
- rW = w * cursorScale;
- rH = h * cursorScale;
- _mouseCurState.rHotX = _mouseCurState.hotX * cursorScale;
- _mouseCurState.rHotY = _mouseCurState.hotY * cursorScale;
-
- // The virtual dimensions will be the same as the original.
-
- _mouseCurState.vW = w;
- _mouseCurState.vH = h;
- _mouseCurState.vHotX = _mouseCurState.hotX;
- _mouseCurState.vHotY = _mouseCurState.hotY;
-
-#ifdef USE_SCALERS
- int rH1 = rH; // store original to pass to aspect-correction function later
-#endif
-
- if (!_cursorDontScale && _videoMode.aspectRatioCorrection) {
- rH = real2Aspect(rH - 1) + 1;
- _mouseCurState.rHotY = real2Aspect(_mouseCurState.rHotY);
- }
-
- if (_mouseCurState.rW != rW || _mouseCurState.rH != rH) {
- _mouseCurState.rW = rW;
- _mouseCurState.rH = rH;
-
+ if (sizeChanged) {
if (_mouseSurface)
SDL_FreeSurface(_mouseSurface);
@@ -2156,13 +2075,13 @@ void SurfaceSdlGraphicsManager::blitCursor() {
_mouseCurState.rW,
_mouseCurState.rH,
16,
- _hwscreen->format->Rmask,
- _hwscreen->format->Gmask,
- _hwscreen->format->Bmask,
- _hwscreen->format->Amask);
+ _hwScreen->format->Rmask,
+ _hwScreen->format->Gmask,
+ _hwScreen->format->Bmask,
+ _hwScreen->format->Amask);
- if (_mouseSurface == NULL)
- error("allocating _mouseSurface failed");
+ if (_mouseSurface == nullptr)
+ error("Allocating _mouseSurface failed");
SDL_SetColorKey(_mouseSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
}
@@ -2233,7 +2152,7 @@ void SurfaceSdlGraphicsManager::undrawMouse() {
}
void SurfaceSdlGraphicsManager::drawMouse() {
- if (!_mouseVisible || !_mouseSurface) {
+ if (!_cursorVisible || !_mouseSurface || !_mouseCurState.w || !_mouseCurState.h) {
_mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0;
return;
}
@@ -2242,8 +2161,10 @@ void SurfaceSdlGraphicsManager::drawMouse() {
int scale;
int hotX, hotY;
- dst.x = _mouseCurState.x;
- dst.y = _mouseCurState.y;
+ const Common::Point virtualCursor = convertWindowToVirtual(_cursorX, _cursorY);
+
+ dst.x = virtualCursor.x;
+ dst.y = virtualCursor.y;
if (!_overlayVisible) {
scale = _videoMode.scaleFactor;
@@ -2283,7 +2204,7 @@ void SurfaceSdlGraphicsManager::drawMouse() {
// Note that SDL_BlitSurface() and addDirtyRect() will both perform any
// clipping necessary
- if (SDL_BlitSurface(_mouseSurface, NULL, _hwscreen, &dst) != 0)
+ if (SDL_BlitSurface(_mouseSurface, nullptr, _hwScreen, &dst) != 0)
error("SDL_BlitSurface failed: %s", SDL_GetError());
// The screen will be updated using real surface coordinates, i.e.
@@ -2332,14 +2253,14 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const char *msg) {
}
// Clip the rect
- if (width > _hwscreen->w)
- width = _hwscreen->w;
- if (height > _hwscreen->h)
- height = _hwscreen->h;
+ if (width > _hwScreen->w)
+ width = _hwScreen->w;
+ if (height > _hwScreen->h)
+ height = _hwScreen->h;
_osdMessageSurface = SDL_CreateRGBSurface(
SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCALPHA,
- width, height, 16, _hwscreen->format->Rmask, _hwscreen->format->Gmask, _hwscreen->format->Bmask, _hwscreen->format->Amask
+ width, height, 16, _hwScreen->format->Rmask, _hwScreen->format->Gmask, _hwScreen->format->Bmask, _hwScreen->format->Amask
);
// Lock the surface
@@ -2376,8 +2297,8 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const char *msg) {
SDL_Rect SurfaceSdlGraphicsManager::getOSDMessageRect() const {
SDL_Rect rect;
- rect.x = (_hwscreen->w - _osdMessageSurface->w) / 2;
- rect.y = (_hwscreen->h - _osdMessageSurface->h) / 2;
+ rect.x = (_hwScreen->w - _osdMessageSurface->w) / 2;
+ rect.y = (_hwScreen->h - _osdMessageSurface->h) / 2;
rect.w = _osdMessageSurface->w;
rect.h = _osdMessageSurface->h;
return rect;
@@ -2390,7 +2311,7 @@ void SurfaceSdlGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface
if (_osdIconSurface && !icon) {
// Force a redraw to clear the icon on the next update
- _forceFull = true;
+ _forceRedraw = true;
}
if (_osdIconSurface) {
@@ -2429,7 +2350,7 @@ void SurfaceSdlGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface
SDL_Rect SurfaceSdlGraphicsManager::getOSDIconRect() const {
SDL_Rect dstRect;
- dstRect.x = _hwscreen->w - _osdIconSurface->w - 10;
+ dstRect.x = _hwScreen->w - _osdIconSurface->w - 10;
dstRect.y = 10;
dstRect.w = _osdIconSurface->w;
dstRect.h = _osdIconSurface->h;
@@ -2461,7 +2382,7 @@ void SurfaceSdlGraphicsManager::updateOSD() {
_osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
}
SDL_SetAlpha(_osdMessageSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdMessageAlpha);
- _forceFull = true;
+ _forceRedraw = true;
}
if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) {
@@ -2471,26 +2392,30 @@ void SurfaceSdlGraphicsManager::updateOSD() {
if (_osdIconSurface) {
// Redraw the area below the icon for the transparent blit to give correct results.
- _forceFull = true;
+ _forceRedraw = true;
}
}
void SurfaceSdlGraphicsManager::drawOSD() {
if (_osdMessageSurface) {
SDL_Rect dstRect = getOSDMessageRect();
- SDL_BlitSurface(_osdMessageSurface, 0, _hwscreen, &dstRect);
+ SDL_BlitSurface(_osdMessageSurface, 0, _hwScreen, &dstRect);
}
if (_osdIconSurface) {
SDL_Rect dstRect = getOSDIconRect();
- SDL_BlitSurface(_osdIconSurface, 0, _hwscreen, &dstRect);
+ SDL_BlitSurface(_osdIconSurface, 0, _hwScreen, &dstRect);
}
}
#endif
-bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
+void SurfaceSdlGraphicsManager::handleResizeImpl(const int width, const int height) {
+ SdlGraphicsManager::handleResizeImpl(width, height);
+ recalculateDisplayAreas();
+}
+bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
// Ctrl-Alt-a toggles aspect ratio correction
if (key == 'a') {
beginGFXTransaction();
@@ -2502,13 +2427,13 @@ bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
message = Common::String::format("%s\n%d x %d -> %d x %d",
_("Enabled aspect ratio correction"),
_videoMode.screenWidth, _videoMode.screenHeight,
- _hwscreen->w, _hwscreen->h
+ _hwScreen->w, _hwScreen->h
);
else
message = Common::String::format("%s\n%d x %d -> %d x %d",
_("Disabled aspect ratio correction"),
_videoMode.screenWidth, _videoMode.screenHeight,
- _hwscreen->w, _hwscreen->h
+ _hwScreen->w, _hwScreen->h
);
displayMessageOnOSD(message.c_str());
#endif
@@ -2529,7 +2454,7 @@ bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
displayMessageOnOSD(_("Filtering disabled"));
}
#endif
- _forceFull = true;
+ _forceRedraw = true;
internUpdateScreen();
return true;
}
@@ -2539,12 +2464,19 @@ bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
int factor = _videoMode.scaleFactor - 1;
SDLKey sdlKey = (SDLKey)key;
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ bool sizeChanged = false;
+#endif
+
// Increase/decrease the scale factor
if (sdlKey == SDLK_EQUALS || sdlKey == SDLK_PLUS || sdlKey == SDLK_MINUS ||
sdlKey == SDLK_KP_PLUS || sdlKey == SDLK_KP_MINUS) {
factor += (sdlKey == SDLK_MINUS || sdlKey == SDLK_KP_MINUS) ? -1 : +1;
if (0 <= factor && factor <= 3) {
newMode = s_gfxModeSwitchTable[_scalerType][factor];
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ sizeChanged = true;
+#endif
}
}
@@ -2582,10 +2514,19 @@ bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
_("Active graphics filter:"),
newScalerName,
_videoMode.screenWidth, _videoMode.screenHeight,
- _hwscreen->w, _hwscreen->h);
+ _hwScreen->w, _hwScreen->h);
displayMessageOnOSD(message.c_str());
}
#endif
+
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ if (sizeChanged) {
+ // Forcibly resizing the window here since a user switching scaler
+ // size will not normally cause the window to update
+ _window->createOrUpdateWindow(_hwScreen->w, _hwScreen->h, _lastFlags);
+ }
+#endif
+
internUpdateScreen();
return true;
@@ -2697,37 +2638,13 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
}
void SurfaceSdlGraphicsManager::notifyVideoExpose() {
- _forceFull = true;
-}
-
-void SurfaceSdlGraphicsManager::notifyResize(const uint width, const uint height) {
-#if SDL_VERSION_ATLEAST(2, 0, 0)
- setWindowResolution(width, height);
-#endif
+ _forceRedraw = true;
}
-void SurfaceSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) {
+void SurfaceSdlGraphicsManager::notifyResize(const int width, const int height) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
- // In SDL2 the actual output resolution might be different from what we
- // requested. Thus, we transform the coordinates from actual output
- // coordinate space into the "virtual" output coordinate space.
- // Please note that we ignore the possible existence of black bars here,
- // this avoids the feeling of stickyness to black bars.
- point.x = point.x * _videoMode.hardwareWidth / _windowWidth;
- point.y = point.y * _videoMode.hardwareHeight / _windowHeight;
+ handleResize(width, height);
#endif
-
- if (!_overlayVisible) {
- point.x /= _videoMode.scaleFactor;
- point.y /= _videoMode.scaleFactor;
- if (_videoMode.aspectRatioCorrection)
- point.y = aspect2Real(point.y);
- }
-}
-
-void SurfaceSdlGraphicsManager::notifyMousePos(Common::Point mouse) {
- transformMouseCoordinates(mouse);
- setMousePos(mouse.x, mouse.y);
}
#if SDL_VERSION_ATLEAST(2, 0, 0)
@@ -2739,39 +2656,6 @@ void SurfaceSdlGraphicsManager::deinitializeRenderer() {
_renderer = nullptr;
}
-void SurfaceSdlGraphicsManager::setWindowResolution(int width, int height) {
- _windowWidth = width;
- _windowHeight = height;
-
- // We expect full screen resolution as inputs coming from the event system.
- _eventSource->resetKeyboardEmulation(_windowWidth - 1, _windowHeight - 1);
-
- // Calculate the "viewport" for the actual area we draw in. In fullscreen
- // we can easily get a different resolution than what we requested. In
- // this case, we add black bars if necessary to assure the aspect ratio
- // is preserved.
- const frac_t outputAspect = intToFrac(_windowWidth) / _windowHeight;
- const frac_t desiredAspect = intToFrac(_videoMode.hardwareWidth) / _videoMode.hardwareHeight;
-
- _viewport.w = _windowWidth;
- _viewport.h = _windowHeight;
-
- // Adjust one dimension for mantaining the aspect ratio.
- if (abs(outputAspect - desiredAspect) >= (int)(FRAC_ONE / 1000)) {
- if (outputAspect < desiredAspect) {
- _viewport.h = _videoMode.hardwareHeight * _windowWidth / _videoMode.hardwareWidth;
- } else if (outputAspect > desiredAspect) {
- _viewport.w = _videoMode.hardwareWidth * _windowHeight / _videoMode.hardwareHeight;
- }
- }
-
- _viewport.x = (_windowWidth - _viewport.w) / 2;
- _viewport.y = (_windowHeight - _viewport.h) / 2;
-
- // Force a full redraw because we changed the viewport.
- _forceFull = true;
-}
-
void SurfaceSdlGraphicsManager::recreateScreenTexture() {
if (!_renderer)
return;
@@ -2789,15 +2673,12 @@ void SurfaceSdlGraphicsManager::recreateScreenTexture() {
SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) {
deinitializeRenderer();
- uint32 createWindowFlags = 0;
-#ifdef USE_SDL_RESIZABLE_WINDOW
- createWindowFlags |= SDL_WINDOW_RESIZABLE;
-#endif
+ uint32 createWindowFlags = SDL_WINDOW_RESIZABLE;
if ((flags & SDL_FULLSCREEN) != 0) {
createWindowFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
}
- if (!_window->createOrUpdateWindow(width, height, createWindowFlags)) {
+ if (!createOrUpdateWindow(width, height, createWindowFlags)) {
return nullptr;
}
@@ -2807,8 +2688,8 @@ SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height,
return nullptr;
}
- SDL_GetWindowSize(_window->getSDLWindow(), &_windowWidth, &_windowHeight);
- setWindowResolution(_windowWidth, _windowHeight);
+ getWindowSizeFromSdl(&_windowWidth, &_windowHeight);
+ handleResize(_windowWidth, _windowHeight);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, _videoMode.filtering ? "linear" : "nearest");
@@ -2830,8 +2711,14 @@ SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height,
void SurfaceSdlGraphicsManager::SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects) {
SDL_UpdateTexture(_screenTexture, nullptr, screen->pixels, screen->pitch);
+ SDL_Rect viewport;
+ viewport.x = _activeArea.drawRect.left;
+ viewport.y = _activeArea.drawRect.top;
+ viewport.w = _activeArea.drawRect.width();
+ viewport.h = _activeArea.drawRect.height();
+
SDL_RenderClear(_renderer);
- SDL_RenderCopy(_renderer, _screenTexture, NULL, &_viewport);
+ SDL_RenderCopy(_renderer, _screenTexture, NULL, &viewport);
SDL_RenderPresent(_renderer);
}
#endif // SDL_VERSION_ATLEAST(2, 0, 0)
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index 532399ed66..60f5d29f55 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -39,17 +39,7 @@
#define USE_SDL_DEBUG_FOCUSRECT
#endif
-// We have (some) support for resizable windows when SDL2 is used. However
-// the overlay still uses the resolution setup with SDL_SetVideoMode. This
-// makes the GUI look subpar when the user resizes the window. In addition
-// we do not adapt the scale factor right now. Thus, we disable this code
-// path for now.
-#if SDL_VERSION_ATLEAST(2, 0, 0) && 0
-#define USE_SDL_RESIZABLE_WINDOW
-#endif
-
#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
-// Uncomment this to enable the 'on screen display' code.
#define USE_OSD 1
#endif
@@ -89,76 +79,70 @@ public:
SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
virtual ~SurfaceSdlGraphicsManager();
- virtual void activateManager();
- virtual void deactivateManager();
+ virtual void activateManager() override;
+ virtual void deactivateManager() override;
- virtual bool hasFeature(OSystem::Feature f);
- virtual void setFeatureState(OSystem::Feature f, bool enable);
- virtual bool getFeatureState(OSystem::Feature f);
+ virtual bool hasFeature(OSystem::Feature f) const override;
+ virtual void setFeatureState(OSystem::Feature f, bool enable) override;
+ virtual bool getFeatureState(OSystem::Feature f) const override;
- virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- virtual int getDefaultGraphicsMode() const;
- virtual bool setGraphicsMode(int mode);
- virtual int getGraphicsMode() const;
- virtual void resetGraphicsScale();
+ virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
+ virtual int getDefaultGraphicsMode() const override;
+ virtual bool setGraphicsMode(int mode) override;
+ virtual int getGraphicsMode() const override;
+ virtual void resetGraphicsScale() override;
#ifdef USE_RGB_COLOR
- virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
- virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
+ virtual Graphics::PixelFormat getScreenFormat() const override { return _screenFormat; }
+ virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override;
#endif
- virtual const OSystem::GraphicsMode *getSupportedShaders() const;
- virtual int getShader() const;
- virtual bool setShader(int id);
- virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
- virtual int getScreenChangeID() const { return _screenChangeCount; }
+ virtual const OSystem::GraphicsMode *getSupportedShaders() const override;
+ virtual int getShader() const override;
+ virtual bool setShader(int id) override;
+ virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL) override;
+ virtual int getScreenChangeID() const override { return _screenChangeCount; }
- virtual void beginGFXTransaction();
- virtual OSystem::TransactionError endGFXTransaction();
+ virtual void beginGFXTransaction() override;
+ virtual OSystem::TransactionError endGFXTransaction() override;
- virtual int16 getHeight();
- virtual int16 getWidth();
+ virtual int16 getHeight() const override;
+ virtual int16 getWidth() const override;
protected:
// PaletteManager API
- virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void setPalette(const byte *colors, uint start, uint num) override;
+ virtual void grabPalette(byte *colors, uint start, uint num) const override;
public:
- virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
- virtual Graphics::Surface *lockScreen();
- virtual void unlockScreen();
- virtual void fillScreen(uint32 col);
- virtual void updateScreen();
- virtual void setShakePos(int shakeOffset);
- virtual void setFocusRectangle(const Common::Rect& rect);
- virtual void clearFocusRectangle();
-
- virtual void showOverlay();
- virtual void hideOverlay();
- virtual Graphics::PixelFormat getOverlayFormat() const { return _overlayFormat; }
- virtual void clearOverlay();
- virtual void grabOverlay(void *buf, int pitch);
- virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);
- virtual int16 getOverlayHeight() { return _videoMode.overlayHeight; }
- virtual int16 getOverlayWidth() { return _videoMode.overlayWidth; }
-
- virtual bool showMouse(bool visible);
- virtual void warpMouse(int x, int y);
- virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
- virtual void setCursorPalette(const byte *colors, uint start, uint num);
+ virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) override;
+ virtual Graphics::Surface *lockScreen() override;
+ virtual void unlockScreen() override;
+ virtual void fillScreen(uint32 col) override;
+ virtual void updateScreen() override;
+ virtual void setShakePos(int shakeOffset) override;
+ virtual void setFocusRectangle(const Common::Rect& rect) override;
+ virtual void clearFocusRectangle() override;
+
+ virtual Graphics::PixelFormat getOverlayFormat() const override { return _overlayFormat; }
+ virtual void clearOverlay() override;
+ virtual void grabOverlay(void *buf, int pitch) const override;
+ virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override;
+ virtual int16 getOverlayHeight() const override { return _videoMode.overlayHeight; }
+ virtual int16 getOverlayWidth() const override { return _videoMode.overlayWidth; }
+
+ virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) override;
+ virtual void setCursorPalette(const byte *colors, uint start, uint num) override;
#ifdef USE_OSD
- virtual void displayMessageOnOSD(const char *msg);
- virtual void displayActivityIconOnOSD(const Graphics::Surface *icon);
+ virtual void displayMessageOnOSD(const char *msg) override;
+ virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
#endif
// Override from Common::EventObserver
- bool notifyEvent(const Common::Event &event);
+ virtual bool notifyEvent(const Common::Event &event) override;
// SdlGraphicsManager interface
- virtual void notifyVideoExpose();
- virtual void notifyResize(const uint width, const uint height);
- virtual void transformMouseCoordinates(Common::Point &point);
- virtual void notifyMousePos(Common::Point mouse);
+ virtual void notifyVideoExpose() override;
+ virtual void notifyResize(const int width, const int height) override;
protected:
#ifdef USE_OSD
@@ -187,18 +171,20 @@ protected:
void drawOSD();
#endif
- /** Hardware screen */
- SDL_Surface *_hwscreen;
+ virtual bool gameNeedsAspectRatioCorrection() const override {
+ return _videoMode.aspectRatioCorrection;
+ }
+
+ virtual void handleResizeImpl(const int width, const int height) override;
+
+ virtual int getGraphicsModeScale(int mode) const override;
#if SDL_VERSION_ATLEAST(2, 0, 0)
/* SDL2 features a different API for 2D graphics. We create a wrapper
* around this API to keep the code paths as close as possible. */
SDL_Renderer *_renderer;
SDL_Texture *_screenTexture;
- SDL_Rect _viewport;
- int _windowWidth, _windowHeight;
void deinitializeRenderer();
- void setWindowResolution(int width, int height);
void recreateScreenTexture();
virtual SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);
@@ -207,9 +193,9 @@ protected:
/** Unseen game screen */
SDL_Surface *_screen;
-#ifdef USE_RGB_COLOR
Graphics::PixelFormat _screenFormat;
Graphics::PixelFormat _cursorFormat;
+#ifdef USE_RGB_COLOR
Common::List<Graphics::PixelFormat> _supportedFormats;
/**
@@ -225,7 +211,6 @@ protected:
SDL_Surface *_tmpscreen2;
SDL_Surface *_overlayscreen;
- bool _overlayVisible;
Graphics::PixelFormat _overlayFormat;
enum {
@@ -238,7 +223,6 @@ protected:
bool sizeChanged;
bool needHotswap;
bool needUpdatescreen;
- bool normal1xScaler;
#if SDL_VERSION_ATLEAST(2, 0, 0)
bool needTextureUpdate;
#endif
@@ -288,14 +272,11 @@ protected:
uint8 _originalBitsPerPixel;
#endif
- /** Force full redraw on next updateScreen */
- bool _forceFull;
-
ScalerProc *_scalerProc;
int _scalerType;
int _transactionMode;
- // Indicates whether it is needed to free _hwsurface in destructor
+ // Indicates whether it is needed to free _hwSurface in destructor
bool _displayDisabled;
bool _screenIsLocked;
@@ -316,10 +297,6 @@ protected:
int _numDirtyRects;
struct MousePos {
- // The mouse position, using either virtual (game) or real
- // (overlay) coordinates.
- int16 x, y;
-
// The size and hotspot of the original cursor image.
int16 w, h;
int16 hotX, hotY;
@@ -334,14 +311,12 @@ protected:
int16 vW, vH;
int16 vHotX, vHotY;
- MousePos() : x(0), y(0), w(0), h(0), hotX(0), hotY(0),
+ MousePos() : w(0), h(0), hotX(0), hotY(0),
rW(0), rH(0), rHotX(0), rHotY(0), vW(0), vH(0),
vHotX(0), vHotY(0)
{ }
};
- bool _mouseVisible;
- bool _mouseNeedsRedraw;
byte *_mouseData;
SDL_Rect _mouseBackup;
MousePos _mouseCurState;
@@ -394,21 +369,45 @@ protected:
virtual void unloadGFXMode();
virtual bool hotswapGFXMode();
- virtual void setFullscreenMode(bool enable);
virtual void setAspectRatioCorrection(bool enable);
#if SDL_VERSION_ATLEAST(2, 0, 0)
- virtual void setFilteringMode(bool enable);
+ void setFilteringMode(bool enable);
#endif
- virtual int effectiveScreenHeight() const;
-
+ virtual bool saveScreenshot(const char *filename);
virtual void setGraphicsModeIntern();
- virtual bool handleScalerHotkeys(Common::KeyCode key);
- virtual bool isScalerHotkey(const Common::Event &event);
- virtual void setMousePos(int x, int y);
- virtual void toggleFullScreen();
- virtual bool saveScreenshot(const char *filename);
+private:
+ void setFullscreenMode(bool enable);
+ bool handleScalerHotkeys(Common::KeyCode key);
+ bool isScalerHotkey(const Common::Event &event);
+ void toggleFullScreen();
+
+ /**
+ * Converts the given point from the overlay's coordinate space to the
+ * game's coordinate space.
+ */
+ Common::Point convertOverlayToGame(const int x, const int y) const {
+ if (getOverlayWidth() == 0 || getOverlayHeight() == 0) {
+ error("convertOverlayToGame called without a valid overlay");
+ }
+
+ return Common::Point(x * getWidth() / getOverlayWidth(),
+ y * getHeight() / getOverlayHeight());
+ }
+
+ /**
+ * Converts the given point from the game's coordinate space to the
+ * overlay's coordinate space.
+ */
+ Common::Point convertGameToOverlay(const int x, const int y) const {
+ if (getWidth() == 0 || getHeight() == 0) {
+ error("convertGameToOverlay called without a valid overlay");
+ }
+
+ return Common::Point(x * getOverlayWidth() / getWidth(),
+ y * getOverlayHeight() / getHeight());
+ }
};
#endif
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
index c17cfd5efa..227674f811 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
@@ -50,7 +50,7 @@ bool SymbianSdlGraphicsManager::setGraphicsMode(int /*name*/) {
return SurfaceSdlGraphicsManager::setGraphicsMode(getDefaultGraphicsMode());
}
-bool SymbianSdlGraphicsManager::hasFeature(OSystem::Feature f) {
+bool SymbianSdlGraphicsManager::hasFeature(OSystem::Feature f) const {
switch (f) {
case OSystem::kFeatureFullscreenMode:
case OSystem::kFeatureAspectRatioCorrection:
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.h b/backends/graphics/symbiansdl/symbiansdl-graphics.h
index fb9a49a834..0fcfb70f24 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.h
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.h
@@ -30,12 +30,12 @@ public:
SymbianSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
public:
- virtual bool hasFeature(OSystem::Feature f);
- virtual void setFeatureState(OSystem::Feature f, bool enable);
+ virtual bool hasFeature(OSystem::Feature f) const override;
+ virtual void setFeatureState(OSystem::Feature f, bool enable) override;
- virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- virtual int getDefaultGraphicsMode() const;
- virtual bool setGraphicsMode(int mode);
+ virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
+ virtual int getDefaultGraphicsMode() const override;
+ virtual bool setGraphicsMode(int mode) override;
};
#endif
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp
index 44a1214a44..1677ecac06 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.cpp
+++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp
@@ -115,7 +115,7 @@ const OSystem::GraphicsMode *WINCESdlGraphicsManager::getSupportedGraphicsModes(
return s_supportedGraphicsModesLow;
}
-bool WINCESdlGraphicsManager::hasFeature(OSystem::Feature f) {
+bool WINCESdlGraphicsManager::hasFeature(OSystem::Feature f) const {
return (f == OSystem::kFeatureVirtualKeyboard);
}
@@ -153,7 +153,7 @@ void WINCESdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
}
}
-bool WINCESdlGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool WINCESdlGraphicsManager::getFeatureState(OSystem::Feature f) const {
switch (f) {
case OSystem::kFeatureFullscreenMode:
return false;
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h
index 9316c69e44..4842d49023 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.h
+++ b/backends/graphics/wincesdl/wincesdl-graphics.h
@@ -46,9 +46,9 @@ public:
const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
- bool hasFeature(OSystem::Feature f);
+ bool hasFeature(OSystem::Feature f) const;
void setFeatureState(OSystem::Feature f, bool enable);
- bool getFeatureState(OSystem::Feature f);
+ bool getFeatureState(OSystem::Feature f) const;
int getDefaultGraphicsMode() const;
bool setGraphicsMode(int mode);
diff --git a/backends/graphics/windowed.h b/backends/graphics/windowed.h
new file mode 100644
index 0000000000..1d4958c9d6
--- /dev/null
+++ b/backends/graphics/windowed.h
@@ -0,0 +1,337 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BACKENDS_GRAPHICS_WINDOWED_H
+#define BACKENDS_GRAPHICS_WINDOWED_H
+
+#include "backends/graphics/graphics.h"
+#include "common/frac.h"
+#include "common/rect.h"
+#include "common/textconsole.h"
+#include "graphics/scaler/aspect.h"
+
+class WindowedGraphicsManager : virtual public GraphicsManager {
+public:
+ WindowedGraphicsManager() :
+ _windowWidth(0),
+ _windowHeight(0),
+ _overlayVisible(false),
+ _forceRedraw(false),
+ _cursorVisible(false),
+ _cursorX(0),
+ _cursorY(0),
+ _cursorNeedsRedraw(false),
+ _cursorLastInActiveArea(true) {}
+
+ virtual void showOverlay() override {
+ if (_overlayVisible)
+ return;
+
+ _activeArea.drawRect = _overlayDrawRect;
+ _activeArea.width = getOverlayWidth();
+ _activeArea.height = getOverlayHeight();
+ _overlayVisible = true;
+ _forceRedraw = true;
+ }
+
+ virtual void hideOverlay() override {
+ if (!_overlayVisible)
+ return;
+
+ _activeArea.drawRect = _gameDrawRect;
+ _activeArea.width = getWidth();
+ _activeArea.height = getHeight();
+ _overlayVisible = false;
+ _forceRedraw = true;
+ }
+
+protected:
+ /**
+ * @returns whether or not the game screen must have aspect ratio correction
+ * applied for correct rendering.
+ */
+ virtual bool gameNeedsAspectRatioCorrection() const = 0;
+
+ /**
+ * Backend-specific implementation for updating internal surfaces that need
+ * to reflect the new window size.
+ */
+ virtual void handleResizeImpl(const int width, const int height) = 0;
+
+ /**
+ * Converts the given point from the active virtual screen's coordinate
+ * space to the window's coordinate space (i.e. game-to-window or
+ * overlay-to-window).
+ */
+ Common::Point convertVirtualToWindow(const int x, const int y) const {
+ const int targetX = _activeArea.drawRect.left;
+ const int targetY = _activeArea.drawRect.top;
+ const int targetWidth = _activeArea.drawRect.width();
+ const int targetHeight = _activeArea.drawRect.height();
+ const int sourceWidth = _activeArea.width;
+ const int sourceHeight = _activeArea.height;
+
+ if (sourceWidth == 0 || sourceHeight == 0) {
+ error("convertVirtualToWindow called without a valid draw rect");
+ }
+
+ return Common::Point(targetX + x * targetWidth / sourceWidth,
+ targetY + y * targetHeight / sourceHeight);
+ }
+
+ /**
+ * Converts the given point from the window's coordinate space to the
+ * active virtual screen's coordinate space (i.e. window-to-game or
+ * window-to-overlay).
+ */
+ Common::Point convertWindowToVirtual(int x, int y) const {
+ const int sourceX = _activeArea.drawRect.left;
+ const int sourceY = _activeArea.drawRect.top;
+ const int sourceMaxX = _activeArea.drawRect.right - 1;
+ const int sourceMaxY = _activeArea.drawRect.bottom - 1;
+ const int sourceWidth = _activeArea.drawRect.width();
+ const int sourceHeight = _activeArea.drawRect.height();
+ const int targetWidth = _activeArea.width;
+ const int targetHeight = _activeArea.height;
+
+ if (sourceWidth == 0 || sourceHeight == 0) {
+ error("convertWindowToVirtual called without a valid draw rect");
+ }
+
+ x = CLIP<int>(x, sourceX, sourceMaxX);
+ y = CLIP<int>(y, sourceY, sourceMaxY);
+
+ return Common::Point(((x - sourceX) * targetWidth) / sourceWidth,
+ ((y - sourceY) * targetHeight) / sourceHeight);
+ }
+
+ /**
+ * @returns the desired aspect ratio of the game surface.
+ */
+ frac_t getDesiredGameAspectRatio() const {
+ if (getHeight() == 0 || gameNeedsAspectRatioCorrection()) {
+ return intToFrac(4) / 3;
+ }
+
+ return intToFrac(getWidth()) / getHeight();
+ }
+
+ /**
+ * Called after the window has been updated with new dimensions.
+ *
+ * @param width The new width of the window, excluding window decoration.
+ * @param height The new height of the window, excluding window decoration.
+ */
+ void handleResize(const int width, const int height) {
+ _windowWidth = width;
+ _windowHeight = height;
+ handleResizeImpl(width, height);
+ }
+
+ /**
+ * Recalculates the display areas for the game and overlay surfaces within
+ * the window.
+ */
+ virtual void recalculateDisplayAreas() {
+ if (_windowHeight == 0) {
+ return;
+ }
+
+ const frac_t outputAspect = intToFrac(_windowWidth) / _windowHeight;
+
+ populateDisplayAreaDrawRect(getDesiredGameAspectRatio(), outputAspect, _gameDrawRect);
+
+ if (getOverlayHeight()) {
+ const frac_t overlayAspect = intToFrac(getOverlayWidth()) / getOverlayHeight();
+ populateDisplayAreaDrawRect(overlayAspect, outputAspect, _overlayDrawRect);
+ }
+
+ if (_overlayVisible) {
+ _activeArea.drawRect = _overlayDrawRect;
+ _activeArea.width = getOverlayWidth();
+ _activeArea.height = getOverlayHeight();
+ } else {
+ _activeArea.drawRect = _gameDrawRect;
+ _activeArea.width = getWidth();
+ _activeArea.height = getHeight();
+ }
+ }
+ /**
+ * Sets the position of the hardware mouse cursor in the host system,
+ * relative to the window.
+ *
+ * @param x X coordinate in window coordinates.
+ * @param y Y coordinate in window coordinates.
+ */
+ virtual void setSystemMousePosition(const int x, const int y) = 0;
+
+ virtual bool showMouse(const bool visible) override {
+ if (_cursorVisible == visible) {
+ return visible;
+ }
+
+ const bool last = _cursorVisible;
+ _cursorVisible = visible;
+ _cursorNeedsRedraw = true;
+ return last;
+ }
+
+ /**
+ * Move ("warp") the mouse cursor to the specified position.
+ *
+ * @param x The new X position of the mouse in virtual screen coordinates.
+ * @param y The new Y position of the mouse in virtual screen coordinates.
+ */
+ void warpMouse(const int x, const int y) {
+ // Check active coordinate instead of window coordinate to avoid warping
+ // the mouse if it is still within the same virtual pixel
+ const Common::Point virtualCursor = convertWindowToVirtual(_cursorX, _cursorY);
+ if (virtualCursor.x != x || virtualCursor.y != y) {
+ // Warping the mouse in SDL generates a mouse movement event, so
+ // `setMousePosition` would be called eventually through the
+ // `notifyMousePosition` callback if we *only* set the system mouse
+ // position here. However, this can cause problems with some games.
+ // For example, the cannon script in CoMI calls to warp the mouse
+ // twice each time the cannon is reloaded, and unless we update the
+ // mouse position immediately, the second call is ignored, which
+ // causes the cannon to change its aim.
+ const Common::Point windowCursor = convertVirtualToWindow(x, y);
+ setMousePosition(windowCursor.x, windowCursor.y);
+ setSystemMousePosition(windowCursor.x, windowCursor.y);
+ }
+ }
+
+ /**
+ * Sets the position of the rendered mouse cursor in the window.
+ *
+ * @param x X coordinate in window coordinates.
+ * @param y Y coordinate in window coordinates.
+ */
+ void setMousePosition(int x, int y) {
+ if (_cursorX != x || _cursorY != y) {
+ _cursorNeedsRedraw = true;
+ }
+
+ _cursorX = x;
+ _cursorY = y;
+ }
+
+ /**
+ * The width of the window, excluding window decoration.
+ */
+ int _windowWidth;
+
+ /**
+ * The height of the window, excluding window decoration.
+ */
+ int _windowHeight;
+
+ /**
+ * Whether the overlay (i.e. launcher, including the out-of-game launcher)
+ * is visible or not.
+ */
+ bool _overlayVisible;
+
+ /**
+ * The scaled draw rectangle for the game surface within the window.
+ */
+ Common::Rect _gameDrawRect;
+
+ /**
+ * The scaled draw rectangle for the overlay (launcher) surface within the
+ * window.
+ */
+ Common::Rect _overlayDrawRect;
+
+ /**
+ * Data about the display area of a virtual screen.
+ */
+ struct DisplayArea {
+ /**
+ * The scaled area where the virtual screen is drawn within the window.
+ */
+ Common::Rect drawRect;
+
+ /**
+ * The width of the virtual screen's unscaled coordinate space.
+ */
+ int width;
+
+ /**
+ * The height of the virtual screen's unscaled coordinate space.
+ */
+ int height;
+ };
+
+ /**
+ * Display area information about the currently active virtual screen. This
+ * will be the overlay screen when the overlay is active, and the game
+ * screen otherwise.
+ */
+ DisplayArea _activeArea;
+
+ /**
+ * Whether the screen must be redrawn on the next frame.
+ */
+ bool _forceRedraw;
+
+ /**
+ * Whether the cursor is actually visible.
+ */
+ bool _cursorVisible;
+
+ /**
+ * Whether the mouse cursor needs to be redrawn on the next frame.
+ */
+ bool _cursorNeedsRedraw;
+
+ /**
+ * Whether the last position of the system cursor was within the active area
+ * of the window.
+ */
+ bool _cursorLastInActiveArea;
+
+ /**
+ * The position of the mouse cursor, in window coordinates.
+ */
+ int _cursorX, _cursorY;
+
+private:
+ void populateDisplayAreaDrawRect(const frac_t inputAspect, const frac_t outputAspect, Common::Rect &drawRect) const {
+ int width = _windowWidth;
+ int height = _windowHeight;
+
+ // Maintain aspect ratios
+ if (outputAspect < inputAspect) {
+ height = intToFrac(width) / inputAspect;
+ } else if (outputAspect > inputAspect) {
+ width = fracToInt(height * inputAspect);
+ }
+
+ drawRect.left = (_windowWidth - width) / 2;
+ drawRect.top = (_windowHeight - height) / 2;
+ drawRect.setWidth(width);
+ drawRect.setHeight(height);
+ }
+};
+
+#endif
diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp
index 74c590c654..140771960b 100644
--- a/backends/midi/coreaudio.cpp
+++ b/backends/midi/coreaudio.cpp
@@ -308,7 +308,7 @@ void MidiDriver_CORE::sysEx(const byte *msg, uint16 length) {
class CoreAudioMusicPlugin : public MusicPluginObject {
public:
const char *getName() const {
- return "CoreAudio";
+ return "Apple DLS Software Synthesizer";
}
const char *getId() const {
@@ -321,8 +321,6 @@ public:
MusicDevices CoreAudioMusicPlugin::getDevices() const {
MusicDevices devices;
- // TODO: Return a different music type depending on the configuration
- // TODO: List the available devices
devices.push_back(MusicDevice(this, "", MT_GM));
return devices;
}
diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp
index e2ec8405e9..37d58c5cbd 100644
--- a/backends/midi/coremidi.cpp
+++ b/backends/midi/coremidi.cpp
@@ -53,7 +53,7 @@ http://lists.apple.com/archives/coreaudio-api/2003/Jul/msg00137.html
*/
class MidiDriver_CoreMIDI : public MidiDriver_MPU401 {
public:
- MidiDriver_CoreMIDI();
+ MidiDriver_CoreMIDI(ItemCount device);
~MidiDriver_CoreMIDI();
int open();
bool isOpen() const { return mOutPort != 0 && mDest != 0; }
@@ -62,13 +62,14 @@ public:
void sysEx(const byte *msg, uint16 length);
private:
+ ItemCount mDevice;
MIDIClientRef mClient;
MIDIPortRef mOutPort;
MIDIEndpointRef mDest;
};
-MidiDriver_CoreMIDI::MidiDriver_CoreMIDI()
- : mClient(0), mOutPort(0), mDest(0) {
+MidiDriver_CoreMIDI::MidiDriver_CoreMIDI(ItemCount device)
+ : mDevice(device), mClient(0), mOutPort(0), mDest(0) {
OSStatus err;
err = MIDIClientCreate(CFSTR("ScummVM MIDI Driver for OS X"), NULL, NULL, &mClient);
@@ -88,9 +89,9 @@ int MidiDriver_CoreMIDI::open() {
mOutPort = 0;
- int dests = MIDIGetNumberOfDestinations();
- if (dests > 0 && mClient) {
- mDest = MIDIGetDestination(0);
+ ItemCount dests = MIDIGetNumberOfDestinations();
+ if (mDevice < dests && mClient) {
+ mDest = MIDIGetDestination(mDevice);
err = MIDIOutputPortCreate( mClient,
CFSTR("scummvm_output_port"),
&mOutPort);
@@ -195,20 +196,59 @@ public:
MusicDevices getDevices() const;
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
+
+private:
+ bool getDeviceName(ItemCount deviceIndex, Common::String &outName) const;
};
MusicDevices CoreMIDIMusicPlugin::getDevices() const {
+ // TODO: Is it possible to get the music type for each device?
+ // Maybe look at the kMIDIPropertyModel property?
+
MusicDevices devices;
- // TODO: Return a different music type depending on the configuration
- // TODO: List the available devices
- devices.push_back(MusicDevice(this, "", MT_GM));
+ ItemCount deviceCount = MIDIGetNumberOfDestinations();
+ for (ItemCount i = 0 ; i < deviceCount ; ++i) {
+ Common::String name;
+ if (getDeviceName(i, name))
+ devices.push_back(MusicDevice(this, name, MT_GM));
+ }
return devices;
}
-Common::Error CoreMIDIMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
- *mididriver = new MidiDriver_CoreMIDI();
+Common::Error CoreMIDIMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle device) const {
+ ItemCount deviceCount = MIDIGetNumberOfDestinations();
+ for (ItemCount i = 0 ; i < deviceCount ; ++i) {
+ Common::String name;
+ if (getDeviceName(i, name)) {
+ MusicDevice md(this, name, MT_GM);
+ if (md.getHandle() == device) {
+ *mididriver = new MidiDriver_CoreMIDI(i);
+ return Common::kNoError;
+ }
+ }
+ }
+
+ return Common::kUnknownError;
+}
- return Common::kNoError;
+bool CoreMIDIMusicPlugin::getDeviceName(ItemCount deviceIndex, Common::String &outName) const {
+ MIDIEndpointRef dest = MIDIGetDestination(deviceIndex);
+ if (!dest)
+ return false;
+ CFStringRef name = nil;
+ if (MIDIObjectGetStringProperty(dest, kMIDIPropertyDisplayName, &name) == noErr) {
+ char buffer[128];
+ if (CFStringGetCString(name, buffer, sizeof(buffer), kCFStringEncodingASCII)) {
+ outName = buffer;
+ CFRelease(name);
+ return true;
+ }
+ CFRelease(name);
+ }
+ // Rather than fail use a default name
+ warning("Failed to get name for CoreMIDi device %lu", deviceIndex);
+ outName = Common::String::format("Unknown Device %lu", deviceIndex);
+ return true;
}
//#if PLUGIN_ENABLED_DYNAMIC(COREMIDI)
diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index 1dab18d54e..944ddd5a47 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -113,6 +113,10 @@ void ModularBackend::initSize(uint w, uint h, const Graphics::PixelFormat *forma
_graphicsManager->initSize(w, h, format);
}
+void ModularBackend::initSizeHint(const Graphics::ModeList &modes) {
+ _graphicsManager->initSizeHint(modes);
+}
+
int ModularBackend::getScreenChangeID() const {
return _graphicsManager->getScreenChangeID();
}
@@ -213,6 +217,7 @@ bool ModularBackend::showMouse(bool visible) {
}
void ModularBackend::warpMouse(int x, int y) {
+ _eventManager->purgeMouseEvents();
_graphicsManager->warpMouse(x, y);
}
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index d828c2dde6..982dbbfb02 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -75,6 +75,7 @@ public:
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
#endif
virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL);
+ virtual void initSizeHint(const Graphics::ModeList &modes) override;
virtual int getScreenChangeID() const;
virtual void beginGFXTransaction();
diff --git a/backends/module.mk b/backends/module.mk
index 5d8c91253f..f7d6ad21dc 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -210,6 +210,12 @@ MODULE_OBJS += \
midi/camd.o
endif
+ifdef RISCOS
+MODULE_OBJS += \
+ fs/riscos/riscos-fs.o \
+ fs/riscos/riscos-fs-factory.o
+endif
+
ifdef PLAYSTATION3
MODULE_OBJS += \
fs/posix/posix-fs.o \
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index 78b7907fe6..e791dd4c21 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -230,7 +230,7 @@ void OSystem_3DS::setPalette(const byte *colors, uint start, uint num) {
flushGameScreen();
}
}
-void OSystem_3DS::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_3DS::grabPalette(byte *colors, uint start, uint num) const {
assert(start + num <= 256);
memcpy(colors, _palette + 3 * start, 3 * num);
}
diff --git a/backends/platform/3ds/osystem.h b/backends/platform/3ds/osystem.h
index 5df49fe593..cad46a18dc 100644
--- a/backends/platform/3ds/osystem.h
+++ b/backends/platform/3ds/osystem.h
@@ -105,7 +105,7 @@ public:
int16 getHeight(){ return _gameHeight; }
int16 getWidth(){ return _gameWidth; }
void setPalette(const byte *colors, uint start, uint num);
- void grabPalette(byte *colors, uint start, uint num);
+ void grabPalette(byte *colors, uint start, uint num) const;
void copyRectToScreen(const void *buf, int pitch, int x, int y, int w,
int h);
Graphics::Surface *lockScreen();
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 2935d96381..c261f85325 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -234,7 +234,7 @@ private:
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y,
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index f847296892..a4f1746cb7 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -408,7 +408,7 @@ void OSystem_Android::setPalette(const byte *colors, uint start, uint num) {
WRITE_UINT16(p, pf.RGBToColor(colors[0], colors[1], colors[2]));
}
-void OSystem_Android::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_Android::grabPalette(byte *colors, uint start, uint num) const {
ENTER("%p, %u, %u", colors, start, num);
#ifdef USE_RGB_COLOR
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index 6cd938ec9c..34e8014ed9 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -106,7 +106,7 @@ class OSystem_Dreamcast : private DCHardware, public EventsBaseBackend, public P
protected:
// PaletteManager API
void setPalette(const byte *colors, uint start, uint num);
- void grabPalette(byte *colors, uint start, uint num);
+ void grabPalette(byte *colors, uint start, uint num) const;
public:
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index 1785c3c416..2547605398 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -171,7 +171,7 @@ void OSystem_Dreamcast::setCursorPalette(const byte *colors, uint start, uint nu
_enable_cursor_palette = true;
}
-void OSystem_Dreamcast::grabPalette(byte *colors, uint start, uint num)
+void OSystem_Dreamcast::grabPalette(byte *colors, uint start, uint num) const
{
const unsigned short *src = palette + start;
if (num>0)
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index f23192cd9d..861ee2e0c5 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -268,7 +268,7 @@ void OSystem_DS::setCursorPalette(const byte *colors, uint start, uint num) {
refreshCursor();
}
-void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {
+void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) const {
// consolePrintf("Grabpalette");
for (unsigned int r = start; r < start + num; r++) {
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index 9f73e125c2..f883bd14d1 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -93,7 +93,7 @@ public:
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
void restoreHardwarePalette();
diff --git a/backends/platform/ios7/ios7_app_delegate.mm b/backends/platform/ios7/ios7_app_delegate.mm
index 88d0a8925e..014275d116 100644
--- a/backends/platform/ios7/ios7_app_delegate.mm
+++ b/backends/platform/ios7/ios7_app_delegate.mm
@@ -39,14 +39,6 @@
return self;
}
-- (void)mainLoop:(id)param {
- @autoreleasepool {
- iOS7_main(iOS7_argc, iOS7_argv);
- }
-
- exit(0);
-}
-
- (void)applicationDidFinishLaunching:(UIApplication *)application {
CGRect rect = [[UIScreen mainScreen] bounds];
@@ -78,7 +70,12 @@
name:@"UIDeviceOrientationDidChangeNotification"
object:nil];
- [NSThread detachNewThreadSelector:@selector(mainLoop:) toTarget:self withObject:nil];
+ // Force creation of the shared instance on the main thread
+ iOS7_buildSharedOSystemInstance();
+
+ dispatch_async(dispatch_get_global_queue(0, 0), ^{
+ iOS7_main(iOS7_argc, iOS7_argv);
+ });
}
- (void)applicationWillResignActive:(UIApplication *)application {
diff --git a/backends/platform/ios7/ios7_common.h b/backends/platform/ios7/ios7_common.h
index 3609387efd..d5c1135564 100644
--- a/backends/platform/ios7/ios7_common.h
+++ b/backends/platform/ios7/ios7_common.h
@@ -122,6 +122,7 @@ void iOS7_updateScreen();
bool iOS7_fetchEvent(InternalEvent *event);
bool iOS7_isBigDevice();
+void iOS7_buildSharedOSystemInstance();
void iOS7_main(int argc, char **argv);
const char *iOS7_getDocumentsDir();
bool iOS7_touchpadModeEnabled();
diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp
index 3a627478f9..90c294a7d5 100644
--- a/backends/platform/ios7/ios7_osys_main.cpp
+++ b/backends/platform/ios7/ios7_osys_main.cpp
@@ -365,6 +365,10 @@ bool iOS7_touchpadModeEnabled() {
return sys && sys->touchpadModeEnabled();
}
+void iOS7_buildSharedOSystemInstance() {
+ OSystem_iOS7::sharedInstance();
+}
+
void iOS7_main(int argc, char **argv) {
//OSystem_iOS7::migrateApp();
diff --git a/backends/platform/ios7/ios7_osys_main.h b/backends/platform/ios7/ios7_osys_main.h
index 0f89cf7aa5..e0ac599b1d 100644
--- a/backends/platform/ios7/ios7_osys_main.h
+++ b/backends/platform/ios7/ios7_osys_main.h
@@ -153,7 +153,7 @@ public:
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
diff --git a/backends/platform/ios7/ios7_osys_video.mm b/backends/platform/ios7/ios7_osys_video.mm
index 1ec0defd7e..30f8950ec6 100644
--- a/backends/platform/ios7/ios7_osys_video.mm
+++ b/backends/platform/ios7/ios7_osys_video.mm
@@ -120,6 +120,15 @@ Common::List<Graphics::PixelFormat> OSystem_iOS7::getSupportedFormats() const {
}
#endif
+static inline void execute_on_main_thread(void (^block)(void)) {
+ if ([NSThread currentThread] == [NSThread mainThread]) {
+ block();
+ }
+ else {
+ dispatch_sync(dispatch_get_main_queue(), block);
+ }
+}
+
void OSystem_iOS7::initSize(uint width, uint height, const Graphics::PixelFormat *format) {
//printf("initSize(%u, %u, %p)\n", width, height, (const void *)format);
@@ -135,7 +144,9 @@ void OSystem_iOS7::initSize(uint width, uint height, const Graphics::PixelFormat
// Create the screen texture right here. We need to do this here, since
// when a game requests hi-color mode, we actually set the framebuffer
// to the texture buffer to avoid an additional copy step.
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(createScreenTexture) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] createScreenTexture];
+ });
// In case the client code tries to set up a non supported mode, we will
// fall back to CLUT8 and set the transaction error accordingly.
@@ -172,13 +183,17 @@ void OSystem_iOS7::beginGFXTransaction() {
OSystem::TransactionError OSystem_iOS7::endGFXTransaction() {
_screenChangeCount++;
updateOutputSurface();
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(setGraphicsMode) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] setGraphicsMode];
+ });
return _gfxTransactionError;
}
void OSystem_iOS7::updateOutputSurface() {
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(initSurface) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] initSurface];
+ });
}
int16 OSystem_iOS7::getHeight() {
@@ -208,7 +223,7 @@ void OSystem_iOS7::setPalette(const byte *colors, uint start, uint num) {
_mouseDirty = _mouseNeedTextureUpdate = true;
}
-void OSystem_iOS7::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_iOS7::grabPalette(byte *colors, uint start, uint num) const {
//printf("grabPalette(%p, %u, %u)\n", colors, start, num);
assert(start + num <= 256);
byte *b = colors;
@@ -338,7 +353,9 @@ void OSystem_iOS7::unlockScreen() {
void OSystem_iOS7::setShakePos(int shakeOffset) {
//printf("setShakePos(%i)\n", shakeOffset);
_videoContext->shakeOffsetY = shakeOffset;
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(setViewTransformation) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] setViewTransformation];
+ });
// HACK: We use this to force a redraw.
_mouseDirty = true;
}
@@ -348,8 +365,10 @@ void OSystem_iOS7::showOverlay() {
_videoContext->overlayVisible = true;
dirtyFullOverlayScreen();
updateScreen();
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(updateMouseCursorScaling) withObject:nil waitUntilDone: YES];
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(clearColorBuffer) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] updateMouseCursorScaling];
+ [[iOS7AppDelegate iPhoneView] clearColorBuffer];
+ });
}
void OSystem_iOS7::hideOverlay() {
@@ -357,8 +376,10 @@ void OSystem_iOS7::hideOverlay() {
_videoContext->overlayVisible = false;
_dirtyOverlayRects.clear();
dirtyFullScreen();
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(updateMouseCursorScaling) withObject:nil waitUntilDone: YES];
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(clearColorBuffer) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] updateMouseCursorScaling];
+ [[iOS7AppDelegate iPhoneView] clearColorBuffer];
+ });
}
void OSystem_iOS7::clearOverlay() {
@@ -439,7 +460,9 @@ void OSystem_iOS7::warpMouse(int x, int y) {
//printf("warpMouse(%d, %d)\n", x, y);
_videoContext->mouseX = x;
_videoContext->mouseY = y;
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(notifyMouseMove) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] notifyMouseMove];
+ });
_mouseDirty = true;
}
@@ -552,5 +575,7 @@ void OSystem_iOS7::updateMouseTexture() {
}
}
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(updateMouseCursor) withObject:nil waitUntilDone: YES];
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] updateMouseCursor];
+ });
}
diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm
index 5baa83e8e8..85a4dc91d8 100644
--- a/backends/platform/ios7/ios7_video.mm
+++ b/backends/platform/ios7/ios7_video.mm
@@ -55,16 +55,31 @@ bool iOS7_isBigDevice() {
return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad;
}
+static inline void execute_on_main_thread(void (^block)(void)) {
+ if ([NSThread currentThread] == [NSThread mainThread]) {
+ block();
+ }
+ else {
+ dispatch_sync(dispatch_get_main_queue(), block);
+ }
+}
+
void iOS7_updateScreen() {
//printf("Mouse: (%i, %i)\n", mouseX, mouseY);
if (!g_needsScreenUpdate) {
g_needsScreenUpdate = 1;
- [[iOS7AppDelegate iPhoneView] performSelectorOnMainThread:@selector(updateSurface) withObject:nil waitUntilDone: NO];
+ execute_on_main_thread(^{
+ [[iOS7AppDelegate iPhoneView] updateSurface];
+ });
}
}
bool iOS7_fetchEvent(InternalEvent *event) {
- return [[iOS7AppDelegate iPhoneView] fetchEvent:event];
+ __block bool fetched;
+ execute_on_main_thread(^{
+ fetched = [[iOS7AppDelegate iPhoneView] fetchEvent:event];
+ });
+ return fetched;
}
uint getSizeNextPOT(uint size) {
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 390566322c..6aa77e291d 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -140,7 +140,7 @@ public:
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index fa5c729a1c..f07160d350 100644
--- a/backends/platform/iphone/osys_video.mm
+++ b/backends/platform/iphone/osys_video.mm
@@ -155,7 +155,7 @@ void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) {
_mouseDirty = _mouseNeedTextureUpdate = true;
}
-void OSystem_IPHONE::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_IPHONE::grabPalette(byte *colors, uint start, uint num) const {
//printf("grabPalette(%p, %u, %u)\n", colors, start, num);
assert(start + num <= 256);
byte *b = colors;
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index ad49c2981f..80bedbb5ab 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -157,7 +157,7 @@ public:
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 16eeae5b7e..1282b16d47 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -408,7 +408,7 @@ void OSystem_N64::rebuildOffscreenMouseBuffer(void) {
}
}
-void OSystem_N64::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_N64::grabPalette(byte *colors, uint start, uint num) const {
#ifdef N64_EXTREME_MEMORY_SAVING // This way loses precisions
uint32 i;
uint16 color;
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index a4ec23329a..823defe8b4 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -556,7 +556,7 @@ void Gs2dScreen::setPalette(const uint8 *pal, uint8 start, uint16 num) {
SignalSema(g_DmacSema);
}
-void Gs2dScreen::grabPalette(uint8 *pal, uint8 start, uint16 num) {
+void Gs2dScreen::grabPalette(uint8 *pal, uint8 start, uint16 num) const {
assert(start + num <= 256);
for (uint16 cnt = 0; cnt < num; cnt++) {
uint16 src = start + cnt;
diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h
index ea2b1e5f78..9ed62da2d0 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -61,7 +61,7 @@ public:
void copyScreenRect(const uint8 *buf, int pitch, int x, int y, int w, int h);
void setPalette(const uint8 *pal, uint8 start, uint16 num);
void updateScreen(void);
- void grabPalette(uint8 *pal, uint8 start, uint16 num);
+ void grabPalette(uint8 *pal, uint8 start, uint16 num) const;
//- overlay routines
void copyOverlayRect(const byte *buf, uint16 pitch, uint16 x, uint16 y, uint16 w, uint16 h);
void grabOverlay(byte *buf, uint16 pitch);
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index e914cdb9c9..f76e26a543 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -678,7 +678,7 @@ void OSystem_PS2::setPalette(const byte *colors, uint start, uint num) {
_screen->setPalette(colors, (uint8)start, (uint16)num);
}
-void OSystem_PS2::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_PS2::grabPalette(byte *colors, uint start, uint num) const {
_screen->grabPalette(colors, (uint8)start, (uint16)num);
}
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index 45b7dfae36..019c3634a0 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -61,7 +61,7 @@ public:
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
diff --git a/backends/platform/psp/default_display_client.h b/backends/platform/psp/default_display_client.h
index d46b7f1a8a..f2972e0b49 100644
--- a/backends/platform/psp/default_display_client.h
+++ b/backends/platform/psp/default_display_client.h
@@ -40,10 +40,10 @@ public:
void clearBuffer();
void clearPalette();
void render() { _renderer.render(); }
- uint32 getWidth() { return _buffer.getSourceWidth(); }
- uint32 getHeight() { return _buffer.getSourceHeight(); }
+ uint32 getWidth() const { return _buffer.getSourceWidth(); }
+ uint32 getHeight() const { return _buffer.getSourceHeight(); }
void setPartialPalette(const byte *colors, uint start, uint num) { setDirty(); return _palette.setPartial(colors, start, num); }
- void getPartialPalette(byte *colors, uint start, uint num) {
+ void getPartialPalette(byte *colors, uint start, uint num) const {
return _palette.getPartial(colors, start, num);
}
void copyFromRect(const byte *buf, int pitch, int destX, int destY, int recWidth, int recHeight);
diff --git a/backends/platform/psp/display_client.cpp b/backends/platform/psp/display_client.cpp
index b238631e62..6e1ae9a10a 100644
--- a/backends/platform/psp/display_client.cpp
+++ b/backends/platform/psp/display_client.cpp
@@ -204,7 +204,7 @@ void Palette::deallocate() {
// Copy some of the palette to an array of colors
//
-void Palette::getPartial(byte *colors, uint start, uint num) {
+void Palette::getPartial(byte *colors, uint start, uint num) const {
DEBUG_ENTER_FUNC();
assert(_values);
@@ -286,13 +286,13 @@ void Palette::print(uint32 numToPrint /* = 0 */) {
}
}
-uint32 Palette::getRawColorAt(uint32 position) {
+uint32 Palette::getRawColorAt(uint32 position) const {
byte *pcolor = &_values[_pixelFormat.pixelsToBytes(position)];
uint32 color = _pixelFormat.getColorValueAt(pcolor);
return color;
}
-uint32 Palette::getRGBAColorAt(uint32 position) {
+uint32 Palette::getRGBAColorAt(uint32 position) const {
uint32 color = getRawColorAt(position);
uint32 r, g, b, a;
_pixelFormat.colorToRgba(color, r, g, b, a);
diff --git a/backends/platform/psp/display_client.h b/backends/platform/psp/display_client.h
index 5e81947e20..a25d9f9ecc 100644
--- a/backends/platform/psp/display_client.h
+++ b/backends/platform/psp/display_client.h
@@ -85,18 +85,19 @@ public:
void clear();
void setPixelFormats(PSPPixelFormat::Type paletteType, PSPPixelFormat::Type bufferType, bool swapRedBlue = false);
void setNumOfEntries(uint32 num) { _numOfEntries = num; }
- uint32 getNumOfEntries() { return _numOfEntries; }
- uint32 getSizeInBytes() { return _pixelFormat.pixelsToBytes(_numOfEntries); }
+ uint32 getNumOfEntries() const { return _numOfEntries; }
+ uint32 getSizeInBytes() const { return _pixelFormat.pixelsToBytes(_numOfEntries); }
void set(byte *values) { setPartial(values, 0, _numOfEntries); }
void setPartial(const byte *colors, uint start, uint num, bool supportsAlpha = false);
- void getPartial(byte *colors, uint start, uint num);
- uint32 getRawColorAt(uint32 position);
- uint32 getRGBAColorAt(uint32 position);
+ void getPartial(byte *colors, uint start, uint num) const;
+ uint32 getRawColorAt(uint32 position) const;
+ uint32 getRGBAColorAt(uint32 position) const;
void setSingleColorRGBA(uint32 num, byte r, byte g, byte b, byte a);
void setColorPositionAlpha(uint32 position, bool alpha);
+ const byte *getRawValues() const { return _values; }
byte *getRawValues() { return _values; }
- bool isAllocated() { return (_values != 0); }
- PSPPixelFormat::Type getPixelFormat() { return _pixelFormat.format; }
+ bool isAllocated() const { return (_values != 0); }
+ PSPPixelFormat::Type getPixelFormat() const { return _pixelFormat.format; }
void print(uint32 numToPrint = 0); // print to screen
protected:
@@ -127,19 +128,20 @@ public:
void setPixelFormat(PSPPixelFormat::Type type, bool swapRedBlue = false);
// getters
- uint32 getWidth() { return _width; }
- uint32 getWidthInBytes() { return _pixelFormat.pixelsToBytes(getWidth()); }
- uint32 getHeight() { return _height; }
- uint32 getSourceWidth() { return _sourceSize.width; }
- uint32 getSourceWidthInBytes() { return _pixelFormat.pixelsToBytes(_sourceSize.width); }
- uint32 getSourceHeight() { return _sourceSize.height; }
- uint32 getTextureWidth() { return _textureSize.width; }
- uint32 getTextureHeight() { return _textureSize.height; }
- PSPPixelFormat::Type getPixelFormat() { return _pixelFormat.format; }
- uint32 getBitsPerPixel() { return _pixelFormat.bitsPerPixel; }
- uint32 getBytesPerPixel() { return getBitsPerPixel() >> 3; } /* won't work for 4-bit */
+ uint32 getWidth() const { return _width; }
+ uint32 getWidthInBytes() const { return _pixelFormat.pixelsToBytes(getWidth()); }
+ uint32 getHeight() const { return _height; }
+ uint32 getSourceWidth() const { return _sourceSize.width; }
+ uint32 getSourceWidthInBytes() const { return _pixelFormat.pixelsToBytes(_sourceSize.width); }
+ uint32 getSourceHeight() const { return _sourceSize.height; }
+ uint32 getTextureWidth() const { return _textureSize.width; }
+ uint32 getTextureHeight() const { return _textureSize.height; }
+ PSPPixelFormat::Type getPixelFormat() const { return _pixelFormat.format; }
+ uint32 getBitsPerPixel() const { return _pixelFormat.bitsPerPixel; }
+ uint32 getBytesPerPixel() const { return getBitsPerPixel() >> 3; } /* won't work for 4-bit */
+ const byte *getPixels() const { return _pixels; }
byte *getPixels() { return _pixels; }
- uint32 getSizeInBytes() { return _pixelFormat.pixelsToBytes(_width * _height); }
+ uint32 getSizeInBytes() const { return _pixelFormat.pixelsToBytes(_width * _height); }
bool hasPalette();
void copyFromArray(const byte *buffer, int pitch);
@@ -147,7 +149,7 @@ public:
void copyToArray(byte *dst, int pitch);
bool allocate(bool inVram = false);
void deallocate();
- bool isAllocated() { return (_pixels != 0) ; }
+ bool isAllocated() const { return (_pixels != 0) ; }
void clear();
void flipNibbles(); // To handle peculiarities of PSP's 4 bit textures
static uint32 scaleUpToPowerOfTwo(uint32 size);
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 67cb72d9d4..e31456fb70 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -280,7 +280,7 @@ int16 OSystem_PSP::getOverlayHeight() {
return (int16)_overlay.getHeight();
}
-void OSystem_PSP::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_PSP::grabPalette(byte *colors, uint start, uint num) const {
DEBUG_ENTER_FUNC();
_screen.getPartialPalette(colors, start, num);
}
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index 6f9238b84e..304c724aaa 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -94,7 +94,7 @@ public:
protected:
// PaletteManager API
void setPalette(const byte *colors, uint start, uint num);
- void grabPalette(byte *colors, uint start, uint num);
+ void grabPalette(byte *colors, uint start, uint num) const;
public:
void setCursorPalette(const byte *colors, uint start, uint num);
diff --git a/backends/platform/psp/psppixelformat.cpp b/backends/platform/psp/psppixelformat.cpp
index 2d7d524b45..83f5935eee 100644
--- a/backends/platform/psp/psppixelformat.cpp
+++ b/backends/platform/psp/psppixelformat.cpp
@@ -173,7 +173,7 @@ Graphics::PixelFormat PSPPixelFormat::convertToScummvmPixelFormat(PSPPixelFormat
return pf;
}
-uint32 PSPPixelFormat::convertTo32BitColor(uint32 color) {
+uint32 PSPPixelFormat::convertTo32BitColor(uint32 color) const {
DEBUG_ENTER_FUNC();
uint32 r, g, b, a, output;
diff --git a/backends/platform/psp/psppixelformat.h b/backends/platform/psp/psppixelformat.h
index ede5a97d6f..3cb3b8fcae 100644
--- a/backends/platform/psp/psppixelformat.h
+++ b/backends/platform/psp/psppixelformat.h
@@ -55,9 +55,9 @@ struct PSPPixelFormat {
PSPPixelFormat::Type &paletteType,
bool &swapRedBlue);
static Graphics::PixelFormat convertToScummvmPixelFormat(PSPPixelFormat::Type type);
- uint32 convertTo32BitColor(uint32 color);
+ uint32 convertTo32BitColor(uint32 color) const;
- inline uint32 rgbaToColor(uint32 r, uint32 g, uint32 b, uint32 a) {
+ inline uint32 rgbaToColor(uint32 r, uint32 g, uint32 b, uint32 a) const {
uint32 color;
switch (format) {
@@ -80,7 +80,7 @@ struct PSPPixelFormat {
return color;
}
- inline void colorToRgba(uint32 color, uint32 &r, uint32 &g, uint32 &b, uint32 &a) {
+ inline void colorToRgba(uint32 color, uint32 &r, uint32 &g, uint32 &b, uint32 &a) const {
switch (format) {
case Type_4444:
a = (color >> 12) & 0xF; // Interpolate to get true colors
@@ -140,7 +140,7 @@ struct PSPPixelFormat {
return color;
}
- inline uint32 pixelsToBytes(uint32 pixels) {
+ inline uint32 pixelsToBytes(uint32 pixels) const {
switch (bitsPerPixel) {
case 4:
pixels >>= 1;
@@ -160,7 +160,7 @@ struct PSPPixelFormat {
return pixels;
}
- inline uint16 swapRedBlue16(uint16 color) {
+ inline uint16 swapRedBlue16(uint16 color) const {
uint16 output;
switch (format) {
@@ -181,7 +181,7 @@ struct PSPPixelFormat {
return output;
}
- inline uint32 swapRedBlue32(uint32 color) {
+ inline uint32 swapRedBlue32(uint32 color) const {
uint32 output;
switch (format) {
@@ -211,7 +211,7 @@ struct PSPPixelFormat {
}
// Return whatever color we point at
- inline uint32 getColorValueAt(byte *pointer) {
+ inline uint32 getColorValueAt(byte *pointer) const {
uint32 result;
switch (bitsPerPixel) {
diff --git a/backends/platform/sdl/riscos/riscos.cpp b/backends/platform/sdl/riscos/riscos.cpp
index 08609396f1..0cdbceb902 100644
--- a/backends/platform/sdl/riscos/riscos.cpp
+++ b/backends/platform/sdl/riscos/riscos.cpp
@@ -20,16 +20,14 @@
*
*/
-#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
-
#include "common/scummsys.h"
#ifdef RISCOS
#include "backends/platform/sdl/riscos/riscos.h"
#include "backends/saves/default/default-saves.h"
-#include "backends/fs/posix/posix-fs-factory.h"
-#include "backends/fs/posix/posix-fs.h"
+#include "backends/fs/riscos/riscos-fs-factory.h"
+#include "backends/fs/riscos/riscos-fs.h"
#include <kernel.h>
#include <swis.h>
@@ -40,7 +38,7 @@
void OSystem_RISCOS::init() {
// Initialze File System Factory
- _fsFactory = new POSIXFilesystemFactory();
+ _fsFactory = new RISCOSFilesystemFactory();
// Invoke parent implementation of this method
OSystem_SDL::init();
@@ -50,7 +48,7 @@ void OSystem_RISCOS::initBackend() {
// Create the savefile manager
if (_savefileManager == 0) {
Common::String savePath = "/<Choices$Write>/ScummVM/Saves";
- if (Posix::assureDirectoryExists(savePath))
+ if (Riscos::assureDirectoryExists(savePath))
_savefileManager = new DefaultSaveFileManager(savePath);
}
@@ -89,7 +87,7 @@ Common::WriteStream *OSystem_RISCOS::createLogFile() {
Common::String logFile = "/<Choices$Write>/ScummVM/Logs";
- if (!Posix::assureDirectoryExists(logFile)) {
+ if (!Riscos::assureDirectoryExists(logFile)) {
return 0;
}
diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index 07ddc998ba..b38a97c5ef 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -129,14 +129,16 @@ void SdlWindow::setWindowCaption(const Common::String &caption) {
void SdlWindow::toggleMouseGrab() {
#if SDL_VERSION_ATLEAST(2, 0, 0)
if (_window) {
- _inputGrabState = !(SDL_GetWindowGrab(_window) == SDL_TRUE);
+ _inputGrabState = SDL_GetWindowGrab(_window) == SDL_FALSE;
SDL_SetWindowGrab(_window, _inputGrabState ? SDL_TRUE : SDL_FALSE);
}
#else
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GRAB_OFF) {
SDL_WM_GrabInput(SDL_GRAB_ON);
+ _inputGrabState = true;
} else {
SDL_WM_GrabInput(SDL_GRAB_OFF);
+ _inputGrabState = false;
}
#endif
}
@@ -153,14 +155,20 @@ bool SdlWindow::hasMouseFocus() const {
#endif
}
-void SdlWindow::warpMouseInWindow(uint x, uint y) {
+bool SdlWindow::warpMouseInWindow(int x, int y) {
+ if (hasMouseFocus()) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
- if (_window && hasMouseFocus()) {
- SDL_WarpMouseInWindow(_window, x, y);
- }
+ if (_window) {
+ SDL_WarpMouseInWindow(_window, x, y);
+ return true;
+ }
#else
- SDL_WarpMouse(x, y);
+ SDL_WarpMouse(x, y);
+ return true;
#endif
+ }
+
+ return false;
}
void SdlWindow::iconifyWindow() {
@@ -223,6 +231,33 @@ bool SdlWindow::createOrUpdateWindow(int width, int height, uint32 flags) {
const uint32 oldNonUpdateableFlags = _lastFlags & ~updateableFlagsMask;
const uint32 newNonUpdateableFlags = flags & ~updateableFlagsMask;
+ const uint32 fullscreenFlags = flags & fullscreenMask;
+
+ // This is terrible, but there is no way in SDL to get information on the
+ // maximum bounds of a window with decoration, and SDL is too dumb to make
+ // sure the window's surface doesn't grow beyond the display bounds, which
+ // can easily happen with 3x scalers. There is a function in SDL to get the
+ // window decoration size, but it only exists starting in SDL 2.0.5, which
+ // is a buggy release on some platforms so we can't safely use 2.0.5+
+ // features since some users replace the SDL dynamic library with 2.0.4, and
+ // the documentation says it only works on X11 anyway, which means it is
+ // basically worthless. So we'll just try to keep things closeish to the
+ // maximum for now.
+ SDL_DisplayMode displayMode;
+ SDL_GetDesktopDisplayMode(0, &displayMode);
+ if (!fullscreenFlags) {
+ displayMode.w -= 20;
+ displayMode.h -= 30;
+ }
+
+ if (width > displayMode.w) {
+ width = displayMode.w;
+ }
+
+ if (height > displayMode.h) {
+ height = displayMode.h;
+ }
+
if (!_window || oldNonUpdateableFlags != newNonUpdateableFlags) {
destroyWindow();
_window = SDL_CreateWindow(_windowCaption.c_str(), _lastX,
@@ -231,8 +266,6 @@ bool SdlWindow::createOrUpdateWindow(int width, int height, uint32 flags) {
setupIcon();
}
} else {
- const uint32 fullscreenFlags = flags & fullscreenMask;
-
if (fullscreenFlags) {
SDL_DisplayMode fullscreenMode;
fullscreenMode.w = width;
@@ -246,7 +279,8 @@ bool SdlWindow::createOrUpdateWindow(int width, int height, uint32 flags) {
}
SDL_SetWindowFullscreen(_window, fullscreenFlags);
- SDL_SetWindowGrab(_window, (flags & SDL_WINDOW_INPUT_GRABBED) ? SDL_TRUE : SDL_FALSE);
+ const bool shouldGrab = (flags & SDL_WINDOW_INPUT_GRABBED) | fullscreenFlags;
+ SDL_SetWindowGrab(_window, shouldGrab ? SDL_TRUE : SDL_FALSE);
}
if (!_window) {
diff --git a/backends/platform/sdl/sdl-window.h b/backends/platform/sdl/sdl-window.h
index d75e811f56..05893c47d3 100644
--- a/backends/platform/sdl/sdl-window.h
+++ b/backends/platform/sdl/sdl-window.h
@@ -56,9 +56,12 @@ public:
bool hasMouseFocus() const;
/**
- * Warp the mouse to the specified position in window coordinates.
+ * Warp the mouse to the specified position in window coordinates. The mouse
+ * will only be warped if the window is focused in the window manager.
+ *
+ * @returns true if the system cursor was warped.
*/
- void warpMouseInWindow(uint x, uint y);
+ bool warpMouseInWindow(int x, int y);
/**
* Iconifies the window.
@@ -73,6 +76,18 @@ public:
*/
bool getSDLWMInformation(SDL_SysWMinfo *info) const;
+ bool mouseIsGrabbed() const {
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ if (_window) {
+ return SDL_GetWindowGrab(_window) == SDL_TRUE;
+ }
+#endif
+ return _inputGrabState;
+ }
+
+private:
+ bool _inputGrabState;
+
#if SDL_VERSION_ATLEAST(2, 0, 0)
public:
/**
@@ -108,7 +123,6 @@ private:
*/
int _lastX, _lastY;
- bool _inputGrabState;
Common::String _windowCaption;
#endif
};
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index bbd5c89f80..f44d87666a 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -297,20 +297,28 @@ void OSystem_SDL::initBackend() {
dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->activateManager();
}
-#if defined(USE_TASKBAR)
void OSystem_SDL::engineInit() {
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->unlockWindowSize();
+#endif
+#ifdef USE_TASKBAR
// Add the started engine to the list of recent tasks
_taskbarManager->addRecent(ConfMan.getActiveDomainName(), ConfMan.get("description"));
// Set the overlay icon the current running engine
_taskbarManager->setOverlayIcon(ConfMan.getActiveDomainName(), ConfMan.get("description"));
+#endif
}
void OSystem_SDL::engineDone() {
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->unlockWindowSize();
+#endif
+#ifdef USE_TASKBAR
// Remove overlay icon
_taskbarManager->setOverlayIcon("", "");
-}
#endif
+}
void OSystem_SDL::initSDL() {
// Check if SDL has not been initialized
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index bc4292be0b..61513fa65f 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -59,10 +59,8 @@ public:
// Override functions from ModularBackend and OSystem
virtual void initBackend();
-#if defined(USE_TASKBAR)
virtual void engineInit();
virtual void engineDone();
-#endif
virtual void quit();
virtual void fatalError();
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index f1591614bf..5482eb7d49 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -165,7 +165,7 @@ public:
virtual PaletteManager *getPaletteManager() { return this; }
protected:
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(byte *colors, uint start, uint num);
+ virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y,
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index c7989e95ad..932ca3814c 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -352,7 +352,7 @@ void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) {
}
}
-void OSystem_Wii::grabPalette(byte *colors, uint start, uint num) {
+void OSystem_Wii::grabPalette(byte *colors, uint start, uint num) const {
#ifdef USE_RGB_COLOR
assert(_pfGame.bytesPerPixel == 1);
#endif
diff --git a/common/array.h b/common/array.h
index 04ec9f9ccb..d4dac35866 100644
--- a/common/array.h
+++ b/common/array.h
@@ -59,6 +59,24 @@ protected:
public:
Array() : _capacity(0), _size(0), _storage(0) {}
+ /**
+ * Constructs an array with `count` default-inserted instances of T. No
+ * copies are made.
+ */
+ explicit Array(size_type count) : _size(count) {
+ allocCapacity(count);
+ for (size_type i = 0; i < count; ++i)
+ new ((void *)&_storage[i]) T();
+ }
+
+ /**
+ * Constructs an array with `count` copies of elements with value `value`.
+ */
+ Array(size_type count, const T &value) : _size(count) {
+ allocCapacity(count);
+ uninitialized_fill_n(_storage, count, value);
+ }
+
Array(const Array<T> &array) : _capacity(array._size), _size(array._size), _storage(0) {
if (array._storage) {
allocCapacity(_size);
@@ -70,10 +88,10 @@ public:
* Construct an array by copying data from a regular array.
*/
template<class T2>
- Array(const T2 *data, size_type n) {
+ Array(const T2 *array, size_type n) {
_size = n;
allocCapacity(n);
- uninitialized_copy(data, data + _size, _storage);
+ uninitialized_copy(array, array + _size, _storage);
}
~Array() {
@@ -106,6 +124,16 @@ public:
_storage[_size].~T();
}
+ /** Returns a pointer to the underlying memory serving as element storage. */
+ const T *data() const {
+ return _storage;
+ }
+
+ /** Returns a pointer to the underlying memory serving as element storage. */
+ T *data() {
+ return _storage;
+ }
+
/** Returns a reference to the first element of the array. */
T &front() {
assert(_size > 0);
@@ -391,31 +419,19 @@ public:
Array<T>::insert(where, element);
}
- T &operator[](size_type idx) {
- error("Operation []= not allowed with SortedArray");
- }
+private:
+ T &operator[](size_type idx);
- void insert_at(size_type idx, const T &element) {
- error("Operation insert_at(idx, element) not allowed with SortedArray");
- }
+ void insert_at(size_type idx, const T &element);
- void insert_at(size_type idx, const Array<T> &array) {
- error("Operation insert_at(idx, array) not allowed with SortedArray");
- }
+ void insert_at(size_type idx, const Array<T> &array);
- void insert(iterator pos, const T &element) {
- error("Operation insert(pos, elemnet) not allowed with SortedArray");
- }
+ void insert(iterator pos, const T &element);
- void push_back(const T &element) {
- error("Operation push_back(element) not allowed with SortedArray");
- }
+ void push_back(const T &element);
- void push_back(const Array<T> &array) {
- error("Operation push_back(array) not allowed with SortedArray");
- }
+ void push_back(const Array<T> &array);
-private:
// Based on code Copyright (C) 2008-2009 Ksplice, Inc.
// Author: Tim Abbott <tabbott@ksplice.com>
// Licensed under GPLv2+
@@ -438,7 +454,6 @@ private:
return &this->_storage[start_];
}
-private:
int (*_comparator)(const void *, const void *);
};
diff --git a/common/events.h b/common/events.h
index 21a65a642b..e5bb8cab50 100644
--- a/common/events.h
+++ b/common/events.h
@@ -395,6 +395,11 @@ public:
*/
virtual void pushEvent(const Event &event) = 0;
+ /**
+ * Purges all unprocessed mouse events already in the event queue.
+ */
+ virtual void purgeMouseEvents() = 0;
+
/** Return the current mouse position */
virtual Point getMousePos() const = 0;
diff --git a/common/memory.h b/common/memory.h
index c32af42ba5..91a320080b 100644
--- a/common/memory.h
+++ b/common/memory.h
@@ -55,11 +55,11 @@ void uninitialized_fill(Type *first, Type *last, const Value &x) {
* It requires the range [dst, dst + n) to be valid and
* uninitialized.
*/
-/*template<class Type, class Value>
+template<class Type, class Value>
void uninitialized_fill_n(Type *dst, size_t n, const Value &x) {
while (n--)
new ((void *)dst++) Type(x);
-}*/
+}
} // End of namespace Common
diff --git a/common/ptr.h b/common/ptr.h
index ebdd77cf3c..510fec14df 100644
--- a/common/ptr.h
+++ b/common/ptr.h
@@ -25,6 +25,7 @@
#include "common/scummsys.h"
#include "common/noncopyable.h"
+#include "common/safe-bool.h"
#include "common/types.h"
namespace Common {
@@ -103,7 +104,7 @@ private:
* a plain pointer is only possible via SharedPtr::get.
*/
template<class T>
-class SharedPtr {
+class SharedPtr : public SafeBool<SharedPtr<T> > {
#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
template<class T2> friend class SharedPtr;
#endif
@@ -167,7 +168,7 @@ public:
* Implicit conversion operator to bool for convenience, to make
* checks like "if (sharedPtr) ..." possible.
*/
- operator bool() const { return _pointer != 0; }
+ bool operator_bool() const { return _pointer != nullptr; }
/**
* Checks if the SharedPtr object is the only object refering
@@ -223,7 +224,7 @@ private:
};
template<typename T>
-class ScopedPtr : NonCopyable {
+class ScopedPtr : private NonCopyable, public SafeBool<ScopedPtr<T> > {
public:
typedef T ValueType;
typedef T *PointerType;
@@ -238,7 +239,7 @@ public:
* Implicit conversion operator to bool for convenience, to make
* checks like "if (scopedPtr) ..." possible.
*/
- operator bool() const { return _pointer != 0; }
+ bool operator_bool() const { return _pointer != nullptr; }
~ScopedPtr() {
delete _pointer;
@@ -277,7 +278,7 @@ private:
template<typename T>
-class DisposablePtr : NonCopyable {
+class DisposablePtr : private NonCopyable, public SafeBool<DisposablePtr<T> > {
public:
typedef T ValueType;
typedef T *PointerType;
@@ -296,7 +297,7 @@ public:
* Implicit conversion operator to bool for convenience, to make
* checks like "if (scopedPtr) ..." possible.
*/
- operator bool() const { return _pointer; }
+ bool operator_bool() const { return _pointer != nullptr; }
/**
* Returns the plain pointer value.
diff --git a/common/system.h b/common/system.h
index 32f20daf8f..206c3134c4 100644
--- a/common/system.h
+++ b/common/system.h
@@ -27,6 +27,7 @@
#include "common/noncopyable.h"
#include "common/list.h" // For OSystem::getSupportedFormats()
#include "graphics/pixelformat.h"
+#include "graphics/mode.h"
namespace Audio {
class Mixer;
@@ -634,6 +635,18 @@ public:
virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) = 0;
/**
+ * Send a list of graphics modes to the backend so it can make a decision
+ * about the best way to set up the display hardware.
+ *
+ * Engines that switch between different virtual screen sizes during a game
+ * should call this function prior to any call to initSize. Engines that use
+ * only a single screen size do not need to call this function.
+ *
+ * @param modes the list of graphics modes the engine will probably use.
+ */
+ virtual void initSizeHint(const Graphics::ModeList &modes) {}
+
+ /**
* Return an int value which is changed whenever any screen
* parameters (like the resolution) change. That is, whenever a
* EVENT_SCREEN_CHANGED would be sent. You can track this value
diff --git a/common/util.h b/common/util.h
index 13c364e97d..a098a6a437 100644
--- a/common/util.h
+++ b/common/util.h
@@ -33,6 +33,9 @@
#define IS_ALIGNED(value, alignment) \
((((size_t)value) & ((alignment) - 1)) == 0)
+#ifdef ABS
+#undef ABS
+#endif
#ifdef MIN
#undef MIN
diff --git a/configure b/configure
index d2c1d1abbe..a6ef3d7599 100755
--- a/configure
+++ b/configure
@@ -126,6 +126,7 @@ done
# Default settings
#
# Default lib behavior yes/no/auto
+_ogg=auto
_vorbis=auto
_sdlnet=auto
_libcurl=auto
@@ -999,8 +1000,10 @@ Optional Libraries:
--disable-alsa disable ALSA midi sound support [autodetect]
--with-ogg-prefix=DIR Prefix where libogg is installed (optional)
+ --disable-ogg disable Ogg support [autodetect]
+
--with-vorbis-prefix=DIR Prefix where libvorbis is installed (optional)
- --disable-vorbis disable Ogg Vorbis support [autodetect]
+ --disable-vorbis disable Vorbis support [autodetect]
--with-tremor-prefix=DIR Prefix where tremor is installed (optional)
--disable-tremor disable tremor support [autodetect]
@@ -1107,6 +1110,8 @@ for ac_option in $@; do
--disable-sndio) _sndio=no ;;
--enable-timidity) _timidity=yes ;;
--disable-timidity) _timidity=no ;;
+ --enable-ogg) _ogg=yes ;;
+ --disable-ogg) _ogg=no ;;
--enable-vorbis) _vorbis=yes ;;
--disable-vorbis) _vorbis=no ;;
--enable-tremor) _tremor=yes ;;
@@ -3898,21 +3903,41 @@ EOF
cc_check -lm && append_var LIBS "-lm"
#
-# Check for Ogg Vorbis
+# Check for Ogg
+#
+echocheck "Ogg"
+if test "$_ogg" = auto ; then
+ _ogg=no
+ cat > $TMPC << EOF
+#include <ogg/ogg.h>
+int main(void) { return 0; }
+EOF
+ cc_check $OGG_CFLAGS $OGG_LIBS -logg && _ogg=yes
+fi
+define_in_config_if_yes "$_ogg" 'USE_OGG'
+echo "$_ogg"
+
+#
+# Check for Vorbis
#
-echocheck "Ogg Vorbis"
+echocheck "Vorbis"
if test "$_vorbis" = auto ; then
_vorbis=no
cat > $TMPC << EOF
#include <vorbis/codec.h>
int main(void) { vorbis_packet_blocksize(0,0); return 0; }
EOF
- cc_check $OGG_CFLAGS $OGG_LIBS $VORBIS_CFLAGS $VORBIS_LIBS \
- -lvorbisfile -lvorbis -logg && _vorbis=yes
+ if test "$_ogg" = yes ; then
+ cc_check $OGG_CFLAGS $OGG_LIBS $VORBIS_CFLAGS $VORBIS_LIBS \
+ -lvorbisfile -lvorbis -logg && _vorbis=yes
+ else
+ cc_check $VORBIS_CFLAGS $VORBIS_LIBS \
+ -lvorbisfile -lvorbis && _vorbis=yes
+ fi
fi
if test "$_vorbis" = yes ; then
- append_var LIBS "$OGG_LIBS $VORBIS_LIBS -lvorbisfile -lvorbis -logg"
- append_var INCLUDES "$OGG_CFLAGS $VORBIS_CFLAGS"
+ append_var LIBS "$VORBIS_LIBS -lvorbisfile -lvorbis"
+ append_var INCLUDES "$VORBIS_CFLAGS"
fi
define_in_config_if_yes "$_vorbis" 'USE_VORBIS'
echo "$_vorbis"
@@ -3931,8 +3956,13 @@ if test "$_tremor" = auto ; then
#include <tremor/ivorbiscodec.h>
int main(void) { vorbis_info_init(0); return 0; }
EOF
- cc_check $TREMOR_CFLAGS $TREMOR_LIBS -lvorbisidec && \
- _tremor=yes
+ if test "$_ogg" = yes ; then
+ cc_check $TREMOR_CFLAGS $TREMOR_LIBS $OGG_CFLAGS $OGG_LIBS \
+ -lvorbisidec -logg && _tremor=yes
+ else
+ cc_check $TREMOR_CFLAGS $TREMOR_LIBS -lvorbisidec && \
+ _tremor=yes
+ fi
fi
if test "$_tremor" = yes && test "$_vorbis" = no; then
add_line_to_config_h '#define USE_TREMOR'
@@ -3948,7 +3978,7 @@ if test "$_tremor" = yes && test "$_vorbis" = no; then
append_var INCLUDES "$TREMOR_CFLAGS"
else
if test "$_vorbis" = yes; then
- _tremor="no (Ogg Vorbis/Tremor support is mutually exclusive)"
+ _tremor="no (Vorbis/Tremor support is mutually exclusive)"
fi
add_line_to_config_h '#undef USE_TREMOR'
fi
@@ -3962,10 +3992,15 @@ echocheck "FLAC >= 1.0.1"
if test "$_flac" = auto ; then
_flac=no
cat > $TMPC << EOF
+#include <FLAC/stream_decoder.h>
#include <FLAC/format.h>
-int main(void) { return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */ }
+int main(void) {
+ FLAC__StreamDecoder *decoder = FLAC__stream_decoder_new();
+ FLAC__stream_decoder_delete(decoder);
+ return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */
+}
EOF
- if test "$_vorbis" = yes ; then
+ if test "$_ogg" = yes ; then
cc_check $FLAC_CFLAGS $FLAC_LIBS $OGG_CFLAGS $OGG_LIBS \
-lFLAC -logg && _flac=yes
else
@@ -3974,16 +4009,18 @@ EOF
fi
fi
if test "$_flac" = yes ; then
- if test "$_vorbis" = yes ; then
- append_var LIBS "$FLAC_LIBS $OGG_LIBS -lFLAC -logg"
- else
- append_var LIBS "$FLAC_LIBS -lFLAC"
- fi
+ append_var LIBS "$FLAC_LIBS -lFLAC"
append_var INCLUDES "$FLAC_CFLAGS"
fi
define_in_config_if_yes "$_flac" 'USE_FLAC'
echo "$_flac"
+# Add the link to ogg only after verbs tremor and flac as it might be used by those.
+if test "$_ogg" = yes ; then
+ append_var LIBS "$OGG_LIBS -logg"
+ append_var INCLUDES "$OGG_CFLAGS"
+fi
+
#
# Check for MAD (MP3 library)
#
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 00ef800af4..d403243e45 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -467,6 +467,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
}
if (CONTAINS_DEFINE(setup.defines, "USE_FLUIDSYNTH")) {
DEF_LOCALLIB_STATIC("libfluidsynth");
+ DEF_LOCALLIB_STATIC("libffi");
DEF_LOCALLIB_STATIC("libglib-2.0");
DEF_SYSTBD("libffi");
}
@@ -485,11 +486,14 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
if (CONTAINS_DEFINE(setup.defines, "USE_PNG")) {
DEF_LOCALLIB_STATIC("libpng");
}
- if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS")) {
+ if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS") || CONTAINS_DEFINE(setup.defines, "USE_THEORADEC")) {
DEF_LOCALLIB_STATIC("libogg");
DEF_LOCALLIB_STATIC("libvorbis");
DEF_LOCALLIB_STATIC("libvorbisfile");
}
+ if (CONTAINS_DEFINE(setup.defines, "USE_THEORADEC")) {
+ DEF_LOCALLIB_STATIC("libtheoradec");
+ }
if (CONTAINS_DEFINE(setup.defines, "USE_ZLIB")) {
DEF_SYSTBD("libz");
}
@@ -502,16 +506,6 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
DEF_LOCALLIB_STATIC("libSDL");
}
- std::string absoluteOutputDir;
-#ifdef POSIX
- char *c_path = realpath(setup.outputDir.c_str(), NULL);
- absoluteOutputDir = c_path;
- absoluteOutputDir += "/lib";
- free(c_path);
-#else
- absoluteOutputDir = "lib";
-#endif
-
frameworksGroup->_properties["children"] = children;
_groups.add(frameworksGroup);
// Force this to be added as a sub-group in the root.
@@ -549,21 +543,27 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
if (CONTAINS_DEFINE(setup.defines, "USE_FREETYPE2")) {
frameworks_iOS.push_back("libfreetype.a");
}
+ if (CONTAINS_DEFINE(setup.defines, "USE_JPEG")) {
+ frameworks_iOS.push_back("libjpeg.a");
+ }
if (CONTAINS_DEFINE(setup.defines, "USE_PNG")) {
frameworks_iOS.push_back("libpng.a");
}
- if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS")) {
+ if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS") || CONTAINS_DEFINE(setup.defines, "USE_THEORADEC")) {
frameworks_iOS.push_back("libogg.a");
frameworks_iOS.push_back("libvorbis.a");
frameworks_iOS.push_back("libvorbisfile.a");
}
+ if (CONTAINS_DEFINE(setup.defines, "USE_THEORADEC")) {
+ frameworks_iOS.push_back("libtheoradec.a");
+ }
if (CONTAINS_DEFINE(setup.defines, "USE_MAD")) {
frameworks_iOS.push_back("libmad.a");
}
if (CONTAINS_DEFINE(setup.defines, "USE_FLUIDSYNTH")) {
frameworks_iOS.push_back("libfluidsynth.a");
frameworks_iOS.push_back("libglib-2.0.a");
- frameworks_iOS.push_back("libffi.tbd");
+ frameworks_iOS.push_back("libffi.a");
frameworks_iOS.push_back("CoreMIDI.framework");
frameworks_iOS.push_back("libiconv.tbd");
}
@@ -632,11 +632,14 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
if (CONTAINS_DEFINE(setup.defines, "USE_PNG")) {
frameworks_osx.push_back("libpng.a");
}
- if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS")) {
+ if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS") || CONTAINS_DEFINE(setup.defines, "USE_THEORADEC")) {
frameworks_osx.push_back("libogg.a");
frameworks_osx.push_back("libvorbis.a");
frameworks_osx.push_back("libvorbisfile.a");
}
+ if (CONTAINS_DEFINE(setup.defines, "USE_THEORADEC")) {
+ frameworks_osx.push_back("libtheoradec.a");
+ }
if (CONTAINS_DEFINE(setup.defines, "USE_ZLIB")) {
frameworks_osx.push_back("libz.tbd");
}
diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp
index 9519e4182a..eb87dbb5d3 100644
--- a/devtools/create_titanic/create_titanic_dat.cpp
+++ b/devtools/create_titanic/create_titanic_dat.cpp
@@ -56,7 +56,7 @@
* ASCIIZ - name of the resource
*/
-#define VERSION_NUMBER 3
+#define VERSION_NUMBER 5
#define HEADER_SIZE 0x1700
Common::File inputFile, outputFile;
@@ -615,7 +615,7 @@ static const BedheadEntry OFF_RESTING_D_WRONG[1] = {
{ "Any", "Any", "Any", "ClosedWrong", 59, 70 }
};
-static const char *const STRINGS_EN[151] = {
+static const char *const STRINGS_EN[156] = {
"",
"You are standing outside the Pellerator.",
"I'm sorry, you cannot enter this pellerator at present as a bot is in the way.",
@@ -760,6 +760,10 @@ static const char *const STRINGS_EN[151] = {
"A previously assigned room: ",
"Saved Chevron: ",
"Current location: ",
+ "Elevator %d",
+ "Floor %d",
+ "Room %d",
+ " (shift-click edits)",
"A hot",
"A cold",
"Load the game.",
@@ -774,20 +778,20 @@ static const char *const STRINGS_EN[151] = {
"Speech volume"
};
-static const char *const STRINGS_DE[197] = {
+static const char *const STRINGS_DE[202] = {
"",
"Sie befinden sich vor dem Pellerator.",
"Wir bedauern, da ein Bot den Weg versperrt, ist Ihnen der "
"Zutritt zum Pellerator Ihnen gegenwSrtig verwehrt.",
- "Wir bedauern, Zutritt zu diesem Pellerator ist nicht m\0xF6"
- "glich, da die T\0xFC" "r zugefroren ist.",
+ "Wir bedauern, Zutritt zu diesem Pellerator ist nicht m\xF6"
+ "glich, da die T\xFC" "r zugefroren ist.",
"Der Sukk-U-Bus befindet sich gegenwSrtig im Standby-oder \"AUS\"-Betrieb.",
"Zur Zeit gibt es nichts zuzustellen.",
"Gegenw\xE4rtig befindet sich nichts im Ablagekorb.",
- "Der Sukk-U-Bus ist ein Einzel-St\0xFC" "ck-Liefergerst.",
+ "Der Sukk-U-Bus ist ein Einzel-St\xFC" "ck-Liefergerst.",
"Nur ein H\xFChnchen pro Passagier. Wir bedanken uns f\xFC"
"r Ihr Verst\xE4ndnis.",
- "H\0xFChner werden nur in Eine-Einheit-Pro-Person-Rationen zugeteilt.",
+ "H\xFChner werden nur in Eine-Einheit-Pro-Person-Rationen zugeteilt.",
"Sie sind in die Erste Klasse h\xF6hergestuft worden. Genie\xDF"
"en Sie es in vollen Z\xFCgen.",
"Sie sind in die Zweite Klasse h\xF6hergestuft worden. Genie\xDF"
@@ -935,6 +939,10 @@ static const char *const STRINGS_DE[197] = {
"Dein zuvor zugewiesenes Zimmer: ",
"Gespeichertes Abzeichen: ",
"Derzeitige Position: ",
+ "Aufzug %d",
+ "Stock %d",
+ "Kabine %d",
+ " (Chevrons ver\xE4" "ndern mit Umschalt-Taste+Klicken)",
"Eine hei\xDF""e",
"Eine kalte",
"Laden Sie das Spiel.",
@@ -951,28 +959,28 @@ static const char *const STRINGS_DE[197] = {
"Sommer",
"Herbst",
"Winter",
- "Fr\0xFC" "nhling",
+ "Fr\xFC" "nhling",
"Sn'ood",
"J'af'ah",
"Bitta",
- "Fr\0xAA" "ic",
- "Pflanzen bitte nicht ber\0xFC" "nhren.",
- "!\0xBC" "ta'\0xAD" "ta! !T\0xAA" "z n\0xAA" " sappibundli t\0xAA"
- "cn\0xAA" "z!",
+ "Fr\xAA" "ic",
+ "Pflanzen bitte nicht ber\xFC" "nhren.",
+ "!\xBC" "ta'\xAD" "ta! !T\xAA" "z n\xAA" " sappibundli t\xAA"
+ "cn\xAA" "z!",
"Stop",
"!Hanaz!",
"VorwSrts",
"!Panaz!",
- "T\0xAA" "z k'b\0xAA" "z",
+ "T\xAA" "z k'b\xAA" "z",
"Ein wenig herumkurven",
- "Otundo a\0x92" " doom\0xAA" "n n\0x92" "sanza",
+ "Otundo a\x92" " doom\xAA" "n n\x92" "sanza",
"Sinnlose Drehung des Steuerrads",
- "!0xBC" "ta\0x92\0xAD" "ta! T\0xAA""z vidsta\0x92" "jaha i\0xAC"
- "in\0x92" "qu\0xAA" " m\0xAA" "n\0xAA" "z",
- "Sternenpanorama des Reiseziels hier einf\0xFC" "ngen.",
+ "!0xBC" "ta\x92\xAD" "ta! T\xAA""z vidsta\x92" "jaha i\xAC"
+ "in\x92" "qu\xAA" " m\xAA" "n\xAA" "z",
+ "Sternenpanorama des Reiseziels hier einf\xFC" "ngen.",
- "V'lo\0xAC",
+ "V'lo\xAC",
"Geschwindigkeit",
"Pan",
"Ein",
@@ -983,29 +991,29 @@ static const char *const STRINGS_DE[197] = {
"Pido",
"Schnell",
- "\0xBC" "lu\0xAD" " q\0xB0 scu'b\0xAA" "rri",
- "H\0xFC" "hnchen a la sauce tomate",
- "\0xBC" "lu\0xAD" " q\0xB0 scu'jajaja",
+ "\xBC" "lu\xAD" " q\xB0 scu'b\xAA" "rri",
+ "H\xFC" "hnchen a la sauce tomate",
+ "\xBC" "lu\xAD" " q\xB0 scu'jajaja",
"H0xFC" "hnchen a la sauce moutarde",
- "\0xBC" "lu0xAD q\0xB0 scu'\0xAD" "lu\0xAD",
- "H\0xFC" "hnchen a la sauce 'Vogel'",
- "\0xBC" "lu\0xAD" " sanza scu, n\0xAA n\0xAA n\0xAA",
- "H\0xFC" "hnchen bar jeglicher sauce",
+ "\xBC" "lu0xAD q\xB0 scu'\xAD" "lu\xAD",
+ "H\xFC" "hnchen a la sauce 'Vogel'",
+ "\xBC" "lu\xAD" " sanza scu, n\xAA n\xAA n\xAA",
+ "H\xFC" "hnchen bar jeglicher sauce",
- "!\0xB2" "la! !\0xB2" "la! !!!Sizzlo ab\0x92\0xAA\0xAA" "o s\0xAA"
- "nza cr\0xAA" "dibo!!! N\0xAA" "nto p\0xAA" "rificio i\0xAC" "ind\0xAA",
+ "!\xB2" "la! !\xB2" "la! !!!Sizzlo ab\x92\xAA\xAA" "o s\xAA"
+ "nza cr\xAA" "dibo!!! N\xAA" "nto p\xAA" "rificio i\xAC" "ind\xAA",
"Achtung, Lebensgefahr. Unglaublich hohe Voltzahl!!! Innen keine "
- "artungsbed\0xFC" "rftigen Teile vorhanden.",
- "!!!Birin\0xAC" "i sp\0xAA" "culato t\0xAA" "z n\0xAA n\0xAA n\0xAA"
- " ouvraditiniz! J\0x92" "in n\0xAA n\0xAA upraximus stifibilimus"
- " j\0x92" "in sigorto funct",
- "Sie hStten die erste Kontrollt\0xFC" "r nicht \0xF6"
- "ffnen sollen! Dies ist nicht nur ungeheuer gef\0xE4"
- "hrlich, Sie verlieren auch jegliche Garantie-Anspr\0xFC" "che.",
- "!T\0xAA" "z n\0xAA bleabaz t\0xAA" "z n\0xAA j\0x92" "abaz! Coco?",
- "Und sagen Sie hinterher blo\0xFC nicht, niemand hStte Sie gewarnt.",
- "Pin\0xAA" "z-pin\0xAA" "z stot \0xAF" "r\0xB0 jibbli",
- "Dr\0xFC" "cken Sie den Knopf um die Bombe zu entschSrfen."
+ "artungsbed\xFC" "rftigen Teile vorhanden.",
+ "!!!Birin\xAC" "i sp\xAA" "culato t\xAA" "z n\xAA n\xAA n\xAA"
+ " ouvraditiniz! J\x92" "in n\xAA n\xAA upraximus stifibilimus"
+ " j\x92" "in sigorto funct",
+ "Sie hStten die erste Kontrollt\xFC" "r nicht \xF6"
+ "ffnen sollen! Dies ist nicht nur ungeheuer gef\xE4"
+ "hrlich, Sie verlieren auch jegliche Garantie-Anspr\xFC" "che.",
+ "!T\xAA" "z n\xAA bleabaz t\xAA" "z n\xAA j\x92" "abaz! Coco?",
+ "Und sagen Sie hinterher blo\xFC nicht, niemand hStte Sie gewarnt.",
+ "Pin\xAA" "z-pin\xAA" "z stot \xAF" "r\xB0 jibbli",
+ "Dr\xFC" "cken Sie den Knopf um die Bombe zu entschSrfen."
};
static const char *const MUSIC_DATA[4] = {
@@ -1142,6 +1150,9 @@ void writeResource(const char *resName, const char *sectionStr, uint32 resId, bo
void writeResource(const char *sectionStr, uint32 resId, bool isEnglish = true) {
char nameBuffer[256];
sprintf(nameBuffer, "%s/%u", sectionStr, resId);
+ if (!isEnglish)
+ strcat(nameBuffer, "/DE");
+
writeResource(nameBuffer, sectionStr, resId, isEnglish);
}
@@ -1556,11 +1567,6 @@ void writeData() {
writeResource("TEXT/STVOCAB", "TEXT", "STVOCAB.TXT");
writeResource("TEXT/JRQUOTES", "TEXT", "JRQUOTES.TXT");
writeResource("TEXT", 155);
- if (!resGer.empty()) {
- writeResource("TEXT/STVOCAB/DE", "TEXT", "STVOCABDE.TXT", false);
- writeResource("TEXT/JRQUOTES/DE", "TEXT", "JRQUOTESDE.TXT", false);
- writeResource("TEXT/155/DE", "TEXT", 155, false);
- }
writeResource("STARFIELD", 132);
writeStarfieldPoints();
@@ -1571,8 +1577,8 @@ void writeData() {
writeStringArray("TEXT/ITEM_NAMES", ITEM_NAMES, 46);
writeStringArray("TEXT/ITEM_IDS", ITEM_IDS, 40);
writeStringArray("TEXT/ROOM_NAMES", ROOM_NAMES, 34);
- writeStringArray("TEXT/STRINGS", STRINGS_EN, 151);
- writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 197);
+ writeStringArray("TEXT/STRINGS", STRINGS_EN, 156);
+ writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 202);
const int TEXT_PHRASES[3] = { 0x61D3C8, 0x618340, 0x61B1E0 };
const int TEXT_REPLACEMENTS1[3] = { 0x61D9B0, 0x61C788, 0x61B7C8 };
const int TEXT_REPLACEMENTS2[3] = { 0x61DD20, 0x61CAF8, 0x61BB38 };
@@ -1695,7 +1701,7 @@ void writeData() {
writeResponseTree();
writeNumbers();
- writeAllScriptQuotesEN();
+ writeAllScriptQuotes();
writeAllScriptResponses();
writeAllScriptRanges();
@@ -1709,6 +1715,10 @@ void writeData() {
}
void writeGermanData() {
+ writeResource("TEXT/STVOCAB/DE", "TEXT", "STVOCABDE.TXT", false);
+ writeResource("TEXT/JRQUOTES/DE", "TEXT", "JRQUOTESDE.TXT", false);
+ writeResource("TEXT/155/DE", "TEXT", 155, false);
+
writeStringArray("TEXT/PHRASES/DE", 0x23EEC8 + GERMAN_DIFF, 178);
writeStringArray("TEXT/REPLACEMENTS1/DE", 0x23F198 + GERMAN_DIFF, 1362);
writeStringArray("TEXT/REPLACEMENTS2/DE", 0x2406E8 + GERMAN_DIFF, 816);
@@ -1753,6 +1763,11 @@ void writeGermanData() {
writeSentenceEntries("Sentences/SuccUBus/DE", 0x637CD8);
writeMissiveOMatMessagesDE();
+
+ writeResource("STFONT", 149, false);
+ writeResource("STFONT", 151, false);
+ writeResource("STFONT", 152, false);
+ writeResource("STFONT", 153, false);
}
void createScriptMap() {
diff --git a/devtools/create_titanic/script_quotes.cpp b/devtools/create_titanic/script_quotes.cpp
index a84bfe2c93..2a8b16c59f 100644
--- a/devtools/create_titanic/script_quotes.cpp
+++ b/devtools/create_titanic/script_quotes.cpp
@@ -33,6 +33,9 @@
#include "script_quotes.h"
static const ScriptQuote BARBOT_QUOTES[] = {
+ { 0x0003d722, 0x0003d372, 0x0000001e },
+ { 0x0003d722, 0x0003d372, 0x00000032 },
+ { 0x0003d722, 0x0003d372, 0x00000046 },
{ 0x00000008, 0x00000000, 0x0003D372 },
{ 0x00000007, 0x00000000, 0x0003D72B },
{ 0x00000004, 0x00000000, 0x0003D722 },
@@ -82,6 +85,10 @@ static const ScriptQuote BARBOT_QUOTES[] = {
};
static const ScriptQuote BELLBOT_QUOTES[] = {
+ { 0x000313d6, 0x000313d7, 0x0000001e },
+ { 0x000313d6, 0x000313d7, 0x00000032 },
+ { 0x000313d6, 0x000313d7, 0x00000046 },
+ { 0x000313a1, 0x000313ae, 0x0000003c },
{ 0x00000008, 0x00000000, 0x00031116 },
{ 0x00000007, 0x00000000, 0x00031447 },
{ 0x00000006, 0x00000000, 0x000310F9 },
@@ -163,6 +170,10 @@ static const ScriptQuote BELLBOT_QUOTES[] = {
};
static const ScriptQuote DESKBOT_QUOTES[] = {
+ { 0x0003ae0e, 0x0003ae27, 0x0000001e },
+ { 0x0003ae0e, 0x0003ae27, 0x00000032 },
+ { 0x0003ae0e, 0x0003ae27, 0x00000046 },
+ { 0x0003abe1, 0x0003ae4c, 0x0000003c },
{ 0x00000008, 0x00000000, 0x0003ACD0 },
{ 0x00000007, 0x00000000, 0x0003ACDC },
{ 0x00000006, 0x00000000, 0x0003ABF9 },
@@ -241,6 +252,10 @@ static const ScriptQuote DESKBOT_QUOTES[] = {
};
static const ScriptQuote DOORBOT_QUOTES[] = {
+ { 0x000360bf, 0x000360c0, 0x0000001e },
+ { 0x000360bf, 0x000360c0, 0x00000032 },
+ { 0x000360bf, 0x000360c0, 0x00000046 },
+ { 0x000360c1, 0x000360c2, 0x0000003c },
{ 0x00000008, 0x00000000, 0x00035F14 },
{ 0x00000007, 0x00000000, 0x00035F6F },
{ 0x00000004, 0x00000000, 0x000360BF },
@@ -316,6 +331,10 @@ static const ScriptQuote DOORBOT_QUOTES[] = {
};
static const ScriptQuote LIFTBOT_QUOTES[] = {
+ { 0x00033694, 0x00033695, 0x0000001e },
+ { 0x00033694, 0x00033695, 0x00000032 },
+ { 0x00033694, 0x00033695, 0x00000046 },
+ { 0x00033696, 0x00033697, 0x0000003c },
{ 0x00000008, 0x00000000, 0x00033655 },
{ 0x00000007, 0x00000000, 0x000335A0 },
{ 0x00000006, 0x00000000, 0x0003368B },
@@ -379,6 +398,10 @@ static const ScriptQuote LIFTBOT_QUOTES[] = {
};
static const ScriptQuote MAITRED_QUOTES[] = {
+ { 0x0003f833, 0x0003f847, 0x0000001e },
+ { 0x0003f833, 0x0003f847, 0x00000032 },
+ { 0x0003f833, 0x0003f847, 0x00000046 },
+ { 0x0003f94f, 0x0003f936, 0x0000003c },
{ 0x00000008, 0x00000000, 0x0003F967 },
{ 0x00000007, 0x00000000, 0x0003F995 },
{ 0x00000006, 0x00000000, 0x0003F833 },
@@ -429,17 +452,16 @@ static const ScriptQuote MAITRED_QUOTES[] = {
};
void writeScriptQuotes(const char *name, const ScriptQuote *quotes,
- uint tag1, uint tag2, uint rangeStart, uint rangeEnd) {
+ uint rangeStart, uint rangeEnd, uint incr) {
outputFile.seek(dataOffset);
- outputFile.writeLong(tag1);
- outputFile.writeLong(tag2);
outputFile.writeLong(rangeStart);
outputFile.writeLong(rangeEnd);
+ outputFile.writeLong(incr);
for (; quotes->_index; ++quotes) {
+ outputFile.writeLong(quotes->_tag1);
+ outputFile.writeLong(quotes->_tag2);
outputFile.writeLong(quotes->_index);
- outputFile.writeLong(quotes->_tagId);
- outputFile.writeLong(quotes->_dialogueId);
}
uint size = outputFile.size() - dataOffset;
@@ -447,20 +469,11 @@ void writeScriptQuotes(const char *name, const ScriptQuote *quotes,
dataOffset += size;
}
-void writeAllScriptQuotesEN() {
- writeScriptQuotes("Quotes/Barbot", BARBOT_QUOTES, 221376, 221375, 0, 999);
- writeScriptQuotes("Quotes/Bellbot", BELLBOT_QUOTES, 201687, 201686, 270000, 270500);
- writeScriptQuotes("Quotes/Deskbot", DESKBOT_QUOTES, 241191, 241166, 270000, 270500);
- writeScriptQuotes("Quotes/Doorbot", DOORBOT_QUOTES, 221376, 221375, 0, 999);
- writeScriptQuotes("Quotes/Liftbot", LIFTBOT_QUOTES, 210581, 210580, 0, 999);
- writeScriptQuotes("Quotes/MaitreD", MAITRED_QUOTES, 260167, 260147, 270000, 270500);
-}
-
-void writeAllScriptQuotesDE() {
- writeScriptQuotes("Quotes/Barbot/DE", BARBOT_QUOTES, 251682, 250738, 0, 999);
- writeScriptQuotes("Quotes/Bellbot", BELLBOT_QUOTES, 201686, 201687, 270000, 270500);
- writeScriptQuotes("Quotes/Deskbot", DESKBOT_QUOTES, 241166, 241191, 270000, 270500);
- writeScriptQuotes("Quotes/Doorbot", DOORBOT_QUOTES, 221375, 221376, 0, 999);
- writeScriptQuotes("Quotes/Liftbot", LIFTBOT_QUOTES, 210580, 210581, 0, 999);
- writeScriptQuotes("Quotes/MaitreD", MAITRED_QUOTES, 260147, 260167, 270000, 270500);
+void writeAllScriptQuotes() {
+ writeScriptQuotes("Quotes/Barbot", BARBOT_QUOTES, 0, 999, 90);
+ writeScriptQuotes("Quotes/Bellbot", BELLBOT_QUOTES, 270000, 270500, 25);
+ writeScriptQuotes("Quotes/Deskbot", DESKBOT_QUOTES, 270000, 270500, 25);
+ writeScriptQuotes("Quotes/Doorbot", DOORBOT_QUOTES, 0, 999, 25);
+ writeScriptQuotes("Quotes/Liftbot", LIFTBOT_QUOTES, 0, 999, 57);
+ writeScriptQuotes("Quotes/MaitreD", MAITRED_QUOTES, 270000, 270500, 25);
}
diff --git a/devtools/create_titanic/script_quotes.h b/devtools/create_titanic/script_quotes.h
index e282ec5181..053ca64993 100644
--- a/devtools/create_titanic/script_quotes.h
+++ b/devtools/create_titanic/script_quotes.h
@@ -26,13 +26,12 @@
#include "common/scummsys.h"
struct ScriptQuote {
+ uint _tag1;
+ uint _tag2;
uint _index;
- uint _tagId;
- uint _dialogueId;
};
-extern void writeAllScriptQuotesEN();
-extern void writeAllScriptQuotesDE();
+extern void writeAllScriptQuotes();
extern void writeEntryHeader(const char *name, uint offset, uint size);
extern uint dataOffset;
diff --git a/dists/engine-data/titanic.dat b/dists/engine-data/titanic.dat
index 2d5ea73117..c4b93a200b 100644
--- a/dists/engine-data/titanic.dat
+++ b/dists/engine-data/titanic.dat
Binary files differ
diff --git a/doc/de/LIESMICH b/doc/de/LIESMICH
index df36208d7b..4401215a26 100644
--- a/doc/de/LIESMICH
+++ b/doc/de/LIESMICH
@@ -33,18 +33,21 @@ Inhaltsverzeichnis:
* 3.12 Hinweise zu Inherit the Earth: Quest for the Orb (Macintosh)
* 3.13 Hinweise zu Maniac Mansion (Apple II/NES)
* 3.14 Hinweise zu Mickey's Space Adventure
- * 3.15 Hinweise zu Nippon Safes Inc. (Amiga)
- * 3.16 Hinweise zu Simon the Sorcerer 1 und 2
- * 3.17 Hinweise zu The Curse of Monkey Island
- * 3.18 Hinweise zu Floyd т€“ Es gibt noch Helden
- * 3.19 Hinweise zu The Legend of Kyrandia
- * 3.20 Hinweise zu Troll's Tale
- * 3.21 Hinweise zu Winnie the Pooh
- * 3.22 Hinweise zum vorhersagenden Eingabedialog in AGI-Spielen von Sierra
- * 3.23 Gleichzeitige Sprachausgabe und Untertitel in SCI-Spielen von Sierra
- * 3.24 Hinweise zu den Spielen der Zork-Reihe
- * 3.25 Hinweise zu Spielen fУМr den Commodore 64
- * 3.26 Hinweise zu Spielen fУМr den Macintosh
+ * 3.15 Hinweise zu Myst
+ * 3.16 Hinweise zu Nippon Safes Inc. (Amiga)
+ * 3.17 Hinweise zu Riven
+ * 3.18 Hinweise zu Simon the Sorcerer 1 und 2
+ * 3.19 Hinweise zu Starship Titanic
+ * 3.20 Hinweise zu The Curse of Monkey Island
+ * 3.21 Hinweise zu Floyd т€“ Es gibt noch Helden
+ * 3.22 Hinweise zu The Legend of Kyrandia
+ * 3.23 Hinweise zu Troll's Tale
+ * 3.24 Hinweise zu Winnie the Pooh
+ * 3.25 Hinweise zum vorhersagenden Eingabedialog in AGI-Spielen von Sierra
+ * 3.26 Gleichzeitige Sprachausgabe und Untertitel in SCI-Spielen von Sierra
+ * 3.27 Hinweise zu den Spielen der Zork-Reihe
+ * 3.28 Hinweise zu Spielen fУМr den Commodore 64
+ * 3.29 Hinweise zu Spielen fУМr den Macintosh
4.0) UnterstУМtzte Plattformen
5.0) ScummVM verwenden
* 5.1 Kommandozeilenoptionen
@@ -81,8 +84,9 @@ Inhaltsverzeichnis:
8.0) Konfigurationsdatei
* 8.1 Verwendbare KonfigurationsschlУМsselwУЖrter
* 8.2 Spielspezifische Optionen der grafischen BenutzeroberflУЄche
-9.0) Kompilieren
-10.0) Mitwirkende
+9.0) Bildschirmfotos (nur SDL-Backend)
+10.0) Kompilieren
+11.0) Mitwirkende
1.0) EinfУМhrung:
@@ -336,6 +340,7 @@ Spiele von Sierra (SCI):
EcoQuest: Die Suche nach Cetus [ecoquest]
EcoQuest 2: Lost Secret of the Rainforest [ecoquest2]
Freddy Pharkas: Cowboy-Apotheker [freddypharkas]
+ Gabriel Knight: Sins of the Fathers [gk1]
Hoyle's Book of Games 1 [hoyle1]
Hoyle's Book of Games 2 [hoyle2]
Hoyle's Book of Games 3 [hoyle3]
@@ -345,6 +350,8 @@ Spiele von Sierra (SCI):
King's Quest IV [kq4sci]
King's Quest V [kq5]
King's Quest VI [kq6]
+ King's Quest VII [kq7]
+ King's Questions [kquestions]
Laura Bow: The Colonel's Bequest [laurabow]
Laura Bow 2: Der Dolch des Amon Ra [laurabow2]
Leisure Suit Larry 1 [lsl1sci]
@@ -352,22 +359,34 @@ Spiele von Sierra (SCI):
Leisure Suit Larry 3 [lsl3]
Leisure Suit Larry 5 [lsl5]
Leisure Suit Larry 6 [lsl6]
+ Leisure Suit Larry 6 (hires) [lsl6hires]
+ Leisure Suit Larry 7 [lsl7]
+ Lighthouse: The Dark Being [lighthouse]
Mixed-up Fairy Tales [fairytales]
Mixed-up Mother Goose [mothergoose]
+ Mixed-up Mother Goose Deluxe [mothergoosehires]
Pepper's Adventures in Time [pepper]
+ Phantasmagoria [phantasmagoria]
+ Phantasmagoria 2: A Puzzle of Flesh [phantasmagoria2]
Police Quest 1 [pq1sci]
Police Quest 2 [pq2]
Police Quest 3 [pq3]
+ Police Quest 4 [pq4]
Quest for Glory 1/Hero's Quest [qfg1]
Quest for Glory 1 [qfg1vga]
Quest for Glory 2 [qfg2]
Quest for Glory 3 [qfg3]
+ RAMA [rama]
Slater & Charlie Go Camping [slater]
+ Shivers [shivers]
Space Quest I [sq1sci]
Space Quest III [sq3]
Space Quest IV [sq4]
Space Quest V [sq5]
+ Space Quest 6 [sq6]
The Island of Dr. Brain [islandbrain]
+ The Beast Within: A Gabriel Knight Mystery [gk2]
+ Torin's Passage [torin]
Andere Spiele:
3 Skulls of the Toltecs [toltecs]
@@ -405,9 +424,11 @@ Andere Spiele:
Nippon Safes Inc. [nippon]
Rex Nebular and the Cosmic Gender Bender [nebular]
Ringworld: Revenge of the Patriarch [ringworld]
+ Riven: The Sequel to Myst [riven]
Return to Ringworld [ringworld2]
Sfinx [sfinx]
Soltys [soltys]
+ Starship Titanic [titanic]
TeenAgent [teenagent]
The 7th Guest [t7g]
The Journeyman Project: Pegasus Prime [pegasus]
@@ -942,8 +963,14 @@ Der Spieler kann dann einfach auf den Rand des Spielbildschirms klicken, um den
Ort zu wechseln, УЄhnlich wie in vielen Adventures, was einfacher und viel
unkomplizierter ist, als sich mit dem MenУМ umherzubewegen.
+3.15) Hinweise zu Myst:
+----- -----------------
+Linke Maustaste: Bewegen/Aktion
+Leertaste: Spiel pausieren
+ESC: Zwischensequenz УМberspringen
+F5: MenУМ
-3.15) Hinweise zu Nippon Safes Inc. (Amiga):
+3.16) Hinweise zu Nippon Safes Inc. (Amiga):
----- --------------------------------------
FУМr dieses Spiel benУЖtigen Sie die Dateien
disk0, global.table, pointer und it (en, fr, ge fУМr die internationale Version).
@@ -951,15 +978,55 @@ disk0, global.table, pointer und it (en, fr, ge fУМr die internationale Version)
ZusУЄtzlich mУМssen Sie das Diskettenabbild 2 in disk1, Abbild 3 in disk2,
Abbild 4 in disk3 sowie Abbild 5 in disk4 umbenennen.
+3.17) Hinweise zu Riven
+----- -----------------
+Linke Maustaste: Bewegen/Aktion
+Pfeiltasten: Bewegen
+Bild hoch: Nach oben sehen
+Bild unten: Nach unten sehen
+Leertaste: Spiel pausieren
+ESC: Zwischensequenz УМberspringen
+F5: MenУМ
-3.16) Hinweise zu Simon the Sorcerer 1 und 2:
+
+3.18) Hinweise zu Simon the Sorcerer 1 und 2:
----- ---------------------------------------
Wenn Sie die Doppel-Version von Simon the Sorcerer 1 oder 2 auf CD haben, finden
Sie die Windows-Version im Hauptverzeichnis der CD und die DOS-Version im
DOS-Verzeichnis der CD.
-
-3.17) Hinweise zu The Curse of Monkey Island:
+3.19) Hinweise zu Starship Titanic:
+-----------------------------------
+Grundlegende Steuerung:
+Linke Maustaste: Bewegung ausfУМhren
+Shift + Linke Maustaste: Bearbeite Raum-Symbole und schnelle Bewegungs-УœbergУЄnge
+Rechte Maustaste: Bearbeite Raum-Symbole und schnelle УœbergУЄnge
+Mausrad: Durch Items (Inventar, etc) und Konversations-Log scrollen
+Pfeiltasten: Bewegung. Pfeil nach unten/zurУМck ist nur verfУМgbar, wenn die aktuelle
+Ansicht die Bewegung nach unten explizit verfУМgbar hat.
+
+Steuerung fУМr das Starfield-Puzzle am Ende des Spiels:
+Tab: Zwischen Sternenkarte und Himmelslandschaft umschalten
+Mausklick: Stern auf der Himmelslandschaft auswУЄhlen
+Mausbewegung: Ausrichtung der Sternenkarte
+Z: Sternenkarte nach links drehen
+X: Sternenkarte nach rechts drehen
+' Sternenkarte nach oben drehen
+/ Sternenkarte nach unten drehen
+; Sternenkarte nach vorne bewegen
+. Sternenkarte nach hinten bewegen
+LEER Bewegung der Sternenkarte stoppen
+L: Koordinaten der Sternenkarte sperren
+D: Koordinaten der Sternenkarte entsperren
+
+Um das Puzzle zu lУЖsen, werden nur Mausklicks, die L- und die Tab-Taste wirklich
+benУЖtigt. Die Aktions-Symbole im PET kУЖnnen anstelle der Tab-Taste verwendet werden.
+
+Verschiedene Steuerungselemente:
+Strg + C: У–ffnet den Cheat-Raum fУМr Entwickler
+Strg + D: У–ffnet den Debugger.
+
+3.20) Hinweise zu The Curse of Monkey Island:
----- ---------------------------------------
FУМr dieses Spiel benУЖtigen Sie die Dateien comi.la0, comi.la1 und comi.la2. Die
Datei comi.la0 kann auf beiden CDs vorgefunden werden, ist aber auf beiden
@@ -971,7 +1038,7 @@ dieser Dateien lassen sich auf beiden CDs vorfinden, jedoch sind sie auch in
diesem Fall identisch.
-3.18) Hinweise zu Floyd т€“ Es gibt noch Helden:
+3.21) Hinweise zu Floyd т€“ Es gibt noch Helden:
----- ----------------------------------------
Amiga/Macintosh:
Sie benУЖtigen ein kleines Paket mit Zwischensequenzen, welche sowohl in der
@@ -1000,7 +1067,7 @@ voices.wav von CD3 in voices3.wav
voices.wav von CD4 in voices4.wav
-3.19) Hinweise zu The Legend of Kyrandia:
+3.22) Hinweise zu The Legend of Kyrandia:
----- -----------------------------------
Um The Legend of Kyrandia unter ScummVM laufen zu lassen, benУЖtigen Sie die
Datei т€žkyra.datт€œ. Die Datei sollte immer in offiziellen ScummVM-Paketen
@@ -1011,14 +1078,14 @@ eingebettet sein sollte. Also mУМssen Sie sich nur diese besorgen, wenn sich
ScummVM darУМber beschwert, dass diese Datei fehlt.
-3.20) Hinweise zu Troll's Tale:
+3.23) Hinweise zu Troll's Tale:
----- -------------------------
Das Originalspiel wurde auf einer PC-Boot-Diskette ausgeliefert, weshalb es
notwendig ist, die Inhalte dieser Diskette in einer Abbild-Datei auszugeben und
diese т€žtroll.imgт€œ zu nennen, um das Spiel unter ScummVM spielen zu kУЖnnen.
-3.21) Hinweise zu Winnie the Pooh:
+3.24) Hinweise zu Winnie the Pooh:
----- ----------------------------
Es ist mУЖglich, SpielstУЄnde vom Original-Interpreter des Spiels in ScummVM zu
importieren.
@@ -1033,7 +1100,7 @@ Ort zu wechseln, УЄhnlich wie in vielen Adventures, was einfacher und viel
unkomplizierter ist, als sich mit dem MenУМ umherzubewegen.
-3.22) Hinweise zum vorhersagenden Eingabedialog bei Sierras AGI-Spielen:
+3.25) Hinweise zum vorhersagenden Eingabedialog bei Sierras AGI-Spielen:
----- ------------------------------------------------------------------
Der vorhersagende Eingabedialog ist ein ScummVM-Hilfsmittel, um die englischen
Spiele der AGI-Engine (die offensichtlich Kommandozeilen-Eingabe erfordern) auf
@@ -1092,7 +1159,7 @@ Ziffernblock zugewiesen wurde. Ebenso kУЖnnen die SchaltflУЄchen mittels der
Pfeiltasten und der Eingabetaste gesteuert werden.
-3.23) Gleichzeitige Sprachausgabe und Untertitel in Sierra-SCI-Spielen:
+3.26) Gleichzeitige Sprachausgabe und Untertitel in Sierra-SCI-Spielen:
----- -----------------------------------------------------------------
Bestimmte CD-Versionen von Sierra-SCI-Spielen boten sowohl Sprachausgabe als
auch Untertitel an. Bei einigen gab es die MУЖglichkeit, zwischen beidem hin- und
@@ -1107,10 +1174,17 @@ In diesen CD-Spielen ist es mУЖglich, gleichzeitige Sprachausgabe und Untertitel
anzeigen zu lassen:
EcoQuest 1 CD
Freddy Pharkas CD
+ Gabriel Knight CD
King's Quest 6 CD
+ King's Quest VII CD
Laura Bow 2 CD
Leisure Suit Larry 6 CD
+ Leisure Suit Larry 6 (hires) CD
+ Police Quest 4 CD
+ Shivers CD
Space Quest 4 CD
+ Space Quest 6 CD
+ Torin's Passage CD
EcoQuest 1 CD:
Der Modus Sprachausgabe und Untertitel kann УМber die Spieloptionen oder auch
@@ -1122,12 +1196,24 @@ Freddy Pharkas CD:
mУЖglich. Bitte beachten Sie, dass einige gesprochene Teile in den
Untertiteln fehlen.
+Gabriel Knight CD:
+ Sprachausgabe und Textausgabe kann mithilfe der "Text" und "Sprache"-Buttons
+ in den Spiel-Optionen oder УМber die Audio-Einstellungen von ScummVM
+ ausgewУЄhlt werden.
+
King's Quest 6 CD:
Der Modus Sprachausgabe und Untertitel kann УМber die ModusschaltflУЄche in
den Spieloptionen (УМber die fУМr ScummVM zusУЄtzlich hinzugefУМgte Einstellung
т€žDualт€œ) oder auch УМber ScummVMs Audio-Optionen deaktiviert und aktiviert
werden.
+King's Quest VII CD:
+ Es gibt innerhalb des Spiels keine Option, um zwischen Sprachausgabe und
+ Textausgabe umzuschalten. Nur die Audio-Einstellungen von ScummVM kУЖnnen
+ dazu verwendet werden. Beachten Sie, dass Untertitel in der offiziellen
+ VerУЖffentlichung des Spiels deaktiviert wurden, sodass einige Untertitel
+ fehlerhaft sein kУЖnnen oder teilweise fehlen.
+
Laura Bow 2 CD:
Der Modus Sprachausgabe und Untertitel kann УМber die ModusschaltflУЄche in
den Spieloptionen (УМber die fУМr ScummVM zusУЄtzlich hinzugefУМgte Einstellung
@@ -1139,13 +1225,40 @@ Leisure Suit Larry 6 CD:
gewУЄhlt werden. Es gibt innerhalb des Spiels keine Option, um alleinige
Untertitel zu aktivieren. Dies ist nur УМber ScummVMs Audio-Optionen mУЖglich.
+Leisure Suit Larry 6 (hires) CD:
+ Untertitel kУЖnnen УМber die Option "Text Ein/Aus" innerhalb des Spiels oder
+ УМber die Audio-Einstellungen von ScummVM deaktiviert werden. Die Sprachausgabe
+ kann nicht deaktiviert werden.
+
+Police Quest 4 CD:
+ Innerhalb des Spiels kann nur zwischen Sprachausgabe und Textausgabe umgeschaltet
+ werden. Nur mithilfe der ScummVM-Audioeinstellungen ist es mУЖglich, Sprachausgabe
+ und Untertitel gleichzeitig zu aktivieren.
+
+Shivers CD:
+ Die Textausgabe kann mithilfe der "Text"-Option in den Einstellungen des Spiels
+ sowie УМber die Audio-Einstellungen von ScummVM ein- und ausgeschaltet werden.
+ Bitte beachten Sie, dass in diesem Spiel nur die Videos mit Untertiteln
+ versehen sind.
+
Space Quest 4 CD:
Der Modus Sprachausgabe und Untertitel kann УМber die SchaltflУЄche fУМr den
Anzeige-Modus in den Spieloptionen oder auch УМber ScummVMs Audio-Optionen
deaktiviert und aktiviert werden.
+Space Quest 6 CD:
+ Sprachausgabe und Text kann mithilfe der "Sprache"- und "Text"-Buttons
+ in den Einstellungen des Spiels oder УМber die Audioeinstellungen in
+ ScummVM ein- und ausgeschaltet werden.
+
+Torin's Passage CD:
+ Untertitel kУЖnnen УМber die Option "Closed Captioning" in den Einstellungen
+ des Spiels ein- und ausgeschaltet werden. Die Sprachausgabe kann ausgeschaltet
+ werden, indem die Option "Audio Mixer" im SpielmenУМ ausgewУЄhlt und die
+ LautstУЄrke der Sprachaufgabe auf null gesetzt wird.
-3.24) Hinweise zu den Spielen der Zork-Reihe:
+
+3.27) Hinweise zu den Spielen der Zork-Reihe:
----- ---------------------------------------
Um die unterstУМtzen Zork-Spiele (Zork Nemesis: Das verbotene Land und
Zork: Der GroУŸinquisitor) spielen zu kУЖnnen, mУМssen Sie einige zusУЄtzliche
@@ -1258,7 +1371,7 @@ das Hauptverzeichnis des Spiels. Kopieren Sie die Verzeichnisse "zassetsc" und
"zassetse" ebenfalls in das Hauptverzeichnis des Spiels.
-3.25) Hinweise zu Spielen fУМr den Commodore 64:
+3.28) Hinweise zu Spielen fУМr den Commodore 64:
----- -----------------------------------------
Sowohl Maniac Mansion als auch Zak McKracken laufen, aber Maniac Mansion ist
noch nicht spielbar. Benennen Sie einfach die D64-DatentrУЄger um in
@@ -1273,7 +1386,7 @@ Plattform eingestellt ist. Wir empfehlen, auf die viel einfachere Methode
zurУМckzugreifen, die im vorherigen Absatz beschrieben ist.
-3.26) Hinweise zu Spielen fУМr den Macintosh:
+3.29) Hinweise zu Spielen fУМr den Macintosh:
----- --------------------------------------
Alle auf SCUMM basierenden Adventures von Lucasarts, mit Ausnahme von COMI,
existieren auch als Versionen fУМr den Macintosh. ScummVM kann die meisten
@@ -1394,10 +1507,25 @@ gestartet werden -- siehe nУЄchster Abschnitt.
-t, --list-targets Zeigt Liste konfigurierter Ziele und beendet.
--list-saves=ZIEL Zeigt Liste von SpielstУЄnden fУМr das festgelegte
Spiel (ZIEL)
- --auto-detect Zeigt eine Liste unterstУМtzter Spiele im aktuellen
- oder in einem anderen gewУЄhlten Verzeichnis an.
- Verwenden Sie --path=PFAD vor --auto-detect, um
- ein Verzeichnis zu wУЄhlen.
+ -a, --add FУМgt alle Spiele aus dem aktuellen oder einem gewУЄhlten
+ Verzeichnis hinzu. Wenn --game=ID verwendet wird,
+ wird nur das Spiel mit dieser Kennung hinzugefУМgt.
+ Siehe auch --detect.
+ Verwenden Sie --path=PFAD vor -a, -add um ein
+ Verzeichnis festzulegen.
+ --detect Zeigt eine Liste der Spiele mit ihrer Kennung in dem
+ aktuellen oder einem gewУЄhlten Verzeichnis an, ohne
+ sie zu der Konfiguration hinzuzufУМgen.
+ Verwenden Sie --path=PFAD vor --detect, um ein
+ Verzeichnis festzulegen.
+ --game=ID In Kombination mit --add oder --detect wird nur das Spiel
+ mit der gewУЄhlten Kennung hinzugefУМgt oder versucht zu erkennen.
+ --auto-detect Zeigt eine Liste der Spiele im aktuellen oder einem gewУЄhlten
+ Verzeichnis an und starte das erste erkannte Spiel.
+ Verwenden Sie --path=PFAD vor --auto-detect, um ein Verzeichnis
+ festzulegen.
+ --recursive In Kombination mit --add oder --detect werden alle
+ Unterverzeichnisse rekursiv durchsucht.
--console Aktiviert das Konsolenfenster
(standardmУЄУŸig aktiviert) (nur Windows)
@@ -1534,6 +1662,7 @@ Die Engines, die momentan das ZurУМckkehren zur Spieleliste unterstУМtzen, sind:
SWORD1
SWORD2
TEENAGENT
+ TITANIC
TOUCHE
TSAGE
TUCKER
@@ -1921,11 +2050,13 @@ den Originalversionen verwendet werden.
- Benennen Sie die Spielstanddatei in т€želvira2-pc.xxxт€œ (DOS-Versionen) oder
т€želvira2.xxxт€œ (andere Versionen) um.
- Waxworks
- - FУМgen Sie 8 Bytes (Name fУМr Spielstand) am Anfang der Spielstanddatei
- hinzu.
- - Benennen Sie die Spielstanddatei in т€žwaxworks-pc.xxxт€œ (DOS-Versionen) oder
- т€žwaxworks.xxxт€œ (andere Versionen) um.
+ Myst
+ - Bennen Sie die Spielstanddatei in "myst-xxx.mys" um.
+ - SpielstУЄnde der Masterpiece Edition und der normalen Ausgabe sind austauschbar.
+
+ Riven
+ - Bennen Sie die Spielstanddatei in "riven-xxx.rvn" um.
+ - SpielstУЄnde der CD- und der DVD-Ausgabe sind nicht austauschbar.
Simon the Sorcerer 1
- Benennen Sie die Spielstanddatei in т€žsimon1.xxxт€œ um.
@@ -1933,9 +2064,18 @@ den Originalversionen verwendet werden.
Simon the Sorcerer 2
- Benennen Sie die Spielstanddatei in т€žsimon2.xxxт€œ um.
+ Starship Titanic
+ - Benennen Sie die Spielstanddatei in "titanic-win.xxx" um.
+
Floyd - Es gibt noch Helden
- Benennen Sie die Spielstanddatei in т€žfeeble.xxxт€œ um.
+ Waxworks
+ - FУМgen Sie 8 Bytes (Name fУМr Spielstand) am Anfang der Spielstanddatei
+ hinzu.
+ - Benennen Sie die Spielstanddatei in т€žwaxworks-pc.xxxт€œ (DOS-Versionen) oder
+ т€žwaxworks.xxxт€œ (andere Versionen) um.
+
Hierbei steht т€žxxxт€œ fУМr den genauen Speicherplatz (z. B. 001), auf welchem sich
der Spielstand unter ScummVM befinden soll.
@@ -1974,6 +2114,7 @@ der Spielstand unter ScummVM befinden soll.
SWORD2
TEENAGENT
TINSEL
+ TITANIC
TOON
TOUCHE
TSAGE
@@ -2009,6 +2150,7 @@ der Spielstand unter ScummVM befinden soll.
SWORD2
TEENAGENT
TINSEL
+ TITANIC
TOON
TOUCHE
TSAGE
@@ -2577,6 +2719,14 @@ Die folgenden SchlУМsselwУЖrter werden erkannt:
save_slot Zahl Nummer des Spielstands, der zu Spielbeginn
geladen werden soll
savepath Text Verzeichnis fУМr SpielstУЄnde des Spiels
+ screenshotpath Text Verzeichnis fУМr Bildschirmfotos
+ iconpaths Text Verzeichnis, in dem nach Icons gesucht wird,
+ die fУМr das ScummVM-Icon in der Windows-Taskbar
+ oder im macOS X-Dock verwendet werden, wenn
+ ein Spiel lУЄuft. Die Icon-Dateien sollten nach
+ der Spiele-Kennung benannt werden und sich unter
+ Windows im .ico-Format und unter macOS X im
+ .png-Format befinden.
versioninfo Text Die Version von ScummVM, welche diese
Konfigurationsdatei erstellt hat
@@ -2613,6 +2763,11 @@ Die folgenden SchlУМsselwУЖrter werden erkannt:
opl_driver Text Verwendung von AdLib-(OPL-)Emulator
output_rate Zahl Zu verwendende Ausgabefrequenz in Hz. Sinnvolle
Werte sind 11025, 22050 und 44100.
+ audio_buffer_size Zahl Уœberschreibt die GrУЖУŸe des Audio-Zwischenspeichers.
+ ZulУЄssige Werte sind: 256 512 1024 2048 4096
+ 8192 16384 32768. Das Standard-Wert wird anhand der
+ output_rate berechnet, um die Audio-Latenz unter
+ 45ms zu halten.
alsa_port Text Zu verwendender Port fУМr Ausgabe mittels
ALSA-Musiktreiber
music_volume Zahl MusiklautstУЄrke-Einstellung (0-255)
@@ -2832,8 +2987,27 @@ angezeigt werden, muss das betreffende Spiel einmal gestartet oder neu zur
Spieleliste hinzugefУМgt werden. Dadurch wird die Konfiguration von jedem Eintrag
aktualisiert, was die spielspezifischen Optionen zum Vorschein bringt.
+9.0) Bildschirmfotos (nur SDL-Backend):
+---- ----------------------------------
+Auf Systemen, die das SDL-Backen verwenden (zum Beispiel Windows, Mac oder Linux)
+kУЖnnen Sie die Tastenkombination "Alt+S" zum Erstellen von Bildschirmfotos verwenden
+(siehe auch 5.4 - TastenkУМrzel).
+
+Sie kУЖnnen das Verzeichnis, in dem die erstellten Bildschirmfotos abgelegt werden sollen,
+in der ScummVM-Konfigurationsdatei festlegen. Dazu mУМssen Sie einen Eintrag "screenshotpath"
+innerhalb der [scummvm]-Sektion hinzufУМgen:
-9.0) Kompilieren:
+[scummvm]
+screenshotpath=/pfad/zu/den/bildschirmfotos/
+
+Wenn in der Konfigurationsdatei kein Bildschirmfoto-Verzeichnis angegeben ist, hУЄngt
+der Speicherort der Bildschirmfotos vom verwendeten Betriebssystem ab:
+ Windows: Im Verzeichnis "Users\Benutzername\Bilder\ScummVM Screenshots"
+ macOS X: Auf dem Desktop.
+ Alle anderen Betriebssysteme: Im aktuellen Verzeichnis.
+
+
+10.0) Kompilieren:
---- ------------
FУМr eine aktuelle Уœbersicht dazu, wie man ScummVM fУМr unterschiedliche
Plattformen kompiliert, schauen Sie bitte in unserem Wiki nach, insbesondere auf
@@ -2862,18 +3036,12 @@ Debug-Nachrichten zu durchsuchen
Windows:
- * Dev-C++
- WeiterfУМhrende Informationen finden Sie unter:
- http://wiki.scummvm.org/index.php/Compiling_ScummVM/DevCPP
* MinGW
WeiterfУМhrende Informationen finden Sie unter:
http://wiki.scummvm.org/index.php/Compiling_ScummVM/MinGW
* Visual Studio (MSVC)
WeiterfУМhrende Informationen finden Sie unter:
http://wiki.scummvm.org/index.php/Compiling_ScummVM/Visual_Studio
- * Windows CE/Mobile
- WeiterfУМhrende Informationen finden Sie unter:
- http://wiki.scummvm.org/index.php/Compiling_ScummVM/Windows_CE
Linux:
* GCC
@@ -2882,7 +3050,7 @@ Debug-Nachrichten zu durchsuchen
AmigaOS4:
WeiterfУМhrende Informationen finden Sie unter:
- http://wiki.scummvm.org/index.php/AmigaOS
+ http://wiki.scummvm.org/index.php/AmigaOS4
Apple iPhone:
WeiterfУМhrende Informationen finden Sie unter:
@@ -2923,10 +3091,6 @@ http://wiki.scummvm.org/index.php/Compiling_ScummVM/Mac_OS_X_Crosscompiling
WeiterfУМhrende Informationen finden Sie unter:
http://wiki.scummvm.org/index.php/Compiling_ScummVM/Maemo
- Nintendo DS:
- WeiterfУМhrende Informationen finden Sie unter:
- http://wiki.scummvm.org/index.php/Compiling_ScummVM/Nintendo_DS
-
Nintendo Wii and Gamecube:
WeiterfУМhrende Informationen finden Sie unter:
http://wiki.scummvm.org/index.php/Compiling_ScummVM/Wii
@@ -2955,12 +3119,12 @@ http://wiki.scummvm.org/index.php/Compiling_ScummVM/Mac_OS_X_Crosscompiling
http://wiki.scummvm.org/index.php/Compiling_ScummVM/Symbian
-10.0) Mitwirkende
+11.0) Mitwirkende
----- -------
Eine ausfУМhrliche Liste derjenigen, die ScummVM ermУЖglicht haben, finden Sie
unter:
- http://www.scummvm.org/credits/
+ http://www.scummvm.org/credits
------------------------------------------------------------------------
diff --git a/doc/de/NEUES b/doc/de/NEUES
index acc06158d4..5ab529b129 100644
--- a/doc/de/NEUES
+++ b/doc/de/NEUES
@@ -5,15 +5,26 @@ Programmcodes finden Sie auf Englisch unter:
1.10.0 (DD.MM.YYYY)
Neue Spiele:
- UnterstУМtzung fУМr Full Pipe hinzugefУМgt.
-
- Neue Spiele (Sierra SCI2 - SCI2.1):
+ - UnterstУМtzung fУМr Hi-Res Adventure #3: Cranston Manor hinzugefУМgt.
+ - UnterstУМtzung fУМr Hi-Res Adventure #4: Ulysses and the Golden Fleece hinzugefУМgt.
+ - UnterstУМtzung fУМr Hi-Res Adventure #5: Time Zone hinzugefУМgt.
+ - UnterstУМtzung fУМr Hi-Res Adventure #6: The Dark Crystal hinzugefУМgt.
+ - UnterstУМtzung fУМr Riven hinzugefУМgt.
+ - UnterstУМtzung fУМr Starship Titanic (Raumschiff Titanic) hinzugefУМgt.
+
+ Neue Spiele (Sierra SCI2 - SCI3):
- UnterstУМtzung fУМr Gabriel Knight hinzugefУМgt.
- UnterstУМtzung fУМr Gabriel Knight 2 hinzugefУМgt.
- UnterstУМtzung fУМr King's Quest VII hinzugefУМgt.
- UnterstУМtzung fУМr King's Questions hinzugefУМgt.
- UnterstУМtzung fУМr Leisure Suit Larry 6 (hires) hinzugefУМgt.
+ - UnterstУМtzung fУМr Leisure Suit Larry 7 hinzugefУМgt.
+ - UnterstУМtzung fУМr Lighthouse hinzugefУМgt.
+ - UnterstУМtzung fУМr Mixed-Up Mother Goose Deluxe hinzugefУМgt.
- UnterstУМtzung fУМr Phantasmagoria hinzugefУМgt.
+ - UnterstУМtzung fУМr Phantasmagoria 2 hinzugefУМgt.
- UnterstУМtzung fУМr Police Quest 4 hinzugefУМgt.
+ - UnterstУМtzung fУМr RAMA hinzugefУМgt.
- UnterstУМtzung fУМr Shivers hinzugefУМgt.
- UnterstУМtzung fУМr Space Quest 6 hinzugefУМgt.
- UnterstУМtzung fУМr Torin's Passage hinzugefУМgt.
@@ -29,6 +40,8 @@ Programmcodes finden Sie auf Englisch unter:
- Sprache der BenutzeroberflУЄche kann ohne Programmneustart geУЄndert werden.
- Integrierter Munt MT-32-Emulator auf Version 2.0.3 aktualisiert.
- Verbesserte Joystick-Bedienung.
+ - Verbesserte Audio-Latenz.
+ - Verbesserte Verwaltung des ScummVM-Fensters in Spielen, die den Bildschirm-Modus wechseln.
AGOS:
- Einstellung fУМr die Untertitel-Geschwindigkeit in der hebrУЄischen Version von
@@ -43,10 +56,19 @@ Programmcodes finden Sie auf Englisch unter:
- SpielstУЄnde kУЖnnen jetzt mithilfe des GMM gespeichert und geladen werden.
SCI:
+ - Verbesserte Ladezeit bei Verwendung des MT-32-Emulators.
+ - Verbesserte Behandlung von MT-32-Halleffekten in SCI0-Spielen.
+ - Verbesserte Auswahl synthetisierter Soundeffekte in SCI0-Spielen.
+ - Verbesserte Auswahl der digitalen Audio-Ausgabe in SQ4.
+ - Verbesserte Ressourcenverwaltung.
+ - Verbesserte Fehlerbehandlung fehlerhafter MIDI-Daten.
+ - Fehler behoben, der die SpeicherstУЄnde mit der Zeit mit unnУЖtigen Daten gefУМllt hat.
+ - Fehlerhafter Tag/Nacht-Rhythmus in QFG3 behoben.
- Skript-Fehler in Police Quest 3 behoben. Wenn der Spieler Marie das Medaillon
УМbergibt, erhУЄlt er dafУМr 10 Punkte. Damit ist es jetzt mУЖglich, das Spiel mit
einer perfekten Punktzahl zu beenden. Dieser Fehler ist auch im Originalspiel
vorhanden.
+ - Verschiedene andere Skript-Fehler wurden behoben.
1.9.1 (DD.MM.YYYY)
Allgemein:
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index ea2144459d..1855280a24 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -153,7 +153,7 @@ AccessEngine::~AccessEngine() {
}
void AccessEngine::setVGA() {
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
}
void AccessEngine::initialize() {
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 61890af37a..9370363a3f 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -681,7 +681,7 @@ void AdlEngine::gameLoop() {
}
Common::Error AdlEngine::run() {
- initGraphics(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, true);
+ initGraphics(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2);
_console = new Console(this);
_display = new Display();
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index fa1f11cce4..119ccfea1d 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -210,7 +210,7 @@ int GfxMgr::initVideo() {
_displayPixels = _displayScreenWidth * _displayScreenHeight;
_displayScreen = (byte *)calloc(_displayPixels, 1);
- initGraphics(_displayScreenWidth, _displayScreenHeight, _displayScreenWidth > 320);
+ initGraphics(_displayScreenWidth, _displayScreenHeight);
setPalette(true); // set gfx-mode palette
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 48b170da75..108d5a94d7 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -577,7 +577,7 @@ Common::Error AGOSEngine::init() {
_screenHeight = 200;
}
- initGraphics(_screenWidth, _screenHeight, getGameType() == GType_FF || getGameType() == GType_PP);
+ initGraphics(_screenWidth, _screenHeight);
_midi = new MidiPlayer();
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 03c9e9e3cb..6ce6ef2603 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -68,7 +68,7 @@ GraphicManager::~GraphicManager() {
}
void GraphicManager::init() {
- initGraphics(kScreenWidth, kScreenHeight * 2, true); // Doubling the height.
+ initGraphics(kScreenWidth, kScreenHeight * 2); // Doubling the height.
for (int i = 0; i < 64; ++i) {
_egaPalette[i][0] = (i >> 2 & 1) * 0xaa + (i >> 5 & 1) * 0x55;
@@ -799,7 +799,7 @@ void GraphicManager::menuRefreshScreen() {
}
void GraphicManager::menuInitialize() {
- initGraphics(kScreenWidth, kMenuScreenHeight, true);
+ initGraphics(kScreenWidth, kMenuScreenHeight);
_menu.create(kScreenWidth, kMenuScreenHeight, Graphics::PixelFormat::createFormatCLUT8());
}
@@ -808,7 +808,7 @@ void GraphicManager::menuFree() {
}
void GraphicManager::menuRestoreScreen() {
- initGraphics(kScreenWidth, 2 * kScreenHeight, true);
+ initGraphics(kScreenWidth, 2 * kScreenHeight);
}
void GraphicManager::menuLoadPictures() {
diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp
index e4dcb1a84b..74518d5a3e 100644
--- a/engines/bbvs/bbvs.cpp
+++ b/engines/bbvs/bbvs.cpp
@@ -170,7 +170,7 @@ Common::Error BbvsEngine::run() {
_isSaveAllowed = false;
_hasSnapshot = false;
- initGraphics(320, 240, false);
+ initGraphics(320, 240);
_screen = new Screen(_system);
_gameModule = new GameModule();
diff --git a/engines/bbvs/videoplayer.cpp b/engines/bbvs/videoplayer.cpp
index 2ab5c1556b..f48c98005e 100644
--- a/engines/bbvs/videoplayer.cpp
+++ b/engines/bbvs/videoplayer.cpp
@@ -37,7 +37,7 @@ void BbvsEngine::playVideo(int videoNum) {
videoFilename = Common::String::format("vid/video%03d.avi", videoNum - 1);
// Set the correct video mode
- initGraphics(320, 240, false, 0);
+ initGraphics(320, 240, nullptr);
if (_system->getScreenFormat().bytesPerPixel == 1) {
warning("Couldn't switch to a RGB color video mode to play a video.");
return;
@@ -84,7 +84,7 @@ void BbvsEngine::playVideo(int videoNum) {
delete videoDecoder;
- initGraphics(320, 240, false);
+ initGraphics(320, 240);
}
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 1d29bde75f..0c5dabe136 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -139,7 +139,7 @@ bool BladeRunnerEngine::hasFeature(EngineFeature f) const {
Common::Error BladeRunnerEngine::run() {
Graphics::PixelFormat format = createRGB555();
- initGraphics(640, 480, true, &format);
+ initGraphics(640, 480, &format);
_system->showMouse(true);
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 7058314b9d..32126835f8 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -219,7 +219,7 @@ Common::Error CGEEngine::run() {
}
// Initialize graphics using following:
- initGraphics(kScrWidth, kScrHeight, false);
+ initGraphics(kScrWidth, kScrHeight);
// Setup necessary game objects
init();
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index ee62e20ac6..04b9db14c4 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -191,7 +191,7 @@ bool CGE2Engine::hasFeature(EngineFeature f) const {
Common::Error CGE2Engine::run() {
syncSoundSettings();
- initGraphics(kScrWidth, kScrHeight, false);
+ initGraphics(kScrWidth, kScrHeight);
init();
cge2_main();
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 9df45b1dfb..75c2a8d51b 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -83,8 +83,8 @@ void ChewyEngine::initialize() {
Common::Error ChewyEngine::run() {
// Initialize backend
- //initGraphics(640, 480, true);
- initGraphics(320, 200, false);
+ //initGraphics(640, 480);
+ initGraphics(320, 200);
initialize();
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 414fe49eb6..5ecf78d8b4 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -94,12 +94,18 @@ void CineEngine::syncSoundSettings() {
}
Common::Error CineEngine::run() {
+ Graphics::ModeList modes;
+ modes.push_back(Graphics::Mode(320, 200));
if (g_cine->getGameType() == GType_FW && (g_cine->getFeatures() & GF_CD)) {
+ modes.push_back(Graphics::Mode(640, 480));
+ initGraphicsModes(modes);
showSplashScreen();
+ } else {
+ initGraphicsModes(modes);
}
// Initialize backend
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
if (g_cine->getGameType() == GType_FW && (g_cine->getFeatures() & GF_CD))
checkCD();
@@ -259,7 +265,7 @@ void CineEngine::showSplashScreen() {
const Graphics::Surface *surface = decoder.getSurface();
if (surface->w == 640 && surface->h == 480) {
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
const byte *palette = decoder.getPalette();
int paletteColorCount = decoder.getPaletteColorCount();
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 13ba76191b..a04f4b650b 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -101,7 +101,7 @@ Common::Error ComposerEngine::run() {
uint height = 480;
if (_bookIni.hasKey("Height", "Common"))
height = atoi(getStringFromConfig("Common", "Height").c_str());
- initGraphics(width, height, true);
+ initGraphics(width, height);
_screen.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
Graphics::Cursor *cursor = Graphics::makeDefaultWinCursor();
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index eebd8fdc15..df525c0791 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -84,7 +84,7 @@ bool CruiseEngine::hasFeature(EngineFeature f) const {
Common::Error CruiseEngine::run() {
// Initialize backend
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
if (!loadLanguageStrings()) {
error("Could not setup language data for your version");
diff --git a/engines/cryo/cryo.cpp b/engines/cryo/cryo.cpp
index 3574105053..52fb2ae8d2 100644
--- a/engines/cryo/cryo.cpp
+++ b/engines/cryo/cryo.cpp
@@ -74,7 +74,7 @@ Common::Error CryoEngine::run() {
_timerTicks = 0; // incremented in realtime
// Initialize graphics using following:
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
_screen.create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
_game->run();
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 46dab0f763..3f9a5383b1 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -228,7 +228,7 @@ void DirectorEngine::testFontScaling() {
int w = 640;
int h = 480;
- initGraphics(w, h, true);
+ initGraphics(w, h);
_system->getPaletteManager()->setPalette(defaultPalette, 0, 256);
Graphics::ManagedSurface surface;
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 350fccb176..30cbe1d4c3 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1170,7 +1170,7 @@ Common::Rect Score::readRect(Common::ReadStreamEndian &stream) {
}
void Score::startLoop() {
- initGraphics(_movieRect.width(), _movieRect.height(), true);
+ initGraphics(_movieRect.width(), _movieRect.height());
_surface->create(_movieRect.width(), _movieRect.height());
_trailSurface->create(_movieRect.width(), _movieRect.height());
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 8fdb1c8d88..4c19ab01df 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -357,7 +357,7 @@ Common::Error DMEngine::run() {
initConstants();
// scummvm/engine specific
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
_console = new Console(this);
_displayMan = new DisplayMan(this);
_dungeonMan = new DungeonMan(this);
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index e3a97bf59a..0de1121d91 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -150,7 +150,7 @@ static SoundArchive* openAnyPossibleDubbing() {
int DraciEngine::init() {
// Initialize graphics using following:
- initGraphics(kScreenWidth, kScreenHeight, false);
+ initGraphics(kScreenWidth, kScreenHeight);
// Open game's archives
_initArchive = new BArchive(initPath);
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 56a2d638f7..d0d2790c0e 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -236,7 +236,7 @@ bool DrasculaEngine::hasFeature(EngineFeature f) const {
Common::Error DrasculaEngine::run() {
// Initialize backend
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
switch (getLanguage()) {
case Common::EN_ANY:
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 4aa487d13f..401ecf038c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -22,6 +22,7 @@
#include "dreamweb/sound.h"
#include "dreamweb/dreamweb.h"
+#include "engines/util.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -563,6 +564,11 @@ void DreamWebEngine::dreamweb() {
break;
}
+ Graphics::ModeList modes;
+ modes.push_back(Graphics::Mode(320, 200));
+ modes.push_back(Graphics::Mode(640, 480));
+ initGraphicsModes(modes);
+
allocateBuffers();
// setMouse
diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp
index bd0957c1bd..f0b77b9691 100644
--- a/engines/dreamweb/titles.cpp
+++ b/engines/dreamweb/titles.cpp
@@ -99,7 +99,7 @@ void DreamWebEngine::gettingShot() {
}
void DreamWebEngine::bibleQuote() {
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
showPCX("I00");
fadeScreenUps();
@@ -285,7 +285,7 @@ void DreamWebEngine::realCredits() {
_sound->loadRoomsSample(_roomsSample);
_sound->volumeSet(0);
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
hangOn(35);
showPCX("I01");
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index 4a7acd2344..aa58352e81 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -151,7 +151,7 @@ void DreamWebEngine::doShake() {
void DreamWebEngine::setMode() {
waitForVSync();
- initGraphics(kScreenwidth, kScreenheight, false);
+ initGraphics(kScreenwidth, kScreenheight);
}
void DreamWebEngine::showPCX(const Common::String &suffix) {
diff --git a/engines/engine.cpp b/engines/engine.cpp
index bb51e77f0d..8f412ba911 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -32,6 +32,7 @@
#include "engines/engine.h"
#include "engines/dialogs.h"
+#include "engines/util.h"
#include "common/config-manager.h"
#include "common/events.h"
@@ -194,58 +195,22 @@ void Engine::initializePath(const Common::FSNode &gamePath) {
SearchMan.addDirectory(gamePath.getPath(), gamePath, 0, 4);
}
-void initCommonGFX(bool defaultTo1XScaler) {
- const Common::ConfigManager::Domain *transientDomain = ConfMan.getDomain(Common::ConfigManager::kTransientDomain);
+void initCommonGFX() {
const Common::ConfigManager::Domain *gameDomain = ConfMan.getActiveDomain();
- assert(transientDomain);
-
- const bool useDefaultGraphicsMode =
- (!transientDomain->contains("gfx_mode") ||
- !scumm_stricmp(transientDomain->getVal("gfx_mode").c_str(), "normal") ||
- !scumm_stricmp(transientDomain->getVal("gfx_mode").c_str(), "default")
- )
- &&
- (
- !gameDomain ||
- !gameDomain->contains("gfx_mode") ||
- !scumm_stricmp(gameDomain->getVal("gfx_mode").c_str(), "normal") ||
- !scumm_stricmp(gameDomain->getVal("gfx_mode").c_str(), "default")
- );
-
- // See if the game should default to 1x scaler
- if (useDefaultGraphicsMode && defaultTo1XScaler) {
- g_system->resetGraphicsScale();
- } else {
- // Override global scaler with any game-specific define
- if (ConfMan.hasKey("gfx_mode")) {
- Common::String gfxMode = ConfMan.get("gfx_mode");
- g_system->setGraphicsMode(gfxMode.c_str());
-
- // HACK: For OpenGL modes, we will still honor the graphics scale override
- if (defaultTo1XScaler && gfxMode.equalsIgnoreCase("opengl"))
- g_system->resetGraphicsScale();
- }
- }
-
- // Note: The following code deals with the fullscreen / ASR settings. This
- // is a bit tricky, because there are three ways the user can affect these
- // settings: Via the config file, via the command line, and via in-game
- // hotkeys.
// Any global or command line settings already have been applied at the time
- // we get here. Hence we only do something
+ // we get here, so we only do something if the game domain overrides those
+ // values
+ if (gameDomain) {
+ if (gameDomain->contains("aspect_ratio"))
+ g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio"));
- // (De)activate aspect-ratio correction as determined by the config settings
- if (gameDomain && gameDomain->contains("aspect_ratio"))
- g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio"));
+ if (gameDomain->contains("fullscreen"))
+ g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
- // (De)activate fullscreen mode as determined by the config settings
- if (gameDomain && gameDomain->contains("fullscreen"))
- g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
-
- // (De)activate filtering mode as determined by the config settings
- if (gameDomain && gameDomain->contains("filtering"))
- g_system->setFeatureState(OSystem::kFeatureFilteringMode, ConfMan.getBool("filtering"));
+ if (gameDomain->contains("filtering"))
+ g_system->setFeatureState(OSystem::kFeatureFilteringMode, ConfMan.getBool("filtering"));
+ }
}
// Please leave the splash screen in working order for your releases, even if they're commercial.
@@ -307,11 +272,15 @@ void splashScreen() {
splash = true;
}
-void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format) {
+void initGraphicsModes(const Graphics::ModeList &modes) {
+ g_system->initSizeHint(modes);
+}
+
+void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
g_system->beginGFXTransaction();
- initCommonGFX(defaultTo1xScaler);
+ initCommonGFX();
#ifdef USE_RGB_COLOR
if (format)
g_system->initSize(width, height, format);
@@ -375,9 +344,6 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics:
}
}
-
-using Graphics::PixelFormat;
-
/**
* Determines the first matching format between two lists.
*
@@ -386,33 +352,33 @@ using Graphics::PixelFormat;
* @return The first item on the backend list that also occurs on the frontend list
* or PixelFormat::createFormatCLUT8() if no matching formats were found.
*/
-inline PixelFormat findCompatibleFormat(Common::List<PixelFormat> backend, Common::List<PixelFormat> frontend) {
+inline Graphics::PixelFormat findCompatibleFormat(const Common::List<Graphics::PixelFormat> &backend, const Common::List<Graphics::PixelFormat> &frontend) {
#ifdef USE_RGB_COLOR
- for (Common::List<PixelFormat>::iterator i = backend.begin(); i != backend.end(); ++i) {
- for (Common::List<PixelFormat>::iterator j = frontend.begin(); j != frontend.end(); ++j) {
+ for (Common::List<Graphics::PixelFormat>::const_iterator i = backend.begin(); i != backend.end(); ++i) {
+ for (Common::List<Graphics::PixelFormat>::const_iterator j = frontend.begin(); j != frontend.end(); ++j) {
if (*i == *j)
return *i;
}
}
#endif
- return PixelFormat::createFormatCLUT8();
+ return Graphics::PixelFormat::createFormatCLUT8();
}
-void initGraphics(int width, int height, bool defaultTo1xScaler, const Common::List<Graphics::PixelFormat> &formatList) {
+void initGraphics(int width, int height, const Common::List<Graphics::PixelFormat> &formatList) {
Graphics::PixelFormat format = findCompatibleFormat(g_system->getSupportedFormats(), formatList);
- initGraphics(width, height, defaultTo1xScaler, &format);
+ initGraphics(width, height, &format);
}
-void initGraphics(int width, int height, bool defaultTo1xScaler) {
+void initGraphics(int width, int height) {
Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();
- initGraphics(width, height, defaultTo1xScaler, &format);
+ initGraphics(width, height, &format);
}
void GUIErrorMessage(const Common::String &msg) {
g_system->setWindowCaption("Error");
g_system->beginGFXTransaction();
- initCommonGFX(false);
+ initCommonGFX();
g_system->initSize(320, 200);
if (g_system->endGFXTransaction() == OSystem::kTransactionSuccess) {
GUI::MessageDialog dialog(msg);
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 61e7eef692..ad9b6a42f6 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -280,7 +280,7 @@ Common::Error FullpipeEngine::saveGameState(int slot, const Common::String &desc
Common::Error FullpipeEngine::run() {
const Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
// Initialize backend
- initGraphics(800, 600, true, &format);
+ initGraphics(800, 600, &format);
_backgroundSurface = new Graphics::Surface;
_backgroundSurface->create(800, 600, format);
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 9289053048..cf8710c64d 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -200,7 +200,7 @@ Common::Error GnapEngine::run() {
#else
Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
#endif
- initGraphics(800, 600, true, &format);
+ initGraphics(800, 600, &format);
// We do not support color conversion yet
if (_system->getScreenFormat() != format)
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 605f1ed5b9..46f32a9f32 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -25,6 +25,7 @@
#include "backends/audiocd/audiocd.h"
#include "base/plugins.h"
#include "common/config-manager.h"
+#include "engines/util.h"
#include "audio/mididrv.h"
#include "audio/mixer.h"
@@ -260,7 +261,7 @@ void GobEngine::setTrueColor(bool trueColor) {
_features = (_features & ~kFeaturesTrueColor) | (trueColor ? kFeaturesTrueColor : 0);
- _video->setSize(is640x480());
+ _video->setSize();
_pixelFormat = g_system->getScreenFormat();
@@ -708,7 +709,14 @@ Common::Error GobEngine::initGraphics() {
_mode = 0x14;
}
- _video->setSize(is640x480());
+ Graphics::ModeList modes;
+ modes.push_back(Graphics::Mode(_width, _height));
+ if (getGameType() == kGameTypeLostInTime) {
+ modes.push_back(Graphics::Mode(640, 400));
+ }
+ initGraphicsModes(modes);
+
+ _video->setSize();
_pixelFormat = g_system->getScreenFormat();
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 3928985dcd..1e8eddeef0 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -797,7 +797,7 @@ void Inter_v2::o2_initScreen() {
height = _vm->_height = 400;
_vm->_global->_colorCount = 16;
- _vm->_video->setSize(true);
+ _vm->_video->setSize();
} else if (_vm->_global->_videoMode == 0x10) {
@@ -810,7 +810,7 @@ void Inter_v2::o2_initScreen() {
_vm->_height = 200;
_vm->_global->_colorCount = 256;
- _vm->_video->setSize(false);
+ _vm->_video->setSize();
}
}
diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp
index 50176e0a27..91342cf326 100644
--- a/engines/gob/inter_v5.cpp
+++ b/engines/gob/inter_v5.cpp
@@ -140,13 +140,13 @@ void Inter_v5::o5_initScreen() {
_vm->_width = 320;
_vm->_height = 200;
- _vm->_video->setSize(false);
+ _vm->_video->setSize();
} else if (_vm->_global->_videoMode == 0x13) {
width = _vm->_width = 640;
height = _vm->_height = 480;
- _vm->_video->setSize(true);
+ _vm->_video->setSize();
}
_vm->_global->_fakeVideoMode = videoMode;
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp
index 1dc51d994c..6480fe89f0 100644
--- a/engines/gob/video.cpp
+++ b/engines/gob/video.cpp
@@ -237,11 +237,11 @@ void Video::clearScreen() {
g_system->fillScreen(0);
}
-void Video::setSize(bool defaultTo1XScaler) {
+void Video::setSize() {
if (_vm->isTrueColor())
- initGraphics(_vm->_width, _vm->_height, defaultTo1XScaler, 0);
+ initGraphics(_vm->_width, _vm->_height, nullptr);
else
- initGraphics(_vm->_width, _vm->_height, defaultTo1XScaler);
+ initGraphics(_vm->_width, _vm->_height);
}
void Video::retrace(bool mouse) {
diff --git a/engines/gob/video.h b/engines/gob/video.h
index 2c547baca0..57ec4fb6d4 100644
--- a/engines/gob/video.h
+++ b/engines/gob/video.h
@@ -112,7 +112,7 @@ public:
void initPrimary(int16 mode);
SurfacePtr initSurfDesc(int16 width, int16 height, int16 flags = 0);
- void setSize(bool defaultTo1XScaler);
+ void setSize();
void clearScreen();
void retrace(bool mouse = true);
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 2ba4ed18ab..291e3a1fde 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -106,7 +106,7 @@ Common::Error GroovieEngine::run() {
case kGroovieV2: {
// Request the mode with the highest precision available
Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
- initGraphics(640, 480, true, &format);
+ initGraphics(640, 480, &format);
if (_system->getScreenFormat() != format)
return Common::kUnsupportedColorMode;
@@ -116,7 +116,7 @@ Common::Error GroovieEngine::run() {
break;
}
case kGroovieT7G:
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
_pixelFormat = Graphics::PixelFormat::createFormatCLUT8();
break;
}
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 7227c3e833..3cdf6add8f 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -106,7 +106,7 @@ GraphicsManager::~GraphicsManager() {
void GraphicsManager::setGraphicalMode(int width, int height) {
if (!_initGraphicsFl) {
Graphics::PixelFormat pixelFormat16(2, 5, 6, 5, 0, 11, 5, 0, 0);
- initGraphics(width, height, true, &pixelFormat16);
+ initGraphics(width, height, &pixelFormat16);
// Init surfaces
_backBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 6881278cee..5f6892bd20 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -218,7 +218,7 @@ void HugoEngine::gameOverMsg() {
Common::Error HugoEngine::run() {
s_Engine = this;
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
_mouse = new MouseHandler(this);
_inventory = new InventoryHandler(this);
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index eaa074ff0a..6076879876 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -253,10 +253,8 @@ void Screen::setResolution() {
_system->getPaletteManager()->grabPalette(palette, 0, 256);
int width = 320, height = 200;
- bool defaultTo1xScaler = false;
if (_vm->gameFlags().useHiRes) {
- defaultTo1xScaler = true;
height = 400;
if (_debugEnabled)
@@ -270,7 +268,7 @@ void Screen::setResolution() {
width = 320;
}
- initGraphics(width, height, defaultTo1xScaler);
+ initGraphics(width, height);
_system->getPaletteManager()->setPalette(palette, 0, 256);
}
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 39b2feb93d..ee67d3a99d 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -160,9 +160,9 @@ LabEngine::~LabEngine() {
Common::Error LabEngine::run() {
if (getFeatures() & GF_LOWRES)
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
else
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
_interface = new Interface(this);
_event = new EventManager(this);
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index 90b684ab0b..91f8a6a346 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -111,7 +111,7 @@ LastExpressEngine::~LastExpressEngine() {
Common::Error LastExpressEngine::run() {
// Initialize the graphics
const Graphics::PixelFormat dataPixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
- initGraphics(640, 480, true, &dataPixelFormat);
+ initGraphics(640, 480, &dataPixelFormat);
// We do not support color conversion
if (_system->getScreenFormat() != dataPixelFormat)
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 8eac519d8c..13417b3251 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -55,7 +55,7 @@ Common::Error LureEngine::init() {
_initialized = false;
_saveLoadAllowed = false;
- initGraphics(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT, false);
+ initGraphics(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT);
// Check the version of the lure.dat file
Common::File f;
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index 483281f583..ddc6d90a81 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -146,7 +146,7 @@ void MacVentureEngine::initDebugChannels() {
Common::Error MacVentureEngine::run() {
debug("MacVenture::MacVentureEngine::init()");
- initGraphics(kScreenWidth, kScreenHeight, true);
+ initGraphics(kScreenWidth, kScreenHeight);
_debugger = new Console(this);
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index a29aa2512f..181d778a02 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -292,7 +292,7 @@ Common::Error MadeEngine::run() {
syncSoundSettings();
// Initialize backend
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
resetAllTimers();
diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp
index 414473bb82..c86593ed0e 100644
--- a/engines/mads/mads.cpp
+++ b/engines/mads/mads.cpp
@@ -159,7 +159,7 @@ void MADSEngine::saveOptions() {
}
Common::Error MADSEngine::run() {
- initGraphics(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, false);
+ initGraphics(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT);
initialize();
// Run the game
diff --git a/engines/mohawk/cstime_graphics.cpp b/engines/mohawk/cstime_graphics.cpp
index 29336525da..7dc1cf339c 100644
--- a/engines/mohawk/cstime_graphics.cpp
+++ b/engines/mohawk/cstime_graphics.cpp
@@ -32,7 +32,7 @@ namespace Mohawk {
CSTimeGraphics::CSTimeGraphics(MohawkEngine_CSTime *vm) : GraphicsManager(), _vm(vm) {
_bmpDecoder = new MohawkBitmap();
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
}
CSTimeGraphics::~CSTimeGraphics() {
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 4069ac5133..0cb12046aa 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -195,6 +195,23 @@ static const MohawkGameDescription gameDescriptions[] = {
0,
},
+ // Myst - Russian
+ // From AndyILC in bug #10303
+ {
+ {
+ "myst",
+ "",
+ AD_ENTRY1("MYST.DAT", "196384f87e8bcb51731bce8416ab6a07"),
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUI_OPTIONS_MYST
+ },
+ GType_MYST,
+ 0,
+ 0,
+ },
+
// Making of Myst
// English Windows 3.11
// From clone2727
diff --git a/engines/mohawk/livingbooks_graphics.cpp b/engines/mohawk/livingbooks_graphics.cpp
index fae0c99f6e..bb521eee22 100644
--- a/engines/mohawk/livingbooks_graphics.cpp
+++ b/engines/mohawk/livingbooks_graphics.cpp
@@ -34,7 +34,7 @@ namespace Mohawk {
LBGraphics::LBGraphics(MohawkEngine_LivingBooks *vm, uint16 width, uint16 height) : GraphicsManager(), _vm(vm) {
_bmpDecoder = _vm->isPreMohawk() ? new LivingBooksBitmap_v1() : new MohawkBitmap();
- initGraphics(width, height, true);
+ initGraphics(width, height);
}
LBGraphics::~LBGraphics() {
diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp
index 9b0d33e30b..3f8d15cea5 100644
--- a/engines/mohawk/myst_graphics.cpp
+++ b/engines/mohawk/myst_graphics.cpp
@@ -40,13 +40,13 @@ MystGraphics::MystGraphics(MohawkEngine_Myst* vm) : GraphicsManager(), _vm(vm) {
if (_vm->getFeatures() & GF_ME) {
// High color
- initGraphics(_viewport.width(), _viewport.height(), true, nullptr);
+ initGraphics(_viewport.width(), _viewport.height(), nullptr);
if (_vm->_system->getScreenFormat().bytesPerPixel == 1)
error("Myst ME requires greater than 256 colors to run");
} else {
// Paletted
- initGraphics(_viewport.width(), _viewport.height(), true);
+ initGraphics(_viewport.width(), _viewport.height());
clearScreenPalette();
}
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp
index c80e9e5899..d0a5c05636 100644
--- a/engines/mohawk/riven_graphics.cpp
+++ b/engines/mohawk/riven_graphics.cpp
@@ -308,7 +308,7 @@ RivenGraphics::RivenGraphics(MohawkEngine_Riven* vm) : GraphicsManager(), _vm(vm
// Restrict ourselves to a single pixel format to simplify the effects implementation
_pixelFormat = Graphics::createPixelFormat<565>();
- initGraphics(608, 436, true, &_pixelFormat);
+ initGraphics(608, 436, &_pixelFormat);
// The actual game graphics only take up the first 392 rows. The inventory
// occupies the rest of the screen and we don't use the buffer to hold that.
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 59004cba7f..92d1ca8839 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -247,7 +247,7 @@ void MortevielleEngine::pauseEngineIntern(bool pause) {
*/
Common::ErrorCode MortevielleEngine::initialize() {
// Initialize graphics mode
- initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT, true);
+ initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT);
// Set up an intermediate screen surface
_screenSurface->create(SCREEN_WIDTH, SCREEN_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp
index 0dc271997b..7fe3e77ccb 100644
--- a/engines/neverhood/neverhood.cpp
+++ b/engines/neverhood/neverhood.cpp
@@ -65,7 +65,7 @@ NeverhoodEngine::~NeverhoodEngine() {
}
Common::Error NeverhoodEngine::run() {
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
const Common::FSNode gameDataDir(ConfMan.get("path"));
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 162671b68a..b732141971 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -731,7 +731,7 @@ Gfx::Gfx(Parallaction* vm) :
_gameType = _vm->getGameType();
_doubleBuffering = _gameType != GType_Nippon;
- initGraphics(_vm->_screenWidth, _vm->_screenHeight, _gameType == GType_BRA);
+ initGraphics(_vm->_screenWidth, _vm->_screenHeight);
setPalette(_palette);
diff --git a/engines/pegasus/graphics.cpp b/engines/pegasus/graphics.cpp
index 7748c266f5..d620fe3d4e 100644
--- a/engines/pegasus/graphics.cpp
+++ b/engines/pegasus/graphics.cpp
@@ -35,7 +35,7 @@
namespace Pegasus {
GraphicsManager::GraphicsManager(PegasusEngine *vm) : _vm(vm) {
- initGraphics(640, 480, true, NULL);
+ initGraphics(640, 480, nullptr);
if (_vm->_system->getScreenFormat().bytesPerPixel == 1)
error("No true color mode available");
diff --git a/engines/plumbers/plumbers.cpp b/engines/plumbers/plumbers.cpp
index 74f622358b..f0445e51eb 100644
--- a/engines/plumbers/plumbers.cpp
+++ b/engines/plumbers/plumbers.cpp
@@ -88,7 +88,7 @@ static const byte cursorPalette[] = {
};
Common::Error PlumbersGame::run() {
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
_console = new Console(this);
CursorMan.replaceCursor(MOUSECURSOR_SCI, 11, 16, 0, 0, 0);
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp
index 6be1782f1c..c25157c697 100644
--- a/engines/prince/graphics.cpp
+++ b/engines/prince/graphics.cpp
@@ -31,7 +31,7 @@
namespace Prince {
GraphicsMan::GraphicsMan(PrinceEngine *vm) : _vm(vm), _changed(false) {
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
_frontScreen = new Graphics::Surface();
_frontScreen->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
diff --git a/engines/prince/videoplayer.cpp b/engines/prince/videoplayer.cpp
index 2fc9003be5..2e73c78a0d 100644
--- a/engines/prince/videoplayer.cpp
+++ b/engines/prince/videoplayer.cpp
@@ -30,7 +30,7 @@ namespace Prince {
void PrinceEngine::playVideo(Common::String videoFilename) {
// Set the correct video mode
- initGraphics(640, 480, true, 0);
+ initGraphics(640, 480, nullptr);
if (_system->getScreenFormat().bytesPerPixel == 1) {
warning("Couldn't switch to a RGB color video mode to play a video.");
return;
@@ -42,7 +42,7 @@ void PrinceEngine::playVideo(Common::String videoFilename) {
if (!videoDecoder->loadFile(videoFilename)) {
delete videoDecoder;
warning("Unable to open video %s", videoFilename.c_str());
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
return;
}
@@ -78,7 +78,7 @@ void PrinceEngine::playVideo(Common::String videoFilename) {
delete videoDecoder;
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
}
} // End of namespace Prince
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 0aea6122ca..16d88ee6f3 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -324,7 +324,7 @@ bool Queen::QueenEngine::hasFeature(EngineFeature f) const {
}
Common::Error QueenEngine::run() {
- initGraphics(GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT, false);
+ initGraphics(GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
_resource = new Resource();
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index ceb86ebb18..79bd66250a 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -40,7 +40,7 @@ namespace Saga {
#define RID_IHNM_HOURGLASS_CURSOR 11 // not in demo
Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height) : _vm(vm), _system(system) {
- initGraphics(width, height, width > 320);
+ initGraphics(width, height);
debug(5, "Init screen %dx%d", width, height);
// Convert surface data to R surface data
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 97a6164d53..28ed12275f 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -300,7 +300,7 @@ void Console::postEnter() {
if (duckMode) {
Common::List<Graphics::PixelFormat> formats;
formats.push_back(videoDecoder->getPixelFormat());
- initGraphics(640, 480, true, formats);
+ initGraphics(640, 480, formats);
if (g_system->getScreenFormat().bytesPerPixel != videoDecoder->getPixelFormat().bytesPerPixel)
error("Could not switch screen format for the duck video");
@@ -316,7 +316,7 @@ void Console::postEnter() {
#ifdef ENABLE_SCI32
// Switch back to 8bpp if we played a duck video
if (duckMode)
- initGraphics(oldWidth, oldHeight, oldWidth > 320);
+ initGraphics(oldWidth, oldHeight);
#endif
_engine->_gfxCursor->kernelShow();
@@ -1507,13 +1507,17 @@ bool Console::cmdAudioDump(int argc, const char **argv) {
// All AudioStreams must output 16-bit samples
bytesPerSample = 2;
- decompressedSize = compressedSize * bytesPerSample;
+
+ decompressedSize = compressedSize;
if (flags & kCompressed) {
decompressedSize *= 2;
}
if (flags & k16Bit) {
sourceIs8Bit = false;
+ } else {
+ // 8-bit is implicitly up-converted by AudioStream to 16-bit
+ decompressedSize *= 2;
}
if (flags & kStereo) {
numChannels = 2;
@@ -3621,7 +3625,7 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) {
uint opCount = 1;
bool printBWTag = false;
bool printBytes = false;
- uint16 size;
+ uint32 size;
if (parse_reg_t(_engine->_gamestate, argv[1], &vpc, false)) {
debugPrintf("Invalid address passed.\n");
@@ -3646,7 +3650,6 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) {
}
do {
- // TODO: Use a true 32-bit reg_t for the position (vpc)
vpc = disassemble(_engine->_gamestate, make_reg32(vpc.getSegment(), vpc.getOffset()), nullptr, printBWTag, printBytes);
} while ((vpc.getOffset() > 0) && (vpc.getOffset() + 6 < size) && (--opCount));
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index e12e5a1449..9d55f02345 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -4787,6 +4787,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_TESTING, GUIO_SQ6_DEMO },
+ // Space Quest 6 - English Win3.11 Demo (from Sneak Peeks 2 CD)
+ // Executable scanning reports "2.100.002", VERSION file reports "1.000.000"
+ {"sq6", "", {
+ {"resource.map", 0, "5cf3f0db76080a4ac327190bd027e355", 2164},
+ {"resource.000", 0, "ab12724e078dea34b624e0d2a38dcd7c", 2159708},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_TESTING, GUIO_SQ6_DEMO },
+
#undef GUIO_SQ6_DEMO
#undef GUIO_SQ6
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index f94ab8a6a7..1297ba2abc 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -480,11 +480,12 @@ bool GameFeatures::autoDetectSci21KernelType() {
// don't have sounds at all, but they're using a SCI2 kernel
if (g_sci->getGameId() == GID_CHEST || g_sci->getGameId() == GID_KQUESTIONS) {
_sci21KernelType = SCI_VERSION_2;
- return true;
+ } else if (g_sci->getGameId() == GID_RAMA && g_sci->isDemo()) {
+ _sci21KernelType = SCI_VERSION_2_1_MIDDLE;
+ } else {
+ warning("autoDetectSci21KernelType(): Sound object not loaded, assuming a SCI2.1 table");
+ _sci21KernelType = SCI_VERSION_2_1_EARLY;
}
-
- warning("autoDetectSci21KernelType(): Sound object not loaded, assuming a SCI2.1 table");
- _sci21KernelType = SCI_VERSION_2_1_EARLY;
return true;
}
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 92cc45a162..7a1c6f59aa 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -128,7 +128,7 @@ public:
inline bool hasTransparentPicturePlanes() const {
const SciGameId &gid = g_sci->getGameId();
- // NOTE: MGDX is assumed to not have transparent picture planes since it
+ // MGDX is assumed to not have transparent picture planes since it
// was released before SQ6, but this has not been verified since it
// cannot be disassembled at the moment (Phar Lap Windows-only release)
return getSciVersion() >= SCI_VERSION_2_1_MIDDLE &&
diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp
index d4e410261f..06d8d9a5d3 100644
--- a/engines/sci/engine/guest_additions.cpp
+++ b/engines/sci/engine/guest_additions.cpp
@@ -163,7 +163,7 @@ void GuestAdditions::writeVarHook(const int type, const int index, const reg_t v
syncAudioVolumeGlobalsToScummVM(index, value);
} else if (g_sci->getGameId() == GID_GK1) {
syncGK1StartupVolumeFromScummVM(index, value);
- } else if (g_sci->getGameId() == GID_RAMA && index == kGlobalVarRamaMusicVolume) {
+ } else if (g_sci->getGameId() == GID_RAMA && !g_sci->isDemo() && index == kGlobalVarRamaMusicVolume) {
syncRamaVolumeFromScummVM((ConfMan.getInt("music_volume") + 1) * kRamaVolumeMax / Audio::Mixer::kMaxMixerVolume);
}
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 797edeeda2..b60d6ccce8 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -73,6 +73,7 @@ struct SciKernelMapSubEntry {
#define SIG_SINCE_SCI21 SCI_VERSION_2_1_EARLY, SCI_VERSION_3
#define SIG_SINCE_SCI21MID SCI_VERSION_2_1_MIDDLE, SCI_VERSION_3
#define SIG_SINCE_SCI21LATE SCI_VERSION_2_1_LATE, SCI_VERSION_3
+#define SIG_SCI21LATE SCI_VERSION_2_1_LATE, SCI_VERSION_2_1_LATE
#define SIG_SCI3 SCI_VERSION_3, SCI_VERSION_3
#define SIG_SCI16 SCI_VERSION_NONE, SCI_VERSION_1_1
@@ -898,7 +899,8 @@ static SciKernelMapEntry s_kernelMap[] = {
// our garbage collector (i.e. the SCI0-SCI1.1 semantics).
{ "Purge", kFlushResources, SIG_EVERYWHERE, "i", NULL, NULL },
{ MAP_CALL(SetShowStyle), SIG_THRU_SCI21MID, SIGFOR_ALL, "ioiiiii([ri])(i)", NULL, NULL },
- { MAP_CALL(SetShowStyle), SIG_SINCE_SCI21LATE, SIGFOR_ALL, "ioiiiiii(r)(i)", NULL, NULL },
+ { MAP_CALL(SetShowStyle), SIG_SCI21LATE, SIGFOR_ALL, "ioiiiii([ri])([ri])(i)", NULL, NULL },
+ { MAP_CALL(SetShowStyle), SIG_SCI3, SIGFOR_ALL, "ioiiiiii(r)(i)", NULL, NULL },
{ MAP_CALL(String), SIG_EVERYWHERE, "(.*)", kString_subops, NULL },
{ MAP_CALL(UpdatePlane), SIG_EVERYWHERE, "o", NULL, NULL },
{ MAP_CALL(UpdateScreenItem), SIG_EVERYWHERE, "o", NULL, NULL },
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index baa088de1f..5edac18bc0 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -448,7 +448,7 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) {
}
int saveNo = -1;
- if (name == "911.sg") {
+ if (name == "911.sg" || name == "autorama.sg") {
saveNo = kAutoSaveId;
} else if (sscanf(name.c_str(), "ramasg.%i", &saveNo) == 1) {
saveNo += kSaveIdShift;
@@ -469,6 +469,9 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) {
Graphics::skipThumbnail(*in);
valid = true;
}
+ if (meta.version >= 34) {
+ g_sci->setTickCount(meta.playTime);
+ }
}
} else {
out = saveFileMan->openForSaving(fileName);
@@ -673,7 +676,7 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) {
sscanf(name.c_str(), "ramasg.%i", &saveNo) == 1) {
name = g_sci->getSavegameName(saveNo + kSaveIdShift);
- } else if (g_sci->getGameId() == GID_RAMA && name == "911.sg") {
+ } else if (g_sci->getGameId() == GID_RAMA && (name == "911.sg" || name == "autorama.sg")) {
name = g_sci->getSavegameName(kAutoSaveId);
}
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index bed4a09342..f9c1edee42 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -76,8 +76,8 @@ reg_t kBaseSetter32(EngineState *s, int argc, reg_t *argv) {
CelObjView celObj(viewId, loopNo, celNo);
Ratio scaleX;
- if (getSciVersion() < SCI_VERSION_3) {
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
scaleX = Ratio(scriptWidth, celObj._xResolution);
}
@@ -102,9 +102,9 @@ reg_t kBaseSetter32(EngineState *s, int argc, reg_t *argv) {
reg_t kSetNowSeen32(EngineState *s, int argc, reg_t *argv) {
const bool found = g_sci->_gfxFrameout->kernelSetNowSeen(argv[0]);
- // NOTE: MGDX is assumed to use the older kSetNowSeen since it was
- // released before SQ6, but this has not been verified since it cannot be
- // disassembled at the moment (Phar Lap Windows-only release)
+ // MGDX is assumed to use the older kSetNowSeen since it was released before
+ // SQ6, but this has not been verified since it cannot be disassembled at
+ // the moment (Phar Lap Windows-only release)
// (See also getNowSeenRect)
if (getSciVersion() <= SCI_VERSION_2_1_EARLY ||
g_sci->getGameId() == GID_SQ6 ||
@@ -160,11 +160,12 @@ reg_t kShakeScreen32(EngineState *s, int argc, reg_t *argv) {
}
reg_t kIsHiRes(EngineState *s, int argc, reg_t *argv) {
- const Buffer &buffer = g_sci->_gfxFrameout->getCurrentBuffer();
- if (buffer.screenWidth < 640 || buffer.screenHeight < 400)
- return make_reg(0, 0);
+ const GfxFrameout *gfxFrameout = g_sci->_gfxFrameout;
+ if (gfxFrameout->getScreenWidth() < 640 || gfxFrameout->getScreenHeight() < 400) {
+ return NULL_REG;
+ }
- return make_reg(0, 1);
+ return TRUE_REG;
}
reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) {
@@ -368,10 +369,10 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) {
const uint16 type = argv[0].toUint16();
reg_t planeObj = argv[1];
int16 seconds = argv[2].toSint16();
- // NOTE: This value seems to indicate whether the transition is an
- // т€œexitт€ transition (0) or an т€œenterт€ transition (-1) for fade
- // transitions. For other types of transitions, it indicates a palette
- // index value to use when filling the screen.
+ // This value indicates whether the transition is an "exit" transition (0)
+ // or an "enter" transition (-1) for fade transitions. For other types of
+ // transitions, it indicates a palette index value to use when filling the
+ // screen.
int16 back = argv[3].toSint16();
int16 priority = argv[4].toSint16();
int16 animate = argv[5].toSint16();
@@ -404,34 +405,33 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) {
error("Illegal show style %d for plane %04x:%04x", type, PRINT_REG(planeObj));
}
- // NOTE: The order of planeObj and showStyle are reversed
- // because this is how SCI3 called the corresponding method
- // on the KernelMgr
+ // The order of planeObj and showStyle are reversed because this is how
+ // SSCI3 called the corresponding method on the KernelMgr
g_sci->_gfxTransitions32->kernelSetShowStyle(argc, planeObj, (ShowStyleType)type, seconds, back, priority, animate, refFrame, pFadeArray, divisions, blackScreen);
return s->r_acc;
}
reg_t kCelHigh32(EngineState *s, int argc, reg_t *argv) {
- GuiResourceId resourceId = argv[0].toUint16();
- int16 loopNo = argv[1].toSint16();
- int16 celNo = argv[2].toSint16();
- CelObjView celObj(resourceId, loopNo, celNo);
+ const GuiResourceId resourceId = argv[0].toUint16();
+ const int16 loopNo = argv[1].toSint16();
+ const int16 celNo = argv[2].toSint16();
+ const CelObjView celObj(resourceId, loopNo, celNo);
int16 height = celObj._height;
- if (getSciVersion() < SCI_VERSION_3) {
- height = mulru(height, Ratio(g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight, celObj._yResolution));
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
+ height = mulru(height, Ratio(g_sci->_gfxFrameout->getScriptHeight(), celObj._yResolution));
}
return make_reg(0, height);
}
reg_t kCelWide32(EngineState *s, int argc, reg_t *argv) {
- GuiResourceId resourceId = argv[0].toUint16();
- int16 loopNo = argv[1].toSint16();
- int16 celNo = argv[2].toSint16();
- CelObjView celObj(resourceId, loopNo, celNo);
+ const GuiResourceId resourceId = argv[0].toUint16();
+ const int16 loopNo = argv[1].toSint16();
+ const int16 celNo = argv[2].toSint16();
+ const CelObjView celObj(resourceId, loopNo, celNo);
int16 width = celObj._width;
- if (getSciVersion() < SCI_VERSION_3) {
- width = mulru(width, Ratio(g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth, celObj._xResolution));
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
+ width = mulru(width, Ratio(g_sci->_gfxFrameout->getScriptWidth(), celObj._xResolution));
}
return make_reg(0, width);
}
@@ -881,8 +881,8 @@ reg_t kSetScroll(EngineState *s, int argc, reg_t *argv) {
const int16 deltaY = argv[2].toSint16();
const GuiResourceId pictureId = argv[3].toUint16();
const bool animate = argv[4].toUint16();
- // NOTE: speed was accepted as an argument, but then never actually used
- // const int16 speed = argc > 5 ? (bool)argv[5].toSint16() : -1;
+ // argv[5] was some speed argument, but it was not actually used by SSCI, so
+ // we ignore it here
const bool mirrorX = argc > 6 ? (bool)argv[6].toUint16() : false;
g_sci->_gfxTransitions32->kernelSetScroll(plane, deltaX, deltaY, pictureId, animate, mirrorX);
@@ -1058,9 +1058,9 @@ reg_t kRemapColorsByRange(EngineState *s, int argc, reg_t *argv) {
const int16 from = argv[1].toSint16();
const int16 to = argv[2].toSint16();
const int16 base = argv[3].toSint16();
- // NOTE: There is an optional last parameter after `base`
- // which was only used by the priority map debugger, which
- // does not exist in release versions of SSCI
+ // There is an optional last parameter after `base` which was only used by
+ // the priority map debugger which does not exist in release versions of
+ // SSCI
g_sci->_gfxRemap32->remapByRange(color, from, to, base);
return s->r_acc;
}
@@ -1068,9 +1068,9 @@ reg_t kRemapColorsByRange(EngineState *s, int argc, reg_t *argv) {
reg_t kRemapColorsByPercent(EngineState *s, int argc, reg_t *argv) {
const uint8 color = argv[0].toUint16();
const int16 percent = argv[1].toSint16();
- // NOTE: There is an optional last parameter after `percent`
- // which was only used by the priority map debugger, which
- // does not exist in release versions of SSCI
+ // There is an optional last parameter after `percent` which was only used
+ // by the priority map debugger, which does not exist in release versions of
+ // SSCI
g_sci->_gfxRemap32->remapByPercent(color, percent);
return s->r_acc;
}
@@ -1078,9 +1078,9 @@ reg_t kRemapColorsByPercent(EngineState *s, int argc, reg_t *argv) {
reg_t kRemapColorsToGray(EngineState *s, int argc, reg_t *argv) {
const uint8 color = argv[0].toUint16();
const int16 gray = argv[1].toSint16();
- // NOTE: There is an optional last parameter after `gray`
- // which was only used by the priority map debugger, which
- // does not exist in release versions of SSCI
+ // There is an optional last parameter after `gray` which was only used by
+ // the priority map debugger, which does not exist in release versions of
+ // SSCI
g_sci->_gfxRemap32->remapToGray(color, gray);
return s->r_acc;
}
@@ -1089,9 +1089,9 @@ reg_t kRemapColorsToPercentGray(EngineState *s, int argc, reg_t *argv) {
const uint8 color = argv[0].toUint16();
const int16 gray = argv[1].toSint16();
const int16 percent = argv[2].toSint16();
- // NOTE: There is an optional last parameter after `percent`
- // which was only used by the priority map debugger, which
- // does not exist in release versions of SSCI
+ // There is an optional last parameter after `percent` which was only used
+ // by the priority map debugger, which does not exist in release versions of
+ // SSCI
g_sci->_gfxRemap32->remapToPercentGray(color, gray, percent);
return s->r_acc;
}
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 2ca5a65fc0..330b78b2b2 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -835,6 +835,10 @@ reg_t kArrayGetSize(EngineState *s, int argc, reg_t *argv) {
}
reg_t kArrayGetElement(EngineState *s, int argc, reg_t *argv) {
+ if (getSciVersion() == SCI_VERSION_2_1_LATE) {
+ return kStringGetChar(s, argc, argv);
+ }
+
SciArray &array = *s->_segMan->lookupArray(argv[0]);
return array.getAsID(argv[1].toUint16());
}
@@ -846,6 +850,10 @@ reg_t kArraySetElements(EngineState *s, int argc, reg_t *argv) {
}
reg_t kArrayFree(EngineState *s, int argc, reg_t *argv) {
+ if (getSciVersion() == SCI_VERSION_2_1_LATE && !s->_segMan->isValidAddr(argv[0], SEG_TYPE_ARRAY)) {
+ return s->r_acc;
+ }
+
s->_segMan->freeArray(argv[0]);
return s->r_acc;
}
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index bbfadf1c53..4d171bdd1c 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -384,10 +384,6 @@ reg_t kDoAudioPosition(EngineState *s, int argc, reg_t *argv) {
}
reg_t kDoAudioRate(EngineState *s, int argc, reg_t *argv) {
- // NOTE: In the original engine this would set the hardware
- // DSP sampling rate; ScummVM mixer does not need this, so
- // we only store the value to satisfy engine compatibility.
-
if (argc > 0) {
const uint16 sampleRate = argv[0].toUint16();
if (sampleRate != 0) {
@@ -407,10 +403,6 @@ reg_t kDoAudioGetCapability(EngineState *s, int argc, reg_t *argv) {
}
reg_t kDoAudioBitDepth(EngineState *s, int argc, reg_t *argv) {
- // NOTE: In the original engine this would set the hardware
- // DSP bit depth; ScummVM mixer does not need this, so
- // we only store the value to satisfy engine compatibility.
-
if (argc > 0) {
const uint16 bitDepth = argv[0].toUint16();
if (bitDepth != 0) {
@@ -426,10 +418,6 @@ reg_t kDoAudioMixing(EngineState *s, int argc, reg_t *argv) {
}
reg_t kDoAudioChannels(EngineState *s, int argc, reg_t *argv) {
- // NOTE: In the original engine this would set the hardware
- // DSP stereo output; ScummVM mixer does not need this, so
- // we only store the value to satisfy engine compatibility.
-
if (argc > 0) {
const int16 numChannels = argv[0].toSint16();
if (numChannels != 0) {
@@ -441,11 +429,6 @@ reg_t kDoAudioChannels(EngineState *s, int argc, reg_t *argv) {
}
reg_t kDoAudioPreload(EngineState *s, int argc, reg_t *argv) {
- // NOTE: In the original engine this would cause audio
- // data for new channels to be preloaded to memory when
- // the channel was initialized; we do not need this, so
- // we only store the value to satisfy engine compatibility.
-
if (argc > 0) {
g_sci->_audio32->setPreload(argv[0].toUint16());
}
@@ -477,11 +460,8 @@ reg_t kDoAudioPanOff(EngineState *s, int argc, reg_t *argv) {
}
reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv) {
- // This is used by script 90 of MUMG Deluxe from the main menu to toggle
- // the audio language between English and Spanish.
- // Basically, it instructs the interpreter to switch the audio resources
- // (resource.aud and associated map files) and load them from the "Spanish"
- // subdirectory instead.
+ // Used by script 90 of MUMG Deluxe from the main menu to toggle between
+ // English and Spanish.
const Common::String audioDirectory = s->_segMan->getString(argv[0]);
g_sci->getResMan()->changeAudioDirectory(audioDirectory);
return s->r_acc;
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 98b2ba2b85..5851b015aa 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -140,7 +140,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
// The only argument is the string for the video
// HACK: Switch to 16bpp graphics for Cinepak.
- initGraphics(screenWidth, screenHeight, screenWidth > 320, NULL);
+ initGraphics(screenWidth, screenHeight, nullptr);
if (g_system->getScreenFormat().bytesPerPixel == 1) {
warning("This video requires >8bpp color to be displayed, but could not switch to RGB color mode");
@@ -176,7 +176,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
// The only known movie to do use this codec is the GK2 demo trailer
// If another video turns up that uses Indeo, we may have to add a better
// check.
- initGraphics(screenWidth, screenHeight, screenWidth > 320, NULL);
+ initGraphics(screenWidth, screenHeight, nullptr);
if (g_system->getScreenFormat().bytesPerPixel == 1) {
warning("This video requires >8bpp color to be displayed, but could not switch to RGB color mode");
@@ -206,7 +206,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
// HACK: Switch back to 8bpp if we played a true color video.
// We also won't be copying the screen to the SCI screen...
if (g_system->getScreenFormat().bytesPerPixel != 1)
- initGraphics(screenWidth, screenHeight, screenWidth > 320);
+ initGraphics(screenWidth, screenHeight);
else if (getSciVersion() < SCI_VERSION_2) {
g_sci->_gfxScreen->kernelSyncWithFramebuffer();
g_sci->_gfxPalette16->kernelSyncScreenPalette();
@@ -460,8 +460,8 @@ reg_t kPlayVMDShowCursor(EngineState *s, int argc, reg_t *argv) {
}
reg_t kPlayVMDSetBlackoutArea(EngineState *s, int argc, reg_t *argv) {
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
Common::Rect blackoutArea;
blackoutArea.left = MAX<int16>(0, argv[0].toSint16());
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index ffc4ac2f3d..9ab6ca34da 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -169,7 +169,6 @@ public:
}
}
- // NOTE: In real engine, -info- is treated as byte size
void clearInfoSelectorFlag(infoSelectorFlags flag) {
if (getSciVersion() == SCI_VERSION_3) {
_infoSelectorSci3 &= ~flag;
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index b0fa31a1bb..a7ebe0b4df 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -801,7 +801,7 @@ void SciBitmap::saveLoadWithSerializer(Common::Serializer &s) {
s.syncBytes(_data, _dataSize);
if (s.isLoading()) {
- _buffer = Buffer(getWidth(), getHeight(), getPixels());
+ _buffer.init(getWidth(), getHeight(), getWidth(), getPixels(), Graphics::PixelFormat::createFormatCLUT8());
}
}
#endif
@@ -866,25 +866,25 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) {
}
#ifdef ENABLE_SCI32
-static void saveLoadPalette32(Common::Serializer &s, Palette *const palette) {
- s.syncAsUint32LE(palette->timestamp);
- for (int i = 0; i < ARRAYSIZE(palette->colors); ++i) {
- s.syncAsByte(palette->colors[i].used);
- s.syncAsByte(palette->colors[i].r);
- s.syncAsByte(palette->colors[i].g);
- s.syncAsByte(palette->colors[i].b);
+static void saveLoadPalette32(Common::Serializer &s, Palette &palette) {
+ s.syncAsUint32LE(palette.timestamp);
+ for (int i = 0; i < ARRAYSIZE(palette.colors); ++i) {
+ s.syncAsByte(palette.colors[i].used);
+ s.syncAsByte(palette.colors[i].r);
+ s.syncAsByte(palette.colors[i].g);
+ s.syncAsByte(palette.colors[i].b);
}
}
-static void saveLoadOptionalPalette32(Common::Serializer &s, Palette **const palette) {
+static void saveLoadOptionalPalette32(Common::Serializer &s, Common::ScopedPtr<Palette> &palette) {
bool hasPalette = false;
if (s.isSaving()) {
- hasPalette = (*palette != nullptr);
+ hasPalette = palette;
}
s.syncAsByte(hasPalette);
if (hasPalette) {
if (s.isLoading()) {
- *palette = new Palette;
+ palette.reset(new Palette);
}
saveLoadPalette32(s, *palette);
}
@@ -899,14 +899,11 @@ void GfxPalette32::saveLoadWithSerializer(Common::Serializer &s) {
++_version;
for (int i = 0; i < kNumCyclers; ++i) {
- delete _cyclers[i];
- _cyclers[i] = nullptr;
+ _cyclers[i].reset();
}
- delete _varyTargetPalette;
- _varyTargetPalette = nullptr;
- delete _varyStartPalette;
- _varyStartPalette = nullptr;
+ _varyTargetPalette.reset();
+ _varyStartPalette.reset();
}
s.syncAsSint16LE(_varyDirection);
@@ -928,14 +925,14 @@ void GfxPalette32::saveLoadWithSerializer(Common::Serializer &s) {
if (g_sci->_features->hasLatePaletteCode() && s.getVersion() >= 41) {
s.syncAsSint16LE(_gammaLevel);
- saveLoadPalette32(s, &_sourcePalette);
+ saveLoadPalette32(s, _sourcePalette);
++_version;
_needsUpdate = true;
_gammaChanged = true;
}
- saveLoadOptionalPalette32(s, &_varyTargetPalette);
- saveLoadOptionalPalette32(s, &_varyStartPalette);
+ saveLoadOptionalPalette32(s, _varyTargetPalette);
+ saveLoadOptionalPalette32(s, _varyStartPalette);
// _nextPalette is not saved by SSCI
@@ -944,14 +941,15 @@ void GfxPalette32::saveLoadWithSerializer(Common::Serializer &s) {
bool hasCycler = false;
if (s.isSaving()) {
- cycler = _cyclers[i];
+ cycler = _cyclers[i].get();
hasCycler = (cycler != nullptr);
}
s.syncAsByte(hasCycler);
if (hasCycler) {
if (s.isLoading()) {
- _cyclers[i] = cycler = new PalCycler;
+ cycler = new PalCycler;
+ _cyclers[i].reset(cycler);
}
s.syncAsByte(cycler->fromColor);
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index a8be13edd9..96ac9388cc 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -99,6 +99,10 @@ static const char *const selectorNameTable[] = {
"play", // system selector
"number", // system selector
"setScript", // system selector
+ "setCycle", // system selector
+ "setStep", // system selector
+ "cycleSpeed", // system selector
+ "handsOff", // system selector
"localize", // Freddy Pharkas
"put", // Police Quest 1 VGA
"say", // Quest For Glory 1 VGA
@@ -131,7 +135,6 @@ static const char *const selectorNameTable[] = {
"iconV", // Phant2
"update", // Phant2
"xOff", // Phant2
- "setCycle", // GK1
"fore", // KQ7
"back", // KQ7
"font", // KQ7
@@ -145,6 +148,7 @@ static const char *const selectorNameTable[] = {
"priority", // RAMA
"plane", // RAMA
"state", // RAMA
+ "getSubscriberObj", // RAMA
#endif
NULL
};
@@ -167,6 +171,10 @@ enum ScriptPatcherSelectors {
SELECTOR_play,
SELECTOR_number,
SELECTOR_setScript,
+ SELECTOR_setCycle,
+ SELECTOR_setStep,
+ SELECTOR_cycleSpeed,
+ SELECTOR_handsOff,
SELECTOR_localize,
SELECTOR_put,
SELECTOR_say,
@@ -200,7 +208,6 @@ enum ScriptPatcherSelectors {
SELECTOR_iconV,
SELECTOR_update,
SELECTOR_xOff,
- SELECTOR_setCycle,
SELECTOR_fore,
SELECTOR_back,
SELECTOR_font,
@@ -213,7 +220,8 @@ enum ScriptPatcherSelectors {
SELECTOR_saveFilePtr,
SELECTOR_priority,
SELECTOR_plane,
- SELECTOR_state
+ SELECTOR_state,
+ SELECTOR_getSubscriberObj
#endif
};
@@ -2275,7 +2283,7 @@ static const SciScriptPatcherEntry kq7Signatures[] = {
// (global 204 bit 15), but global 201 is not a flag global (it holds a
// reference to theInvisCursor). This patch stops clearing after 1359 (global
// 200 bit 15). Hopefully that is good enough to not break the game.
-// Applies to at least: English 1.0 & 2.0
+// Applies to at least: English 1.0c & 2.0a
static const uint16 lighthouseFlagResetSignature[] = {
SIG_MAGICDWORD,
0x34, SIG_UINT16(0x58f), // ldi 1423
@@ -2288,9 +2296,37 @@ static const uint16 lighthouseFlagResetPatch[] = {
PATCH_END
};
+// When doing a system check on the portal computer in the lighthouse, the game
+// counts up to 1024MB, one megabyte at a time. In SSCI, this count speed would
+// be video speed dependent, but with our frame rate throttler, it takes 17
+// seconds. So, replace this slowness with a much faster POST that is more
+// accurate to the original game.
+// Applies to at least: US English 1.0c
+static const uint16 lighthouseMemoryCountSignature[] = {
+ SIG_MAGICDWORD,
+ 0x8d, 0x02, // lst 2
+ 0x35, 0x0a, // ldi 10
+ 0x24, // le?
+ 0x31, 0x3b, // bnt [to second digit overflow]
+ SIG_ADDTOOFFSET(+4), // ldi, sat
+ 0x8d, 0x03, // lst 3
+ 0x35, 0x0a, // ldi 10
+ SIG_END
+};
+
+static const uint16 lighthouseMemoryCountPatch[] = {
+ PATCH_ADDTOOFFSET(+2), // lst 2
+ 0x35, 0x02, // ldi 2
+ PATCH_ADDTOOFFSET(+9), // le?, bnt, ldi, sat, lst
+ 0x35, 0x02, // ldi 2
+ PATCH_END
+};
+
+
// script, description, signature patch
static const SciScriptPatcherEntry lighthouseSignatures[] = {
{ true, 5, "fix bad globals clear after credits", 1, lighthouseFlagResetSignature, lighthouseFlagResetPatch },
+ { true, 360, "fix slow computer memory counter", 1, lighthouseMemoryCountSignature, lighthouseMemoryCountPatch },
{ true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
{ true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },
{ true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch },
@@ -2446,6 +2482,130 @@ static const SciScriptPatcherEntry longbowSignatures[] = {
};
// ===========================================================================
+// Leisure Suit Larry 1 (Spanish)
+//
+// It seems originally the Spanish version of Larry 1 used some beta code at
+// least for the man wearing a barrel, who walks around in front of the casino.
+// The script inside the resource files even uses a class, that does not exist
+// inside those resource files, which causes a hard error.
+// The patch files included with the Spanish version (300.scr,300.tex, 927.scr)
+// add this class, but at least inside ScummVM a write to a non-existent selector
+// happens right after the player tries to buy an apple from that man.
+//
+// In the original English releases (2.0+2.1) this was handled differently.
+// Which is why this script patch changes that code to work just like in the English release.
+//
+// Attention: for at least some release of this game, view 302 (man wearing a barrel) is fully
+// broken! Which also causes a crash. The original interpreter crashes as well.
+// The only way to fix this is to dump that view from another release of Larry 1
+// and then use the view patch file on this release.
+//
+// Applies to at least: Spanish floppy
+// Responsible method: sBuyApple::changeScript(2)
+// Fixes bug: #10240
+static const uint16 larry1SignatureBuyApple[] = {
+ // end of state 0
+ 0x35, 0x01, // ldi 01
+ 0x65, 0x10, // aTop cycles
+ 0x32, SIG_UINT16(0x0248), // jmp [ret]
+ 0x3c, // dup
+ 0x35, 0x01, // ldi 01
+ 0x1a, // eq?
+ 0x30, SIG_UINT16(0x0007), // bnt [step 2 check]
+ // state 1 code
+ 0x35, 0x01, // ldi 01
+ 0x65, 0x10, // aTop cycles
+ 0x32, SIG_UINT16(0x023a), // jmp [ret]
+ 0x3c, // dup
+ 0x35, 0x02, // ldi 02
+ 0x1a, // eq?
+ 0x30, SIG_UINT16(0x0036), // bnt [step 3 check]
+ // state 2 code
+ 0x35, 0x02, // ldi 02
+ 0x38, SIG_UINT16(0x0091), // pushi setCycle
+ 0x78, // push1
+ 0x51, 0x18, // class Walk
+ 0x36, // push
+ 0x38, SIG_UINT16(0x0126), // pushi setAvoider
+ 0x78, // push1
+ 0x51, SIG_ADDTOOFFSET(+1), // class PAvoider (original 0x25, w/ patch file 0x6d)
+ 0x36, // push
+ 0x38, SIG_UINT16(0x0116), // pushi setMotion
+ SIG_MAGICDWORD,
+ 0x39, 0x04, // pushi 04
+ 0x51, 0x24, // class PolyPath
+ 0x36, // push
+ 0x39, 0x04, // pushi 04
+ 0x76, // push0
+ 0x72, SIG_UINT16(0x0f4e), // lofsa aAppleMan
+ 0x4a, 0x04, // send 04
+ 0x36, // push
+ 0x35, 0x1d, // ldi 1Dh
+ 0x02, // add
+ 0x36, // push
+ 0x39, 0x03, // pushi 03
+ 0x76, // push0
+ 0x72, SIG_UINT16(0x0f4e), // lofsa aAppleMan
+ 0x4a, 0x04, // send 04
+ 0x36, // push
+ 0x7c, // pushSelf
+ 0x81, 0x00, // lag global[0]
+ 0x4a, 0x18, // send 18h
+ 0x32, SIG_UINT16(0x01fd), // jmp [ret]
+ SIG_END
+};
+
+static const uint16 larry1PatchBuyApple[] = {
+ PATCH_ADDTOOFFSET(+11),
+ 0x2f, 0xf3, // bt [jump to end of step 1 code], saves 8 bytes
+ 0x3c, // dup
+ 0x35, 0x02, // ldi 02
+ 0x1a, // eq?
+ 0x31, 0x3f, // bnt [step 3 check]
+ 0x38, PATCH_UINT16(0x00e1), // pushi distanceTo
+ 0x78, // push1
+ 0x72, PATCH_UINT16(0x0f4e), // lofsa sAppleMan
+ 0x36, // push
+ 0x81, 0x00, // lag global[0]
+ 0x4a, 0x06, // send 06
+ 0x36, // push
+ 0x35, 0x1e, // ldi 1Eh
+ 0x1e, // gt?
+ 0x31, 0xdb, // bnt [jump to end of step 1 code]
+ 0x38, PATCH_SELECTOR16(setCycle), // pushi setCycle
+ 0x78, // push1
+ 0x51, 0x18, // class Walk
+ 0x36, // push
+ 0x38, PATCH_SELECTOR16(setMotion), // pushi setMotion
+ 0x39, 0x04, // pushi 04
+ 0x51, 0x24, // class PolyPath
+ 0x36, // push
+ 0x39, 0x04, // pushi 04
+ 0x76, // push0
+ 0x72, PATCH_UINT16(0x0f4e), // lofsa aAppleMan
+ 0x4a, 0x04, // send 04
+ 0x36, // push
+ 0x35, 0x1d, // ldi 1Dh
+ 0x02, // add
+ 0x36, // push
+ 0x39, 0x03, // pushi 03
+ 0x76, // push0
+ 0x72, PATCH_UINT16(0x0f4e), // lofsa aAppleMan
+ 0x4a, 0x04, // send 04
+ 0x36, // push
+ 0x7c, // pushSelf
+ 0x81, 0x00, // lag global[0]
+ 0x4a, 0x12, // send 12h
+ PATCH_END
+};
+
+// script, description, signature patch
+static const SciScriptPatcherEntry larry1Signatures[] = {
+ { true, 300, "Spanish: buy apple from barrel man", 1, larry1SignatureBuyApple, larry1PatchBuyApple },
+ SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+// ===========================================================================
// Leisure Suit Larry 2
// On the plane, Larry is able to wear the parachute. This grants 4 points.
// In early versions of LSL2, it was possible to get "unlimited" points by
@@ -3698,8 +3858,37 @@ static const uint16 phant1RatPatch[] = {
PATCH_END
};
+// In Phantasmagoria the cursor's hover state will not trigger on any of the
+// buttons in the main menu after returning to the main menu from a game, or
+// when choosing "Quit" on the main menu and then cancelling the quit in the
+// confirmation dialogue, until another button has been hovered and unhovered
+// once.
+// This happens because the quit confirmation dialogue creates its own
+// event handling loop which prevents the main event loop from handling the
+// cursor leaving the button (which would reset global 193 to 0), and the
+// dialogue does not reset global193 itself, so it remains at 2 until a new
+// button gets hovered and unhovered.
+// There is not enough space in the confirmation dialogue code to add a reset
+// of global 193, so we just remove the check entirely, since it is only used
+// to avoid resetting the cursor's view on every mouse movement, and this
+// button type is only used on the main menu and the in-game control panel.
+//
+// Applies to at least: English CD
+static const uint16 phant1RedQuitCursorSignature[] = {
+ SIG_MAGICDWORD,
+ 0x89, 0xc1, // lsg $c1
+ 0x35, 0x02, // ldi 02
+ SIG_END
+};
+
+static const uint16 phant1RedQuitCursorPatch[] = {
+ 0x33, 0x05, // jmp [past global193 check]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry phantasmagoriaSignatures[] = {
+ { true, 23, "make cursor red after clicking quit", 1, phant1RedQuitCursorSignature, phant1RedQuitCursorPatch },
{ true, 901, "fix invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
{ true, 1111, "ignore audio settings from save game", 1, phant1SavedVolumeSignature, phant1SavedVolumePatch },
{ true, 20200, "fix broken rat init in sEnterFromAlcove", 1, phant1RatSignature, phant1RatPatch },
@@ -5694,14 +5883,89 @@ static const uint16 qfg4BenchmarkPatch[] = {
PATCH_END
};
-// script, description, signature patch
+// Right at the start of the game inside room 800, when automatically sliding down a slope
+// an error may happen inside Grooper::doit caused by a timing issue.
+//
+// We delay a bit, so that hero::cycler should always be set.
+//
+// Applies to: English CD, English floppy, German floppy
+// Responsible method: sFallsBackSide::changeState (script 803)
+// Fixes bug #9801
+static const uint16 qfg4SlidingDownSlopeSignature[] = {
+ 0x87, 0x01, // lap param[1]
+ 0x65, SIG_ADDTOOFFSET(+1), // aTop state
+ 0x36, // push
+ 0x3c, // dup
+ 0x35, 0x00, // ldi 00
+ 0x1a, // eq?
+ 0x31, 0x30, // bnt [skip state 0]
+ 0x38, SIG_SELECTOR16(handsOff), // pushi handsOff
+ 0x76, // push0
+ 0x81, 0x01, // lag global[1]
+ 0x4a, SIG_UINT16(0x0004), // send 04
+ SIG_MAGICDWORD,
+ 0x38, SIG_SELECTOR16(cycleSpeed), // pushi cycleSpeed
+ 0x76, // push0
+ 0x81, 0x00, // lag global[0]
+ 0x4a, SIG_UINT16(0x0004), // send 04
+ 0xa3, 0x00, // sal local[0]
+ 0x38, SIG_SELECTOR16(setStep), // pushi setStep
+ 0x7a, // push2
+ 0x78, // push1
+ 0x78, // push1
+ 0x38, SIG_SELECTOR16(setMotion), // pushi setMotion
+ 0x38, SIG_UINT16(0x0004), // pushi 04
+ 0x51, SIG_ADDTOOFFSET(+1), // class PolyPath
+ 0x36, // push
+ 0x39, 0x49, // pushi $49
+ 0x39, 0x50, // pushi $50
+ 0x7c, // pushSelf
+ 0x81, 0x00, // lag global[0]
+ 0x4a, SIG_UINT16(0x0014), // send $14
+ SIG_END
+};
+
+static const uint16 qfg4SlidingDownSlopePatch[] = {
+ PATCH_ADDTOOFFSET(+5),
+ 0x2f, 0x34, // bt [skip state 0]
+ 0x38, PATCH_SELECTOR16(handsOff), // pushi handsOff
+ 0x76, // push0
+ 0x81, 0x01, // lag global[1]
+ 0x4a, PATCH_UINT16(0x0004), // send 04
+
+ 0x78, // push1
+ 0x39, 0x20, // pushi $20
+ 0x43, kScummVMWaitId, PATCH_UINT16(0x02), // callk Wait, $2
+ 0x38, PATCH_SELECTOR16(setStep), // pushi setStep
+ 0x7a, // push2
+ 0x78, // push1
+ 0x78, // push1
+ 0x38, PATCH_SELECTOR16(setMotion), // pushi setMotion
+ 0x38, PATCH_UINT16(0x0004), // pushi 04
+ 0x51, PATCH_GETORIGINALBYTE(+44), // class PolyPath
+ 0x36, // push
+ 0x39, 0x49, // pushi $49
+ 0x39, 0x50, // pushi $50
+ 0x7c, // pushSelf
+ 0x81, 0x00, // lag global[0]
+ 0x38, PATCH_SELECTOR16(cycleSpeed), // pushi cycleSpeed
+ 0x76, // push0
+ 0x4a, PATCH_UINT16(0x0018), // send $18
+ 0xa3, 0x00, // sal local[0]
+ 0x3a, // toss
+ 0x48, // ret
+ PATCH_END
+};
+
+// script, description, signature patch
static const SciScriptPatcherEntry qfg4Signatures[] = {
- { true, 1, "disable volume reset on startup", 1, sci2VolumeResetSignature, sci2VolumeResetPatch },
- { true, 1, "disable video benchmarking", 1, qfg4BenchmarkSignature, qfg4BenchmarkPatch },
- { true, 83, "fix incorrect array type", 1, qfg4TrapArrayTypeSignature, qfg4TrapArrayTypePatch },
- { true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
- { true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },
- { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch },
+ { true, 1, "disable volume reset on startup", 1, sci2VolumeResetSignature, sci2VolumeResetPatch },
+ { true, 1, "disable video benchmarking", 1, qfg4BenchmarkSignature, qfg4BenchmarkPatch },
+ { true, 83, "fix incorrect array type", 1, qfg4TrapArrayTypeSignature, qfg4TrapArrayTypePatch },
+ { true, 803, "fix sliding down slope", 1, qfg4SlidingDownSlopeSignature, qfg4SlidingDownSlopePatch },
+ { true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
+ { true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },
+ { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch },
SCI_SIGNATUREENTRY_TERMINATOR
};
@@ -6383,13 +6647,12 @@ static const uint16 ramaBenchmarkPatch[] = {
};
// RAMA uses a custom save game format that game scripts read and write
-// manually. The save game format serialises object references, which in the
-// original engine could be done just by writing int16s (since object references
-// were just 16-bit indexes), but in ScummVM we have to write the full 32-bit
-// reg_t. We hijack kFileIOReadWord/kFileIOWriteWord to do this for us, but we
-// need the game to agree to use those kFileIO calls instead of doing raw reads
-// and creating its own numbers, as it tries to do here in
-// `SaveManager::readWord`.
+// manually. The save game format serialises object references, which SSCI could
+// be done just by writing int16s (since object references were just 16-bit
+// indexes), but in ScummVM we have to write the full 32-bit reg_t. We hijack
+// kFileIOReadWord/kFileIOWriteWord to do this for us, but we need the game to
+// agree to use those kFileIO calls instead of doing raw reads and creating its
+// own numbers, as it tries to do here in `SaveManager::readWord`.
static const uint16 ramaSerializeRegTSignature1[] = {
SIG_MAGICDWORD,
0x38, SIG_SELECTOR16(newWith), // pushi $10b (newWith)
@@ -6410,6 +6673,31 @@ static const uint16 ramaSerializeRegTPatch1[] = {
PATCH_END
};
+// When restoring a NukeTimer client, the game makes a self-call to
+// `NukeTimer::getSubscriberObj` from `NukeTimer::serialize`, but forgets to
+// pass a required argument. In SSCI this happens to work because the value on
+// the stack where the first argument should be is the `getSubscriberObj`
+// selector, so it evaluates to true, but currently ScummVM defaults
+// uninitialised param reads to 0 so the game was following the wrong path and
+// breaking.
+// Applies to at least: US English
+static const uint16 ramaNukeTimerSignature[] = {
+ 0x7e, SIG_ADDTOOFFSET(+2), // line whatever
+ SIG_MAGICDWORD,
+ 0x38, SIG_SELECTOR16(getSubscriberObj), // pushi $3ca (getSubscriberObj)
+ 0x76, // push0
+ 0x54, SIG_UINT16(0x04), // self 4
+ SIG_END
+};
+
+static const uint16 ramaNukeTimerPatch[] = {
+ 0x38, PATCH_SELECTOR16(getSubscriberObj), // pushi $3ca (getSubscriberObj)
+ 0x78, // push1
+ 0x38, PATCH_UINT16(0x01), // pushi 1 (wasting bytes)
+ 0x54, PATCH_UINT16(0x06), // self 6
+ PATCH_END
+};
+
// When opening a datacube on the pocket computer, `DocReader::init` will try
// to perform arithmetic on a pointer to `thighComputer::plane` and then use the
// resulting value as the priority for the DocReader. This happened to work in
@@ -6455,10 +6743,11 @@ static const uint16 ramaChangeDirPatch[] = {
};
static const SciScriptPatcherEntry ramaSignatures[] = {
- { true, 55, "fix bad DocReader::init priority calculation", 1, ramaDocReaderInitSignature, ramaDocReaderInitPatch },
- { true, 85, "fix SaveManager to use normal readWord calls", 1, ramaSerializeRegTSignature1, ramaSerializeRegTPatch1 },
- { true, 64908, "disable video benchmarking", 1, ramaBenchmarkSignature, ramaBenchmarkPatch },
- { true, 64990, "disable change directory button", 1, ramaChangeDirSignature, ramaChangeDirPatch },
+ { true, 55, "fix bad DocReader::init priority calculation", 1, ramaDocReaderInitSignature, ramaDocReaderInitPatch },
+ { true, 85, "fix SaveManager to use normal readWord calls", 1, ramaSerializeRegTSignature1, ramaSerializeRegTPatch1 },
+ { true, 201, "fix crash restoring save games using NukeTimer", 1, ramaNukeTimerSignature, ramaNukeTimerPatch },
+ { true, 64908, "disable video benchmarking", 1, ramaBenchmarkSignature, ramaBenchmarkPatch },
+ { true, 64990, "disable change directory button", 1, ramaChangeDirSignature, ramaChangeDirPatch },
SCI_SIGNATUREENTRY_TERMINATOR
};
@@ -7336,6 +7625,9 @@ void ScriptPatcher::processScript(uint16 scriptNr, SciSpan<byte> scriptData) {
case GID_LONGBOW:
signatureTable = longbowSignatures;
break;
+ case GID_LSL1:
+ signatureTable = larry1Signatures;
+ break;
case GID_LSL2:
signatureTable = larry2Signatures;
break;
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index d46b630292..b4dcbef0d4 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -191,7 +191,7 @@ reg_t disassemble(EngineState *s, reg32_t pos, const Object *obj, bool printBWTa
debugN("\t%s[%x],", (param_value < kernel->_kernelFuncs.size()) ?
((param_value < kernel->getKernelNamesSize()) ? kernel->getKernelName(param_value).c_str() : "[Unknown(postulated)]")
: "<invalid>", param_value);
- } else if (opcode == op_class) {
+ } else if (opcode == op_class || opcode == op_super) {
const reg_t classAddr = s->_segMan->getClassAddress(param_value, SCRIPT_GET_DONT_LOAD, retval.getSegment());
if (!classAddr.isNull()) {
debugN("\t%s", s->_segMan->getObjectName(classAddr));
@@ -199,15 +199,8 @@ reg_t disassemble(EngineState *s, reg32_t pos, const Object *obj, bool printBWTa
} else {
debugN(opsize ? "\t%02x" : "\t%04x", param_value);
}
- } else if (opcode == op_super) {
- if (obj != nullptr) {
- debugN("\t%s", s->_segMan->getObjectName(obj->getSuperClassSelector()));
- debugN(opsize ? "[%02x]" : "[%04x]", param_value);
- } else {
- debugN(opsize ? "\t%02x" : "\t%04x", param_value);
- }
- debugN(",");
+ debugN(", ");
#ifdef ENABLE_SCI32
} else if (
opcode == op_pToa || opcode == op_aTop ||
@@ -267,11 +260,11 @@ reg_t disassemble(EngineState *s, reg32_t pos, const Object *obj, bool printBWTa
retval.incOffset(2);
}
- const uint32 offset = findOffset(param_value, script_entity, retval.getOffset());
+ const uint32 offset = findOffset(param_value, script_entity, pos.getOffset() + bytecount);
reg_t addr;
addr.setSegment(retval.getSegment());
addr.setOffset(offset);
- if (getSciVersion() == SCI_VERSION_3 && !s->_segMan->isObject(addr)) {
+ if (!s->_segMan->isObject(addr)) {
debugN("\t\"%s\"", s->_segMan->derefString(addr));
} else {
debugN("\t%s", s->_segMan->getObjectName(addr));
@@ -284,11 +277,11 @@ reg_t disassemble(EngineState *s, reg32_t pos, const Object *obj, bool printBWTa
if (opsize) {
int8 offset = (int8)scr[retval.getOffset()];
retval.incOffset(1);
- debugN("\t%02x [%04x]", 0xff & offset, kOffsetMask & (retval.getOffset() + offset));
+ debugN("\t%02x [%04x]", 0xff & offset, kOffsetMask & (pos.getOffset() + bytecount + offset));
} else {
int16 offset = (int16)READ_SCI11ENDIAN_UINT16(&scr[retval.getOffset()]);
retval.incOffset(2);
- debugN("\t%04x [%04x]", 0xffff & offset, kOffsetMask & (retval.getOffset() + offset));
+ debugN("\t%04x [%04x]", 0xffff & offset, kOffsetMask & (pos.getOffset() + bytecount + offset));
}
break;
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index d6e2dd3c24..14744e3e39 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -977,7 +977,7 @@ public:
_data = (byte *)malloc(other._dataSize);
memcpy(_data, other._data, other._dataSize);
if (_dataSize) {
- _buffer = Buffer(getWidth(), getHeight(), getPixels());
+ _buffer.init(getWidth(), getHeight(), getWidth(), getPixels(), Graphics::PixelFormat::createFormatCLUT8());
}
_gc = other._gc;
}
@@ -998,7 +998,7 @@ public:
_data = (byte *)malloc(other._dataSize);
memcpy(_data, other._data, _dataSize);
if (_dataSize) {
- _buffer = Buffer(getWidth(), getHeight(), getPixels());
+ _buffer.init(getWidth(), getHeight(), getWidth(), getPixels(), Graphics::PixelFormat::createFormatCLUT8());
}
_gc = other._gc;
@@ -1032,7 +1032,7 @@ public:
setXResolution(xResolution);
setYResolution(yResolution);
- _buffer = Buffer(getWidth(), getHeight(), getPixels());
+ _buffer.init(getWidth(), getHeight(), getWidth(), getPixels(), Graphics::PixelFormat::createFormatCLUT8());
}
inline int getRawSize() const {
@@ -1102,12 +1102,11 @@ public:
BITMAP_PROPERTY(32, DataOffset, 24);
- // NOTE: This property is used as a "magic number" for
- // validating that a block of memory is a valid bitmap,
- // and so is always set to the size of the header.
+ // This property is used as a "magic number" for validating that a block of
+ // memory is a valid bitmap, and so is always set to the size of the header.
BITMAP_PROPERTY(32, UncompressedDataOffset, 28);
- // NOTE: This property always seems to be zero
+ // This property always seems to be zero in SSCI
BITMAP_PROPERTY(32, ControlOffset, 32);
inline uint16 getXResolution() const {
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp
index 42c71c4d31..d2f6a14797 100644
--- a/engines/sci/engine/selector.cpp
+++ b/engines/sci/engine/selector.cpp
@@ -165,6 +165,10 @@ void Kernel::mapSelectors() {
FIND_SELECTOR(vanishingY);
FIND_SELECTOR(iconIndex);
FIND_SELECTOR(select);
+ FIND_SELECTOR(handsOff);
+ FIND_SELECTOR(setStep);
+ FIND_SELECTOR(setMotion);
+ FIND_SELECTOR(cycleSpeed);
#ifdef ENABLE_SCI32
FIND_SELECTOR(data);
diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h
index 2debd3204d..2c1a34e938 100644
--- a/engines/sci/engine/selector.h
+++ b/engines/sci/engine/selector.h
@@ -131,6 +131,11 @@ struct SelectorCache {
Selector iconIndex; ///< Used to index icon bar objects
Selector select;
+ Selector handsOff;
+ Selector setStep;
+ Selector setMotion;
+ Selector cycleSpeed;
+
#ifdef ENABLE_SCI32
Selector data; // Used by Array()/String()
Selector picture; // Used to hold the picture ID for SCI32 pictures
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 9c271db250..ecdf0cb695 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -27,7 +27,7 @@
#include "sci/engine/script_patches.h"
#include "sci/engine/workarounds.h"
-#define SCI_WORKAROUNDENTRY_TERMINATOR { (SciGameId)0, -1, -1, 0, NULL, NULL, NULL, 0, { WORKAROUND_NONE, 0 } }
+#define SCI_WORKAROUNDENTRY_TERMINATOR { (SciGameId)0, -1, -1, 0, NULL, NULL, NULL, 0, 0, { WORKAROUND_NONE, 0 } }
namespace Sci {
@@ -72,23 +72,23 @@ static const uint16 sig_arithmetic_ecoq2_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry arithmeticWorkarounds[] = {
- { GID_CAMELOT, 92, 92, 0, "endingCartoon2", "changeState", sig_arithmetic_camelot_1, 0, { WORKAROUND_FAKE, 0 } }, // op_lai: during the ending, sub gets called with no parameters, uses parameter 1 which is theGrail in this case - bug #5237
- { GID_ECOQUEST2, 100, 0, 0, "Rain", "points", sig_arithmetic_ecoq2_1, 0, { WORKAROUND_FAKE, 0 } }, // op_or: when giving the papers to the customs officer, gets called against a pointer instead of a number - bug #4939, Spanish version - bug #5750
- { GID_FANMADE, 516, 983, 0, "Wander", "setTarget", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_mul: The Legend of the Lost Jewel Demo (fan made): called with object as second parameter when attacked by insects - bug #5124
- { GID_GK1, 800,64992, 0, "Fwd", "doit", NULL, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when Mosely finds Gabriel and Grace near the end of the game, compares the Grooper object with 7
- { GID_HOYLE4, 700, -1, 1, "Code", "doit", NULL, 0, { WORKAROUND_FAKE, 1 } }, // op_add: while bidding in Bridge, an object ("Bid") is added to an object in another segment ("hand3")
- { GID_ICEMAN, 199, 977, 0, "Grooper", "doit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_add: While dancing with the girl
- { GID_MOTHERGOOSE256, -1, 999, 0, "Event", "new", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_and: constantly during the game (SCI1 version)
- { GID_MOTHERGOOSE256, -1, 4, 0, "rm004", "doit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_or: when going north and reaching the castle (rooms 4 and 37) - bug #5101
- { GID_MOTHERGOOSEHIRES,90, 90, 0, "newGameButton", "select", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_ge: MUMG Deluxe, when selecting "New Game" in the main menu. It tries to compare an integer with a list. Needs to return false for the game to continue.
- { GID_PHANTASMAGORIA, 902, 0, 0, "", "export 7", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_shr: when starting a chapter in Phantasmagoria
- { GID_QFG1VGA, 301, 928, 0, "Blink", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_div: when entering the inn, gets called with 1 parameter, but 2nd parameter is used for div which happens to be an object
- { GID_QFG2, 200, 200, 0, "astro", "messages", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_lsi: when getting asked for your name by the astrologer - bug #5152
- { GID_QFG3, 780, 999, 0, "", "export 6", NULL, 0, { WORKAROUND_FAKE, 0 } }, // op_add: trying to talk to yourself at the top of the giant tree - bug #6692
- { GID_QFG4, 710,64941, 0, "RandCycle", "doit", NULL, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when the tentacle appears in the third room of the caves
- { GID_TORIN, 51400,64928, 0, "Blink", "init", NULL, 0, { WORKAROUND_FAKE, 1 } }, // op_div: when Lycentia knocks Torin out after he removes her collar
+ { GID_CAMELOT, 92, 92, 0, "endingCartoon2", "changeState", sig_arithmetic_camelot_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_lai: during the ending, sub gets called with no parameters, uses parameter 1 which is theGrail in this case - bug #5237
+ { GID_ECOQUEST2, 100, 0, 0, "Rain", "points", sig_arithmetic_ecoq2_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_or: when giving the papers to the customs officer, gets called against a pointer instead of a number - bug #4939, Spanish version - bug #5750
+ { GID_FANMADE, 516, 983, 0, "Wander", "setTarget", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_mul: The Legend of the Lost Jewel Demo (fan made): called with object as second parameter when attacked by insects - bug #5124
+ { GID_GK1, 800,64992, 0, "Fwd", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when Mosely finds Gabriel and Grace near the end of the game, compares the Grooper object with 7
+ { GID_HOYLE4, 700, -1, 1, "Code", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // op_add: while bidding in Bridge, an object ("Bid") is added to an object in another segment ("hand3")
+ { GID_ICEMAN, 199, 977, 0, "Grooper", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_add: While dancing with the girl
+ { GID_MOTHERGOOSE256, -1, 999, 0, "Event", "new", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_and: constantly during the game (SCI1 version)
+ { GID_MOTHERGOOSE256, -1, 4, 0, "rm004", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_or: when going north and reaching the castle (rooms 4 and 37) - bug #5101
+ { GID_MOTHERGOOSEHIRES,90, 90, 0, "newGameButton", "select", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_ge: MUMG Deluxe, when selecting "New Game" in the main menu. It tries to compare an integer with a list. Needs to return false for the game to continue.
+ { GID_PHANTASMAGORIA, 902, 0, 0, "", "export 7", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_shr: when starting a chapter in Phantasmagoria
+ { GID_QFG1VGA, 301, 928, 0, "Blink", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_div: when entering the inn, gets called with 1 parameter, but 2nd parameter is used for div which happens to be an object
+ { GID_QFG2, 200, 200, 0, "astro", "messages", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_lsi: when getting asked for your name by the astrologer - bug #5152
+ { GID_QFG3, 780, 999, 0, "", "export 6", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // op_add: trying to talk to yourself at the top of the giant tree - bug #6692
+ { GID_QFG4, 710,64941, 0, "RandCycle", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when the tentacle appears in the third room of the caves
+ { GID_TORIN, 51400,64928, 0, "Blink", "init", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // op_div: when Lycentia knocks Torin out after he removes her collar
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -269,240 +269,243 @@ static const uint16 sig_uninitread_sq1_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
- { GID_CAMELOT, 40, 40, 0, "Rm40", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when looking at the ground at the pool of Siloam - bug #6401
- { GID_CASTLEBRAIN, 280, 280, 0, "programmer", "dispatchEvent", NULL, 0, { WORKAROUND_FAKE, 0xf } }, // pressing 'q' on the computer screen in the robot room, and closing the help dialog that pops up (bug #5143). Moves the cursor to the view with the ID returned (in this case, the robot hand)
- { GID_CNICK_KQ, -1, 0, 1, "Character", "say", NULL, -1, { WORKAROUND_FAKE, 0 } }, // checkers/backgammon, like in hoyle 3 - temps 504 and 505 - bug #6255
- { GID_CNICK_KQ, -1, 700, 0, "gcWindow", "open", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when entering the control menu, like in hoyle 3
- { GID_CNICK_KQ, 300, 303, 0, "theDoubleCube", "<noname520>", NULL, 5, { WORKAROUND_FAKE, 0 } }, // while playing backgammon with doubling enabled - bug #6426 (same as the theDoubleCube::make workaround for Hoyle 3)
- { GID_CNICK_KQ, 300, 303, 0, "theDoubleCube", "<noname519>", NULL, 9, { WORKAROUND_FAKE, 0 } }, // when accepting a double, while playing backgammon with doubling enabled (same as the theDoubleCube::accept workaround for Hoyle 3)
- { GID_CNICK_LAURABOW,500, 0, 1, "<no name>", "<noname446>", NULL, -1, { WORKAROUND_FAKE, 0 } }, // Yacht, like in hoyle 3 - temps 504 and 505 - bug #6424
- { GID_CNICK_LAURABOW, -1, 700, 0, NULL, "open", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when entering control menu - bug #6423 (same as the gcWindow workaround for Hoyle 3)
- { GID_CNICK_LAURABOW,100, 100, 0, NULL, "<noname144>", NULL, 1, { WORKAROUND_FAKE, 0 } }, // while playing domino - bug #6429 (same as the dominoHand2 workaround for Hoyle 3)
- { GID_CNICK_LAURABOW,100, 110, 0, NULL, "doit", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when changing the "Dominoes per hand" setting - bug #6430
- { GID_CNICK_LONGBOW, 0, 0, 0, "RH Budget", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when starting the game
- { GID_ECOQUEST, -1, -1, 0, NULL, "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // almost clicking anywhere triggers this in almost all rooms
- { GID_FANMADE, 516, 979, 0, "", "export 0", NULL, 20, { WORKAROUND_FAKE, 0 } }, // Happens in Grotesteing after the logos
- { GID_FANMADE, 528, 990, 0, "GDialog", "doit", NULL, 4, { WORKAROUND_FAKE, 0 } }, // Happens in Cascade Quest when closing the glossary - bug #5116
- { GID_FANMADE, 488, 1, 0, "RoomScript", "doit", sig_uninitread_fanmade_1, 1, { WORKAROUND_FAKE, 0 } }, // Happens in Ocean Battle while playing - bug #5335
- { GID_FREDDYPHARKAS, -1, 24, 0, "gcWin", "open", NULL, 5, { WORKAROUND_FAKE, 0xf } }, // is used as priority for game menu
- { GID_FREDDYPHARKAS, -1, 31, 0, "quitWin", "open", NULL, 5, { WORKAROUND_FAKE, 0xf } }, // is used as priority for game menu
- { GID_FREDDYPHARKAS, 540, 540, 0, "WaverCode", "init", NULL, -1, { WORKAROUND_FAKE, 0 } }, // Gun pratice mini-game - bug #5232
- { GID_GK1, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // sometimes when walk-clicking
- { GID_GK1, -1, 64937, -1, "GKControls", "dispatchEvent", NULL, 6, { WORKAROUND_FAKE, 0 } }, // when using keyboard navigation (tab) in the game settings and hitting 'enter' when over a slider
- { GID_GK2, -1, 11, 0, "", "export 10", NULL, 3, { WORKAROUND_FAKE, 0 } }, // called when the game starts
- { GID_GK2, -1, 11, 0, "", "export 10", NULL, 4, { WORKAROUND_FAKE, 0 } }, // called during the game
- { GID_HOYLE1, 4, 104, 0, "GinRummyCardList", "calcRuns", NULL, 4, { WORKAROUND_FAKE, 0 } }, // Gin Rummy / right when the game starts
- { GID_HOYLE1, 5, 204, 0, "tableau", "checkRuns", NULL, 2, { WORKAROUND_FAKE, 0 } }, // Cribbage / during the game
- { GID_HOYLE1, 3, 16, 0, "", "export 0", sig_uninitread_hoyle1_1, 3, { WORKAROUND_FAKE, 0 } }, // Hearts / during the game - bug #5299
- { GID_HOYLE1, -1, 997, 0, "MenuBar", "doit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When changing game speed settings - bug #5512
- { GID_HOYLE3, -1, 0, 1, "Character", "say", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when starting checkers or dominoes, first time a character says something - temps 504 and 505
- { GID_HOYLE3, -1, 700, 0, "gcWindow", "open", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when entering control menu
- { GID_HOYLE3, 100, 100, 0, "dominoHand2", "cue", NULL, 1, { WORKAROUND_FAKE, 0 } }, // while playing domino - bug #5042
- { GID_HOYLE3, 100, 110, 0, "OKButton", "doit", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when changing the "Dominoes per hand" setting - bug #6430
- { GID_HOYLE3, 300, 303, 0, "theDoubleCube", "make", NULL, 5, { WORKAROUND_FAKE, 0 } }, // while playing backgammon with doubling enabled
- { GID_HOYLE3, 300, 303, 0, "theDoubleCube", "accept", NULL, 9, { WORKAROUND_FAKE, 0 } }, // when accepting a double, while playing backgammon with doubling enabled
- { GID_HOYLE4, -1, 0, 0, NULL, "open", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when selecting "Control" from the menu (temp vars 0-3) - bug #5132
- { GID_HOYLE4, 910, 18, 0, NULL, "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // during tutorial - bug #5213
- { GID_HOYLE4, 910, 910, 0, NULL, "setup", NULL, 3, { WORKAROUND_FAKE, 0 } }, // when selecting "Tutorial" from the main menu - bug #5132
- { GID_HOYLE4, 700, 700, 1, "BridgeHand", "calcQTS", NULL, 3, { WORKAROUND_FAKE, 0 } }, // when placing a bid in bridge (always)
- { GID_HOYLE4, 700, 710, 1, "BridgeStrategyPlay", "checkSplitTops", NULL, 10, { WORKAROUND_FAKE, 0 } }, // while playing bridge, objects LeadReturn_Trump, SecondSeat_Trump, ThirdSeat_Trump and others - bug #5794
- { GID_HOYLE4, 700, -1, 1, "BridgeDefense", "think", NULL, -1, { WORKAROUND_FAKE, 0 } }, // sometimes while playing bridge, temp var 3, 17 and others, objects LeadReturn_Trump, ThirdSeat_Trump and others
- { GID_HOYLE4, 700, 730, 1, "BridgeDefense", "beatTheirBest", NULL, 3, { WORKAROUND_FAKE, 0 } }, // rarely while playing bridge
- { GID_HOYLE4, 700, -1, 1, "Code", "doit", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when placing a bid in bridge (always), temp var 11, 24, 27, 46, 75, objects compete_tree, compwe_tree, other1_tree, b1 - bugs #5663 and #5794
- { GID_HOYLE4, 700, 921, 0, "Print", "addEdit", NULL, 0, { WORKAROUND_FAKE, 118 } }, // when saving the game (may also occur in other situations) - bug #6601, bug #6614
- { GID_HOYLE4, 700, 921, 0, "Print", "addEdit", NULL, 1, { WORKAROUND_FAKE, 1 } }, // see above, Text-control saves its coordinates to temp[0] and temp[1], Edit-control adjusts to those uninitialized temps, who by accident were left over from the Text-control
- { GID_HOYLE4, 300, 300, 0, "", "export 2", sig_uninitread_hoyle4_1, 0, { WORKAROUND_FAKE, 0 } }, // after passing around cards in hearts
- { GID_HOYLE4, 400, 400, 1, "GinHand", "calcRuns", NULL, 4, { WORKAROUND_FAKE, 0 } }, // sometimes while playing Gin Rummy (e.g. when knocking and placing a card) - bug #5665
- { GID_HOYLE4, 500, 17, 1, "Character", "say", NULL, 504, { WORKAROUND_FAKE, 0 } }, // sometimes while playing Cribbage (e.g. when the opponent says "Last Card") - bug #5662
- { GID_HOYLE4, 800, 870, 0, "EuchreStrategy", "thinkLead", NULL, 0, { WORKAROUND_FAKE, 0 } }, // while playing Euchre, happens at least on 2nd or 3rd turn - bug #6602
- { GID_HOYLE4, -1, 937, 0, "IconBar", "dispatchEvent", NULL, 408, { WORKAROUND_FAKE, 0 } }, // pressing ENTER on scoreboard while mouse is not on OK button, may not happen all the time - bug #6603
- { GID_HOYLE5, -1, 14, -1, NULL, "select", NULL, 1, { WORKAROUND_FAKE, 0 } }, // dragging the sliders in game settings
- { GID_HOYLE5, -1, 64937, -1, NULL, "select", NULL, 7, { WORKAROUND_FAKE, 0 } }, // clicking the "control" and "options" buttons in the icon bar
- { GID_HOYLE5, -1, 64937, -1, "IconBar", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // clicking on any button in the icon bar
- { GID_HOYLE5, 300, 300, 0, "", "export 2", sig_uninitread_hoyle5_1, 0, { WORKAROUND_FAKE, 0 } }, // after passing around cards in hearts
- { GID_ISLANDBRAIN, 100, 937, 0, "IconBar", "dispatchEvent", NULL, 58, { WORKAROUND_FAKE, 0 } }, // when using ENTER at the startup menu - bug #5241
- { GID_ISLANDBRAIN, 140, 140, 0, "piece", "init", NULL, 3, { WORKAROUND_FAKE, 1 } }, // first puzzle right at the start, some initialization variable. bnt is done on it, and it should be non-0
- { GID_ISLANDBRAIN, 200, 268, 0, "anElement", "select", NULL, 0, { WORKAROUND_FAKE, 0 } }, // elements puzzle, gets used before super TextIcon
- { GID_JONES, 1, 232, 0, "weekendText", "draw", sig_uninitread_jones_1, 0, { WORKAROUND_FAKE, 0 } }, // jones/cd only - gets called during the game
- { GID_JONES, 1, 255, 0, "", "export 0", NULL, -1, { WORKAROUND_FAKE, 0 } }, // jones/cd only - called when a game ends, temps 13 and 14
- { GID_JONES, 764, 255, 0, "", "export 0", NULL, -1, { WORKAROUND_FAKE, 0 } }, // jones/ega&vga only - called when the game starts, temps 13 and 14
- //{ GID_KQ5, -1, 0, 0, "", "export 29", NULL, 3, { WORKAROUND_FAKE, 0xf } }, // called when playing harp for the harpies or when aborting dialog in toy shop, is used for kDoAudio - bug #4961
+ { GID_CAMELOT, 40, 40, 0, "Rm40", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when looking at the ground at the pool of Siloam - bug #6401
+ { GID_CASTLEBRAIN, 280, 280, 0, "programmer", "dispatchEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0xf } }, // pressing 'q' on the computer screen in the robot room, and closing the help dialog that pops up (bug #5143). Moves the cursor to the view with the ID returned (in this case, the robot hand)
+ { GID_CASTLEBRAIN, 320, 325, 0, "word", "dispatchEvent", NULL, 14, 15, { WORKAROUND_FAKE, 0 } }, // holding down enter key during the word search puzzle, temp 14 and 15 - bug #9783
+ { GID_CNICK_KQ, -1, 0, 1, "Character", "say", NULL, 504, 505, { WORKAROUND_FAKE, 0 } }, // checkers/backgammon, like in hoyle 3 - temps 504 and 505 - bug #6255
+ { GID_CNICK_KQ, -1, 700, 0, "gcWindow", "open", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when entering the control menu, like in hoyle 3
+ { GID_CNICK_KQ, 300, 303, 0, "theDoubleCube", "<noname520>", NULL, 5, 5, { WORKAROUND_FAKE, 0 } }, // while playing backgammon with doubling enabled - bug #6426 (same as the theDoubleCube::make workaround for Hoyle 3)
+ { GID_CNICK_KQ, 300, 303, 0, "theDoubleCube", "<noname519>", NULL, 9, 9, { WORKAROUND_FAKE, 0 } }, // when accepting a double, while playing backgammon with doubling enabled (same as the theDoubleCube::accept workaround for Hoyle 3)
+ { GID_CNICK_LAURABOW,500, 0, 1, "<no name>", "<noname446>", NULL, 504, 505, { WORKAROUND_FAKE, 0 } }, // Yacht, like in hoyle 3 - temps 504 and 505 - bug #6424
+ { GID_CNICK_LAURABOW, -1, 700, 0, NULL, "open", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when entering control menu - bug #6423 (same as the gcWindow workaround for Hoyle 3)
+ { GID_CNICK_LAURABOW,100, 100, 0, NULL, "<noname144>", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // while playing domino - bug #6429 (same as the dominoHand2 workaround for Hoyle 3)
+ { GID_CNICK_LAURABOW,100, 110, 0, NULL, "doit", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when changing the "Dominoes per hand" setting - bug #6430
+ { GID_CNICK_LSL, 250, 250, 0, "increase", "handleEvent", NULL, 2, 2, { WORKAROUND_FAKE, 0 } }, // when increasing own bet for blackjack - bug #10184
+ { GID_CNICK_LONGBOW, 0, 0, 0, "RH Budget", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when starting the game
+ { GID_ECOQUEST, -1, -1, 0, NULL, "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // almost clicking anywhere triggers this in almost all rooms
+ { GID_FANMADE, 516, 979, 0, "", "export 0", NULL, 20, 20, { WORKAROUND_FAKE, 0 } }, // Happens in Grotesteing after the logos
+ { GID_FANMADE, 528, 990, 0, "GDialog", "doit", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // Happens in Cascade Quest when closing the glossary - bug #5116
+ { GID_FANMADE, 488, 1, 0, "RoomScript", "doit", sig_uninitread_fanmade_1, 1, 1, { WORKAROUND_FAKE, 0 } }, // Happens in Ocean Battle while playing - bug #5335
+ { GID_FREDDYPHARKAS, -1, 24, 0, "gcWin", "open", NULL, 5, 5, { WORKAROUND_FAKE, 0xf } }, // is used as priority for game menu
+ { GID_FREDDYPHARKAS, -1, 31, 0, "quitWin", "open", NULL, 5, 5, { WORKAROUND_FAKE, 0xf } }, // is used as priority for game menu
+ { GID_FREDDYPHARKAS, 540, 540, 0, "WaverCode", "init", NULL, 0, 1, { WORKAROUND_FAKE, 0 } }, // Gun pratice mini-game, all temps - 0+1 - bug #5232
+ { GID_GK1, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // sometimes when walk-clicking
+ { GID_GK1, -1, 64937, -1, "GKControls", "dispatchEvent", NULL, 6, 6, { WORKAROUND_FAKE, 0 } }, // when using keyboard navigation (tab) in the game settings and hitting 'enter' when over a slider
+ { GID_GK2, -1, 11, 0, "", "export 10", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // called when the game starts
+ { GID_GK2, -1, 11, 0, "", "export 10", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // called during the game
+ { GID_HOYLE1, 4, 104, 0, "GinRummyCardList", "calcRuns", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // Gin Rummy / right when the game starts
+ { GID_HOYLE1, 5, 204, 0, "tableau", "checkRuns", NULL, 2, 2, { WORKAROUND_FAKE, 0 } }, // Cribbage / during the game
+ { GID_HOYLE1, 3, 16, 0, "", "export 0", sig_uninitread_hoyle1_1, 3, 3, { WORKAROUND_FAKE, 0 } }, // Hearts / during the game - bug #5299
+ { GID_HOYLE1, -1, 997, 0, "MenuBar", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When changing game speed settings - bug #5512
+ { GID_HOYLE3, -1, 0, 1, "Character", "say", NULL, 504, 505, { WORKAROUND_FAKE, 0 } }, // when starting checkers or dominoes, first time a character says something - temps 504 and 505
+ { GID_HOYLE3, -1, 700, 0, "gcWindow", "open", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when entering control menu
+ { GID_HOYLE3, 100, 100, 0, "dominoHand2", "cue", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // while playing domino - bug #5042
+ { GID_HOYLE3, 100, 110, 0, "OKButton", "doit", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when changing the "Dominoes per hand" setting - bug #6430
+ { GID_HOYLE3, 300, 303, 0, "theDoubleCube", "make", NULL, 5, 5, { WORKAROUND_FAKE, 0 } }, // while playing backgammon with doubling enabled
+ { GID_HOYLE3, 300, 303, 0, "theDoubleCube", "accept", NULL, 9, 9, { WORKAROUND_FAKE, 0 } }, // when accepting a double, while playing backgammon with doubling enabled
+ { GID_HOYLE4, -1, 0, 0, NULL, "open", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when selecting "Control" from the menu (temp vars 0-3) - bug #5132
+ { GID_HOYLE4, 910, 18, 0, NULL, "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // during tutorial - bug #5213
+ { GID_HOYLE4, 910, 910, 0, NULL, "setup", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // when selecting "Tutorial" from the main menu - bug #5132
+ { GID_HOYLE4, 700, 700, 1, "BridgeHand", "calcQTS", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // when placing a bid in bridge (always)
+ { GID_HOYLE4, 700, 710, 1, "BridgeStrategyPlay", "checkSplitTops", NULL, 10, 10, { WORKAROUND_FAKE, 0 } }, // while playing bridge, objects LeadReturn_Trump, SecondSeat_Trump, ThirdSeat_Trump and others - bug #5794
+ { GID_HOYLE4, 700, -1, 1, "BridgeDefense", "think", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // sometimes while playing bridge, temp var 3, 17 and others, objects LeadReturn_Trump, ThirdSeat_Trump and others
+ { GID_HOYLE4, 700, 730, 1, "BridgeDefense", "beatTheirBest", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // rarely while playing bridge
+ { GID_HOYLE4, 700, -1, 1, "Code", "doit", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when placing a bid in bridge (always), temp var 11, 24, 27, 46, 75, objects compete_tree, compwe_tree, other1_tree, b1 - bugs #5663 and #5794
+ { GID_HOYLE4, 700, 921, 0, "Print", "addEdit", NULL, 0, 0, { WORKAROUND_FAKE, 118 } }, // when saving the game (may also occur in other situations) - bug #6601, bug #6614
+ { GID_HOYLE4, 700, 921, 0, "Print", "addEdit", NULL, 1, 1, { WORKAROUND_FAKE, 1 } }, // see above, Text-control saves its coordinates to temp[0] and temp[1], Edit-control adjusts to those uninitialized temps, who by accident were left over from the Text-control
+ { GID_HOYLE4, 300, 300, 0, "", "export 2", sig_uninitread_hoyle4_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // after passing around cards in hearts
+ { GID_HOYLE4, 400, 400, 1, "GinHand", "calcRuns", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // sometimes while playing Gin Rummy (e.g. when knocking and placing a card) - bug #5665
+ { GID_HOYLE4, 500, 17, 1, "Character", "say", NULL, 504, 504, { WORKAROUND_FAKE, 0 } }, // sometimes while playing Cribbage (e.g. when the opponent says "Last Card") - bug #5662
+ { GID_HOYLE4, 800, 870, 0, "EuchreStrategy", "thinkLead", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // while playing Euchre, happens at least on 2nd or 3rd turn - bug #6602
+ { GID_HOYLE4, -1, 937, 0, "IconBar", "dispatchEvent", NULL, 408, 408, { WORKAROUND_FAKE, 0 } }, // pressing ENTER on scoreboard while mouse is not on OK button, may not happen all the time - bug #6603
+ { GID_HOYLE5, -1, 14, -1, NULL, "select", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // dragging the sliders in game settings
+ { GID_HOYLE5, -1, 64937, -1, NULL, "select", NULL, 7, 7, { WORKAROUND_FAKE, 0 } }, // clicking the "control" and "options" buttons in the icon bar
+ { GID_HOYLE5, -1, 64937, -1, "IconBar", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // clicking on any button in the icon bar
+ { GID_HOYLE5, 300, 300, 0, "", "export 2", sig_uninitread_hoyle5_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // after passing around cards in hearts
+ { GID_ISLANDBRAIN, 100, 937, 0, "IconBar", "dispatchEvent", NULL, 58, 58, { WORKAROUND_FAKE, 0 } }, // when using ENTER at the startup menu - bug #5241
+ { GID_ISLANDBRAIN, 140, 140, 0, "piece", "init", NULL, 3, 3, { WORKAROUND_FAKE, 1 } }, // first puzzle right at the start, some initialization variable. bnt is done on it, and it should be non-0
+ { GID_ISLANDBRAIN, 180, 190, 0, "word", "dispatchEvent", NULL, 14, 15, { WORKAROUND_FAKE, 0 } }, // holding down enter key during the word search puzzle, temps 14 and 15
+ { GID_ISLANDBRAIN, 200, 268, 0, "anElement", "select", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // elements puzzle, gets used before super TextIcon
+ { GID_JONES, 1, 232, 0, "weekendText", "draw", sig_uninitread_jones_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // jones/cd only - gets called during the game
+ { GID_JONES, 1, 255, 0, "", "export 0", NULL, 13, 14, { WORKAROUND_FAKE, 0 } }, // jones/cd only - called when a game ends, temps 13 and 14
+ { GID_JONES, 764, 255, 0, "", "export 0", NULL, 13, 14, { WORKAROUND_FAKE, 0 } }, // jones/ega&vga only - called when the game starts, temps 13 and 14
+ //{ GID_KQ5, -1, 0, 0, "", "export 29", NULL, 3, 3, { WORKAROUND_FAKE, 0xf } }, // called when playing harp for the harpies or when aborting dialog in toy shop, is used for kDoAudio - bug #4961
// ^^ shouldn't be needed anymore, we got a script patch instead (kq5PatchCdHarpyVolume)
- { GID_KQ5, 25, 25, 0, "rm025", "doit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // inside witch forest, when going to the room where the walking rock is
- { GID_KQ5, 55, 55, 0, "helpScript", "doit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when giving the tambourine to the monster in the labyrinth (only happens at one of the locations) - bug #5198
- { GID_KQ5, -1, 755, 0, "gcWin", "open", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when entering control menu in the FM-Towns version
- { GID_KQ6, -1, 30, 0, "rats", "changeState", NULL, -1, { WORKAROUND_FAKE, 0 } }, // rats in the catacombs (temps 1 - 5) - bugs #4958, #4998, #5017
- { GID_KQ6, 210, 210, 0, "rm210", "scriptCheck", NULL, 0, { WORKAROUND_FAKE, 1 } }, // using inventory in that room - bug #4953
- { GID_KQ6, 500, 500, 0, "rm500", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // going to island of the beast
- { GID_KQ6, 520, 520, 0, "rm520", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // going to boiling water trap on beast isle
- { GID_KQ6, -1, 903, 0, "controlWin", "open", NULL, 4, { WORKAROUND_FAKE, 0 } }, // when opening the controls window (save, load etc)
- { GID_KQ6, -1, 907, 0, "tomato", "doVerb", NULL, 2, { WORKAROUND_FAKE, 0 } }, // when looking at the rotten tomato in the inventory - bug #5331
- { GID_KQ6, -1, 928, 0, NULL, "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // gets caused by Text+Audio support (see script patcher)
- { GID_KQ7, -1, 64996, 0, "User", "handleEvent", NULL, 1, { WORKAROUND_FAKE, 0 } }, // called when pushing a keyboard key
- { GID_KQ7, 2450, 2450, 0, "exBridge", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // called when walking up to the throne in the cave in chapter 2
- { GID_KQ7, 2450, 2450, 0, "maliciaComes", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when malicia appears at the southeast exit of the main chamber near the end of chapter 2
- { GID_KQ7, 5300, 5302, 0, "putOnMask", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // in chapter 3, after using the mask on Valanice, click the jackalope hair in inventory - bug Trac#9759
- { GID_KQ7, 6060, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // after entering the harp crystal in chapter 5
- { GID_LAURABOW, 37, 0, 0, "CB1", "doit", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when going up the stairs - bug #5084
- { GID_LAURABOW, -1, 967, 0, "myIcon", "cycle", NULL, 1, { WORKAROUND_FAKE, 0 } }, // having any portrait conversation coming up - initial bug #4971
- { GID_LAURABOW2, -1, 24, 0, "gcWin", "open", NULL, 5, { WORKAROUND_FAKE, 0xf } }, // is used as priority for game menu
- { GID_LAURABOW2, -1, 21, 0, "dropCluesCode", "doit", NULL, 1, { WORKAROUND_FAKE, 0x7fff } }, // when asking some questions (e.g. the reporter about the burglary, or the policeman about Ziggy). Must be big, as the game scripts perform lt on it and start deleting journal entries - bugs #4979, #5026
- { GID_LAURABOW2, -1, 90, 1, "MuseumActor", "init", NULL, 6, { WORKAROUND_FAKE, 0 } }, // Random actors in museum - bug #5197
- { GID_LAURABOW2, 240, 240, 0, "sSteveAnimates", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Steve Dorian's idle animation at the docks - bug #5028
- { GID_LAURABOW2, -1, 928, 0, NULL, "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // gets caused by Text+Audio support (see script patcher)
- { GID_LIGHTHOUSE, -1, 17, 0, NULL, "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when operating the joystick in the puzzle to lower the bridge at the entrance to the workshop, or the joystick that moves the robotic arm in the mini-sub
- { GID_LONGBOW, -1, 0, 0, "Longbow", "restart", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When canceling a restart game - bug #5244
- { GID_LONGBOW, -1, 213, 0, "clear", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When giving an answer using the druid hand sign code in any room
- { GID_LONGBOW, -1, 213, 0, "letter", "handleEvent", sig_uninitread_longbow_1, 1, { WORKAROUND_FAKE, 0 } }, // When using the druid hand sign code in any room - bug #5035
- { GID_LSL1, 250, 250, 0, "increase", "handleEvent", NULL, 2, { WORKAROUND_FAKE, 0 } }, // casino, playing game, increasing bet
- { GID_LSL1, 720, 720, 0, "rm720", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // age check room
- { GID_LSL2, 38, 38, 0, "cloudScript", "changeState", NULL, 1, { WORKAROUND_FAKE, 0 } }, // entering the room in the middle deck of the ship - bug #5034
- { GID_LSL3, 340, 340, 0, "ComicScript", "changeState", NULL, -1, { WORKAROUND_FAKE, 0 } }, // right after entering the 3 ethnic groups inside comedy club (temps 200, 201, 202, 203)
- { GID_LSL3, -1, 997, 0, "TheMenuBar", "handleEvent", NULL, 1, { WORKAROUND_FAKE, 0xf } }, // when setting volume the first time, this temp is used to set volume on entry (normally it would have been initialized to 's')
- { GID_LSL6, 820, 82, 0, "", "export 0", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when touching the electric fence - bug #5103
- { GID_LSL6, -1, 85, 0, "washcloth", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // washcloth in inventory
- { GID_LSL6, -1, 928, -1, "Narrator", "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // used by various objects that are even translated in foreign versions, that's why we use the base-class
- { GID_LSL6HIRES, -1, 85, 0, "LL6Inv", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when creating a new game
- { GID_LSL6HIRES, -1, 85, 0, "washcloth", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when interacting with the wet washcloth in the inventory - Trac#9811
- { GID_LSL6HIRES, -1, 64950, 1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // at least when entering swimming pool area
- { GID_LSL6HIRES, -1, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // during the game
- { GID_LSL7, -1, 64029, 0, "oMessager", "nextMsg", NULL, 4, { WORKAROUND_FAKE, 0 } }, // when running the game with subtitles only
- { GID_LSL7, -1, 64017, 0, "oFlags", "clear", NULL, 0, { WORKAROUND_FAKE, 0 } }, // demo version, when it starts, and whenever the player chooses to go to the "Strip Liar's Dice" mini game
- { GID_LSL7, -1, 64017, 0, "oActorFlags", "clear", NULL, 0, { WORKAROUND_FAKE, 0 } }, // after an NPC walks off the left side of the screen at the Clothing Optional Pool
- { GID_LSL7, -1, 64892, 0, "oEventHandler", "killAllEventHogs", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when looking at the swordfish in the kitchen
- { GID_MOTHERGOOSE256, -1, 0, 0, "MG", "doit", NULL, 5, { WORKAROUND_FAKE, 0 } }, // SCI1.1: When moving the cursor all the way to the left during the game - bug #5224
- { GID_MOTHERGOOSE256, -1, 992, 0, "AIPath", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Happens in the demo and full version. In the demo, it happens when walking two screens from mother goose's house to the north. In the full version, it happens in rooms 7 and 23 - bug #5269
- { GID_MOTHERGOOSE256, 90, 90, 0, "introScript", "changeState", NULL, 65, { WORKAROUND_FAKE, 0 } }, // SCI1(CD): At the very end, after the game is completed and restarted - bug #5626
- { GID_MOTHERGOOSE256, 94, 94, 0, "sunrise", "changeState", NULL, 367, { WORKAROUND_FAKE, 0 } }, // At the very end, after the game is completed - bug #5294
- { GID_MOTHERGOOSEHIRES,-1,64950, -1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // right when clicking on a child at the start and probably also later
- { GID_MOTHERGOOSEHIRES,-1,64950, -1, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // see above
- { GID_PEPPER, -1, 894, 0, "Package", "doVerb", NULL, 3, { WORKAROUND_FAKE, 0 } }, // using the hand on the book in the inventory - bug #5154
- { GID_PEPPER, 150, 928, 0, "Narrator", "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // happens during the non-interactive demo of Pepper
- { GID_PHANTASMAGORIA, -1, 64921, -1, "Print", "addEdit", NULL, 1, { WORKAROUND_FAKE, 0 } }, // When trying to use the game debugger's flag setting command
- { GID_PHANTASMAGORIA2,-1, 64926, -1, "Thumb", "action", NULL, 1, { WORKAROUND_FAKE, 0 } }, // When dragging one of the volume sliders and releasing the mouse button over the +/- buttons
- { GID_PQ4, -1, 25, 0, "iconToggle", "select", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when toggling the icon bar to auto-hide or not
- { GID_PQ4, 170, 170, -1, "hideAndSeek", "handleEvent", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when clicking to move right while still moving left during the Emo shootout - bug #9847
- { GID_PQ4, 275, 64964, -1, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when Sherry walks out of the morgue on day 3
- { GID_PQ4, 240, 64964, -1, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when encountering Sherry and the reporter outside the morgue at the end of day 3
- { GID_PQ4, 2010, 2010, -1, "enemyShip1", "cantBeHere", NULL, 7, { WORKAROUND_FAKE, 0 } }, // when crashing into a UFO in the asteroids minigame in the Shortstop Bar
- { GID_PQ4, 2010, 2010, -1, "enemyShip2", "cantBeHere", NULL, 7, { WORKAROUND_FAKE, 0 } }, // when crashing into a UFO in the asteroids minigame in the Shortstop Bar
- { GID_PQ4, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // floppy: when walking within room 395 (city hall, day 3)
- { GID_PQSWAT, -1, 64950, 0, NULL, "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Using any menus in-game
- { GID_PQSWAT, -1, 73, 0, "theLashInterface", "transmit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Clicking the transmit button in LASH
- { GID_PQSWAT, 2990, 2990, 0, "talkToSchienbly", "changeState", NULL, 1, { WORKAROUND_FAKE, 0 } }, // When the video of Schienbly talking for the first time ends
- { GID_QFG1, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1_1, 0, { WORKAROUND_FAKE, 0 } }, // qfg1/hq1: going to the brigands hideout
- { GID_QFG1VGA, 16, 16, 0, "lassoFailed", "changeState", NULL, -1, { WORKAROUND_FAKE, 0 } }, // qfg1vga: casting the "fetch" spell in the screen with the flowers, temps 0 and 1 - bug #5309
- { GID_QFG1VGA, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1vga_1, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga: going to the brigands hideout - bug #5515
- { GID_QFG2, -1, 71, 0, "theInvSheet", "doit", NULL, 1, { WORKAROUND_FAKE, 0 } }, // accessing the inventory
- { GID_QFG2, -1, 79, 0, "TryToMoveTo", "onTarget", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when throwing pot at air elemental, happens when client coordinates are the same as airElemental coordinates. happened to me right after room change - bug #6859
- { GID_QFG2, -1, 701, -1, "Alley", "at", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when walking inside the alleys in the town - bug #5019 & #5106
- { GID_QFG2, -1, 990, 0, "Restore", "doit", NULL, 364, { WORKAROUND_FAKE, 0 } }, // when pressing enter in restore dialog w/o any saved games present
- { GID_QFG2, 260, 260, 0, "abdulS", "changeState", sig_uninitread_qfg2_1, -1, { WORKAROUND_FAKE, 0 } }, // During the thief's first mission (in the house), just before Abdul is about to enter the house (where you have to hide in the wardrobe), bug #5153, temps 1 and 2
- { GID_QFG2, 260, 260, 0, "jabbarS", "changeState", sig_uninitread_qfg2_1, -1, { WORKAROUND_FAKE, 0 } }, // During the thief's first mission (in the house), just before Jabbar is about to enter the house (where you have to hide in the wardrobe), bug #5164, temps 1 and 2
- { GID_QFG2, 500, 500, 0, "lightNextCandleS", "changeState", NULL, -1, { WORKAROUND_FAKE, 0 } }, // Inside the last room, while Ad Avis performs the ritual to summon the genie - bug #5566
- { GID_QFG2, -1, 700, 0, NULL, "showSign", NULL, 10, { WORKAROUND_FAKE, 0 } }, // Occurs sometimes when reading a sign in Raseir, Shapeir et al - bugs #5627, #5635
- { GID_QFG3, 510, 510, 0, "awardPrize", "changeState", NULL, 0, { WORKAROUND_FAKE, 1 } }, // Simbani warrior challenge, after throwing the spears and retrieving the ring - bug #5277. Must be non-zero, otherwise the prize is awarded twice - bug #6160
- { GID_QFG3, 140, 140, 0, "rm140", "init", sig_uninitread_qfg3_1, 0, { WORKAROUND_FAKE, 0 } }, // when importing a character and selecting the previous profession - bug #5163
- { GID_QFG3, 330, 330, -1, "Teller", "doChild", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when talking to King Rajah about "Rajah" (bug #5033, temp 1) or "Tarna" (temp 0), or when clicking on yourself and saying "Greet" (bug #5148, temp 1)
- { GID_QFG3, 700, 700, -1, "monsterIsDead", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // in the jungle, after winning any fight, bug #5169
- { GID_QFG3, 470, 470, -1, "rm470", "notify", NULL, 0, { WORKAROUND_FAKE, 0 } }, // closing the character screen in the Simbani village in the room with the bridge, bug #5165
- { GID_QFG3, 470, 470, -1, "<invalid name>", "notify", NULL, 0, { WORKAROUND_FAKE, 0 } }, // same as previous, with rm470::name used for temp storage by fan patches added by GOG
- { GID_QFG3, 490, 490, -1, "computersMove", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when finishing awari game, bug #5167
- { GID_QFG3, 490, 490, -1, "computersMove", "changeState", sig_uninitread_qfg3_2, 4, { WORKAROUND_FAKE, 0 } }, // also when finishing awari game
- { GID_QFG3, 851, 32, -1, "ProjObj", "doit", NULL, 1, { WORKAROUND_FAKE, 0 } }, // near the end, when throwing the spear of death, bug #5282
- { GID_QFG4, -1, 15, -1, "charInitScreen", "dispatchEvent", NULL, 5, { WORKAROUND_FAKE, 0 } }, // floppy version, when viewing the character screen
- { GID_QFG4, -1, 64917, -1, "controlPlane", "setBitmap", NULL, 3, { WORKAROUND_FAKE, 0 } }, // floppy version, when entering the game menu
- { GID_QFG4, -1, 64917, -1, "Plane", "setBitmap", NULL, 3, { WORKAROUND_FAKE, 0 } }, // floppy version, happens sometimes in fight scenes
- { GID_QFG4, 380, 80, -1, "myButton", "select", NULL, 2, { WORKAROUND_FAKE, 1 } }, // CD version, when clicking on a puzzle piece for the keyhole scrambled picture puzzle
- { GID_QFG4, 520, 64950, 0, "fLake2", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // CD version, at the lake, when meeting the Rusalka and attempting to leave
- { GID_QFG4, 780, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // CD version, walking down to the monastery basement
- { GID_QFG4, 800, 64950, 0, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // CD version, in the room with the spider pillar, when climbing on the pillar
- { GID_RAMA, -1, 64950, -1, NULL, "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the main game interface, or the main menu buttons, or mousing over things in the main game window
- { GID_RAMA, -1, 64923, -1, "Inset", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When receiving a message on the pocket computer at the start of the game
- { GID_RAMA, 6107, 6107, -1, NULL, "doVerb", sig_uninitread_rama_2, 0, { WORKAROUND_FAKE, 0 } }, // When pressing keys on the final console in the Avian Lair
- { GID_RAMA, 6110, 6110, -1, "securityKeypad", "newRoom", sig_uninitread_rama_1, 0, { WORKAROUND_FAKE, 0 } }, // When entering the correct key combination on the security console in the Avian Lair
- { GID_SHIVERS, -1, 952, 0, "SoundManager", "stop", NULL, 2, { WORKAROUND_FAKE, 0 } }, // Just after Sierra logo
- { GID_SHIVERS, -1, 64950, 0, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the locked door at the beginning
- { GID_SHIVERS, -1, 64950, 0, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the gargoyle eye at the beginning
- { GID_SHIVERS, 20311, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // Just after door puzzle is solved and the metal balls start to roll
- { GID_SHIVERS, 29260, 29260, 0, "spMars", "handleEvent", NULL, 4, { WORKAROUND_FAKE, 0 } }, // When clicking mars after seeing fortune to align earth etc...
- { GID_SHIVERS, 29260, 29260, 0, "spVenus", "handleEvent", NULL, 4, { WORKAROUND_FAKE, 0 } }, // When clicking venus after seeing fortune to align earth etc...
- { GID_SQ1, 103, 103, 0, "hand", "internalEvent", NULL, -1, { WORKAROUND_FAKE, 0 } }, // Spanish (and maybe early versions?) only: when moving cursor over input pad, temps 1 and 2
- { GID_SQ1, -1, 703, 0, "", "export 1", NULL, 0, { WORKAROUND_FAKE, 0 } }, // sub that's called from several objects while on sarien battle cruiser
- { GID_SQ1, -1, 703, 0, "firePulsar", "changeState", sig_uninitread_sq1_1, 0, { WORKAROUND_FAKE, 0 } }, // export 1, but called locally (when shooting at aliens)
- { GID_SQ4, -1, 398, 0, "showBox", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // CD: called when rummaging in Software Excess bargain bin
- { GID_SQ4, -1, 928, -1, "Narrator", "startText", NULL, 1000, { WORKAROUND_FAKE, 1 } }, // CD: happens in the options dialog and in-game when speech and subtitles are used simultaneously
- { GID_SQ4, 395, 395, -1, "fromStoreScript", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // CD: happens when shoplifting in Galaxy Galleria - bug #10229
- { GID_SQ4, -1, 708, -1, "exitBut", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "close" button in the sq4 hintbook - bug #6447
- { GID_SQ4, -1, 708, -1, "", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "close" button... in Russian version - bug #5573
- { GID_SQ4, -1, 708, -1, "prevBut", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "previous" button in the sq4 hintbook - bug #6447
- { GID_SQ4, -1, 708, -1, "\xA8\xE6\xE3 \xAD\xA0\xA7\xA0\xA4.", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "previous" button... in Russian version - bug #5573
- { GID_SQ4, -1, 708, -1, "nextBut", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "next" button in the sq4 hintbook - bug #6447
- { GID_SQ4, -1, 708, -1, ".", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "next" button... in Russian version - bug #5573
- { GID_SQ5, 201, 201, 0, "buttonPanel", "doVerb", NULL, 0, { WORKAROUND_FAKE, 1 } }, // when looking at the orange or red button - bug #5112
- { GID_SQ6, -1, 0, 0, "SQ6", "init", NULL, 2, { WORKAROUND_FAKE, 0 } }, // Demo and full version: called when the game starts (demo: room 0, full: room 100)
- { GID_SQ6, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // called when pressing "Start game" in the main menu, when entering the Orion's Belt bar (room 300), and perhaps other places
- { GID_SQ6, -1, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // during the game
- { GID_SQ6, 210, 210, 0, "buttonSecret", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // after winning the first round of stooge fighter 3
- { GID_SQ6, -1, 64994, -1, "Game", "restore", NULL, 1, { WORKAROUND_FAKE, 0 } }, // When trying to load an invalid save game from the launcher
- { GID_SQ6, -1, 64921, -1, "Print", "addEdit", NULL, 1, { WORKAROUND_FAKE, 0 } }, // When trying to use the game debugger's flag setting command
- { GID_TORIN, -1, 64017, 0, "oFlags", "clear", NULL, 0, { WORKAROUND_FAKE, 0 } }, // entering Torin's home in the French version
- { GID_TORIN, -1, 64029, 0, "oMessager", "nextMsg", NULL, 3, { WORKAROUND_FAKE, 0 } }, // start of chapter one, or when running with subtitles only
- { GID_TORIN, -1, 64892, 0, "oEventHandler", "killAllEventHogs", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when pressing the hint button when the game is about to transition to a new room (race condition) - Trac#9810
- { GID_TORIN, 20100, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // going down the cliff at the first screen of chapter 2 (washing area)
- { GID_TORIN, 61100, 64888, 0, "Torin", "autorestore", NULL, 11, { WORKAROUND_FAKE, 0 } }, // after attempting to restore a save game saved with the wrong game version
+ { GID_KQ5, 25, 25, 0, "rm025", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // inside witch forest, when going to the room where the walking rock is
+ { GID_KQ5, 55, 55, 0, "helpScript", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when giving the tambourine to the monster in the labyrinth (only happens at one of the locations) - bug #5198
+ { GID_KQ5, -1, 755, 0, "gcWin", "open", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when entering control menu in the FM-Towns version
+ { GID_KQ6, -1, 30, 0, "rats", "changeState", NULL, 0, 5, { WORKAROUND_FAKE, 0 } }, // rats in the catacombs (temps 0-5, all temps!) - bugs #4958, #4998, #5017
+ { GID_KQ6, 210, 210, 0, "rm210", "scriptCheck", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // using inventory in that room - bug #4953
+ { GID_KQ6, 500, 500, 0, "rm500", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // going to island of the beast
+ { GID_KQ6, 520, 520, 0, "rm520", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // going to boiling water trap on beast isle
+ { GID_KQ6, -1, 903, 0, "controlWin", "open", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // when opening the controls window (save, load etc)
+ { GID_KQ6, -1, 907, 0, "tomato", "doVerb", NULL, 2, 2, { WORKAROUND_FAKE, 0 } }, // when looking at the rotten tomato in the inventory - bug #5331
+ { GID_KQ6, -1, 928, 0, NULL, "startText", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // gets caused by Text+Audio support (see script patcher)
+ { GID_KQ7, -1, 64996, 0, "User", "handleEvent", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // called when pushing a keyboard key
+ { GID_KQ7, 2450, 2450, 0, "exBridge", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // called when walking up to the throne in the cave in chapter 2
+ { GID_KQ7, 2450, 2450, 0, "maliciaComes", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when malicia appears at the southeast exit of the main chamber near the end of chapter 2
+ { GID_KQ7, 5300, 5302, 0, "putOnMask", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // in chapter 3, after using the mask on Valanice, click the jackalope hair in inventory - bug Trac#9759
+ { GID_KQ7, 6060, 64964, 0, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // after entering the harp crystal in chapter 5
+ { GID_LAURABOW, 37, 0, 0, "CB1", "doit", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when going up the stairs - bug #5084
+ { GID_LAURABOW, -1, 967, 0, "myIcon", "cycle", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // having any portrait conversation coming up - initial bug #4971
+ { GID_LAURABOW2, -1, 24, 0, "gcWin", "open", NULL, 5, 5, { WORKAROUND_FAKE, 0xf } }, // is used as priority for game menu
+ { GID_LAURABOW2, -1, 21, 0, "dropCluesCode", "doit", NULL, 1, 1, { WORKAROUND_FAKE, 0x7fff } }, // when asking some questions (e.g. the reporter about the burglary, or the policeman about Ziggy). Must be big, as the game scripts perform lt on it and start deleting journal entries - bugs #4979, #5026
+ { GID_LAURABOW2, -1, 90, 1, "MuseumActor", "init", NULL, 6, 6, { WORKAROUND_FAKE, 0 } }, // Random actors in museum - bug #5197
+ { GID_LAURABOW2, 240, 240, 0, "sSteveAnimates", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Steve Dorian's idle animation at the docks - bug #5028
+ { GID_LAURABOW2, -1, 928, 0, NULL, "startText", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // gets caused by Text+Audio support (see script patcher)
+ { GID_LIGHTHOUSE, -1, 17, 0, NULL, "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when operating the joystick in the puzzle to lower the bridge at the entrance to the workshop, or the joystick that moves the robotic arm in the mini-sub
+ { GID_LONGBOW, -1, 0, 0, "Longbow", "restart", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When canceling a restart game - bug #5244
+ { GID_LONGBOW, -1, 213, 0, "clear", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When giving an answer using the druid hand sign code in any room
+ { GID_LONGBOW, -1, 213, 0, "letter", "handleEvent", sig_uninitread_longbow_1, 1, 1, { WORKAROUND_FAKE, 0 } }, // When using the druid hand sign code in any room - bug #5035
+ { GID_LSL1, 250, 250, 0, "increase", "handleEvent", NULL, 2, 2, { WORKAROUND_FAKE, 0 } }, // casino, playing game, increasing bet
+ { GID_LSL1, 720, 720, 0, "rm720", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // age check room
+ { GID_LSL2, 38, 38, 0, "cloudScript", "changeState", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // entering the room in the middle deck of the ship - bug #5034
+ { GID_LSL3, 340, 340, 0, "ComicScript", "changeState", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // right after entering the 3 ethnic groups inside comedy club (temps 200, 201, 202, 203)
+ { GID_LSL3, -1, 997, 0, "TheMenuBar", "handleEvent", NULL, 1, 1, { WORKAROUND_FAKE, 0xf } }, // when setting volume the first time, this temp is used to set volume on entry (normally it would have been initialized to 's')
+ { GID_LSL6, 820, 82, 0, "", "export 0", NULL, 0, 326, { WORKAROUND_FAKE, 0 } }, // when touching the electric fence (temp 193 for English release, temp 293 for French/German, temp 313 for Spanish - used for setting the loop of the death animation), it's not setting it for this death - bug #5103
+ { GID_LSL6, -1, 85, 0, "washcloth", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // washcloth in inventory
+ { GID_LSL6, -1, 928, -1, "Narrator", "startText", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // used by various objects that are even translated in foreign versions, that's why we use the base-class
+ { GID_LSL6HIRES, -1, 85, 0, "LL6Inv", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when creating a new game
+ { GID_LSL6HIRES, -1, 85, 0, "washcloth", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when interacting with the wet washcloth in the inventory - Trac#9811
+ { GID_LSL6HIRES, -1, 64950, 1, "Feature", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // at least when entering swimming pool area
+ { GID_LSL6HIRES, -1, 64964, 0, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // during the game
+ { GID_LSL7, -1, 64029, 0, "oMessager", "nextMsg", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // when running the game with subtitles only
+ { GID_LSL7, -1, 64017, 0, "oFlags", "clear", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // demo version, when it starts, and whenever the player chooses to go to the "Strip Liar's Dice" mini game
+ { GID_LSL7, -1, 64017, 0, "oActorFlags", "clear", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // after an NPC walks off the left side of the screen at the Clothing Optional Pool
+ { GID_LSL7, -1, 64892, 0, "oEventHandler", "killAllEventHogs", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when looking at the swordfish in the kitchen
+ { GID_MOTHERGOOSE256, -1, 0, 0, "MG", "doit", NULL, 5, 5, { WORKAROUND_FAKE, 0 } }, // SCI1.1: When moving the cursor all the way to the left during the game - bug #5224
+ { GID_MOTHERGOOSE256, -1, 992, 0, "AIPath", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Happens in the demo and full version. In the demo, it happens when walking two screens from mother goose's house to the north. In the full version, it happens in rooms 7 and 23 - bug #5269
+ { GID_MOTHERGOOSE256, 90, 90, 0, "introScript", "changeState", NULL, 65, 65, { WORKAROUND_FAKE, 0 } }, // SCI1(CD): At the very end, after the game is completed and restarted - bug #5626
+ { GID_MOTHERGOOSE256, 94, 94, 0, "sunrise", "changeState", NULL, 367, 367, { WORKAROUND_FAKE, 0 } }, // At the very end, after the game is completed - bug #5294
+ { GID_MOTHERGOOSEHIRES,-1,64950, -1, "Feature", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // right when clicking on a child at the start and probably also later
+ { GID_MOTHERGOOSEHIRES,-1,64950, -1, "View", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // see above
+ { GID_PEPPER, -1, 894, 0, "Package", "doVerb", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // using the hand on the book in the inventory - bug #5154
+ { GID_PEPPER, 150, 928, 0, "Narrator", "startText", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // happens during the non-interactive demo of Pepper
+ { GID_PHANTASMAGORIA, -1, 64921, -1, "Print", "addEdit", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When trying to use the game debugger's flag setting command
+ { GID_PHANTASMAGORIA2,-1, 64926, -1, "Thumb", "action", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When dragging one of the volume sliders and releasing the mouse button over the +/- buttons
+ { GID_PQ4, -1, 25, 0, "iconToggle", "select", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when toggling the icon bar to auto-hide or not
+ { GID_PQ4, 170, 170, -1, "hideAndSeek", "handleEvent", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when clicking to move right while still moving left during the Emo shootout - bug #9847
+ { GID_PQ4, 275, 64964, -1, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when Sherry walks out of the morgue on day 3
+ { GID_PQ4, 240, 64964, -1, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when encountering Sherry and the reporter outside the morgue at the end of day 3
+ { GID_PQ4, 2010, 2010, -1, "enemyShip1", "cantBeHere", NULL, 7, 7, { WORKAROUND_FAKE, 0 } }, // when crashing into a UFO in the asteroids minigame in the Shortstop Bar
+ { GID_PQ4, 2010, 2010, -1, "enemyShip2", "cantBeHere", NULL, 7, 7, { WORKAROUND_FAKE, 0 } }, // when crashing into a UFO in the asteroids minigame in the Shortstop Bar
+ { GID_PQ4, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // floppy: when walking within room 395 (city hall, day 3)
+ { GID_PQSWAT, -1, 64950, 0, NULL, "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Using any menus in-game
+ { GID_PQSWAT, -1, 73, 0, "theLashInterface", "transmit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Clicking the transmit button in LASH
+ { GID_PQSWAT, 2990, 2990, 0, "talkToSchienbly", "changeState", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When the video of Schienbly talking for the first time ends
+ { GID_QFG1, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1/hq1: going to the brigands hideout
+ { GID_QFG1VGA, 16, 16, 0, "lassoFailed", "changeState", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // qfg1vga: casting the "fetch" spell in the screen with the flowers, temps 0 and 1 - bug #5309
+ { GID_QFG1VGA, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1vga_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga: going to the brigands hideout - bug #5515
+ { GID_QFG2, -1, 71, 0, "theInvSheet", "doit", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // accessing the inventory
+ { GID_QFG2, -1, 79, 0, "TryToMoveTo", "onTarget", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when throwing pot at air elemental, happens when client coordinates are the same as airElemental coordinates. happened to me right after room change - bug #6859
+ { GID_QFG2, -1, 701, -1, "Alley", "at", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when walking inside the alleys in the town - bug #5019 & #5106
+ { GID_QFG2, -1, 990, 0, "Restore", "doit", NULL, 364, 364, { WORKAROUND_FAKE, 0 } }, // when pressing enter in restore dialog w/o any saved games present
+ { GID_QFG2, 260, 260, 0, "abdulS", "changeState", sig_uninitread_qfg2_1, -1, -1, { WORKAROUND_FAKE, 0 } }, // During the thief's first mission (in the house), just before Abdul is about to enter the house (where you have to hide in the wardrobe), bug #5153, temps 1 and 2
+ { GID_QFG2, 260, 260, 0, "jabbarS", "changeState", sig_uninitread_qfg2_1, -1, -1, { WORKAROUND_FAKE, 0 } }, // During the thief's first mission (in the house), just before Jabbar is about to enter the house (where you have to hide in the wardrobe), bug #5164, temps 1 and 2
+ { GID_QFG2, 500, 500, 0, "lightNextCandleS", "changeState", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // Inside the last room, while Ad Avis performs the ritual to summon the genie - bug #5566
+ { GID_QFG2, -1, 700, 0, NULL, "showSign", NULL, 10, 10, { WORKAROUND_FAKE, 0 } }, // Occurs sometimes when reading a sign in Raseir, Shapeir et al - bugs #5627, #5635
+ { GID_QFG3, 510, 510, 0, "awardPrize", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // Simbani warrior challenge, after throwing the spears and retrieving the ring - bug #5277. Must be non-zero, otherwise the prize is awarded twice - bug #6160
+ { GID_QFG3, 140, 140, 0, "rm140", "init", sig_uninitread_qfg3_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // when importing a character and selecting the previous profession - bug #5163
+ { GID_QFG3, 330, 330, -1, "Teller", "doChild", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // when talking to King Rajah about "Rajah" (bug #5033, temp 1) or "Tarna" (temp 0), or when clicking on yourself and saying "Greet" (bug #5148, temp 1)
+ { GID_QFG3, 700, 700, -1, "monsterIsDead", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // in the jungle, after winning any fight, bug #5169
+ { GID_QFG3, 470, 470, -1, "rm470", "notify", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // closing the character screen in the Simbani village in the room with the bridge, bug #5165
+ { GID_QFG3, 470, 470, -1, "<invalid name>", "notify", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // same as previous, with rm470::name used for temp storage by fan patches added by GOG
+ { GID_QFG3, 490, 490, -1, "computersMove", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when finishing awari game, bug #5167
+ { GID_QFG3, 490, 490, -1, "computersMove", "changeState", sig_uninitread_qfg3_2, 4, 4, { WORKAROUND_FAKE, 0 } }, // also when finishing awari game
+ { GID_QFG3, 851, 32, -1, "ProjObj", "doit", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // near the end, when throwing the spear of death, bug #5282
+ { GID_QFG4, -1, 15, -1, "charInitScreen", "dispatchEvent", NULL, 5, 5, { WORKAROUND_FAKE, 0 } }, // floppy version, when viewing the character screen
+ { GID_QFG4, -1, 64917, -1, "controlPlane", "setBitmap", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // floppy version, when entering the game menu
+ { GID_QFG4, -1, 64917, -1, "Plane", "setBitmap", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // floppy version, happens sometimes in fight scenes
+ { GID_QFG4, 380, 80, -1, "myButton", "select", NULL, 2, 2, { WORKAROUND_FAKE, 1 } }, // CD version, when clicking on a puzzle piece for the keyhole scrambled picture puzzle
+ { GID_QFG4, 520, 64950, 0, "fLake2", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // CD version, at the lake, when meeting the Rusalka and attempting to leave
+ { GID_QFG4, 780, 64964, 0, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // CD version, walking down to the monastery basement
+ { GID_QFG4, 800, 64950, 0, "View", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // CD version, in the room with the spider pillar, when climbing on the pillar
+ { GID_RAMA, -1, 64950, -1, NULL, "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the main game interface, or the main menu buttons, or mousing over things in the main game window
+ { GID_RAMA, -1, 64923, -1, "Inset", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When receiving a message on the pocket computer at the start of the game
+ { GID_RAMA, 6107, 6107, -1, NULL, "doVerb", sig_uninitread_rama_2, 0, 0, { WORKAROUND_FAKE, 0 } }, // When pressing keys on the final console in the Avian Lair
+ { GID_RAMA, 6110, 6110, -1, "securityKeypad", "newRoom", sig_uninitread_rama_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // When entering the correct key combination on the security console in the Avian Lair
+ { GID_SHIVERS, -1, 952, 0, "SoundManager", "stop", NULL, 2, 2, { WORKAROUND_FAKE, 0 } }, // Just after Sierra logo
+ { GID_SHIVERS, -1, 64950, 0, "Feature", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the locked door at the beginning
+ { GID_SHIVERS, -1, 64950, 0, "View", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the gargoyle eye at the beginning
+ { GID_SHIVERS, 20311, 64964, 0, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // Just after door puzzle is solved and the metal balls start to roll
+ { GID_SHIVERS, 29260, 29260, 0, "spMars", "handleEvent", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // When clicking mars after seeing fortune to align earth etc...
+ { GID_SHIVERS, 29260, 29260, 0, "spVenus", "handleEvent", NULL, 4, 4, { WORKAROUND_FAKE, 0 } }, // When clicking venus after seeing fortune to align earth etc...
+ { GID_SQ1, 103, 103, 0, "hand", "internalEvent", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // Spanish (and maybe early versions?) only: when moving cursor over input pad, temps 1 and 2
+ { GID_SQ1, -1, 703, 0, "", "export 1", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // sub that's called from several objects while on sarien battle cruiser
+ { GID_SQ1, -1, 703, 0, "firePulsar", "changeState", sig_uninitread_sq1_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // export 1, but called locally (when shooting at aliens)
+ { GID_SQ4, -1, 398, 0, "showBox", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // CD: called when rummaging in Software Excess bargain bin
+ { GID_SQ4, -1, 928, -1, "Narrator", "startText", NULL, 1000, 1000, { WORKAROUND_FAKE, 1 } }, // CD: happens in the options dialog and in-game when speech and subtitles are used simultaneously
+ { GID_SQ4, 395, 395, -1, "fromStoreScript", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // CD: happens when shoplifting in Galaxy Galleria - bug #10229
+ { GID_SQ4, -1, 708, -1, "exitBut", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "close" button in the sq4 hintbook - bug #6447
+ { GID_SQ4, -1, 708, -1, "", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "close" button... in Russian version - bug #5573
+ { GID_SQ4, -1, 708, -1, "prevBut", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "previous" button in the sq4 hintbook - bug #6447
+ { GID_SQ4, -1, 708, -1, "\xA8\xE6\xE3 \xAD\xA0\xA7\xA0\xA4.", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "previous" button... in Russian version - bug #5573
+ { GID_SQ4, -1, 708, -1, "nextBut", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "next" button in the sq4 hintbook - bug #6447
+ { GID_SQ4, -1, 708, -1, ".", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Floppy: happens, when looking at the "next" button... in Russian version - bug #5573
+ { GID_SQ5, 201, 201, 0, "buttonPanel", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // when looking at the orange or red button - bug #5112
+ { GID_SQ6, -1, 0, 0, "SQ6", "init", NULL, 2, 2, { WORKAROUND_FAKE, 0 } }, // Demo and full version: called when the game starts (demo: room 0, full: room 100)
+ { GID_SQ6, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // called when pressing "Start game" in the main menu, when entering the Orion's Belt bar (room 300), and perhaps other places
+ { GID_SQ6, -1, 64964, 0, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // during the game
+ { GID_SQ6, 210, 210, 0, "buttonSecret", "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // after winning the first round of stooge fighter 3
+ { GID_SQ6, -1, 64994, -1, "Game", "restore", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When trying to load an invalid save game from the launcher
+ { GID_SQ6, -1, 64921, -1, "Print", "addEdit", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When trying to use the game debugger's flag setting command
+ { GID_TORIN, -1, 64017, 0, "oFlags", "clear", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // entering Torin's home in the French version
+ { GID_TORIN, -1, 64029, 0, "oMessager", "nextMsg", NULL, 3, 3, { WORKAROUND_FAKE, 0 } }, // start of chapter one, or when running with subtitles only
+ { GID_TORIN, -1, 64892, 0, "oEventHandler", "killAllEventHogs", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when pressing the hint button when the game is about to transition to a new room (race condition) - Trac#9810
+ { GID_TORIN, 20100, 64964, 0, "DPath", "init", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // going down the cliff at the first screen of chapter 2 (washing area)
+ { GID_TORIN, 61100, 64888, 0, "Torin", "autorestore", NULL, 11, 11, { WORKAROUND_FAKE, 0 } }, // after attempting to restore a save game saved with the wrong game version
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kAbs_workarounds[] = {
- { GID_HOYLE1, 1, 1, 0, "room1", "doit", NULL, 0, { WORKAROUND_FAKE, 0x3e9 } }, // crazy eights - called with objects instead of integers
- { GID_HOYLE1, 2, 2, 0, "room2", "doit", NULL, 0, { WORKAROUND_FAKE, 0x3e9 } }, // old maid - called with objects instead of integers
- { GID_HOYLE1, 3, 3, 0, "room3", "doit", NULL, 0, { WORKAROUND_FAKE, 0x3e9 } }, // hearts - called with objects instead of integers
- { GID_QFG1VGA, -1, -1, 0, NULL, "doit", NULL, 0, { WORKAROUND_FAKE, 0x3e9 } }, // when the game is patched with the NRS patch
- { GID_QFG3 , -1, -1, 0, NULL, "doit", NULL, 0, { WORKAROUND_FAKE, 0x3e9 } }, // when the game is patched with the NRS patch - bugs #6042, #6043
+ { GID_HOYLE1, 1, 1, 0, "room1", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0x3e9 } }, // crazy eights - called with objects instead of integers
+ { GID_HOYLE1, 2, 2, 0, "room2", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0x3e9 } }, // old maid - called with objects instead of integers
+ { GID_HOYLE1, 3, 3, 0, "room3", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0x3e9 } }, // hearts - called with objects instead of integers
+ { GID_QFG1VGA, -1, -1, 0, NULL, "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0x3e9 } }, // when the game is patched with the NRS patch
+ { GID_QFG3 , -1, -1, 0, NULL, "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0x3e9 } }, // when the game is patched with the NRS patch - bugs #6042, #6043
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kArraySetElements_workarounds[] = {
- { GID_GK1, 302, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when erasing a letter on the wall in St Louis Cemetery
- { GID_PHANTASMAGORIA, -1, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when starting a new game and selecting a chapter above 1, or when quitting the chase (in every chase room), or when completing chase successfully
+ { GID_GK1, 302, 64918, 0, "Str", "callKernel", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when erasing a letter on the wall in St Louis Cemetery
+ { GID_PHANTASMAGORIA, -1, 64918, 0, "Str", "callKernel", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when starting a new game and selecting a chapter above 1, or when quitting the chase (in every chase room), or when completing chase successfully
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kArrayFill_workarounds[] = {
- { GID_PQ4, 540, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when clicking on Hate Crimes in the computer on day 2
+ { GID_PQ4, 540, 64918, 0, "Str", "callKernel", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when clicking on Hate Crimes in the computer on day 2
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kCelHigh_workarounds[] = {
- { GID_KQ5, -1, 255, 0, "deathIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when getting beaten up in the inn and probably more, called with 2nd parameter as object - bug #5049
- { GID_PQ2, -1, 255, 0, "DIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when showing picture within windows, called with 2nd/3rd parameters as objects
- { GID_SQ1, 1, 255, 0, "DIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // DEMO: Called with 2nd/3rd parameters as objects when clicking on the menu - bug #5012
- { GID_FANMADE, -1, 979, 0, "DIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // In The Gem Scenario and perhaps other fanmade games, this is called with 2nd/3rd parameters as objects - bug #5144
+ { GID_KQ5, -1, 255, 0, "deathIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when getting beaten up in the inn and probably more, called with 2nd parameter as object - bug #5049
+ { GID_PQ2, -1, 255, 0, "DIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when showing picture within windows, called with 2nd/3rd parameters as objects
+ { GID_SQ1, 1, 255, 0, "DIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // DEMO: Called with 2nd/3rd parameters as objects when clicking on the menu - bug #5012
+ { GID_FANMADE, -1, 979, 0, "DIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // In The Gem Scenario and perhaps other fanmade games, this is called with 2nd/3rd parameters as objects - bug #5144
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kCelWide_workarounds[] = {
- { GID_KQ5, -1, 255, 0, "deathIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when getting beaten up in the inn and probably more, called with 2nd parameter as object - bug #5049
- { GID_PQ2, -1, 255, 0, "DIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when showing picture within windows, called with 2nd/3rd parameters as objects
- { GID_SQ1, 1, 255, 0, "DIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // DEMO: Called with 2nd/3rd parameters as objects when clicking on the menu - bug #5012
- { GID_FANMADE, -1, 979, 0, "DIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // In The Gem Scenario and perhaps other fanmade games, this is called with 2nd/3rd parameters as objects - bug #5144
- { GID_LSL6HIRES, -1, 94, 0, "ll6ControlPanel", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when opening the "controls" panel from the main menu, the third argument is missing
+ { GID_KQ5, -1, 255, 0, "deathIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when getting beaten up in the inn and probably more, called with 2nd parameter as object - bug #5049
+ { GID_PQ2, -1, 255, 0, "DIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when showing picture within windows, called with 2nd/3rd parameters as objects
+ { GID_SQ1, 1, 255, 0, "DIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // DEMO: Called with 2nd/3rd parameters as objects when clicking on the menu - bug #5012
+ { GID_FANMADE, -1, 979, 0, "DIcon", "setSize", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // In The Gem Scenario and perhaps other fanmade games, this is called with 2nd/3rd parameters as objects - bug #5144
+ { GID_LSL6HIRES, -1, 94, 0, "ll6ControlPanel", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when opening the "controls" panel from the main menu, the third argument is missing
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDeleteKey_workarounds[] = {
- { GID_HOYLE4, 300, 999, 0, "handleEventList", "delete", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // restarting hearts, while tray is shown - bug #6604
- { GID_HOYLE4, 500, 999, 0, "handleEventList", "delete", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // restarting cribbage, while tray is shown - bug #6604
- { GID_HOYLE4, 975, 999, 0, "handleEventList", "delete", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // going back to gamelist from hearts/cribbage, while tray is shown - bug #6604
+ { GID_HOYLE4, 300, 999, 0, "handleEventList", "delete", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // restarting hearts, while tray is shown - bug #6604
+ { GID_HOYLE4, 500, 999, 0, "handleEventList", "delete", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // restarting cribbage, while tray is shown - bug #6604
+ { GID_HOYLE4, 975, 999, 0, "handleEventList", "delete", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // going back to gamelist from hearts/cribbage, while tray is shown - bug #6604
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -527,13 +530,13 @@ static const uint16 sig_kDeviceInfo_Fanmade_2[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDeviceInfo_workarounds[] = {
- { GID_FANMADE, -1, 994, 1, "Game", "save", sig_kDeviceInfo_Fanmade_1, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 01 variant
- { GID_FANMADE, -1, 994, 1, "Game", "save", sig_kDeviceInfo_Fanmade_2, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 0001 variant
- { GID_FANMADE, -1, 994, 0, "Black", "save", sig_kDeviceInfo_Fanmade_1, 0, { WORKAROUND_IGNORE, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice (Black Cauldron Remake)
- { GID_FANMADE, -1, 994, 1, "Game", "restore", sig_kDeviceInfo_Fanmade_1, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 01 variant
- { GID_FANMADE, -1, 994, 1, "Game", "restore", sig_kDeviceInfo_Fanmade_2, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 0001 variant
+ { GID_FANMADE, -1, 994, 1, "Game", "save", sig_kDeviceInfo_Fanmade_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 01 variant
+ { GID_FANMADE, -1, 994, 1, "Game", "save", sig_kDeviceInfo_Fanmade_2, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 0001 variant
+ { GID_FANMADE, -1, 994, 0, "Black", "save", sig_kDeviceInfo_Fanmade_1, 0, 0, { WORKAROUND_IGNORE, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice (Black Cauldron Remake)
+ { GID_FANMADE, -1, 994, 1, "Game", "restore", sig_kDeviceInfo_Fanmade_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 01 variant
+ { GID_FANMADE, -1, 994, 1, "Game", "restore", sig_kDeviceInfo_Fanmade_2, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // In fanmade games (SCI Studio), this is called with one parameter for CurDevice LDI 0001 variant
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -568,110 +571,110 @@ static const uint16 sig_kDisplay_sq4_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDisplay_workarounds[] = {
- { GID_ISLANDBRAIN, 300, 300, 0, "geneDude", "show", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the gene explanation chart - a parameter is an object
- { GID_LONGBOW, 95, 95, 0, "countDown", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during title screen "Robin Hood! Your bow is needed"
- { GID_LONGBOW, 220, 220, 0, "moveOn", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during second room "Outwit and outfight..."
- { GID_LONGBOW, 210, 210, 0, "mama", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during third room "Fall under the spell..."
- { GID_LONGBOW, 320, 320, 0, "flyin", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during fourth room "Conspiracies, love..."
- { GID_PQ2, 23, 23, 0, "rm23Script", "elements", sig_kDisplay_pq2_1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of files in jail - 0x75 as id - bug #5223
- { GID_PQ2, 23, 23, 0, "rm23Script", "handleEvent", sig_kDisplay_pq2_1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of file in jail - 0x75 as id - bug #9670
- { GID_QFG1, 11, 11, 0, "battle", "init", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id
- { GID_SQ4, 397, 0, 0, "", "export 12", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // FLOPPY: when going into the computer store - bug #5227
- { GID_SQ4, 391, 391, 0, "doCatalog", "changeState", sig_kDisplay_sq4_1, 0, { WORKAROUND_IGNORE, 0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object
- { GID_SQ4, 391, 391, 0, "choosePlug", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // CD: ordering connector in roboter sale - a parameter is an object
+ { GID_ISLANDBRAIN, 300, 300, 0, "geneDude", "show", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the gene explanation chart - a parameter is an object
+ { GID_LONGBOW, 95, 95, 0, "countDown", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during title screen "Robin Hood! Your bow is needed"
+ { GID_LONGBOW, 220, 220, 0, "moveOn", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during second room "Outwit and outfight..."
+ { GID_LONGBOW, 210, 210, 0, "mama", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during third room "Fall under the spell..."
+ { GID_LONGBOW, 320, 320, 0, "flyin", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during fourth room "Conspiracies, love..."
+ { GID_PQ2, 23, 23, 0, "rm23Script", "elements", sig_kDisplay_pq2_1, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of files in jail - 0x75 as id - bug #5223
+ { GID_PQ2, 23, 23, 0, "rm23Script", "handleEvent", sig_kDisplay_pq2_1, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of file in jail - 0x75 as id - bug #9670
+ { GID_QFG1, 11, 11, 0, "battle", "init", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id
+ { GID_SQ4, 397, 0, 0, "", "export 12", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // FLOPPY: when going into the computer store - bug #5227
+ { GID_SQ4, 391, 391, 0, "doCatalog", "changeState", sig_kDisplay_sq4_1, 0, 0, { WORKAROUND_IGNORE, 0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object
+ { GID_SQ4, 391, 391, 0, "choosePlug", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // CD: ordering connector in roboter sale - a parameter is an object
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDirLoop_workarounds[] = {
- { GID_KQ4, 4, 992, 0, "Avoid", "doit", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when the ogre catches you in front of his house, second parameter points to the same object as the first parameter, instead of being an integer (the angle) - bug #5217
+ { GID_KQ4, 4, 992, 0, "Avoid", "doit", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when the ogre catches you in front of his house, second parameter points to the same object as the first parameter, instead of being an integer (the angle) - bug #5217
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDisposeScript_workarounds[] = {
- { GID_LAURABOW, 777, 777, 0, "myStab", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: after the will is signed, parameter 0 is an object - bug #4967
- { GID_LSL2, -1, 54, 0, "rm54", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // Amiga: room 55, script tries to kDisposeScript an object (does not happen for DOS) - bug #6818
- { GID_MOTHERGOOSEHIRES,37, 337, 0, "rhymeScript", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // after the rhyme with the king
- { GID_QFG1, -1, 64, 0, "rm64", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving graveyard, parameter 0 is an object
- { GID_SQ4, -1, 151, 0, "fightScript", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // during fight with Vohaul, parameter 0 is an object, happens in at least room 150
- { GID_SQ4, -1, 152, 0, "driveCloseUp", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when choosing "beam download", parameter 0 is an object, may happen in room 150 and 900 (900 see bug #9812)
- { GID_SQ4, 150, 152, 0, "", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when choosing "beam download"... in Russian version - bug #5573
- { GID_SQ4, 900, 152, 0, "", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // same as above, but for "game over" room
+ { GID_LAURABOW, 777, 777, 0, "myStab", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: after the will is signed, parameter 0 is an object - bug #4967
+ { GID_LSL2, -1, 54, 0, "rm54", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // Amiga: room 55, script tries to kDisposeScript an object (does not happen for DOS) - bug #6818
+ { GID_MOTHERGOOSEHIRES,37, 337, 0, "rhymeScript", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // after the rhyme with the king
+ { GID_QFG1, -1, 64, 0, "rm64", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving graveyard, parameter 0 is an object
+ { GID_SQ4, -1, 151, 0, "fightScript", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // during fight with Vohaul, parameter 0 is an object, happens in at least room 150
+ { GID_SQ4, -1, 152, 0, "driveCloseUp", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when choosing "beam download", parameter 0 is an object, may happen in room 150 and 900 (900 see bug #9812)
+ { GID_SQ4, 150, 152, 0, "", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when choosing "beam download"... in Russian version - bug #5573
+ { GID_SQ4, 900, 152, 0, "", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // same as above, but for "game over" room
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDoAudioResume_workarounds[] = {
- { GID_HOYLE5, -1, 17, 0, NULL, "startAudio", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when a character talks during a game
+ { GID_HOYLE5, -1, 17, 0, NULL, "startAudio", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when a character talks during a game
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDoSoundPlay_workarounds[] = {
- { GID_LSL6HIRES, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
- { GID_QFG4, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
- { GID_PQ4, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
- { GID_KQ7, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
- { GID_SQ6, -1, 0, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Demo passes an extra null argument on startup
- { GID_GK1, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Mac version always passes an extra null argument
- { GID_GK2, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Demo passes an extra null argument when clicking on buttons
+ { GID_LSL6HIRES, -1, 64989, 0, NULL, "play", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
+ { GID_QFG4, -1, 64989, 0, NULL, "play", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
+ { GID_PQ4, -1, 64989, 0, NULL, "play", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
+ { GID_KQ7, -1, 64989, 0, NULL, "play", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
+ { GID_SQ6, -1, 0, 0, NULL, "play", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Demo passes an extra null argument on startup
+ { GID_GK1, -1, 64989, 0, NULL, "play", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Mac version always passes an extra null argument
+ { GID_GK2, -1, 64989, 0, NULL, "play", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Demo passes an extra null argument when clicking on buttons
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kDoSoundFade_workarounds[] = {
- { GID_KQ5, 213, 989, 0, "globalSound3", "fade", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when bandits leave the secret temple, parameter 4 is an object - bug #5078
- { GID_KQ6, 105, 989, 0, "globalSound", "fade", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // floppy: during intro, parameter 4 is an object
- { GID_KQ6, 460, 989, 0, "globalSound2", "fade", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // after pulling the black widow's web on the isle of wonder, parameter 4 is an object - bug #4954
- { GID_QFG4, -1, 64989, 0, "longSong", "fade", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // CD version: many places, parameter 4 is an object (longSong)
- { GID_SQ5, 800, 989, 0, "sq5Music1", "fade", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when cutting the wrong part of Goliath with the laser - bug #6341
+ { GID_KQ5, 213, 989, 0, "globalSound3", "fade", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when bandits leave the secret temple, parameter 4 is an object - bug #5078
+ { GID_KQ6, 105, 989, 0, "globalSound", "fade", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // floppy: during intro, parameter 4 is an object
+ { GID_KQ6, 460, 989, 0, "globalSound2", "fade", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // after pulling the black widow's web on the isle of wonder, parameter 4 is an object - bug #4954
+ { GID_QFG4, -1, 64989, 0, "longSong", "fade", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // CD version: many places, parameter 4 is an object (longSong)
+ { GID_SQ5, 800, 989, 0, "sq5Music1", "fade", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when cutting the wrong part of Goliath with the laser - bug #6341
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGetAngle_workarounds[] = {
- { GID_FANMADE, 516, 992, 0, "Motion", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // The Legend of the Lost Jewel Demo (fan made): called with third/fourth parameters as objects
- { GID_KQ6, -1, 752, 0, "throwDazzle", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // room 740/790 after the Genie is exposed in the Palace (short and long ending), it starts shooting lightning bolts around. An extra 5th parameter is passed - bug #4959 & #5203
- { GID_SQ1, -1, 927, 0, "PAvoider", "doit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // all rooms in Ulence Flats after getting the Pilot Droid: called with a single parameter when the droid is in Roger's path - bug #6016
+ { GID_FANMADE, 516, 992, 0, "Motion", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // The Legend of the Lost Jewel Demo (fan made): called with third/fourth parameters as objects
+ { GID_KQ6, -1, 752, 0, "throwDazzle", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // room 740/790 after the Genie is exposed in the Palace (short and long ending), it starts shooting lightning bolts around. An extra 5th parameter is passed - bug #4959 & #5203
+ { GID_SQ1, -1, 927, 0, "PAvoider", "doit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // all rooms in Ulence Flats after getting the Pilot Droid: called with a single parameter when the droid is in Roger's path - bug #6016
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kFileIOOpen_workarounds[] = {
- { GID_TORIN, 61000, 61000, 0, "roSierraLogo", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo
- { GID_TORIN, 61100, 61100, 0, "roPickAChapter", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo in the demo
+ { GID_TORIN, 61000, 61000, 0, "roSierraLogo", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo
+ { GID_TORIN, 61100, 61100, 0, "roPickAChapter", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo in the demo
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kFindKey_workarounds[] = {
- { GID_ECOQUEST2, 100, 999, 0, "myList", "contains", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When Noah Greene gives Adam the Ecorder, and just before the game gives a demonstration, a null reference to a list is passed - bug #4987
- { GID_HOYLE4, 300, 999, 0, "Piles", "contains", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When passing the three cards in Hearts, a null reference to a list is passed - bug #5664
+ { GID_ECOQUEST2, 100, 999, 0, "myList", "contains", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When Noah Greene gives Adam the Ecorder, and just before the game gives a demonstration, a null reference to a list is passed - bug #4987
+ { GID_HOYLE4, 300, 999, 0, "Piles", "contains", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When passing the three cards in Hearts, a null reference to a list is passed - bug #5664
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kFrameOut_workarounds[] = {
- { GID_PQ4, 360, 360, 0, "csFrontInset", "init", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When clicking hand on the impounded white car on day 4 - bug #9848
- { GID_PQ4, 360, 360, 0, "csFrontInset", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When clicking hand on the impounded white car on day 4
- { GID_PQ4, 360, 360, 0, "copCarInset", "init", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When clicking hand on the impounded police car on day 3
- { GID_PQ4, 360, 360, 0, "copCarInset", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the impounded police car on day 3
- { GID_PQ4, 275, 275, 0, "checkSherry", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When encountering Sherry and Sam in the morgue on day 3
- { GID_PQ4, 725, 725, 0, "fridgeInset", "init", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When opening the refrigerator at the end of day 4
- { GID_PQ4, 725, 725, 0, "fridgeInset", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the refrigerator at the end of day 4
- { GID_PQ4, 735, 735, 0, "medInset", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the medicine cabinet at the end of day 4
+ { GID_PQ4, 360, 360, 0, "csFrontInset", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When clicking hand on the impounded white car on day 4 - bug #9848
+ { GID_PQ4, 360, 360, 0, "csFrontInset", "dispose", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When clicking hand on the impounded white car on day 4
+ { GID_PQ4, 360, 360, 0, "copCarInset", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When clicking hand on the impounded police car on day 3
+ { GID_PQ4, 360, 360, 0, "copCarInset", "dispose", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the impounded police car on day 3
+ { GID_PQ4, 275, 275, 0, "checkSherry", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When encountering Sherry and Sam in the morgue on day 3
+ { GID_PQ4, 725, 725, 0, "fridgeInset", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When opening the refrigerator at the end of day 4
+ { GID_PQ4, 725, 725, 0, "fridgeInset", "dispose", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the refrigerator at the end of day 4
+ { GID_PQ4, 735, 735, 0, "medInset", "dispose", NULL, 0, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the medicine cabinet at the end of day 4
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGraphDrawLine_workarounds[] = {
- { GID_ISLANDBRAIN, 300, 300, 0, "dudeViewer", "show", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when looking at the gene explanation chart, gets called with 1 extra parameter
- { GID_SQ1, 43, 43, 0, "someoneDied", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when ordering beer, gets called with 1 extra parameter
- { GID_SQ1, 71, 71, 0, "destroyXenon", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // during the Xenon destruction cutscene (which results in death), gets called with 1 extra parameter - bug #5176
- { GID_SQ1, 53, 53, 0, "blastEgo", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when Roger is found and zapped by the cleaning robot, gets called with 1 extra parameter - bug #5177
+ { GID_ISLANDBRAIN, 300, 300, 0, "dudeViewer", "show", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when looking at the gene explanation chart, gets called with 1 extra parameter
+ { GID_SQ1, 43, 43, 0, "someoneDied", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when ordering beer, gets called with 1 extra parameter
+ { GID_SQ1, 71, 71, 0, "destroyXenon", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // during the Xenon destruction cutscene (which results in death), gets called with 1 extra parameter - bug #5176
+ { GID_SQ1, 53, 53, 0, "blastEgo", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when Roger is found and zapped by the cleaning robot, gets called with 1 extra parameter - bug #5177
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -687,32 +690,32 @@ static const uint16 sig_kGraphSaveBox_ibrain_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGraphSaveBox_workarounds[] = {
- { GID_CASTLEBRAIN, 420, 427, 0, "alienIcon", "select", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when selecting a card during the alien card game, gets called with 1 extra parameter
- { GID_ISLANDBRAIN, 290, 291, 0, "upElevator", "changeState", sig_kGraphSaveBox_ibrain_1, 0, { WORKAROUND_STILLCALL, 0 } }, // when testing in the elevator puzzle, gets called with 1 argument less - 15 is on stack - bug #4943
- { GID_ISLANDBRAIN, 290, 291, 0, "downElevator", "changeState", sig_kGraphSaveBox_ibrain_1, 0, { WORKAROUND_STILLCALL, 0 } }, // see above
- { GID_ISLANDBRAIN, 290, 291, 0, "correctElevator", "changeState", sig_kGraphSaveBox_ibrain_1, 0, { WORKAROUND_STILLCALL, 0 } }, // see above (when testing the correct solution)
- { GID_PQ3, 202, 202, 0, "MapEdit", "movePt", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #5099
+ { GID_CASTLEBRAIN, 420, 427, 0, "alienIcon", "select", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when selecting a card during the alien card game, gets called with 1 extra parameter
+ { GID_ISLANDBRAIN, 290, 291, 0, "upElevator", "changeState", sig_kGraphSaveBox_ibrain_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when testing in the elevator puzzle, gets called with 1 argument less - 15 is on stack - bug #4943
+ { GID_ISLANDBRAIN, 290, 291, 0, "downElevator", "changeState", sig_kGraphSaveBox_ibrain_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // see above
+ { GID_ISLANDBRAIN, 290, 291, 0, "correctElevator", "changeState", sig_kGraphSaveBox_ibrain_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // see above (when testing the correct solution)
+ { GID_PQ3, 202, 202, 0, "MapEdit", "movePt", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #5099
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGraphRestoreBox_workarounds[] = {
- { GID_LSL6, -1, 86, 0, "LL6Inv", "hide", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // happens during the game, gets called with 1 extra parameter
+ { GID_LSL6, -1, 86, 0, "LL6Inv", "hide", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // happens during the game, gets called with 1 extra parameter
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGraphFillBoxForeground_workarounds[] = {
- { GID_LSL6, -1, 0, 0, "LSL6", "hideControls", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // happens when giving the bungee key to merrily (room 240) and at least in room 650 too - gets called with additional 5th parameter
+ { GID_LSL6, -1, 0, 0, "LSL6", "hideControls", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // happens when giving the bungee key to merrily (room 240) and at least in room 650 too - gets called with additional 5th parameter
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGraphFillBoxAny_workarounds[] = {
- { GID_ECOQUEST2, 100, 333, 0, "showEcorder", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // necessary workaround for our ecorder script patch, because there isn't enough space to patch the function
- { GID_SQ4, -1, 818, 0, "iconTextSwitch", "show", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // CD: game menu "text/speech" display - parameter 5 is missing, but the right color number is on the stack
+ { GID_ECOQUEST2, 100, 333, 0, "showEcorder", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // necessary workaround for our ecorder script patch, because there isn't enough space to patch the function
+ { GID_SQ4, -1, 818, 0, "iconTextSwitch", "show", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // CD: game menu "text/speech" display - parameter 5 is missing, but the right color number is on the stack
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -728,111 +731,111 @@ static const uint16 sig_kGraphRedrawBox_sq4_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGraphRedrawBox_workarounds[] = {
- { GID_SQ4, 405, 405, 0, "swimAfterEgo", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
- { GID_SQ4, 405, 405, 0, "", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573
- { GID_SQ4, 406, 406, 0, "egoFollowed", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // FLOPPY: when getting shot by the police - accidental additional parameter specified
- { GID_SQ4, -1, 406, 0, "swimAndShoot", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
- { GID_SQ4, -1, 406, 0, "", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573 (is for both egoFollowed and swimAndShoot)
- { GID_SQ4, 410, 410, 0, "swimAfterEgo", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
- { GID_SQ4, 410, 410, 0, "", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573
- { GID_SQ4, 411, 411, 0, "swimAndShoot", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
- { GID_SQ4, 411, 411, 0, "", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573
- { GID_SQ4, 150, 150, 0, "laserScript", "changeState", sig_kGraphRedrawBox_sq4_1, 0, { WORKAROUND_STILLCALL, 0 } }, // when visiting the pedestral where Roger Jr. is trapped, before trashing the brain icon in the programming chapter, accidental additional parameter specified - bug #5479, German - bug #5527
- { GID_SQ4, 150, 150, 0, "", "changeState", sig_kGraphRedrawBox_sq4_1, 0, { WORKAROUND_STILLCALL, 0 } }, // same as above, for the Russian version - bug #5573
- { GID_SQ4, -1, 704, 0, "shootEgo", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // When shot by Droid in Super Computer Maze (Rooms 500, 505, 510...) - accidental additional parameter specified
- { GID_KQ5, -1, 981, 0, "myWindow", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when closing any dialog box, accidental additional parameter specified - bug #5031
- { GID_KQ5, -1, 995, 0, "invW", "doit", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when closing the inventory window, accidental additional parameter specified
- { GID_KQ5, -1, 995, 0, "", "export 0", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when opening the gem pouch, accidental additional parameter specified - bug #5138
- { GID_KQ5, -1, 403, 0, "KQ5Window", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the FM Towns version when closing any dialog box, accidental additional parameter specified
+ { GID_SQ4, 405, 405, 0, "swimAfterEgo", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
+ { GID_SQ4, 405, 405, 0, "", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573
+ { GID_SQ4, 406, 406, 0, "egoFollowed", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // FLOPPY: when getting shot by the police - accidental additional parameter specified
+ { GID_SQ4, -1, 406, 0, "swimAndShoot", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
+ { GID_SQ4, -1, 406, 0, "", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573 (is for both egoFollowed and swimAndShoot)
+ { GID_SQ4, 410, 410, 0, "swimAfterEgo", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
+ { GID_SQ4, 410, 410, 0, "", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573
+ { GID_SQ4, 411, 411, 0, "swimAndShoot", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
+ { GID_SQ4, 411, 411, 0, "", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573
+ { GID_SQ4, 150, 150, 0, "laserScript", "changeState", sig_kGraphRedrawBox_sq4_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when visiting the pedestral where Roger Jr. is trapped, before trashing the brain icon in the programming chapter, accidental additional parameter specified - bug #5479, German - bug #5527
+ { GID_SQ4, 150, 150, 0, "", "changeState", sig_kGraphRedrawBox_sq4_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // same as above, for the Russian version - bug #5573
+ { GID_SQ4, -1, 704, 0, "shootEgo", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // When shot by Droid in Super Computer Maze (Rooms 500, 505, 510...) - accidental additional parameter specified
+ { GID_KQ5, -1, 981, 0, "myWindow", "dispose", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when closing any dialog box, accidental additional parameter specified - bug #5031
+ { GID_KQ5, -1, 995, 0, "invW", "doit", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when closing the inventory window, accidental additional parameter specified
+ { GID_KQ5, -1, 995, 0, "", "export 0", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when opening the gem pouch, accidental additional parameter specified - bug #5138
+ { GID_KQ5, -1, 403, 0, "KQ5Window", "dispose", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the FM Towns version when closing any dialog box, accidental additional parameter specified
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kGraphUpdateBox_workarounds[] = {
- { GID_ECOQUEST2, 100, 333, 0, "showEcorder", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // necessary workaround for our ecorder script patch, because there isn't enough space to patch the function
- { GID_PQ3, 202, 202, 0, "MapEdit", "addPt", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #5099
- { GID_PQ3, 202, 202, 0, "MapEdit", "movePt", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #5099
- { GID_PQ3, 202, 202, 0, "MapEdit", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters
+ { GID_ECOQUEST2, 100, 333, 0, "showEcorder", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // necessary workaround for our ecorder script patch, because there isn't enough space to patch the function
+ { GID_PQ3, 202, 202, 0, "MapEdit", "addPt", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #5099
+ { GID_PQ3, 202, 202, 0, "MapEdit", "movePt", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #5099
+ { GID_PQ3, 202, 202, 0, "MapEdit", "dispose", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kIsObject_workarounds[] = {
- { GID_GK1DEMO, 50, 999, 0, "List", "eachElementDo", NULL, 0, { WORKAROUND_FAKE, 0 } }, // GK1 demo, when asking Grace for messages it gets called with an invalid parameter (type "error") - bug #4950
- { GID_ISLANDBRAIN, -1, 999, 0, "List", "eachElementDo", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when going to the game options, choosing "Info" and selecting anything from the list, gets called with an invalid parameter (type "error") - bug #4989
- { GID_QFG3, -1, 999, 0, "List", "eachElementDo", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when asking for something, gets called with type error parameter
+ { GID_GK1DEMO, 50, 999, 0, "List", "eachElementDo", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // GK1 demo, when asking Grace for messages it gets called with an invalid parameter (type "error") - bug #4950
+ { GID_ISLANDBRAIN, -1, 999, 0, "List", "eachElementDo", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when going to the game options, choosing "Info" and selecting anything from the list, gets called with an invalid parameter (type "error") - bug #4989
+ { GID_QFG3, -1, 999, 0, "List", "eachElementDo", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when asking for something, gets called with type error parameter
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kListAt_workarounds[] = {
- { GID_HOYLE5, 100, 64999, 0, "theHands", "at", NULL, 0, { WORKAROUND_FAKE, 0 } }, // After the first hand is dealt in Crazy Eights game in demo, an object is passed instead of a number
- { GID_LIGHTHOUSE, 24, 64999, 0, "LightInv", "at", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When taking the car keys from the table at the start of the game
+ { GID_HOYLE5, 100, 64999, 0, "theHands", "at", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // After the first hand is dealt in Crazy Eights game in demo, an object is passed instead of a number
+ { GID_LIGHTHOUSE, 24, 64999, 0, "LightInv", "at", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When taking the car keys from the table at the start of the game
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kMemory_workarounds[] = {
- { GID_LAURABOW2, -1, 999, 0, "", "export 6", NULL, 0, { WORKAROUND_FAKE, 0 } }, // during the intro, when exiting the train (room 160), talking to Mr. Augustini, etc. - bug #4944
- { GID_SQ1, -1, 999, 0, "", "export 6", NULL, 0, { WORKAROUND_FAKE, 0 } }, // during walking Roger around Ulence Flats - bug #6017
+ { GID_LAURABOW2, -1, 999, 0, "", "export 6", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // during the intro, when exiting the train (room 160), talking to Mr. Augustini, etc. - bug #4944
+ { GID_SQ1, -1, 999, 0, "", "export 6", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // during walking Roger around Ulence Flats - bug #6017
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kMoveCursor_workarounds[] = {
- { GID_KQ5, -1, 937, 0, "IconBar", "handleEvent", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when pressing escape to open the menu, gets called with one parameter instead of 2 - bug #5575
+ { GID_KQ5, -1, 937, 0, "IconBar", "handleEvent", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when pressing escape to open the menu, gets called with one parameter instead of 2 - bug #5575
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kNewWindow_workarounds[] = {
- { GID_ECOQUEST, -1, 981, 0, "SysWindow", "open", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // EcoQuest 1 demo uses an in-between interpreter from SCI1 to SCI1.1. It's SCI1.1, but uses the SCI1 semantics for this call - bug #4976
+ { GID_ECOQUEST, -1, 981, 0, "SysWindow", "open", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // EcoQuest 1 demo uses an in-between interpreter from SCI1 to SCI1.1. It's SCI1.1, but uses the SCI1 semantics for this call - bug #4976
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kPalVarySetVary_workarounds[] = {
- { GID_KQ7, 4600, 4600, 0, "sRosDogDeath2", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when dying by letting the dog find you under the house. Trac#9763
+ { GID_KQ7, 4600, 4600, 0, "sRosDogDeath2", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when dying by letting the dog find you under the house. Trac#9763
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kPalVarySetPercent_workarounds[] = {
- { GID_GK1, 370, 370, 0, "graceComeOut", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // there's an extra parameter in GK1, when changing chapters. This extra parameter seems to be a bug or just unimplemented functionality, as there's no visible change from the original in the chapter change room
+ { GID_GK1, 370, 370, 0, "graceComeOut", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // there's an extra parameter in GK1, when changing chapters. This extra parameter seems to be a bug or just unimplemented functionality, as there's no visible change from the original in the chapter change room
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kPalVarySetStart_workarounds[] = {
- { GID_PQ4, 170, 170, 0, "getHit", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Three extra parameters passed during the gunfight at the end of day 1
+ { GID_PQ4, 170, 170, 0, "getHit", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Three extra parameters passed during the gunfight at the end of day 1
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kPalVaryMergeStart_workarounds[] = {
- { GID_PQ4, 170, 170, 0, "getHit", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Three extra parameters passed during the gunfight at the end of day 1
+ { GID_PQ4, 170, 170, 0, "getHit", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Three extra parameters passed during the gunfight at the end of day 1
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kPlatform32_workarounds[] = {
- { GID_HOYLE5, -1, 0, 0, "hoyle4", "newRoom", NULL, 0, { WORKAROUND_FAKE, 1 } }, // at the start of the game, incorrectly uses SCI16 calling convention for kPlatform
+ { GID_HOYLE5, -1, 0, 0, "hoyle4", "newRoom", NULL, 0, 0, { WORKAROUND_FAKE, 1 } }, // at the start of the game, incorrectly uses SCI16 calling convention for kPlatform
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kRandom_workarounds[] = {
- { GID_TORIN, 51400, 64928, 0, "Blink", "init", NULL, -1, { WORKAROUND_FAKE, 0 } }, // at the end of the game, during the cutscene after touching the collar on Lycentia; Trac#9779
- { GID_TORIN, 51400, 64928, 0, "Blink", "cycleDone", NULL, -1, { WORKAROUND_FAKE, 0 } }, // at the end of the game, during the cutscene after touching the collar on Lycentia; Trac#9779
+ { GID_TORIN, 51400, 64928, 0, "Blink", "init", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // at the end of the game, during the cutscene after touching the collar on Lycentia; Trac#9779
+ { GID_TORIN, 51400, 64928, 0, "Blink", "cycleDone", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // at the end of the game, during the cutscene after touching the collar on Lycentia; Trac#9779
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kReadNumber_workarounds[] = {
- { GID_CNICK_LAURABOW,100, 101, 0, "dominoes.opt", "doit", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // When dominoes.opt is present, the game scripts call kReadNumber with an extra integer parameter - bug #6425
- { GID_HOYLE3, 100, 101, 0, "dominoes.opt", "doit", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // When dominoes.opt is present, the game scripts call kReadNumber with an extra integer parameter - bug #6425
+ { GID_CNICK_LAURABOW,100, 101, 0, "dominoes.opt", "doit", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // When dominoes.opt is present, the game scripts call kReadNumber with an extra integer parameter - bug #6425
+ { GID_HOYLE3, 100, 101, 0, "dominoes.opt", "doit", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // When dominoes.opt is present, the game scripts call kReadNumber with an extra integer parameter - bug #6425
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -848,29 +851,29 @@ static const uint16 sig_kResCheck_lsl6hires_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kResCheck_workarounds[] = {
- { GID_LSL6HIRES, 740, 740, -1, "myCreditText", "handleEvent", sig_kResCheck_lsl6hires_1, -1, { WORKAROUND_IGNORE, 0 } }, // when clicking quit during the final credits
+ { GID_LSL6HIRES, 740, 740, -1, "myCreditText", "handleEvent", sig_kResCheck_lsl6hires_1, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when clicking quit during the final credits
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[] = {
- { GID_QFG4DEMO, 100, 100, 0, "doMovie", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // after the Sierra logo, no flags are passed, thus the call is meaningless - bug #4947
+ { GID_QFG4DEMO, 100, 100, 0, "doMovie", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // after the Sierra logo, no flags are passed, thus the call is meaningless - bug #4947
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kSetCursor_workarounds[] = {
- { GID_KQ5, -1, 768, 0, "KQCursor", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // CD: gets called with 4 additional "900d" parameters
- { GID_MOTHERGOOSEHIRES,-1, 0, -1, "MG", "setCursor", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // At the start of the game, an object is passed as the cel number
+ { GID_KQ5, -1, 768, 0, "KQCursor", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // CD: gets called with 4 additional "900d" parameters
+ { GID_MOTHERGOOSEHIRES,-1, 0, -1, "MG", "setCursor", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // At the start of the game, an object is passed as the cel number
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kSetPort_workarounds[] = {
- { GID_LSL6, 740, 740, 0, "rm740", "drawPic", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // ending scene, is called with additional 3 (!) parameters
- { GID_QFG3, 830, 830, 0, "portalOpens", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when the portal appears during the end, gets called with 4 parameters - bug #5174
+ { GID_LSL6, 740, 740, 0, "rm740", "drawPic", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // ending scene, is called with additional 3 (!) parameters
+ { GID_QFG3, 830, 830, 0, "portalOpens", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when the portal appears during the end, gets called with 4 parameters - bug #5174
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -886,16 +889,16 @@ static const uint16 sig_kStrAt_ibrain_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kStrAt_workarounds[] = {
- { GID_CASTLEBRAIN, 220, 220, 0, "robotJokes", "animateOnce", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when trying to view the terminal at the end of the maze without having collected any robot jokes - bug #5127
- { GID_ISLANDBRAIN, 300, 310, 0, "childBreed", "changeState", sig_kStrAt_ibrain_1, 0, { WORKAROUND_FAKE, 0 } }, // when clicking Breed to get the second-generation cyborg hybrid (Standard difficulty), the two parameters are swapped - bug #5088
+ { GID_CASTLEBRAIN, 220, 220, 0, "robotJokes", "animateOnce", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when trying to view the terminal at the end of the maze without having collected any robot jokes - bug #5127
+ { GID_ISLANDBRAIN, 300, 310, 0, "childBreed", "changeState", sig_kStrAt_ibrain_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // when clicking Breed to get the second-generation cyborg hybrid (Standard difficulty), the two parameters are swapped - bug #5088
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kStrCpy_workarounds[] = {
- { GID_MOTHERGOOSE, 23, 23, 0, "talkScript", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when talking to the girl in scene 23, there's no destination parameter (script bug - wrong instruction order). The original source is used directly afterwards in kDisplay, to show the girl's text - bug #6485
+ { GID_MOTHERGOOSE, 23, 23, 0, "talkScript", "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when talking to the girl in scene 23, there's no destination parameter (script bug - wrong instruction order). The original source is used directly afterwards in kDisplay, to show the girl's text - bug #6485
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -911,29 +914,29 @@ static const uint16 sig_kStrLen_qfg2_1[] = {
SIG_END
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kStrLen_workarounds[] = {
- { GID_QFG2, 210, 2, 0, "", "export 21", sig_kStrLen_qfg2_1, 0, { WORKAROUND_FAKE, 0 } }, // When saying something incorrect at the WIT, an integer is passed instead of a reference - bug #5489
+ { GID_QFG2, 210, 2, 0, "", "export 21", sig_kStrLen_qfg2_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // When saying something incorrect at the WIT, an integer is passed instead of a reference - bug #5489
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kUnLoad_workarounds[] = {
- { GID_ECOQUEST, 380, 61, 0, "gotIt", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // CD version: after talking to the dolphin the first time, a 3rd parameter is passed by accident
- { GID_ECOQUEST, 380, 69, 0, "lookAtBlackBoard", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // German version, when closing the blackboard closeup in the dolphin room, a 3rd parameter is passed by accident - bug #5483
- { GID_LAURABOW2, -1, -1, 0, "sCartoon", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during the intro, a 3rd parameter is passed by accident - bug #4966
- { GID_LSL6, 130, 130, 0, "recruitLarryScr", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // during intro, a 3rd parameter is passed by accident
- { GID_LSL6, 740, 740, 0, "showCartoon", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // during ending, 4 additional parameters are passed by accident
- { GID_LSL6HIRES, 740, 740, 0, "showCartoon", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // during ending, multiple additional parameters are passed by accident
- { GID_LSL6HIRES, 130, 130, 0, "recruitLarryScr", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // during intro, a 3rd parameter is passed by accident
- { GID_SQ1, 43, 303, 0, "slotGuy", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error
- { GID_QFG4, -1, 110, 0, "dreamer", "dispose", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // during the dream sequence, a 3rd parameter is passed by accident
+ { GID_ECOQUEST, 380, 61, 0, "gotIt", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // CD version: after talking to the dolphin the first time, a 3rd parameter is passed by accident
+ { GID_ECOQUEST, 380, 69, 0, "lookAtBlackBoard", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // German version, when closing the blackboard closeup in the dolphin room, a 3rd parameter is passed by accident - bug #5483
+ { GID_LAURABOW2, -1, -1, 0, "sCartoon", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during the intro, a 3rd parameter is passed by accident - bug #4966
+ { GID_LSL6, 130, 130, 0, "recruitLarryScr", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // during intro, a 3rd parameter is passed by accident
+ { GID_LSL6, 740, 740, 0, "showCartoon", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // during ending, 4 additional parameters are passed by accident
+ { GID_LSL6HIRES, 740, 740, 0, "showCartoon", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // during ending, multiple additional parameters are passed by accident
+ { GID_LSL6HIRES, 130, 130, 0, "recruitLarryScr", "changeState", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // during intro, a 3rd parameter is passed by accident
+ { GID_SQ1, 43, 303, 0, "slotGuy", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error
+ { GID_QFG4, -1, 110, 0, "dreamer", "dispose", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // during the dream sequence, a 3rd parameter is passed by accident
SCI_WORKAROUNDENTRY_TERMINATOR
};
-// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kScrollWindowAdd_workarounds[] = {
- { GID_PHANTASMAGORIA, 45, 64907, 0, "ScrollableWindow", "addString", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // ScrollWindow interface passes the last two parameters twice
+ { GID_PHANTASMAGORIA, 45, 64907, 0, "ScrollableWindow", "addString", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // ScrollWindow interface passes the last two parameters twice
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -971,7 +974,7 @@ SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroun
&& ((workaround->inheritanceLevel == -1) || (workaround->inheritanceLevel == inheritanceLevel))
&& objectNameMatches
&& workaround->methodName == g_sci->getSciLanguageString(curMethodName, K_LANG_ENGLISH)
- && ((workaround->index == -1) || (workaround->index == index))) {
+ && ((workaround->fromIndex == -1) || ((workaround->fromIndex <= index) && (workaround->toIndex >= index)))) {
// Workaround found
if ((workaround->localCallSignature) || (curLocalCallOffset >= 0)) {
// local call signature found and/or subcall was made
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index a965a14a42..a462fddcaa 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -55,7 +55,8 @@ struct SciWorkaroundEntry {
const char *objectName;
const char *methodName;
const uint16 *localCallSignature;
- int index;
+ int fromIndex;
+ int toIndex;
SciWorkaroundSolution newValue;
};
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index e69095a6b1..aef84e212d 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -164,7 +164,7 @@ SciEvent EventManager::getScummVMEvent() {
#if ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2) {
- const Buffer &screen = g_sci->_gfxFrameout->getCurrentBuffer();
+ const GfxFrameout *gfxFrameout = g_sci->_gfxFrameout;
// This will clamp `mousePos` according to the restricted zone,
// so any cursor or screen item associated with the mouse position
@@ -172,7 +172,7 @@ SciEvent EventManager::getScummVMEvent() {
g_sci->_gfxCursor32->deviceMoved(mousePos);
Common::Point mousePosSci = mousePos;
- mulru(mousePosSci, Ratio(screen.scriptWidth, screen.screenWidth), Ratio(screen.scriptHeight, screen.screenHeight));
+ mulru(mousePosSci, Ratio(gfxFrameout->getScriptWidth(), gfxFrameout->getScreenWidth()), Ratio(gfxFrameout->getScriptHeight(), gfxFrameout->getScreenHeight()));
noEvent.mousePosSci = input.mousePosSci = mousePosSci;
if (_hotRectanglesActive) {
diff --git a/engines/sci/graphics/celobj32.cpp b/engines/sci/graphics/celobj32.cpp
index a49690a703..fb7abe8a77 100644
--- a/engines/sci/graphics/celobj32.cpp
+++ b/engines/sci/graphics/celobj32.cpp
@@ -35,7 +35,7 @@
namespace Sci {
#pragma mark CelScaler
-CelScaler *CelObj::_scaler = nullptr;
+Common::ScopedPtr<CelScaler> CelObj::_scaler;
void CelScaler::activateScaleTables(const Ratio &scaleX, const Ratio &scaleY) {
for (int i = 0; i < ARRAYSIZE(_scaleTables); ++i) {
@@ -74,9 +74,9 @@ void CelScaler::buildLookupTable(int *table, const Ratio &ratio, const int size)
}
}
-const CelScalerTable *CelScaler::getScalerTable(const Ratio &scaleX, const Ratio &scaleY) {
+const CelScalerTable &CelScaler::getScalerTable(const Ratio &scaleX, const Ratio &scaleY) {
activateScaleTables(scaleX, scaleY);
- return &_scaleTables[_activeIndex];
+ return _scaleTables[_activeIndex];
}
#pragma mark -
@@ -87,21 +87,13 @@ void CelObj::init() {
CelObj::deinit();
_drawBlackLines = false;
_nextCacheId = 1;
- _scaler = new CelScaler();
- _cache = new CelCache;
- _cache->resize(100);
+ _scaler.reset(new CelScaler());
+ _cache.reset(new CelCache(100));
}
void CelObj::deinit() {
- delete _scaler;
- _scaler = nullptr;
- if (_cache != nullptr) {
- for (CelCache::iterator it = _cache->begin(); it != _cache->end(); ++it) {
- delete it->celObj;
- }
- }
- delete _cache;
- _cache = nullptr;
+ _scaler.reset();
+ _cache.reset();
}
#pragma mark -
@@ -172,10 +164,9 @@ struct SCALER_Scale {
_minX(targetRect.left),
_maxX(targetRect.right - 1),
#endif
- // The maximum width of the scaled object may not be as
- // wide as the source data it requires if downscaling,
- // so just always make the reader decompress an entire
- // line of source data when scaling
+ // The maximum width of the scaled object may not be as wide as the source
+ // data it requires if downscaling, so just always make the reader
+ // decompress an entire line of source data when scaling
_reader(celObj, celObj._width) {
#ifndef NDEBUG
assert(_minX <= _maxX);
@@ -203,39 +194,39 @@ struct SCALER_Scale {
// games which use global scaling are the ones that use low-resolution
// script coordinates too.
- const CelScalerTable *table = CelObj::_scaler->getScalerTable(scaleX, scaleY);
+ const CelScalerTable &table = CelObj::_scaler->getScalerTable(scaleX, scaleY);
- if (g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth == kLowResX) {
+ if (g_sci->_gfxFrameout->getScriptWidth() == kLowResX) {
const int16 unscaledX = (scaledPosition.x / scaleX).toInt();
if (FLIP) {
const int lastIndex = celObj._width - 1;
for (int16 x = targetRect.left; x < targetRect.right; ++x) {
- _valuesX[x] = lastIndex - (table->valuesX[x] - unscaledX);
+ _valuesX[x] = lastIndex - (table.valuesX[x] - unscaledX);
}
} else {
for (int16 x = targetRect.left; x < targetRect.right; ++x) {
- _valuesX[x] = table->valuesX[x] - unscaledX;
+ _valuesX[x] = table.valuesX[x] - unscaledX;
}
}
const int16 unscaledY = (scaledPosition.y / scaleY).toInt();
for (int16 y = targetRect.top; y < targetRect.bottom; ++y) {
- _valuesY[y] = table->valuesY[y] - unscaledY;
+ _valuesY[y] = table.valuesY[y] - unscaledY;
}
} else {
if (FLIP) {
const int lastIndex = celObj._width - 1;
for (int16 x = targetRect.left; x < targetRect.right; ++x) {
- _valuesX[x] = lastIndex - table->valuesX[x - scaledPosition.x];
+ _valuesX[x] = lastIndex - table.valuesX[x - scaledPosition.x];
}
} else {
for (int16 x = targetRect.left; x < targetRect.right; ++x) {
- _valuesX[x] = table->valuesX[x - scaledPosition.x];
+ _valuesX[x] = table.valuesX[x - scaledPosition.x];
}
}
for (int16 y = targetRect.top; y < targetRect.bottom; ++y) {
- _valuesY[y] = table->valuesY[y - scaledPosition.y];
+ _valuesY[y] = table.valuesY[y - scaledPosition.y];
}
}
}
@@ -412,8 +403,8 @@ struct MAPPER_NoMDNoSkip {
struct MAPPER_Map {
inline void draw(byte *target, const byte pixel, const uint8 skipColor) const {
if (pixel != skipColor) {
- // NOTE: For some reason, SSCI never checks if the source
- // pixel is *above* the range of remaps.
+ // For some reason, SSCI never checks if the source pixel is *above*
+ // the range of remaps, so we do not either.
if (pixel < g_sci->_gfxRemap32->getStartColor()) {
*target = pixel;
} else if (g_sci->_gfxRemap32->remapEnabled(pixel)) {
@@ -429,8 +420,8 @@ struct MAPPER_Map {
*/
struct MAPPER_NoMap {
inline void draw(byte *target, const byte pixel, const uint8 skipColor) const {
- // NOTE: For some reason, SSCI never checks if the source
- // pixel is *above* the range of remaps.
+ // For some reason, SSCI never checks if the source pixel is *above* the
+ // range of remaps, so we do not either.
if (pixel != skipColor && pixel < g_sci->_gfxRemap32->getStartColor()) {
*target = pixel;
}
@@ -444,9 +435,9 @@ void CelObj::draw(Buffer &target, const ScreenItem &screenItem, const Common::Re
_drawBlackLines = screenItem._drawBlackLines;
if (_remap) {
- // NOTE: In the original code this check was `g_Remap_numActiveRemaps && _remap`,
- // but since we are already in a `_remap` branch, there is no reason to check it
- // again
+ // In SSCI, this check was `g_Remap_numActiveRemaps && _remap`, but
+ // since we are already in a `_remap` branch, there is no reason to
+ // check that again
if (g_sci->_gfxRemap32->getRemapCount()) {
if (scaleX.isOne() && scaleY.isOne()) {
if (_compressionType == kCelCompressionNone) {
@@ -612,7 +603,7 @@ void CelObj::submitPalette() const {
#pragma mark CelObj - Caching
int CelObj::_nextCacheId = 1;
-CelCache *CelObj::_cache = nullptr;
+Common::ScopedPtr<CelCache> CelObj::_cache;
int CelObj::searchCache(const CelInfo32 &celInfo, int *const nextInsertIndex) const {
*nextInsertIndex = -1;
@@ -648,12 +639,7 @@ void CelObj::putCopyInCache(const int cacheIndex) const {
}
CelCacheEntry &entry = (*_cache)[cacheIndex];
-
- if (entry.celObj != nullptr) {
- delete entry.celObj;
- }
-
- entry.celObj = duplicate();
+ entry.celObj.reset(duplicate());
entry.id = ++_nextCacheId;
}
@@ -672,9 +658,9 @@ struct RENDERER {
_skipColor(skipColor) {}
inline void draw(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const {
- byte *targetPixel = (byte *)target.getPixels() + target.screenWidth * targetRect.top + targetRect.left;
+ byte *targetPixel = (byte *)target.getPixels() + target.w * targetRect.top + targetRect.left;
- const int16 skipStride = target.screenWidth - targetRect.width();
+ const int16 skipStride = target.w - targetRect.width();
const int16 targetWidth = targetRect.width();
const int16 targetHeight = targetRect.height();
for (int16 y = 0; y < targetHeight; ++y) {
@@ -807,8 +793,8 @@ void CelObj::drawUncompHzFlipNoMDNoSkip(Buffer &target, const Common::Rect &targ
}
void CelObj::scaleDrawNoMD(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const {
- // In SSCI the checks are > because their rects are BR-inclusive;
- // our checks are >= because our rects are BR-exclusive
+ // In SSCI the checks are > because their rects are BR-inclusive; our checks
+ // are >= because our rects are BR-exclusive
if (g_sci->_features->hasEmptyScaleDrawHack() &&
(targetRect.left >= targetRect.right ||
targetRect.top >= targetRect.bottom)) {
@@ -822,8 +808,8 @@ void CelObj::scaleDrawNoMD(Buffer &target, const Ratio &scaleX, const Ratio &sca
}
void CelObj::scaleDrawUncompNoMD(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const {
- // In SSCI the checks are > because their rects are BR-inclusive;
- // our checks are >= because our rects are BR-exclusive
+ // In SSCI the checks are > because their rects are BR-inclusive; our checks
+ // are >= because our rects are BR-exclusive
if (g_sci->_features->hasEmptyScaleDrawHack() &&
(targetRect.left >= targetRect.right ||
targetRect.top >= targetRect.bottom)) {
@@ -861,11 +847,11 @@ int16 CelObjView::getNumCels(const GuiResourceId viewId, int16 loopNo) {
const uint16 loopCount = data[2];
- // Every version of SCI32 has a logic error in this function that causes
- // random memory to be read if a script requests the cel count for one
- // past the maximum loop index. For example, GK1 room 808 does this, and
- // gets stuck in an infinite loop because the game script expects this
- // method to return a non-zero value.
+ // Every version of SSCI has a logic error in this function that causes
+ // random memory to be read if a script requests the cel count for one past
+ // the maximum loop index. For example, GK1 room 808 does this, and gets
+ // stuck in an infinite loop because the game script expects this method to
+ // return a non-zero value.
// This bug is triggered in basically every SCI32 game and appears to be
// universally fixable simply by always using the next lowest loop instead.
if (loopNo == loopCount) {
@@ -904,7 +890,7 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int
const int cacheIndex = searchCache(_info, &cacheInsertIndex);
if (cacheIndex != -1) {
CelCacheEntry &entry = (*_cache)[cacheIndex];
- const CelObjView *const cachedCelObj = dynamic_cast<CelObjView *>(entry.celObj);
+ const CelObjView *const cachedCelObj = dynamic_cast<CelObjView *>(entry.celObj.get());
if (cachedCelObj == nullptr) {
error("Expected a CelObjView in cache slot %d", cacheIndex);
}
@@ -915,7 +901,7 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int
const Resource *const resource = g_sci->getResMan()->findResource(ResourceId(kResourceTypeView, viewId), false);
- // NOTE: SCI2.1/SQ6 just silently returns here.
+ // SSCI just silently returns here
if (!resource) {
error("View resource %d not found", viewId);
}
@@ -944,8 +930,6 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int
_info.loopNo = loopCount - 1;
}
- // NOTE: This is the actual check, in the actual location,
- // from SCI engine.
if (loopNo < 0) {
error("Loop is less than 0");
}
@@ -1011,10 +995,8 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int
error("Compression type not supported - V: %d L: %d C: %d", _info.resourceId, _info.loopNo, _info.celNo);
}
- if (celHeader[10] & 128) {
- // NOTE: This is correct according to SCI2.1/SQ6/DOS;
- // the engine re-reads the byte value as a word value
- const uint16 flags = celHeader.getUint16SEAt(10);
+ const uint16 flags = celHeader.getUint16SEAt(10);
+ if (flags & 0x80) {
_transparent = flags & 1 ? true : false;
_remap = flags & 2 ? true : false;
} else if (_compressionType == kCelCompressionNone) {
@@ -1096,7 +1078,7 @@ Common::Point CelObjView::getLinkPosition(const int16 linkId) const {
Common::Point point;
point.x = linkTable.getInt16SEAt(0);
if (_mirrorX) {
- // NOTE: SSCI had an off-by-one error here (missing -1)
+ // SSCI had an off-by-one error here (missing -1)
point.x = _width - point.x - 1;
}
point.y = linkTable.getInt16SEAt(2);
@@ -1127,7 +1109,7 @@ CelObjPic::CelObjPic(const GuiResourceId picId, const int16 celNo) {
const int cacheIndex = searchCache(_info, &cacheInsertIndex);
if (cacheIndex != -1) {
CelCacheEntry &entry = (*_cache)[cacheIndex];
- const CelObjPic *const cachedCelObj = dynamic_cast<CelObjPic *>(entry.celObj);
+ const CelObjPic *const cachedCelObj = dynamic_cast<CelObjPic *>(entry.celObj.get());
if (cachedCelObj == nullptr) {
error("Expected a CelObjPic in cache slot %d", cacheIndex);
}
@@ -1138,7 +1120,7 @@ CelObjPic::CelObjPic(const GuiResourceId picId, const int16 celNo) {
const Resource *const resource = g_sci->getResMan()->findResource(ResourceId(kResourceTypePic, picId), false);
- // NOTE: SCI2.1/SQ6 just silently returns here.
+ // SSCI just silently returns here
if (!resource) {
error("Pic resource %d not found", picId);
}
@@ -1183,10 +1165,9 @@ CelObjPic::CelObjPic(const GuiResourceId picId, const int16 celNo) {
_yResolution = 400;
}
- if (celHeader.getUint8At(10) & 128) {
- // NOTE: This is correct according to SCI2.1/SQ6/DOS;
- // the engine re-reads the byte value as a word value
- const uint16 flags = celHeader.getUint16SEAt(10);
+
+ const uint16 flags = celHeader.getUint16SEAt(10);
+ if (flags & 0x80) {
_transparent = flags & 1 ? true : false;
_remap = flags & 2 ? true : false;
} else {
@@ -1251,7 +1232,8 @@ CelObjMem::CelObjMem(const reg_t bitmapObject) {
SciBitmap *bitmap = g_sci->getEngineState()->_segMan->lookupBitmap(bitmapObject);
- // NOTE: SSCI did no error checking here at all.
+ // SSCI did no error checking here at all so would just end up reading
+ // garbage or crashing if this ever happened
if (!bitmap) {
error("Bitmap %04x:%04x not found", PRINT_REG(bitmapObject));
}
@@ -1283,8 +1265,8 @@ CelObjColor::CelObjColor(const uint8 color, const int16 width, const int16 heigh
_info.color = color;
_origin.x = 0;
_origin.y = 0;
- _xResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- _yResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ _xResolution = g_sci->_gfxFrameout->getScriptWidth();
+ _yResolution = g_sci->_gfxFrameout->getScriptHeight();
_hunkPaletteOffset = 0;
_mirrorX = false;
_remap = false;
@@ -1293,8 +1275,8 @@ CelObjColor::CelObjColor(const uint8 color, const int16 width, const int16 heigh
}
void CelObjColor::draw(Buffer &target, const ScreenItem &screenItem, const Common::Rect &targetRect, const bool mirrorX) {
- // TODO: The original engine sets this flag but why? One cannot
- // draw a solid color mirrored.
+ // One cannot draw a solid color mirrored, but SSCI sets it anyway, so we do
+ // too
_drawMirrored = mirrorX;
draw(target, targetRect);
}
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 6e50f7232e..02b2859f5c 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -33,14 +33,14 @@ namespace Sci {
typedef Common::Rational Ratio;
// SCI32 has four different coordinate systems:
-// 1. low resolution, 2. game/script resolution,
-// 3. text/bitmap resolution, 4. screen resolution
+// 1. low resolution, 2. game/script resolution, 3. text/bitmap resolution,
+// 4. screen resolution
//
-// In CelObj, these values are used when there is
-// no baked in resolution of cels.
+// In CelObj, these values are used when there is no baked in resolution of
+// cels.
//
-// In ScreenItem, it is used when deciding which
-// path to take to calculate dimensions.
+// In ScreenItem, it is used when deciding which path to take to calculate
+// dimensions.
enum {
kLowResX = 320,
kLowResY = 200
@@ -60,8 +60,7 @@ enum CelCompressionType {
};
/**
- * A CelInfo32 object describes the basic properties of a
- * cel object.
+ * A CelInfo32 object describes the basic properties of a cel object.
*/
struct CelInfo32 {
/**
@@ -70,26 +69,24 @@ struct CelInfo32 {
CelType type;
/**
- * For cel objects that draw from resources, the ID of
- * the resource to load.
+ * For cel objects that draw from resources, the ID of the resource to load.
*/
GuiResourceId resourceId;
/**
- * For CelObjView, the loop number to draw from the
- * view resource.
+ * For CelObjView, the loop number to draw from the view resource.
*/
int16 loopNo;
/**
- * For CelObjView and CelObjPic, the cel number to draw
- * from the view or pic resource.
+ * For CelObjView and CelObjPic, the cel number to draw from the view or pic
+ * resource.
*/
int16 celNo;
/**
- * For CelObjMem, a segment register pointing to a heap
- * resource containing headered bitmap data.
+ * For CelObjMem, a segment register pointing to a heap resource containing
+ * headered bitmap data.
*/
reg_t bitmap;
@@ -98,18 +95,16 @@ struct CelInfo32 {
*/
uint8 color;
- // NOTE: In at least SCI2.1/SQ6, color is left
- // uninitialised.
CelInfo32() :
+ // In SSCI, color is left uninitialised
type(kCelTypeMem),
resourceId(0),
loopNo(0),
celNo(0),
bitmap(NULL_REG) {}
- // NOTE: This is the equivalence criteria used by
- // CelObj::searchCache in at least SCI2.1/SQ6. Notably,
- // it does not check the color field.
+ // This is the equivalence criteria used by CelObj::searchCache in at least
+ // SSCI SQ6. Notably, it does not check the color field.
inline bool operator==(const CelInfo32 &other) {
return (
type == other.type &&
@@ -143,13 +138,12 @@ struct CelInfo32 {
class CelObj;
struct CelCacheEntry {
/**
- * A monotonically increasing cache ID used to identify
- * the least recently used item in the cache for
- * replacement.
+ * A monotonically increasing cache ID used to identify the least recently
+ * used item in the cache for replacement.
*/
int id;
- CelObj *celObj;
- CelCacheEntry() : id(0), celObj(nullptr) {}
+ Common::ScopedPtr<CelObj> celObj;
+ CelCacheEntry() : id(0) {}
};
typedef Common::Array<CelCacheEntry> CelCache;
@@ -166,9 +160,9 @@ enum {
struct CelScalerTable {
/**
- * A lookup table of indexes that should be used to find
- * the correct column to read from the source bitmap
- * when drawing a scaled version of the source bitmap.
+ * A lookup table of indexes that should be used to find the correct column
+ * to read from the source bitmap when drawing a scaled version of the
+ * source bitmap.
*/
int valuesX[kCelScalerTableSize];
@@ -178,9 +172,9 @@ struct CelScalerTable {
Ratio scaleX;
/**
- * A lookup table of indexes that should be used to find
- * the correct row to read from a source bitmap when
- * drawing a scaled version of the source bitmap.
+ * A lookup table of indexes that should be used to find the correct row to
+ * read from a source bitmap when drawing a scaled version of the source
+ * bitmap.
*/
int valuesY[kCelScalerTableSize];
@@ -202,25 +196,23 @@ class CelScaler {
int _activeIndex;
/**
- * Activates a scale table for the given X and Y ratios.
- * If there is no table that matches the given ratios,
- * the least most recently used table will be replaced
- * and activated.
+ * Activates a scale table for the given X and Y ratios. If there is no
+ * table that matches the given ratios, the least most recently used table
+ * will be replaced and activated.
*/
void activateScaleTables(const Ratio &scaleX, const Ratio &scaleY);
/**
- * Builds a pixel lookup table in `table` for the given
- * ratio. The table will be filled up to the specified
- * size, which should be large enough to draw across the
- * entire target buffer.
+ * Builds a pixel lookup table in `table` for the given ratio. The table
+ * will be filled up to the specified size, which should be large enough to
+ * draw across the entire target buffer.
*/
void buildLookupTable(int *table, const Ratio &ratio, const int size);
public:
CelScaler() :
- _scaleTables(),
- _activeIndex(0) {
+ _scaleTables(),
+ _activeIndex(0) {
CelScalerTable &table = _scaleTables[0];
table.scaleX = Ratio();
table.scaleY = Ratio();
@@ -236,7 +228,7 @@ public:
/**
* Retrieves scaler tables for the given X and Y ratios.
*/
- const CelScalerTable *getScalerTable(const Ratio &scaleX, const Ratio &scaleY);
+ const CelScalerTable &getScalerTable(const Ratio &scaleX, const Ratio &scaleY);
};
#pragma mark -
@@ -244,53 +236,47 @@ public:
class ScreenItem;
/**
- * A cel object is the lowest-level rendering primitive in
- * the SCI engine and draws itself directly to a target
- * pixel buffer.
+ * A cel object is the lowest-level rendering primitive in the SCI engine and
+ * draws itself directly to a target pixel buffer.
*/
class CelObj {
protected:
/**
- * When true, every second line of the cel will be
- * rendered as a black line.
+ * When true, every second line of the cel will be rendered as a black line.
*
* @see ScreenItem::_drawBlackLines
- * @note Using a static member because otherwise this
- * would otherwise need to be copied down through
- * several calls. (SSCI did similar, using a global
- * variable.)
+ * @note Using a static member because otherwise this would otherwise need
+ * to be copied down through several calls. (SSCI did similar, using a
+ * global variable.)
*/
static bool _drawBlackLines;
/**
- * When true, this cel will be horizontally mirrored
- * when it is drawn. This is an internal flag that is
- * set by draw methods based on the combination of the
- * cel's `_mirrorX` property and the owner screen item's
- * `_mirrorX` property.
+ * When true, this cel will be horizontally mirrored when it is drawn. This
+ * is an internal flag that is set by draw methods based on the combination
+ * of the cel's `_mirrorX` property and the owner screen item's `_mirrorX`
+ * property.
*/
bool _drawMirrored;
public:
- static CelScaler *_scaler;
+ static Common::ScopedPtr<CelScaler> _scaler;
/**
- * The basic identifying information for this cel. This
- * information effectively acts as a composite key for
- * a cel object, and any cel object can be recreated
- * from this data alone.
+ * The basic identifying information for this cel. This information
+ * effectively acts as a composite key for a cel object, and any cel object
+ * can be recreated from this data alone.
*/
CelInfo32 _info;
/**
- * The offset to the cel header for this cel within the
- * raw resource data.
+ * The offset to the cel header for this cel within the raw resource data.
*/
uint32 _celHeaderOffset;
/**
- * The offset to the embedded palette for this cel
- * within the raw resource data.
+ * The offset to the embedded palette for this cel within the raw resource
+ * data.
*/
uint32 _hunkPaletteOffset;
@@ -300,36 +286,32 @@ public:
uint16 _width, _height;
/**
- * TODO: Documentation
+ * The origin of the cel, relative to the top-left corner, in cel
+ * coordinates.
*/
Common::Point _origin;
/**
- * The dimensions of the original coordinate system for
- * the cel. Used to scale cels from their native size
- * to the correct size on screen.
+ * The dimensions of the original coordinate system for the cel. Used to
+ * scale cels from their native size to the correct size on screen.
*
- * @note This is set to scriptWidth/Height for
- * CelObjColor. For other cel objects, the value comes
- * from the raw resource data. For text bitmaps, this is
- * the width/height of the coordinate system used to
- * generate the text, which also defaults to
- * scriptWidth/Height but seems to typically be changed
- * to more closely match the native screen resolution.
+ * @note This is set to scriptWidth/Height for CelObjColor. For other cel
+ * objects, the value comes from the raw resource data. For text bitmaps,
+ * this is the width/height of the coordinate system used to generate the
+ * text, which also defaults to scriptWidth/Height but seems to typically be
+ * changed to more closely match the native screen resolution.
*/
uint16 _xResolution, _yResolution;
/**
- * The skip (transparent) color for the cel. When
- * compositing, any pixels matching this color will not
- * be copied to the buffer.
+ * The skip (transparent) color for the cel. When compositing, any pixels
+ * matching this color will not be copied to the buffer.
*/
uint8 _skipColor;
/**
- * Whether or not this cel has any transparent regions.
- * This is used for optimised drawing of non-transparent
- * cels.
+ * Whether or not this cel has any transparent regions. This is used for
+ * optimised drawing of non-transparent cels.
*/
bool _transparent;
@@ -339,15 +321,14 @@ public:
CelCompressionType _compressionType;
/**
- * Whether or not this cel should be palette-remapped?
+ * Whether or not this cel contains remap pixels.
*/
bool _remap;
/**
- * If true, the cel contains pre-mirrored picture data.
- * This value comes directly from the resource data and
- * is XORed with the `_mirrorX` property of the owner
- * screen item when rendering.
+ * If true, the cel contains pre-mirrored picture data. This value comes
+ * directly from the resource data and is XORed with the `_mirrorX` property
+ * of the owner screen item when rendering.
*/
bool _mirrorX;
@@ -364,71 +345,63 @@ public:
virtual ~CelObj() {};
/**
- * Draws the cel to the target buffer using the priority
- * and positioning information from the given screen
- * item. The mirroring of the cel will be unchanged from
- * any previous call to draw.
+ * Draws the cel to the target buffer using the priority and positioning
+ * information from the given screen item. The mirroring of the cel will be
+ * unchanged from any previous call to draw.
*/
void draw(Buffer &target, const ScreenItem &screenItem, const Common::Rect &targetRect) const;
/**
- * Draws the cel to the target buffer using the priority
- * and positioning information from the given screen
- * item and the given mirror flag.
+ * Draws the cel to the target buffer using the priority and positioning
+ * information from the given screen item and the given mirror flag.
*
- * @note In SCI engine, this function was a virtual
- * function, but CelObjView, CelObjPic, and CelObjMem
- * all used the same function and the compiler
- * deduplicated the copies; we deduplicate the source by
- * putting the implementation on CelObj instead of
- * copying it to 3/4 of the subclasses.
+ * @note In SSCI, this function was a virtual function, but CelObjView,
+ * CelObjPic, and CelObjMem all used the same function and the compiler
+ * deduplicated the copies; we deduplicate the source by putting the
+ * implementation on CelObj instead of copying it to 3/4 of the subclasses.
*/
virtual void draw(Buffer &target, const ScreenItem &screenItem, const Common::Rect &targetRect, const bool mirrorX);
/**
- * Draws the cel to the target buffer using the
- * positioning and mirroring information from the
- * provided arguments.
+ * Draws the cel to the target buffer using the positioning and mirroring
+ * information from the provided arguments.
*
- * @note In SCI engine, this function was a virtual
- * function, but CelObjView, CelObjPic, and CelObjMem
- * all used the same function and the compiler
- * deduplicated the copies; we deduplicate the source by
- * putting the implementation on CelObj instead of
- * copying it to 3/4 of the subclasses.
+ * @note In SSCI, this function was a virtual function, but CelObjView,
+ * CelObjPic, and CelObjMem all used the same function and the compiler
+ * deduplicated the copies; we deduplicate the source by putting the
+ * implementation on CelObj instead of copying it to 3/4 of the subclasses.
*/
virtual void draw(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition, const bool mirrorX);
/**
- * Draws the cel to the target buffer using the given
- * position and scaling parameters. The mirroring of the
- * cel will be unchanged from any previous call to draw.
+ * Draws the cel to the target buffer using the given position and scaling
+ * parameters. The mirroring of the cel will be unchanged from any previous
+ * call to draw.
*/
void drawTo(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition, const Ratio &scaleX, const Ratio &scaleY) const;
/**
- * Creates a copy of this cel on the free store and
- * returns a pointer to the new object. The new cel will
- * point to a shared copy of bitmap/resource data.
+ * Creates a copy of this cel on the free store and returns a pointer to the
+ * new object. The new cel will point to a shared copy of bitmap/resource
+ * data.
*/
virtual CelObj *duplicate() const = 0;
/**
- * Retrieves a pointer to the raw resource data for this
- * cel. This method cannot be used with a CelObjColor.
+ * Retrieves a pointer to the raw resource data for this cel. This method
+ * cannot be used with a CelObjColor.
*/
virtual const SciSpan<const byte> getResPointer() const = 0;
/**
- * Reads the pixel at the given coordinates. This method
- * is valid only for CelObjView and CelObjPic.
+ * Reads the pixel at the given coordinates. This method is valid only for
+ * CelObjView and CelObjPic.
*/
virtual uint8 readPixel(const uint16 x, const uint16 y, const bool mirrorX) const;
/**
- * Submits the palette from this cel to the palette
- * manager for integration into the master screen
- * palette.
+ * Submits the palette from this cel to the palette manager for integration
+ * into the master screen palette.
*/
void submitPalette() const;
@@ -454,7 +427,8 @@ private:
void drawUncompHzFlipMap(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
void scaleDrawMap(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
void scaleDrawUncompMap(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
- // NOTE: The original includes versions of the above functions with priority parameters, which were not actually used in SCI32
+ // SSCI includes versions of the above functions with priority parameters
+ // which are not actually used in SCI32
void drawHzFlipNoMD(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
void drawNoFlipNoMD(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
@@ -464,37 +438,34 @@ private:
void drawUncompHzFlipNoMDNoSkip(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
void scaleDrawNoMD(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
void scaleDrawUncompNoMD(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
- // NOTE: The original includes versions of the above functions with priority parameters, which were not actually used in SCI32
+ // SSCI includes versions of the above functions with priority parameters
+ // which are not actually used in SCI32
#pragma mark -
#pragma mark CelObj - Caching
protected:
/**
- * A monotonically increasing cache ID used to identify
- * the least recently used item in the cache for
- * replacement.
+ * A monotonically increasing cache ID used to identify the least recently
+ * used item in the cache for replacement.
*/
static int _nextCacheId;
/**
- * A cache of cel objects used to avoid reinitialisation
- * overhead for cels with the same CelInfo32.
+ * A cache of cel objects used to avoid reinitialisation overhead for cels
+ * with the same CelInfo32.
*/
- // NOTE: At least SQ6 uses a fixed cache size of 100.
- static CelCache *_cache;
+ static Common::ScopedPtr<CelCache> _cache;
/**
- * Searches the cel cache for a CelObj matching the
- * provided CelInfo32. If not found, -1 is returned.
- * nextInsertIndex will receive the index of the oldest
- * item in the cache, which can be used to replace
- * the oldest item with a newer item.
+ * Searches the cel cache for a CelObj matching the provided CelInfo32. If
+ * not found, -1 is returned. `nextInsertIndex` will receive the index of
+ * the oldest item in the cache, which can be used to replace the oldest
+ * item with a newer item.
*/
int searchCache(const CelInfo32 &celInfo, int *nextInsertIndex) const;
/**
- * Puts a copy of this CelObj into the cache at the
- * given cache index.
+ * Puts a copy of this CelObj into the cache at the given cache index.
*/
void putCopyInCache(int index) const;
};
@@ -503,22 +474,20 @@ protected:
#pragma mark CelObjView
/**
- * A CelObjView is the drawing primitive for a View type
- * resource. Each CelObjView corresponds to a single cel
- * within a single loop of a view.
+ * A CelObjView is the drawing primitive for a View type resource. Each
+ * CelObjView corresponds to a single cel within a single loop of a view.
*/
class CelObjView : public CelObj {
private:
/**
- * Analyses resources without baked-in remap flags
- * to determine whether or not they should be remapped.
+ * Analyses resources without baked-in remap flags to determine whether or
+ * not they should be remapped.
*/
bool analyzeUncompressedForRemap() const;
/**
- * Analyses compressed resources without baked-in remap
- * flags to determine whether or not they should be
- * remapped.
+ * Analyses compressed resources without baked-in remap flags to determine
+ * whether or not they should be remapped.
*/
bool analyzeForRemap() const;
@@ -532,9 +501,8 @@ public:
static int16 getNumCels(const GuiResourceId viewId, const int16 loopNo);
/**
- * Draws the cel to the target buffer using the
- * positioning, mirroring, and scaling information from
- * the provided arguments.
+ * Draws the cel to the target buffer using the positioning, mirroring, and
+ * scaling information from the provided arguments.
*/
void draw(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition, bool mirrorX, const Ratio &scaleX, const Ratio &scaleY);
@@ -548,16 +516,14 @@ public:
#pragma mark CelObjPic
/**
- * A CelObjPic is the drawing primitive for a Picture type
- * resource. Each CelObjPic corresponds to a single cel
- * within a picture.
+ * A CelObjPic is the drawing primitive for a Picture type resource. Each
+ * CelObjPic corresponds to a single cel within a picture.
*/
class CelObjPic : public CelObj {
private:
/**
- * Analyses uncompressed resources without baked-in skip
- * flags to determine whether or not they can use fast
- * blitting.
+ * Analyses uncompressed resources without baked-in skip flags to determine
+ * whether or not they can use fast blitting.
*/
bool analyzeUncompressedForSkip() const;
@@ -568,14 +534,13 @@ public:
uint8 _celCount;
/**
- * The position of this cel relative to the top-left
- * corner of the picture.
+ * The position of this cel relative to the top-left corner of the picture.
*/
Common::Point _relativePosition;
/**
- * The z-buffer priority for this cel. Higher prorities
- * are drawn on top of lower priorities.
+ * The z-buffer priority for this cel. Higher prorities are drawn on top of
+ * lower priorities.
*/
int16 _priority;
@@ -593,10 +558,9 @@ public:
#pragma mark CelObjMem
/**
- * A CelObjMem is the drawing primitive for arbitrary
- * bitmaps generated in memory. Generated bitmaps in SCI32
- * include text & vector drawings and per-pixel screen
- * transitions like dissolves.
+ * A CelObjMem is the drawing primitive for arbitrary bitmaps generated in
+ * memory. Generated bitmaps in SCI32 include text & vector drawings and
+ * per-pixel screen transitions like dissolves.
*/
class CelObjMem : public CelObj {
public:
diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp
index 52a9dfa9b3..fa4396c1d8 100644
--- a/engines/sci/graphics/controls32.cpp
+++ b/engines/sci/graphics/controls32.cpp
@@ -43,8 +43,8 @@ GfxControls32::GfxControls32(SegManager *segMan, GfxCache *cache, GfxText32 *tex
_gfxText32(text),
_overwriteMode(false),
_nextCursorFlashTick(0),
- // SSCI used a memory handle for a ScrollWindow object
- // as ID. We use a simple numeric handle instead.
+ // SSCI used a memory handle for a ScrollWindow object as ID. We use a
+ // simple numeric handle instead.
_nextScrollWindowId(10000) {}
GfxControls32::~GfxControls32() {
@@ -137,27 +137,27 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) {
ScreenItem *screenItem = new ScreenItem(plane->_object, celInfo, Common::Point(), ScaleInfo());
plane->_screenItemList.add(screenItem);
- // frameOut must be called after the screen item is
- // created, and before it is updated at the end of the
- // event loop, otherwise it has both created and updated
- // flags set which crashes the engine (it runs updates
- // before creations)
+ // frameOut must be called after the screen item is created, and before it
+ // is updated at the end of the event loop, otherwise it has both created
+ // and updated flags set which crashes the engine (updates are handled
+ // before creations, but the screen item is not in the correct state for an
+ // update)
g_sci->_gfxFrameout->frameOut(true);
EventManager *eventManager = g_sci->getEventManager();
bool clearTextOnInput = true;
bool textChanged = false;
for (;;) {
- // We peek here because the last event needs to be allowed to
- // dispatch a second time to the normal event handling system.
- // In the actual engine, the event is always consumed and then
- // the last event just gets posted back to the event manager for
- // reprocessing, but instead, we only remove the event from the
- // queue *after* we have determined it is not a defocusing event
+ // We peek here because the last event needs to be allowed to dispatch a
+ // second time to the normal event handling system. In SSCI, the event
+ // is always consumed and then the last event just gets posted back to
+ // the event manager for reprocessing, but instead, we only remove the
+ // event from the queue *after* we have determined it is not a
+ // defocusing event
const SciEvent event = eventManager->getSciEvent(kSciEventAny | kSciEventPeek);
bool focused = true;
- // Original engine did not have a QUIT event but we have to handle it
+ // SSCI did not have a QUIT event, but we do, so we have to handle it
if (event.type == kSciEventQuit) {
focused = false;
} else if (event.type == kSciEventMousePress && !editorPlaneRect.contains(event.mousePosSci)) {
@@ -179,18 +179,16 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) {
break;
}
- // Consume the event now that we know it is not one of the
- // defocusing events above
+ // Consume the event now that we know it is not one of the defocusing
+ // events above
if (event.type != kSciEventNone)
eventManager->getSciEvent(kSciEventAny);
- // NOTE: In the original engine, the font and bitmap were
- // reset here on each iteration through the loop, but it
- // doesn't seem like this should be necessary since
- // control is not yielded back to the VM until input is
- // received, which means there is nothing that could modify
- // the GfxText32's state with a different font in the
- // meantime
+ // In SSCI, the font and bitmap were reset here on each iteration
+ // through the loop, but this is not necessary since control is not
+ // yielded back to the VM until input is received, which means there is
+ // nothing that could modify the GfxText32's state with a different font
+ // in the meantime
bool shouldDeleteChar = false;
bool shouldRedrawText = false;
@@ -223,8 +221,8 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) {
case kSciKeyInsert:
clearTextOnInput = false;
- // Redrawing also changes the cursor rect to
- // reflect the new insertion mode
+ // Redrawing also changes the cursor rect to reflect the new
+ // insertion mode
shouldRedrawText = true;
_overwriteMode = !_overwriteMode;
break;
@@ -324,10 +322,9 @@ void GfxControls32::drawCursor(TextEditor &editor) {
const int16 scaledFontHeight = _gfxText32->scaleUpHeight(_gfxText32->_font->getHeight());
- // NOTE: The original code branched on borderColor here but
- // the two branches appeared to be identical, differing only
- // because the compiler decided to be differently clever
- // when optimising multiplication in each branch
+ // SSCI branched on borderColor here but the two branches appeared to be
+ // identical, differing only because the compiler decided to be
+ // differently clever when optimising multiplication in each branch
if (_overwriteMode) {
editor.cursorRect.top = editor.textRect.top;
editor.cursorRect.setHeight(scaledFontHeight);
@@ -394,8 +391,8 @@ ScrollWindow::ScrollWindow(SegManager *segMan, const Common::Rect &gameRect, con
_gfxText32.setFont(_fontId);
_pointSize = _gfxText32._font->getHeight();
- const uint16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const uint16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const uint16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const uint16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
Common::Rect bitmapRect(gameRect);
mulinc(bitmapRect, Ratio(_gfxText32._xResolution, scriptWidth), Ratio(_gfxText32._yResolution, scriptHeight));
@@ -465,9 +462,8 @@ reg_t ScrollWindow::add(const Common::String &text, const GuiResourceId fontId,
if (_entries.size() == _maxNumEntries) {
ScrollWindowEntry removedEntry = _entries.remove_at(0);
_text.erase(0, removedEntry.text.size());
- // `_firstVisibleChar` will be reset shortly if
- // `scrollTo` is true, so there is no reason to
- // update it
+ // `_firstVisibleChar` will be reset shortly if `scrollTo` is true, so
+ // there is no reason to update it
if (!scrollTo) {
_firstVisibleChar -= removedEntry.text.size();
}
@@ -476,17 +472,17 @@ reg_t ScrollWindow::add(const Common::String &text, const GuiResourceId fontId,
_entries.push_back(ScrollWindowEntry());
ScrollWindowEntry &entry = _entries.back();
- // NOTE: In SSCI the line ID was a memory handle for the
- // string of this line. We use a numeric ID instead.
+ // In SSCI, the line ID was a memory handle for the string of this line. We
+ // use a numeric ID instead.
entry.id = make_reg(0, _nextEntryId++);
if (_nextEntryId > _maxNumEntries) {
_nextEntryId = 1;
}
- // NOTE: In SSCI this was updated after _text was
- // updated, which meant there was an extra unnecessary
- // subtraction operation (subtracting `entry.text` size)
+ // In SSCI, this was updated after _text was updated, which meant there was
+ // an extra unnecessary subtraction operation (subtracting `entry.text`
+ // size)
if (scrollTo) {
_firstVisibleChar = _text.size();
}
@@ -517,9 +513,8 @@ void ScrollWindow::fillEntry(ScrollWindowEntry &entry, const Common::String &tex
// with properties -1 can inherit properties from the previously rendered
// line instead of the defaults.
- // NOTE: SSCI added "|s<lineIndex>|" here, but |s| is
- // not a valid control code, so it just always ended up
- // getting skipped
+ // SSCI added "|s<lineIndex>|" here, but |s| is not a valid control code, so
+ // it just always ended up getting skipped by the text rendering code
if (entry.fontId != -1) {
formattedText += Common::String::format("|f%d|", entry.fontId);
}
@@ -705,9 +700,8 @@ void ScrollWindow::pageDown() {
void ScrollWindow::computeLineIndices() {
_gfxText32.setFont(_fontId);
- // NOTE: Unlike SSCI, foreColor and alignment are not
- // set since these properties do not affect the width of
- // lines
+ // Unlike SSCI, foreColor and alignment are not set since these properties
+ // do not affect the width of lines
if (_gfxText32._font->getHeight() != _pointSize) {
error("Illegal font size font = %d pointSize = %d, should be %d.", _fontId, _gfxText32._font->getHeight(), _pointSize);
@@ -717,8 +711,8 @@ void ScrollWindow::computeLineIndices() {
_startsOfLines.clear();
- // NOTE: The original engine had a 1000-line limit; we
- // do not enforce any limit
+ // SSCI had a 1000-line limit; we do not enforce any limit since we use
+ // dynamic containers
for (uint charIndex = 0; charIndex < _text.size(); ) {
_startsOfLines.push_back(charIndex);
charIndex += _gfxText32.getTextCount(_text, charIndex, lineRect, false);
diff --git a/engines/sci/graphics/controls32.h b/engines/sci/graphics/controls32.h
index 680c70d2d6..de292da3b7 100644
--- a/engines/sci/graphics/controls32.h
+++ b/engines/sci/graphics/controls32.h
@@ -32,8 +32,8 @@ class GfxScreen;
class GfxText32;
enum MessageBoxStyle {
- kMessageBoxOK = 0x0,
- kMessageBoxYesNo = 0x4
+ kMessageBoxOK = 0x0,
+ kMessageBoxYesNo = 0x4
};
struct TextEditor {
@@ -89,14 +89,12 @@ struct TextEditor {
uint16 cursorCharPosition;
/**
- * Whether or not the cursor is currently drawn to the
- * screen.
+ * Whether or not the cursor is currently drawn to the screen.
*/
bool cursorIsDrawn;
/**
- * The rectangle for drawing the input cursor, in bitmap
- * pixels.
+ * The rectangle for drawing the input cursor, in bitmap pixels.
*/
Common::Rect cursorRect;
@@ -111,30 +109,26 @@ struct TextEditor {
*/
struct ScrollWindowEntry {
/**
- * ID of the line. In SSCI this was actually a memory
- * handle for the string of this line. We use a simple
- * numeric ID instead.
+ * ID of the line. In SSCI this was actually a memory handle for the string
+ * of this line. We use a simple numeric ID instead.
*/
reg_t id;
/**
- * The alignment to use when rendering this line of
- * text. If -1, the default alignment from the
- * corresponding ScrollWindow will be used.
+ * The alignment to use when rendering this line of text. If -1, the default
+ * alignment from the corresponding ScrollWindow will be used.
*/
TextAlign alignment;
/**
- * The color to use to render this line of text. If -1,
- * the default foreground color from the corresponding
- * ScrollWindow will be used.
+ * The color to use to render this line of text. If -1, the default
+ * foreground color from the corresponding ScrollWindow will be used.
*/
int16 foreColor;
/**
- * The font to use to render this line of text. If -1,
- * the default font from the corresponding ScrollWindow
- * will be used.
+ * The font to use to render this line of text. If -1, the default font from
+ * the corresponding ScrollWindow will be used.
*/
GuiResourceId fontId;
@@ -155,16 +149,15 @@ public:
~ScrollWindow();
/**
- * Adds a new text entry to the window. If `fontId`,
- * `foreColor`, or `alignment` are `-1`, the
- * ScrollWindow's default values will be used.
+ * Adds a new text entry to the window. If `fontId`, `foreColor`, or
+ * `alignment` are `-1`, the ScrollWindow's default values will be used.
*/
reg_t add(const Common::String &text, const GuiResourceId fontId, const int16 foreColor, const TextAlign alignment, const bool scrollTo);
/**
- * Modifies an existing text entry with the given ID. If
- * `fontId`, `foreColor`, or `alignment` are `-1`, the
- * ScrollWindow's default values will be used.
+ * Modifies an existing text entry with the given ID. If `fontId`,
+ * `foreColor`, or `alignment` are `-1`, the ScrollWindow's default values
+ * will be used.
*/
reg_t modify(const reg_t id, const Common::String &text, const GuiResourceId fontId, const int16 foreColor, const TextAlign alignment, const bool scrollTo);
@@ -179,9 +172,8 @@ public:
void hide();
/**
- * Gets the number of lines that the content of a
- * ScrollWindow is scrolled upward, as a ratio of the
- * total number of lines of content.
+ * Gets the number of lines that the content of a ScrollWindow is scrolled
+ * upward, as a ratio of the total number of lines of content.
*/
Ratio where() const;
@@ -221,8 +213,8 @@ public:
void pageDown();
/**
- * Gets a reference to the in-memory bitmap that
- * is used to render the text in the ScrollWindow.
+ * Gets a reference to the in-memory bitmap that is used to render the text
+ * in the ScrollWindow.
*/
const reg_t getBitmap() const { return _bitmap; }
@@ -232,31 +224,26 @@ private:
typedef Common::Array<ScrollWindowEntry> EntriesList;
/**
- * A convenience function that fills a
- * ScrollWindowEntry's properties.
+ * A convenience function that fills a ScrollWindowEntry's properties.
*/
void fillEntry(ScrollWindowEntry &entry, const Common::String &text, const GuiResourceId fontId, const int16 foreColor, const TextAlign alignment);
/**
- * Rescans the entire text of the ScrollWindow when an
- * entry is added or modified, calculating the character
- * offsets of all line endings, the total number of
- * lines of text, the height of the viewport (in lines
- * of text), the last character visible in the viewport
- * (assuming the viewport is scrolled to the top), and
- * the line index of the bottommost visible line
- * (assuming the viewport is scrolled to the top).
+ * Rescans the entire text of the ScrollWindow when an entry is added or
+ * modified, calculating the character offsets of all line endings, the
+ * total number of lines of text, the height of the viewport (in lines of
+ * text), the last character visible in the viewport (assuming the viewport
+ * is scrolled to the top), and the line index of the bottommost visible
+ * line (assuming the viewport is scrolled to the top).
*/
void computeLineIndices();
/**
- * Calculates which text is visible within the
- * ScrollWindow's viewport and renders the text to the
- * internal bitmap.
+ * Calculates which text is visible within the ScrollWindow's viewport and
+ * renders the text to the internal bitmap.
*
- * If `doFrameOut` is true, the screen will be refreshed
- * immediately instead of waiting for the next call to
- * `kFrameOut`.
+ * If `doFrameOut` is true, the screen will be refreshed immediately instead
+ * of waiting for the next call to `kFrameOut`.
*/
void update(const bool doFrameOut);
@@ -266,21 +253,18 @@ private:
GfxText32 _gfxText32;
/**
- * The individual text entries added to the
- * ScrollWindow.
+ * The individual text entries added to the ScrollWindow.
*/
EntriesList _entries;
/**
- * The maximum number of entries allowed. Once this
- * limit is reached, the oldest entry will be removed
- * when a new entry is added.
+ * The maximum number of entries allowed. Once this limit is reached, the
+ * oldest entry will be removed when a new entry is added.
*/
uint _maxNumEntries;
/**
- * A mapping from a line index to the line's character
- * offset in `_text`.
+ * A mapping from a line index to the line's character offset in `_text`.
*/
Common::Array<int> _startsOfLines;
@@ -300,39 +284,36 @@ private:
int _firstVisibleChar;
/**
- * The index of the line that is at the top of the
- * viewport.
+ * The index of the line that is at the top of the viewport.
*/
int _topVisibleLine;
/**
- * The index of the last visible character in `_text`,
- * or -1 if there is no text.
+ * The index of the last visible character in `_text`, or -1 if there is no
+ * text.
*/
int _lastVisibleChar;
/**
- * The index of the line that is at the bottom of the
- * viewport, or -1 if there is no text.
+ * The index of the line that is at the bottom of the viewport, or -1 if
+ * there is no text.
*/
int _bottomVisibleLine;
/**
- * The total number of lines in the backbuffer. This
- * number may be higher than the total number of entries
- * if an entry contains newlines.
+ * The total number of lines in the backbuffer. This number may be higher
+ * than the total number of entries if an entry contains newlines.
*/
int _numLines;
/**
- * The number of lines that are currently visible in the
- * text area of the window.
+ * The number of lines that are currently visible in the text area of the
+ * window.
*/
int _numVisibleLines;
/**
- * The plane in which the ScrollWindow should be
- * rendered.
+ * The plane in which the ScrollWindow should be rendered.
*/
reg_t _plane;
@@ -347,20 +328,18 @@ private:
uint8 _backColor;
/**
- * The default border color of the text bitmap. If -1,
- * the viewport will have no border.
+ * The default border color of the text bitmap. If -1, the viewport will
+ * have no border.
*/
int16 _borderColor;
/**
- * The default font used for rendering text into the
- * ScrollWindow.
+ * The default font used for rendering text into the ScrollWindow.
*/
GuiResourceId _fontId;
/**
- * The default text alignment used for rendering text
- * into the ScrollWindow.
+ * The default text alignment used for rendering text into the ScrollWindow.
*/
TextAlign _alignment;
@@ -370,22 +349,20 @@ private:
bool _visible;
/**
- * The dimensions of the text box inside the font
- * bitmap, in text-system coordinates.
+ * The dimensions of the text box inside the font bitmap, in text-system
+ * coordinates.
*/
Common::Rect _textRect;
/**
- * The top-left corner of the ScrollWindow's screen
- * item, in game script coordinates, relative to the
- * parent plane.
+ * The top-left corner of the ScrollWindow's screen item, in game script
+ * coordinates, relative to the parent plane.
*/
Common::Point _position;
/**
- * The height of the default font in screen pixels. All
- * fonts rendered into the ScrollWindow must have this
- * same height.
+ * The height of the default font in screen pixels. All fonts rendered into
+ * the ScrollWindow must have this same height.
*/
uint8 _pointSize;
@@ -395,8 +372,8 @@ private:
reg_t _bitmap;
/**
- * A monotonically increasing ID used to identify
- * text entries added to the ScrollWindow.
+ * A monotonically increasing ID used to identify text entries added to the
+ * ScrollWindow.
*/
uint16 _nextEntryId;
@@ -407,7 +384,8 @@ private:
};
/**
- * Controls class, handles drawing of controls in SCI32 (SCI2, SCI2.1, SCI3) games
+ * Controls class, handles drawing of UI controls in SCI32 games that use kernel
+ * controls instead of custom script controls.
*/
class GfxControls32 {
public:
@@ -426,14 +404,13 @@ public:
private:
/**
- * If true, typing will overwrite text that already
- * exists at the text cursor's current position.
+ * If true, typing will overwrite text that already exists at the text
+ * cursor's current position.
*/
bool _overwriteMode;
/**
- * The tick at which the text cursor should be toggled
- * by `flashCursor`.
+ * The tick at which the text cursor should be toggled by `flashCursor`.
*/
uint32 _nextCursorFlashTick;
@@ -448,8 +425,8 @@ private:
void eraseCursor(TextEditor &editor);
/**
- * Toggles the text cursor for the given editor to be
- * either drawn or erased.
+ * Toggles the text cursor for the given editor to be either drawn or
+ * erased.
*/
void flashCursor(TextEditor &editor);
@@ -457,9 +434,8 @@ private:
#pragma mark Scrollable window control
public:
/**
- * Creates a new scrollable window and returns the ID
- * for the new window, which is used by game scripts to
- * interact with scrollable windows.
+ * Creates a new scrollable window and returns the ID for the new window,
+ * which is used by game scripts to interact with scrollable windows.
*/
reg_t makeScrollWindow(const Common::Rect &gameRect, const Common::Point &position, const reg_t plane, const uint8 defaultForeColor, const uint8 defaultBackColor, const GuiResourceId defaultFontId, const TextAlign defaultAlignment, const int16 defaultBorderColor, const uint16 maxNumEntries);
@@ -477,8 +453,7 @@ private:
typedef Common::HashMap<uint16, ScrollWindow *> ScrollWindowMap;
/**
- * Monotonically increasing ID used to identify
- * ScrollWindow instances.
+ * Monotonically increasing ID used to identify ScrollWindow instances.
*/
uint16 _nextScrollWindowId;
@@ -497,8 +472,7 @@ public:
private:
/**
- * Convenience function for creating and showing a
- * message box.
+ * Convenience function for creating and showing a message box.
*/
int16 showMessageBox(const Common::String &message, const char *const okLabel, const char *const altLabel, const int16 okValue, const int16 altValue);
};
diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp
index 74fbafa2f0..a189f7405d 100644
--- a/engines/sci/graphics/cursor32.cpp
+++ b/engines/sci/graphics/cursor32.cpp
@@ -34,22 +34,22 @@ namespace Sci {
GfxCursor32::GfxCursor32() :
_hideCount(0),
_position(0, 0),
- _writeToVMAP(false) {
+ _needsPaint(false) {
}
-void GfxCursor32::init(const Buffer &vmap) {
- _vmap = vmap;
- _vmapRegion.rect = Common::Rect(_vmap.screenWidth, _vmap.screenHeight);
- _vmapRegion.data = (byte *)_vmap.getPixels();
- _restrictedArea = _vmapRegion.rect;
+void GfxCursor32::init(const Buffer &outputBuffer) {
+ _screen = outputBuffer;
+ _screenRegion.rect = Common::Rect(_screen.w, _screen.h);
+ _screenRegion.data = static_cast<byte *>(_screen.getPixels());
+ _restrictedArea = _screenRegion.rect;
}
GfxCursor32::~GfxCursor32() {
free(_cursor.data);
free(_cursorBack.data);
- free(_drawBuff1.data);
- free(_drawBuff2.data);
- free(_savedVmapRegion.data);
+ free(_scratch1.data);
+ free(_scratch2.data);
+ free(_savedScreenRegion.data);
}
void GfxCursor32::hide() {
@@ -57,26 +57,28 @@ void GfxCursor32::hide() {
return;
}
+ g_system->showMouse(false);
if (!_cursorBack.rect.isEmpty()) {
- drawToHardware(_cursorBack);
+ drawToScreen(_cursorBack);
}
}
void GfxCursor32::revealCursor() {
_cursorBack.rect = _cursor.rect;
- _cursorBack.rect.clip(_vmapRegion.rect);
+ _cursorBack.rect.clip(_screenRegion.rect);
if (_cursorBack.rect.isEmpty()) {
return;
}
- readVideo(_cursorBack);
- _drawBuff1.rect = _cursor.rect;
- copy(_drawBuff1, _cursorBack);
- paint(_drawBuff1, _cursor);
- drawToHardware(_drawBuff1);
+ copyFromScreen(_cursorBack);
+ _scratch1.rect = _cursor.rect;
+ copy<false>(_scratch1, _cursorBack);
+ copy<true>(_scratch1, _cursor);
+ drawToScreen(_scratch1);
}
-void GfxCursor32::paint(DrawRegion &target, const DrawRegion &source) {
+template <bool SKIP>
+void GfxCursor32::copy(DrawRegion &target, const DrawRegion &source) {
if (source.rect.isEmpty()) {
return;
}
@@ -96,25 +98,33 @@ void GfxCursor32::paint(DrawRegion &target, const DrawRegion &source) {
const byte *sourcePixel = source.data + (sourceYOffset * source.rect.width()) + sourceXOffset;
const uint8 skipColor = source.skipColor;
- const int16 sourceStride = source.rect.width() - drawRectWidth;
- const int16 targetStride = target.rect.width() - drawRectWidth;
+ int16 sourceStride = source.rect.width();
+ int16 targetStride = target.rect.width();
+ if (SKIP) {
+ sourceStride -= drawRectWidth;
+ targetStride -= drawRectWidth;
+ }
for (int16 y = 0; y < drawRectHeight; ++y) {
- for (int16 x = 0; x < drawRectWidth; ++x) {
- if (*sourcePixel != skipColor) {
- *targetPixel = *sourcePixel;
+ if (SKIP) {
+ for (int16 x = 0; x < drawRectWidth; ++x) {
+ if (*sourcePixel != skipColor) {
+ *targetPixel = *sourcePixel;
+ }
+ ++targetPixel;
+ ++sourcePixel;
}
- ++targetPixel;
- ++sourcePixel;
+ } else {
+ memcpy(targetPixel, sourcePixel, drawRectWidth);
}
- sourcePixel += sourceStride;
targetPixel += targetStride;
+ sourcePixel += sourceStride;
}
}
-void GfxCursor32::drawToHardware(const DrawRegion &source) {
+void GfxCursor32::drawToScreen(const DrawRegion &source) {
Common::Rect drawRect(source.rect);
- drawRect.clip(_vmapRegion.rect);
+ drawRect.clip(_screenRegion.rect);
const int16 sourceXOffset = drawRect.left - source.rect.left;
const int16 sourceYOffset = drawRect.top - source.rect.top;
byte *sourcePixel = source.data + (sourceYOffset * source.rect.width()) + sourceXOffset;
@@ -127,12 +137,14 @@ void GfxCursor32::unhide() {
return;
}
+ g_system->showMouse(true);
_cursor.rect.moveTo(_position.x - _hotSpot.x, _position.y - _hotSpot.y);
revealCursor();
}
void GfxCursor32::show() {
if (_hideCount) {
+ g_system->showMouse(true);
_hideCount = 0;
_cursor.rect.moveTo(_position.x - _hotSpot.x, _position.y - _hotSpot.y);
revealCursor();
@@ -142,10 +154,10 @@ void GfxCursor32::show() {
void GfxCursor32::setRestrictedArea(const Common::Rect &rect) {
_restrictedArea = rect;
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
mulru(_restrictedArea, Ratio(screenWidth, scriptWidth), Ratio(screenHeight, scriptHeight), 0);
@@ -174,7 +186,7 @@ void GfxCursor32::setRestrictedArea(const Common::Rect &rect) {
}
void GfxCursor32::clearRestrictedArea() {
- _restrictedArea = _vmapRegion.rect;
+ _restrictedArea = _screenRegion.rect;
}
void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const int16 celNo) {
@@ -250,7 +262,7 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
// threshold size because inventory items usually have a
// high-resolution cursor representation.
bool pixelDouble = false;
- if (g_sci->_gfxFrameout->_isHiRes &&
+ if (g_sci->_gfxFrameout->isHiRes() &&
(g_sci->getGameId() == GID_GK1 ||
(g_sci->getGameId() == GID_PQ4 && _width <= 22 && _height <= 22))) {
@@ -266,7 +278,8 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
memset(_cursor.data, 255, _width * _height);
_cursor.skipColor = 255;
- Buffer target(_width, _height, _cursor.data);
+ Buffer target;
+ target.init(_width, _height, _width, _cursor.data, Graphics::PixelFormat::createFormatCLUT8());
if (pixelDouble) {
view.draw(target, _cursor.rect, Common::Point(0, 0), false, 2, 2);
} else {
@@ -279,65 +292,36 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
_cursor.rect = Common::Rect(_width, _height);
*_cursor.data = _cursor.skipColor;
_cursorBack.rect = _cursor.rect;
- _cursorBack.rect.clip(_vmapRegion.rect);
+ _cursorBack.rect.clip(_screenRegion.rect);
if (!_cursorBack.rect.isEmpty()) {
- readVideo(_cursorBack);
+ copyFromScreen(_cursorBack);
}
}
_cursorBack.data = (byte *)realloc(_cursorBack.data, _width * _height);
memset(_cursorBack.data, 0, _width * _height);
- _drawBuff1.data = (byte *)realloc(_drawBuff1.data, _width * _height);
- _drawBuff2.data = (byte *)realloc(_drawBuff2.data, _width * _height * 4);
- _savedVmapRegion.data = (byte *)realloc(_savedVmapRegion.data, _width * _height);
+ _scratch1.data = (byte *)realloc(_scratch1.data, _width * _height);
+ _scratch2.data = (byte *)realloc(_scratch2.data, _width * _height * 4);
+ _savedScreenRegion.data = (byte *)realloc(_savedScreenRegion.data, _width * _height);
unhide();
}
-void GfxCursor32::readVideo(DrawRegion &target) {
- // NOTE: In SSCI, mouse events were received via hardware interrupt, so
- // there was a separate branch here that would read from VRAM instead of
- // from the game's back buffer when a mouse event was received while the
- // back buffer was being updated. In ScummVM, mouse events are polled, which
- // means it is not possible to receive a mouse event during a back buffer
- // update, so the code responsible for handling that is removed.
- copy(target, _vmapRegion);
-}
-
-void GfxCursor32::copy(DrawRegion &target, const DrawRegion &source) {
- if (source.rect.isEmpty()) {
- return;
- }
-
- Common::Rect drawRect(source.rect);
- drawRect.clip(target.rect);
- if (drawRect.isEmpty()) {
- return;
- }
-
- const int16 sourceXOffset = drawRect.left - source.rect.left;
- const int16 sourceYOffset = drawRect.top - source.rect.top;
- const int16 drawWidth = drawRect.width();
- const int16 drawHeight = drawRect.height();
-
- byte *targetPixel = target.data + ((drawRect.top - target.rect.top) * target.rect.width()) + (drawRect.left - target.rect.left);
- const byte *sourcePixel = source.data + (sourceYOffset * source.rect.width()) + sourceXOffset;
-
- const int16 sourceStride = source.rect.width();
- const int16 targetStride = target.rect.width();
-
- for (int y = 0; y < drawHeight; ++y) {
- memcpy(targetPixel, sourcePixel, drawWidth);
- targetPixel += targetStride;
- sourcePixel += sourceStride;
- }
+void GfxCursor32::copyFromScreen(DrawRegion &target) {
+ // In SSCI, mouse events were received via hardware interrupt, so there was
+ // a separate branch here that would read from VRAM instead of from the
+ // game's back buffer when a mouse event was received while the back buffer
+ // was being updated. In ScummVM, mouse events are polled, which means it is
+ // not possible to receive a mouse event during a back buffer update, so the
+ // code responsible for handling that is removed.
+ copy<false>(target, _screenRegion);
}
void GfxCursor32::setPosition(const Common::Point &position) {
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
Common::Point newPosition;
newPosition.x = (position.x * Ratio(screenWidth, scriptWidth)).toInt();
@@ -349,32 +333,32 @@ void GfxCursor32::setPosition(const Common::Point &position) {
}
void GfxCursor32::gonnaPaint(Common::Rect paintRect) {
- if (!_hideCount && !_writeToVMAP && !_cursorBack.rect.isEmpty()) {
+ if (!_hideCount && !_needsPaint && !_cursorBack.rect.isEmpty()) {
paintRect.left &= ~3;
paintRect.right |= 3;
if (_cursorBack.rect.intersects(paintRect)) {
- _writeToVMAP = true;
+ _needsPaint = true;
}
}
}
void GfxCursor32::paintStarting() {
- if (_writeToVMAP) {
- _savedVmapRegion.rect = _cursor.rect;
- copy(_savedVmapRegion, _vmapRegion);
- paint(_vmapRegion, _cursor);
+ if (_needsPaint) {
+ _savedScreenRegion.rect = _cursor.rect;
+ copy<false>(_savedScreenRegion, _screenRegion);
+ copy<true>(_screenRegion, _cursor);
}
}
void GfxCursor32::donePainting() {
- if (_writeToVMAP) {
- copy(_vmapRegion, _savedVmapRegion);
- _savedVmapRegion.rect = Common::Rect();
- _writeToVMAP = false;
+ if (_needsPaint) {
+ copy<false>(_screenRegion, _savedScreenRegion);
+ _savedScreenRegion.rect = Common::Rect();
+ _needsPaint = false;
}
if (!_hideCount && !_cursorBack.rect.isEmpty()) {
- copy(_cursorBack, _vmapRegion);
+ copy<false>(_cursorBack, _screenRegion);
}
}
@@ -423,45 +407,45 @@ void GfxCursor32::move() {
}
// Cursor moved offscreen
- if (!_cursor.rect.intersects(_vmapRegion.rect)) {
- drawToHardware(_cursorBack);
+ if (!_cursor.rect.intersects(_screenRegion.rect)) {
+ drawToScreen(_cursorBack);
return;
}
if (!_cursor.rect.intersects(_cursorBack.rect)) {
// Cursor moved to a completely different part of the screen
- _drawBuff1.rect = _cursor.rect;
- _drawBuff1.rect.clip(_vmapRegion.rect);
- readVideo(_drawBuff1);
+ _scratch1.rect = _cursor.rect;
+ _scratch1.rect.clip(_screenRegion.rect);
+ copyFromScreen(_scratch1);
- _drawBuff2.rect = _drawBuff1.rect;
- copy(_drawBuff2, _drawBuff1);
+ _scratch2.rect = _scratch1.rect;
+ copy<false>(_scratch2, _scratch1);
- paint(_drawBuff1, _cursor);
- drawToHardware(_drawBuff1);
+ copy<true>(_scratch1, _cursor);
+ drawToScreen(_scratch1);
- drawToHardware(_cursorBack);
+ drawToScreen(_cursorBack);
_cursorBack.rect = _cursor.rect;
- _cursorBack.rect.clip(_vmapRegion.rect);
- copy(_cursorBack, _drawBuff2);
+ _cursorBack.rect.clip(_screenRegion.rect);
+ copy<false>(_cursorBack, _scratch2);
} else {
// Cursor moved, but still overlaps the previous cursor location
Common::Rect mergedRect(_cursorBack.rect);
mergedRect.extend(_cursor.rect);
- mergedRect.clip(_vmapRegion.rect);
+ mergedRect.clip(_screenRegion.rect);
- _drawBuff2.rect = mergedRect;
- readVideo(_drawBuff2);
+ _scratch2.rect = mergedRect;
+ copyFromScreen(_scratch2);
- copy(_drawBuff2, _cursorBack);
+ copy<false>(_scratch2, _cursorBack);
_cursorBack.rect = _cursor.rect;
- _cursorBack.rect.clip(_vmapRegion.rect);
- copy(_cursorBack, _drawBuff2);
+ _cursorBack.rect.clip(_screenRegion.rect);
+ copy<false>(_cursorBack, _scratch2);
- paint(_drawBuff2, _cursor);
- drawToHardware(_drawBuff2);
+ copy<true>(_scratch2, _cursor);
+ drawToScreen(_scratch2);
}
}
diff --git a/engines/sci/graphics/cursor32.h b/engines/sci/graphics/cursor32.h
index 562a2c50de..fb07c49dbb 100644
--- a/engines/sci/graphics/cursor32.h
+++ b/engines/sci/graphics/cursor32.h
@@ -23,6 +23,7 @@
#ifndef SCI_GRAPHICS_CURSOR32_H
#define SCI_GRAPHICS_CURSOR32_H
+#include "common/array.h" // for Array
#include "common/rect.h" // for Point, Rect
#include "common/scummsys.h" // for int16, byte, uint8
#include "common/serializer.h" // for Serializable, Serializer (ptr only)
@@ -37,11 +38,10 @@ public:
~GfxCursor32();
/**
- * Initialises the cursor system with the given
- * buffer to use as the output buffer for
- * rendering the cursor.
+ * Initialises the cursor system with the given buffer to use as the output
+ * buffer for rendering the cursor.
*/
- void init(const Buffer &vmap);
+ void init(const Buffer &outputBuffer);
/**
* Called when the hardware mouse moves.
@@ -49,41 +49,35 @@ public:
bool deviceMoved(Common::Point &position);
/**
- * Called by GfxFrameout once for each show
- * rectangle that is going to be drawn to
- * hardware.
+ * Called by GfxFrameout once for each show rectangle that is going to be
+ * drawn to hardware.
*/
void gonnaPaint(Common::Rect paintRect);
/**
- * Called by GfxFrameout when the rendering to
- * hardware begins.
+ * Called by GfxFrameout when the rendering to hardware begins.
*/
void paintStarting();
/**
- * Called by GfxFrameout when the output buffer
- * has finished rendering to hardware.
+ * Called by GfxFrameout when the output buffer has finished rendering to
+ * hardware.
*/
void donePainting();
/**
- * Hides the cursor. Each call to `hide` will
- * increment a hide counter, which must be
- * returned to 0 before the cursor will be
- * shown again.
+ * Hides the cursor. Each call to `hide` will increment a hide counter,
+ * which must be returned to 0 before the cursor will be shown again.
*/
void hide();
/**
- * Shows the cursor, if the hide counter is
- * returned to 0.
+ * Shows the cursor, if the hide counter is returned to 0.
*/
void unhide();
/**
- * Shows the cursor regardless of the state of
- * the hide counter.
+ * Shows the cursor regardless of the state of the hide counter.
*/
void show();
@@ -93,14 +87,12 @@ public:
void setView(const GuiResourceId viewId, const int16 loopNo, const int16 celNo);
/**
- * Explicitly sets the position of the cursor,
- * in game script coordinates.
+ * Explicitly sets the position of the cursor, in game script coordinates.
*/
void setPosition(const Common::Point &position);
/**
- * Sets the region that the mouse is allowed
- * to move within.
+ * Sets the region that the mouse is allowed to move within.
*/
void setRestrictedArea(const Common::Rect &rect);
@@ -109,10 +101,6 @@ public:
*/
void clearRestrictedArea();
-#ifdef ENABLE_SCI32_MAC
- void setMacCursorRemapList(int cursorCount, reg_t *cursors);
-#endif
-
virtual void saveLoadWithSerializer(Common::Serializer &ser);
private:
@@ -121,42 +109,41 @@ private:
byte *data;
uint8 skipColor;
- DrawRegion() : rect(), data(nullptr) {}
+ DrawRegion() : data(nullptr) {}
};
/**
- * Information about the current cursor.
- * Used to restore cursor when loading a
- * savegame.
+ * Information about the current cursor. Used to restore cursor when loading
+ * a savegame.
*/
CelInfo32 _cursorInfo;
/**
- * Content behind the cursor? TODO
+ * The content of the frame buffer which was behind the cursor prior to its
+ * being drawn.
*/
DrawRegion _cursorBack;
/**
* Scratch buffer.
*/
- DrawRegion _drawBuff1;
+ DrawRegion _scratch1;
/**
* Scratch buffer 2.
*/
- DrawRegion _drawBuff2;
+ DrawRegion _scratch2;
/**
- * A draw region representing the current
- * output buffer.
+ * A draw region representing the entire output buffer.
*/
- DrawRegion _vmapRegion;
+ DrawRegion _screenRegion;
/**
- * The content behind the cursor in the
+ * The region behind the cursor immediately before it is painted to the
* output buffer.
*/
- DrawRegion _savedVmapRegion;
+ DrawRegion _savedScreenRegion;
/**
* The cursor bitmap.
@@ -164,93 +151,82 @@ private:
DrawRegion _cursor;
/**
- * The width and height of the cursor,
- * in screen coordinates.
+ * The width and height of the cursor, in screen coordinates.
*/
int16 _width, _height;
/**
- * The output buffer where the cursor is
- * rendered.
+ * The output buffer where the cursor is rendered.
*/
- Buffer _vmap;
+ Buffer _screen;
/**
- * The number of times the cursor has been
- * hidden.
+ * The number of times the cursor has been hidden.
*/
int _hideCount;
/**
- * The rendered position of the cursor, in
- * screen coordinates.
+ * The rendered position of the cursor, in screen coordinates.
*/
Common::Point _position;
/**
- * The position of the cursor hot spot, relative
- * to the cursor origin, in screen pixels.
+ * The position of the cursor hot spot, relative to the cursor origin, in
+ * screen pixels.
*/
Common::Point _hotSpot;
/**
- * The area within which the cursor is allowed
- * to move, in screen pixels.
+ * The area within which the cursor is allowed to move, in screen pixels.
*/
Common::Rect _restrictedArea;
/**
- * Indicates whether or not the cursor needs to
- * be repainted on the output buffer due to a
- * change of graphics in the area underneath the
- * cursor.
- */
- bool _writeToVMAP;
-
- // Mac versions of games use a remap list to remap their cursors
- Common::Array<uint16> _macCursorRemap;
-
- /**
- * Reads data from the output buffer or hardware
- * to the given draw region.
+ * Indicates whether or not the cursor needs to be repainted on the output
+ * buffer due to a change of graphics in the area underneath the cursor.
*/
- void readVideo(DrawRegion &target);
+ bool _needsPaint;
/**
- * Reads data from the output buffer to the
- * given draw region.
+ * Reads data from the output buffer to the given draw region.
*/
- void readVideoFromVmap(DrawRegion &target);
+ void copyFromScreen(DrawRegion &target);
/**
- * Copies pixel data from the given source to
- * the given target.
+ * Copies pixel data from the given source to the given target. If SKIP is
+ * true, pixels that match the `skipColor` property of the source will be
+ * skipped.
+ *
+ * @note In SSCI, the function that did not handle skip color was called
+ * `copy` and the one that did was called `paint`.
*/
+ template <bool SKIP>
void copy(DrawRegion &target, const DrawRegion &source);
/**
- * Draws from the given source onto the given
- * target, skipping pixels in the source that
- * match the `skipColor` property.
- */
- void paint(DrawRegion &target, const DrawRegion &source);
-
- /**
- * Draws the cursor to the position it was
- * drawn to prior to moving offscreen or being
- * hidden by a call to `hide`.
+ * Draws the cursor to the position it was drawn to prior to moving
+ * offscreen or being hidden by a call to `hide`.
*/
void revealCursor();
/**
* Draws the given source to the output buffer.
*/
- void drawToHardware(const DrawRegion &source);
+ void drawToScreen(const DrawRegion &source);
/**
* Renders the cursor at its new location.
*/
void move();
+
+#ifdef ENABLE_SCI32_MAC
+public:
+ void setMacCursorRemapList(int cursorCount, reg_t *cursors);
+
+private:
+ // Mac versions of games use a remap list to remap their cursors
+ Common::Array<uint16> _macCursorRemap;
+#endif
};
} // End of namespace Sci
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 6ea4975ea8..434c5a0fec 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -61,7 +61,7 @@
namespace Sci {
GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor) :
- _isHiRes(gameIsHiRes()),
+ _isHiRes(detectHiRes()),
_palette(palette),
_cursor(cursor),
_segMan(segMan),
@@ -74,15 +74,13 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
_lastScreenUpdateTick(0) {
if (g_sci->getGameId() == GID_PHANTASMAGORIA) {
- _currentBuffer = Buffer(630, 450, nullptr);
+ _currentBuffer.create(630, 450, Graphics::PixelFormat::createFormatCLUT8());
} else if (_isHiRes) {
- _currentBuffer = Buffer(640, 480, nullptr);
+ _currentBuffer.create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
} else {
- _currentBuffer = Buffer(320, 200, nullptr);
+ _currentBuffer.create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
}
- _currentBuffer.setPixels(calloc(1, _currentBuffer.screenWidth * _currentBuffer.screenHeight));
- _screenRect = Common::Rect(_currentBuffer.screenWidth, _currentBuffer.screenHeight);
- initGraphics(_currentBuffer.screenWidth, _currentBuffer.screenHeight, _isHiRes);
+ initGraphics(_currentBuffer.w, _currentBuffer.h);
switch (g_sci->getGameId()) {
case GID_HOYLE5:
@@ -91,18 +89,20 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
case GID_PHANTASMAGORIA2:
case GID_TORIN:
case GID_RAMA:
- _currentBuffer.scriptWidth = 640;
- _currentBuffer.scriptHeight = 480;
+ _scriptWidth = 640;
+ _scriptHeight = 480;
break;
case GID_GK2:
case GID_PQSWAT:
if (!g_sci->isDemo()) {
- _currentBuffer.scriptWidth = 640;
- _currentBuffer.scriptHeight = 480;
+ _scriptWidth = 640;
+ _scriptHeight = 480;
+ break;
}
- break;
+ // fall through
default:
- // default script width for other games is 320x200
+ _scriptWidth = 320;
+ _scriptHeight = 200;
break;
}
}
@@ -110,7 +110,7 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
GfxFrameout::~GfxFrameout() {
clear();
CelObj::deinit();
- free(_currentBuffer.getPixels());
+ _currentBuffer.free();
}
void GfxFrameout::run() {
@@ -119,10 +119,10 @@ void GfxFrameout::run() {
ScreenItem::init();
GfxText32::init();
- // NOTE: This happens in SCI::InitPlane in the actual engine,
- // and is a background fill plane to ensure hidden planes
- // (planes with a priority of -1) are never drawn
- Plane *initPlane = new Plane(Common::Rect(_currentBuffer.scriptWidth, _currentBuffer.scriptHeight));
+ // This plane is created in SCI::InitPlane in SSCI, and is a background fill
+ // plane to ensure "hidden" planes (planes with negative priority) are never
+ // drawn
+ Plane *initPlane = new Plane(Common::Rect(_scriptWidth, _scriptHeight));
initPlane->_priority = 0;
_planes.add(initPlane);
}
@@ -133,7 +133,7 @@ void GfxFrameout::clear() {
_showList.clear();
}
-bool GfxFrameout::gameIsHiRes() const {
+bool GfxFrameout::detectHiRes() const {
// QFG4 is always low resolution
if (g_sci->getGameId() == GID_QFG4) {
return false;
@@ -296,8 +296,8 @@ void GfxFrameout::kernelDeletePlane(const reg_t object) {
}
if (plane->_created) {
- // NOTE: The original engine calls some `AbortPlane` function that
- // just ends up doing this anyway so we skip the extra indirection
+ // SSCI calls some `AbortPlane` function that just ends up doing this
+ // anyway, so we skip the extra indirection
_planes.erase(plane);
} else {
plane->_created = 0;
@@ -331,8 +331,8 @@ void GfxFrameout::kernelMovePlaneItems(const reg_t object, const int16 deltaX, c
for (ScreenItemList::iterator it = plane->_screenItemList.begin(); it != plane->_screenItemList.end(); ++it) {
ScreenItem &screenItem = **it;
- // If object is a number, the screen item from the
- // engine, not a script, and should be ignored
+ // If object is a number, the screen item from the engine, not a script,
+ // and should be ignored
if (screenItem._object.isNumber()) {
continue;
}
@@ -360,19 +360,19 @@ void GfxFrameout::addPlane(Plane *plane) {
error("Plane %04x:%04x already exists", PRINT_REG(plane->_object));
}
- plane->clipScreenRect(_screenRect);
+ plane->clipScreenRect(Common::Rect(_currentBuffer.w, _currentBuffer.h));
_planes.add(plane);
}
void GfxFrameout::updatePlane(Plane &plane) {
- // NOTE: This assertion comes from SCI engine code.
+ // This assertion comes from SSCI
assert(_planes.findByObject(plane._object) == &plane);
Plane *visiblePlane = _visiblePlanes.findByObject(plane._object);
- plane.sync(visiblePlane, _screenRect);
- // NOTE: updateScreenRect was originally called a second time here,
- // but it is already called at the end of the Plane::Update call
- // in the original engine anyway.
+ plane.sync(visiblePlane, Common::Rect(_currentBuffer.w, _currentBuffer.h));
+ // updateScreenRect was called a second time here in SSCI, but it is already
+ // called at the end of the sync call (also in SSCI) so there is no reason
+ // to do it again
_planes.sort();
}
@@ -401,8 +401,8 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR
robotPlayer.doRobot();
}
- // NOTE: The original engine allocated these as static arrays of 100
- // pointers to ScreenItemList / RectList
+ // SSCI allocated these as static arrays of 100 pointers to
+ // ScreenItemList / RectList
ScreenItemListList screenItemLists;
EraseListList eraseLists;
@@ -455,12 +455,12 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show
int16 prevRoom = g_sci->getEngineState()->variables[VAR_GLOBAL][kGlobalVarPreviousRoomNo].toSint16();
- Common::Rect rect(_currentBuffer.screenWidth, _currentBuffer.screenHeight);
+ Common::Rect rect(_currentBuffer.w, _currentBuffer.h);
_showList.add(rect);
showBits();
- // NOTE: The original engine allocated these as static arrays of 100
- // pointers to ScreenItemList / RectList
+ // SSCI allocated these as static arrays of 100 pointers to
+ // ScreenItemList / RectList
ScreenItemListList screenItemLists;
EraseListList eraseLists;
@@ -557,24 +557,39 @@ void GfxFrameout::directFrameOut(const Common::Rect &showRect) {
}
#ifdef USE_RGB_COLOR
+void GfxFrameout::redrawGameScreen(const Common::Rect &skipRect) const {
+ Common::ScopedPtr<Graphics::Surface> game(_currentBuffer.convertTo(g_system->getScreenFormat(), _palette->getHardwarePalette()));
+ assert(game);
+
+ Common::Rect rects[4];
+ int splitCount = splitRects(Common::Rect(game->w, game->h), skipRect, rects);
+ if (splitCount != -1) {
+ while (splitCount--) {
+ const Common::Rect &drawRect = rects[splitCount];
+ g_system->copyRectToScreen(game->getBasePtr(drawRect.left, drawRect.top), game->pitch, drawRect.left, drawRect.top, drawRect.width(), drawRect.height());
+ }
+ }
+
+ game->free();
+}
+
void GfxFrameout::resetHardware() {
updateMousePositionForRendering();
- _showList.add(Common::Rect(getCurrentBuffer().screenWidth, getCurrentBuffer().screenHeight));
+ _showList.add(Common::Rect(_currentBuffer.w, _currentBuffer.h));
g_system->getPaletteManager()->setPalette(_palette->getHardwarePalette(), 0, 256);
showBits();
}
#endif
/**
- * Determines the parts of `middleRect` that aren't overlapped
- * by `showRect`, optimised for contiguous memory writes.
- * Returns -1 if `middleRect` and `showRect` have no intersection.
- * Returns number of returned parts (in `outRects`) otherwise.
- * (In particular, this returns 0 if `middleRect` is contained
- * in `other`.)
+ * Determines the parts of `middleRect` that aren't overlapped by `showRect`,
+ * optimised for contiguous memory writes.
+ *
+ * `middleRect` is modified directly to extend into the upper and lower rects.
*
- * `middleRect` is modified directly to extend into the upper
- * and lower rects.
+ * @returns -1 if `middleRect` and `showRect` have no intersection, or the
+ * number of returned parts (in `outRects`) otherwise. (In particular, this
+ * returns 0 if `middleRect` is contained in `showRect`.)
*/
int splitRectsForRender(Common::Rect &middleRect, const Common::Rect &showRect, Common::Rect(&outRects)[2]) {
if (!middleRect.intersects(showRect)) {
@@ -651,8 +666,7 @@ int splitRectsForRender(Common::Rect &middleRect, const Common::Rect &showRect,
return splitCount;
}
-// NOTE: The third rectangle parameter is only ever given a non-empty rect
-// by VMD code, via `frameOut`
+// The third rectangle parameter is only ever passed by VMD code
void GfxFrameout::calcLists(ScreenItemListList &drawLists, EraseListList &eraseLists, const Common::Rect &eraseRect) {
RectList eraseList;
Common::Rect outRects[4];
@@ -670,8 +684,8 @@ void GfxFrameout::calcLists(ScreenItemListList &drawLists, EraseListList &eraseL
const Plane *outerPlane = _planes[outerPlaneIndex];
const Plane *visiblePlane = _visiblePlanes.findByObject(outerPlane->_object);
- // NOTE: SSCI only ever checks for kPlaneTypeTransparent here, even
- // though kPlaneTypeTransparentPicture is also a transparent plane
+ // SSCI only ever checks for kPlaneTypeTransparent here, even though
+ // kPlaneTypeTransparentPicture is also a transparent plane
if (outerPlane->_type == kPlaneTypeTransparent) {
foundTransparentPlane = true;
}
@@ -741,7 +755,6 @@ void GfxFrameout::calcLists(ScreenItemListList &drawLists, EraseListList &eraseL
}
}
- // clean up deleted planes
if (deletedPlaneCount) {
for (int planeIndex = planeCount - 1; planeIndex >= 0; --planeIndex) {
Plane *plane = _planes[planeIndex];
@@ -866,7 +879,7 @@ void GfxFrameout::calcLists(ScreenItemListList &drawLists, EraseListList &eraseL
}
}
- // NOTE: SSCI only looks for kPlaneTypeTransparent, not
+ // SSCI really only looks for kPlaneTypeTransparent, not
// kPlaneTypeTransparentPicture
if (foundTransparentPlane) {
for (PlaneList::size_type planeIndex = 0; planeIndex < planeCount; ++planeIndex) {
@@ -913,8 +926,6 @@ void GfxFrameout::drawScreenItemList(const DrawList &screenItemList) {
const DrawItem &drawItem = *screenItemList[i];
mergeToShowList(drawItem.rect, _showList, _overdrawThreshold);
const ScreenItem &screenItem = *drawItem.screenItem;
- // TODO: Remove
-// debug("Drawing item %04x:%04x to %d %d %d %d", PRINT_REG(screenItem._object), PRINT_RECT(drawItem.rect));
CelObj &celObj = *screenItem._celObj;
celObj.draw(_currentBuffer, screenItem, drawItem.rect, screenItem._mirrorX ^ celObj._mirrorX);
}
@@ -986,9 +997,8 @@ void GfxFrameout::showBits() {
for (RectList::const_iterator rect = _showList.begin(); rect != _showList.end(); ++rect) {
Common::Rect rounded(**rect);
- // NOTE: SCI engine used BR-inclusive rects so used slightly
- // different masking here to ensure that the width of rects
- // was always even.
+ // SSCI uses BR-inclusive rects so has slightly different masking here
+ // to ensure that the width of rects is always even
rounded.left &= ~1;
rounded.right = (rounded.right + 1) & ~1;
_cursor->gonnaPaint(rounded);
@@ -998,13 +1008,12 @@ void GfxFrameout::showBits() {
for (RectList::const_iterator rect = _showList.begin(); rect != _showList.end(); ++rect) {
Common::Rect rounded(**rect);
- // NOTE: SCI engine used BR-inclusive rects so used slightly
- // different masking here to ensure that the width of rects
- // was always even.
+ // SSCI uses BR-inclusive rects so has slightly different masking here
+ // to ensure that the width of rects is always even
rounded.left &= ~1;
rounded.right = (rounded.right + 1) & ~1;
- byte *sourceBuffer = (byte *)_currentBuffer.getPixels() + rounded.top * _currentBuffer.screenWidth + rounded.left;
+ byte *sourceBuffer = (byte *)_currentBuffer.getPixels() + rounded.top * _currentBuffer.w + rounded.left;
// Sometimes screen items (especially from SCI2.1early transitions, like
// in the asteroids minigame in PQ4) generate zero-dimension show
@@ -1029,7 +1038,7 @@ void GfxFrameout::showBits() {
#else
{
#endif
- g_system->copyRectToScreen(sourceBuffer, _currentBuffer.screenWidth, rounded.left, rounded.top, rounded.width(), rounded.height());
+ g_system->copyRectToScreen(sourceBuffer, _currentBuffer.w, rounded.left, rounded.top, rounded.width(), rounded.height());
}
}
@@ -1089,14 +1098,14 @@ void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, co
byte *pixels = (byte *)_currentBuffer.getPixels();
- for (int pixelIndex = 0, numPixels = _currentBuffer.screenWidth * _currentBuffer.screenHeight; pixelIndex < numPixels; ++pixelIndex) {
+ for (int pixelIndex = 0, numPixels = _currentBuffer.w * _currentBuffer.h; pixelIndex < numPixels; ++pixelIndex) {
byte currentValue = pixels[pixelIndex];
int8 styleRangeValue = styleRanges[currentValue];
if (styleRangeValue == -1 && styleRangeValue == style) {
currentValue = pixels[pixelIndex] = clut[currentValue];
- // NOTE: In original engine this assignment happens outside of the
- // condition, but if the branch is not followed the value is just
- // going to be the same as it was before
+ // In SSCI this assignment happens outside of the condition, but if
+ // the branch is not followed the value is just going to be the same
+ // as it was before, so we do it here instead
styleRangeValue = styleRanges[currentValue];
}
@@ -1110,7 +1119,7 @@ void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, co
}
void GfxFrameout::updateScreen(const int delta) {
- // using OSystem::getMillis instead of Sci::getTickCount because these
+ // Using OSystem::getMillis instead of Sci::getTickCount here because these
// values need to be monotonically increasing for the duration of the
// GfxFrameout object or else the screen will stop updating
const uint32 now = g_system->getMillis() * 60 / 1000;
@@ -1199,20 +1208,19 @@ reg_t GfxFrameout::kernelIsOnMe(const reg_t object, const Common::Point &positio
return make_reg(0, 0);
}
- // NOTE: The original engine passed a copy of the ScreenItem into isOnMe
- // as a hack around the fact that the screen items in `_visiblePlanes`
- // did not have their `_celObj` pointers cleared when their CelInfo was
- // updated by `Plane::decrementScreenItemArrayCounts`. We handle this
- // this more intelligently by clearing `_celObj` in the copy assignment
- // operator, which is only ever called by `decrementScreenItemArrayCounts`
- // anyway.
+ // SSCI passed a copy of the ScreenItem into isOnMe as a hack around the
+ // fact that the screen items in `_visiblePlanes` did not have their
+ // `_celObj` pointers cleared when their CelInfo was updated by
+ // `Plane::decrementScreenItemArrayCounts`. We handle this this more
+ // intelligently by clearing `_celObj` in the copy assignment operator,
+ // which is only ever called by `decrementScreenItemArrayCounts` anyway.
return make_reg(0, isOnMe(*screenItem, *plane, position, checkPixel));
}
bool GfxFrameout::isOnMe(const ScreenItem &screenItem, const Plane &plane, const Common::Point &position, const bool checkPixel) const {
Common::Point scaledPosition(position);
- mulru(scaledPosition, Ratio(_currentBuffer.screenWidth, _currentBuffer.scriptWidth), Ratio(_currentBuffer.screenHeight, _currentBuffer.scriptHeight));
+ mulru(scaledPosition, Ratio(_currentBuffer.w, _scriptWidth), Ratio(_currentBuffer.h, _scriptHeight));
scaledPosition.x += plane._planeRect.left;
scaledPosition.y += plane._planeRect.top;
@@ -1228,8 +1236,8 @@ bool GfxFrameout::isOnMe(const ScreenItem &screenItem, const Plane &plane, const
scaledPosition.x -= screenItem._scaledPosition.x;
scaledPosition.y -= screenItem._scaledPosition.y;
- if (getSciVersion() < SCI_VERSION_3) {
- mulru(scaledPosition, Ratio(celObj._xResolution, _currentBuffer.screenWidth), Ratio(celObj._yResolution, _currentBuffer.screenHeight));
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
+ mulru(scaledPosition, Ratio(celObj._xResolution, _currentBuffer.w), Ratio(celObj._yResolution, _currentBuffer.h));
}
if (screenItem._scale.signal != kScaleSignalNone && screenItem._scale.x && screenItem._scale.y) {
@@ -1271,9 +1279,9 @@ bool GfxFrameout::getNowSeenRect(const reg_t screenItemObject, Common::Rect &res
const ScreenItem *screenItem = plane->_screenItemList.findByObject(screenItemObject);
if (screenItem == nullptr) {
- // NOTE: MGDX is assumed to use the older getNowSeenRect since it was
- // released before SQ6, but this has not been verified since it cannot
- // be disassembled at the moment (Phar Lap Windows-only release)
+ // MGDX is assumed to use the older getNowSeenRect since it was released
+ // before SQ6, but this has not been verified since it cannot be
+ // disassembled at the moment (Phar Lap Windows-only release)
// (See also kSetNowSeen32)
if (getSciVersion() <= SCI_VERSION_2_1_EARLY ||
g_sci->getGameId() == GID_SQ6 ||
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index a7b529fe90..eddf88f523 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -37,37 +37,70 @@ class GfxTransitions32;
struct PlaneShowStyle;
/**
- * Frameout class, kFrameout and relevant functions for SCI32 games.
- * Roughly equivalent to GraphicsMgr in the actual SCI engine.
+ * Frameout class, kFrameOut and relevant functions for SCI32 games.
+ * Roughly equivalent to GraphicsMgr in SSCI.
*/
class GfxFrameout {
friend class GfxTransitions32;
+
+public:
+ GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor);
+ ~GfxFrameout();
+
+ void clear();
+ void run();
+
+ /**
+ * Returns true if the game should render at a resolution greater than
+ * 320x240.
+ */
+ inline bool isHiRes() const { return _isHiRes; }
+
+ /**
+ * Gets the x-resolution used by game scripts.
+ */
+ inline int16 getScriptWidth() const { return _scriptWidth; }
+
+ /**
+ * Gets the y-resolution used by game scripts.
+ */
+ inline int16 getScriptHeight() const { return _scriptHeight; }
+
+ /**
+ * Gets the x-resolution of the output buffer.
+ */
+ inline int16 getScreenWidth() const { return _currentBuffer.w; }
+
+ /**
+ * Gets the y-resolution of the output buffer.
+ */
+ inline int16 getScreenHeight() const { return _currentBuffer.h; }
+
private:
GfxCursor32 *_cursor;
GfxPalette32 *_palette;
+ GfxTransitions32 *_transitions;
SegManager *_segMan;
/**
- * Determines whether the current game should be rendered in
- * high resolution.
+ * Whether or not the game should render at a resolution above 320x240.
*/
- bool gameIsHiRes() const;
-
-public:
- GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor);
- ~GfxFrameout();
-
bool _isHiRes;
- void clear();
- void run();
+ /**
+ * The resolution used by game scripts.
+ * @see celobj32.h comments on kLowResX/kLowResY.
+ */
+ int16 _scriptWidth, _scriptHeight;
+
+ /**
+ * Determines whether the current game should be rendered in high
+ * resolution.
+ */
+ bool detectHiRes() const;
#pragma mark -
#pragma mark Screen items
-private:
- void remapMarkRedraw();
- bool getNowSeenRect(const reg_t screenItemObject, Common::Rect &result) const;
-
public:
/**
* Adds a screen item.
@@ -100,39 +133,27 @@ public:
bool kernelSetNowSeen(const reg_t screenItemObject) const;
int16 kernelObjectIntersect(const reg_t object1, const reg_t object2) const;
-#pragma mark -
-#pragma mark Planes
private:
- /**
- * The list of planes (i.e. layers) that have been added
- * to the screen.
- *
- * @note This field is on `GraphicsMgr.screen` in SCI
- * engine.
- */
- PlaneList _planes;
-
- /**
- * Updates an existing plane with properties from the
- * given VM object.
- */
- void updatePlane(Plane &plane);
+ void remapMarkRedraw();
+ bool getNowSeenRect(const reg_t screenItemObject, Common::Rect &result) const;
+#pragma mark -
+#pragma mark Planes
public:
/**
* Creates and adds a new plane to the plane list. Ownership of the passed
* object is transferred to GfxFrameout.
*
- * @note This method is on Screen in SCI engine, but it
- * is only ever called on `GraphicsMgr.screen`.
+ * @note This method is on Screen in SSCI, but it is only ever called on
+ * `GraphicsMgr.screen`.
*/
void addPlane(Plane *plane);
/**
* Deletes a plane within the current plane list.
*
- * @note This method is on Screen in SCI engine, but it
- * is only ever called on `GraphicsMgr.screen`.
+ * @note This method is on Screen in SSCI, but it is only ever called on
+ * `GraphicsMgr.screen`.
*/
void deletePlane(Plane &plane);
@@ -148,148 +169,27 @@ public:
void kernelMovePlaneItems(const reg_t object, const int16 deltaX, const int16 deltaY, const bool scrollPics);
int16 kernelGetHighPlanePri();
-#pragma mark -
-#pragma mark Pics
-public:
- void kernelAddPicAt(const reg_t planeObject, const GuiResourceId pictureId, const int16 pictureX, const int16 pictureY, const bool mirrorX, const bool deleteDuplicate);
-
-#pragma mark -
-#pragma mark Rendering
private:
/**
- * The last time the hardware screen was updated.
- */
- uint32 _lastScreenUpdateTick;
-
- GfxTransitions32 *_transitions;
-
- /**
- * State tracker to provide more accurate 60fps
- * video throttling.
- */
- uint8 _throttleState;
-
- /**
- * The internal display pixel buffer. During frameOut,
- * this buffer is drawn into according to the draw and
- * erase rects calculated by `calcLists`, then drawn out
- * to the hardware surface according to the `_showList`
- * rects (which are also calculated by `calcLists`).
- */
- Buffer _currentBuffer;
-
- /**
- * When true, a change to the remap zone in the palette
- * has occurred and screen items with remap data need to
- * be redrawn.
- */
- bool _remapOccurred;
-
- /**
- * TODO: Document
- * TODO: Depending upon if the engine ever modifies this
- * rect, it may be stupid to store it separately instead
- * of just getting width/height from GfxScreen.
- *
- * @note This field is on `GraphicsMgr.screen` in SCI
- * engine.
- */
- Common::Rect _screenRect;
-
- /**
- * A list of rectangles, in display coordinates, that
- * represent portions of the internal screen buffer that
- * should be drawn to the hardware display surface.
+ * The list of planes (i.e. layers) that will be rendered to the screen on
+ * the next call to `frameOut`.
*
- * @note This field is on `GraphicsMgr.screen` in SCI
- * engine.
- */
- RectList _showList;
-
- /**
- * The amount of extra overdraw that is acceptable when
- * merging two show list rectangles together into a
- * single larger rectangle.
- *
- * @note This field is on `GraphicsMgr.screen` in SCI
- * engine.
- */
- int _overdrawThreshold;
-
- /**
- * A list of planes that are currently drawn to the
- * hardware display surface. Used to calculate
- * differences in plane properties between the last
- * frame and current frame.
- *
- * @note This field is on `GraphicsMgr.visibleScreen` in
- * SCI engine.
- */
- PlaneList _visiblePlanes;
-
- /**
- * Calculates the location and dimensions of dirty rects
- * over the entire screen for rendering the next frame.
- * The draw and erase lists in `drawLists` and
- * `eraseLists` each represent one plane on the screen.
- * The optional `eraseRect` argument allows a specific
- * area of the screen to be erased.
- */
- void calcLists(ScreenItemListList &drawLists, EraseListList &eraseLists, const Common::Rect &eraseRect = Common::Rect());
-
- /**
- * Erases the areas in the given erase list from the
- * visible screen buffer by filling them with the color
- * from the corresponding plane. This is an optimisation
- * for colored-type planes only; other plane types have
- * to be redrawn from pixel data.
- */
- void drawEraseList(const RectList &eraseList, const Plane &plane);
-
- /**
- * Draws all screen items from the given draw list to
- * the visible screen buffer.
- */
- void drawScreenItemList(const DrawList &screenItemList);
-
- /**
- * Adds a new rectangle to the list of regions to write
- * out to the hardware. The provided rect may be merged
- * into an existing rectangle to reduce the number of
- * blit operations.
- */
- void mergeToShowList(const Common::Rect &drawRect, RectList &showList, const int overdrawThreshold);
-
- /**
- * Sends all dirty rects from the internal frame buffer to the backend,
- * then updates the hardware screen.
+ * @note This field is on `GraphicsMgr.screen` in SSCI.
*/
- void showBits();
+ PlaneList _planes;
/**
- * Validates whether the given palette index in the
- * style range should copy a color from the next
- * palette to the source palette during a palette
- * morph operation.
+ * Updates an existing plane with properties from the given VM object.
*/
- inline bool validZeroStyle(const uint8 style, const int i) const {
- if (style != 0) {
- return false;
- }
+ void updatePlane(Plane &plane);
- // TODO: Cannot check Shivers or MGDX until those executables can be
- // unwrapped
- switch (g_sci->getGameId()) {
- case GID_KQ7:
- case GID_PHANTASMAGORIA:
- case GID_SQ6:
- return (i > 71 && i < 104);
- break;
- default:
- return true;
- }
- }
+#pragma mark -
+#pragma mark Pics
+public:
+ void kernelAddPicAt(const reg_t planeObject, const GuiResourceId pictureId, const int16 pictureX, const int16 pictureY, const bool mirrorX, const bool deleteDuplicate);
+#pragma mark -
+#pragma mark Rendering
public:
/**
* Updates the hardware screen, no more than once per tick.
@@ -307,7 +207,7 @@ public:
* Resets the pixel format of the hardware surface to the given format.
*/
void setPixelFormat(const Graphics::PixelFormat &format) const {
- initGraphics(_currentBuffer.screenWidth, _currentBuffer.screenHeight, _isHiRes, &format);
+ initGraphics(_currentBuffer.w, _currentBuffer.h, &format);
}
/**
@@ -316,9 +216,9 @@ public:
bool _throttleKernelFrameOut;
/**
- * Whether palMorphFrameOut should be used instead of
- * frameOut for rendering. Used by kMorphOn to
- * explicitly enable palMorphFrameOut for one frame.
+ * Whether `palMorphFrameOut` should be used instead of `frameOut` for
+ * rendering. Used by `kMorphOn` to explicitly enable `palMorphFrameOut` for
+ * one frame.
*/
bool _palMorphIsOn;
@@ -329,16 +229,14 @@ public:
void kernelFrameOut(const bool showBits);
/**
- * Throttles the engine as necessary to maintain
- * 60fps output.
+ * Throttles the engine as necessary to maintain 60fps output.
*/
void throttle();
/**
- * Updates the internal screen buffer for the next
- * frame. If `shouldShowBits` is true, also sends the
- * buffer to hardware. If `eraseRect` is non-empty,
- * it is added to the erase list for this frame.
+ * Updates the internal screen buffer for the next frame. If
+ * `shouldShowBits` is true, also sends the buffer to hardware. If
+ * `eraseRect` is non-empty, it is added to the erase list for this frame.
*/
void frameOut(const bool shouldShowBits, const Common::Rect &eraseRect = Common::Rect());
@@ -353,6 +251,14 @@ public:
*/
void directFrameOut(const Common::Rect &showRect);
+ /**
+ * Redraws the game screen from the internal frame buffer to the system.
+ * Used after pixel format changes.
+ *
+ * @param skipRect An area of the screen that does not need to be redrawn.
+ */
+ void redrawGameScreen(const Common::Rect &skipRect) const;
+
#ifdef USE_RGB_COLOR
/**
* Sends the entire internal screen buffer and palette to hardware.
@@ -361,19 +267,18 @@ public:
#endif
/**
- * Modifies the raw pixel data for the next frame with
- * new palette indexes based on matched style ranges.
+ * Modifies the raw pixel data for the next frame with new palette indexes
+ * based on matched style ranges.
*/
void alterVmap(const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges);
- // NOTE: This function is used within ScreenItem subsystem and assigned
- // to various booleanish fields that seem to represent the state of the
- // screen item (created, updated, deleted). In GK1/DOS, Phant1/m68k,
- // SQ6/DOS, SQ6/Win, and Phant2/Win, this function simply returns 1. If
- // you know of any game/environment where this function returns some
- // value other than 1, or if you used to work at Sierra and can explain
- // why this is a thing (and if anyone needs to care about it), please
- // open a ticket!!
+ // This function is used within ScreenItem subsystem and assigned to various
+ // booleanish fields that seem to represent the state of the screen item
+ // (created, updated, deleted). In GK1/DOS, Phant1/m68k, SQ6/DOS, SQ6/Win,
+ // and Phant2/Win, this function simply returns 1. If you know of any
+ // game/environment where this function returns some value other than 1, or
+ // if you used to work at Sierra and can explain why this is a thing (and if
+ // anyone needs to care about it), please open a ticket!!
inline int getScreenCount() const {
return 1;
};
@@ -383,8 +288,121 @@ public:
*/
void shakeScreen(const int16 numShakes, const ShakeDirection direction);
+private:
+ /**
+ * The last time the hardware screen was updated.
+ */
+ uint32 _lastScreenUpdateTick;
+
+ /**
+ * State tracker to provide more accurate 60fps video throttling.
+ */
+ uint8 _throttleState;
+
+ /**
+ * The internal display pixel buffer. During `frameOut`, this buffer is
+ * drawn into according to the draw and erase rects calculated by
+ * `calcLists`, then drawn out to the hardware surface according to the
+ * `_showList` rects (which are also calculated by `calcLists`).
+ */
+ Buffer _currentBuffer;
+
+ /**
+ * When true, a change to the remap zone in the palette has occurred and
+ * screen items with remap data need to be redrawn.
+ */
+ bool _remapOccurred;
+
+ /**
+ * A list of rectangles, in screen coordinates, that represent portions of
+ * the internal screen buffer that are dirty and should be drawn to the
+ * hardware display surface.
+ *
+ * @note This field is on `GraphicsMgr.screen` in SSCI.
+ */
+ RectList _showList;
+
+ /**
+ * The amount of extra overdraw that is acceptable when merging two show
+ * list rectangles together into a single larger rectangle.
+ *
+ * @note This field is on `GraphicsMgr.screen` in SSCI.
+ */
+ int _overdrawThreshold;
+
+ /**
+ * The list of planes that are currently drawn to the hardware display
+ * surface. Used to calculate differences in plane properties between the
+ * last frame and current frame.
+ *
+ * @note This field is on `GraphicsMgr.visibleScreen` in SSCI.
+ */
+ PlaneList _visiblePlanes;
+
+ /**
+ * Calculates the location and dimensions of dirty rects over the entire
+ * screen for rendering the next frame. The draw and erase lists in
+ * `drawLists` and `eraseLists` each represent one plane on the screen.
+ * The optional `eraseRect` argument allows a specific area of the screen to
+ * be explicitly erased.
+ */
+ void calcLists(ScreenItemListList &drawLists, EraseListList &eraseLists, const Common::Rect &eraseRect = Common::Rect());
+
+ /**
+ * Erases the areas in the given erase list from the visible screen buffer
+ * by filling them with the color from the corresponding plane. This is an
+ * optimisation for colored-type planes only; other plane types have to be
+ * redrawn from pixel data.
+ */
+ void drawEraseList(const RectList &eraseList, const Plane &plane);
+
+ /**
+ * Draws all screen items from the given draw list to the visible screen
+ * buffer.
+ */
+ void drawScreenItemList(const DrawList &screenItemList);
+
+ /**
+ * Adds a new rectangle to the list of regions to write out to the hardware.
+ * The provided rect may be merged into an existing rectangle to reduce the
+ * number of blit operations.
+ */
+ void mergeToShowList(const Common::Rect &drawRect, RectList &showList, const int overdrawThreshold);
+
+ /**
+ * Sends all dirty rects from the internal frame buffer to the backend, then
+ * updates the hardware screen.
+ */
+ void showBits();
+
+ /**
+ * Validates whether the given palette index in the style range should copy
+ * a color from the next palette to the source palette during a palette
+ * morph operation.
+ */
+ inline bool validZeroStyle(const uint8 style, const int i) const {
+ if (style != 0) {
+ return false;
+ }
+
+ // TODO: Cannot check Shivers or MGDX until those executables can be
+ // unwrapped
+ switch (g_sci->getGameId()) {
+ case GID_KQ7:
+ case GID_PHANTASMAGORIA:
+ case GID_SQ6:
+ return (i > 71 && i < 104);
+ break;
+ default:
+ return true;
+ }
+ }
+
#pragma mark -
#pragma mark Mouse cursor
+public:
+ reg_t kernelIsOnMe(const reg_t object, const Common::Point &position, const bool checkPixel) const;
+
private:
void updateMousePositionForRendering() const {
// In SSCI, mouse events were received via hardware interrupt, so the
@@ -398,14 +416,11 @@ private:
}
/**
- * Determines whether or not the point given by
- * `position` is inside of the given screen item.
+ * Determines whether or not the point given by `position` is inside of the
+ * given screen item.
*/
bool isOnMe(const ScreenItem &screenItem, const Plane &plane, const Common::Point &position, const bool checkPixel) const;
-public:
- reg_t kernelIsOnMe(const reg_t object, const Common::Point &position, const bool checkPixel) const;
-
#pragma mark -
#pragma mark Debugging
public:
diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h
index 38da280701..5842bf0887 100644
--- a/engines/sci/graphics/helpers.h
+++ b/engines/sci/graphics/helpers.h
@@ -225,47 +225,7 @@ inline int splitRects(Common::Rect r, const Common::Rect &other, Common::Rect(&o
return splitCount;
}
-struct Buffer : public Graphics::Surface {
- uint16 screenWidth;
- uint16 screenHeight;
- uint16 scriptWidth;
- uint16 scriptHeight;
-
- Buffer() :
- screenWidth(0),
- screenHeight(0),
- scriptWidth(320),
- scriptHeight(200) {}
-
- Buffer(const uint16 width, const uint16 height, uint8 *const pix) :
- screenWidth(width),
- screenHeight(height),
- // TODO: These values are not correct for all games. Script
- // dimensions were hard-coded per game in the original
- // interpreter. Search all games for their internal script
- // dimensions and set appropriately. (This code does not
- // appear to exist at all in SCI3, which uses 640x480.)
- scriptWidth(320),
- scriptHeight(200) {
- init(width, height, width, pix, Graphics::PixelFormat::createFormatCLUT8());
- }
-
- void clear(const uint8 value) {
- memset(pixels, value, w * h);
- }
-
- inline uint8 *getAddress(const uint16 x, const uint16 y) {
- return (uint8 *)getBasePtr(x, y);
- }
-
- inline uint8 *getAddressSimRes(const uint16 x, const uint16 y) {
- return (uint8*)pixels + (y * w * screenHeight / scriptHeight) + (x * screenWidth / scriptWidth);
- }
-
- bool isNull() {
- return pixels == nullptr;
- }
-};
+typedef Graphics::Surface Buffer;
#endif
struct Color {
diff --git a/engines/sci/graphics/lists32.h b/engines/sci/graphics/lists32.h
index ff0bc6ceae..82e9e58b36 100644
--- a/engines/sci/graphics/lists32.h
+++ b/engines/sci/graphics/lists32.h
@@ -28,13 +28,11 @@
namespace Sci {
/**
- * StablePointerArray holds pointers in a fixed-size array
- * that maintains position of erased items until `pack` is
- * called. It is used by DrawList, RectList, and
- * ScreenItemList. StablePointerArray takes ownership of
- * all pointers that are passed to it and deletes them when
- * calling `erase` or when destroying the
- * StablePointerArray.
+ * StablePointerArray holds pointers in a fixed-size array that maintains
+ * position of erased items until `pack` is called. It is used by DrawList,
+ * RectList, and ScreenItemList. StablePointerArray takes ownership of all
+ * pointers that are passed to it and deletes them when calling `erase` or when
+ * destroying the StablePointerArray.
*/
template<class T, uint N>
class StablePointerArray {
diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp
index 8a63365f03..f80f115e1b 100644
--- a/engines/sci/graphics/paint32.cpp
+++ b/engines/sci/graphics/paint32.cpp
@@ -42,9 +42,9 @@ reg_t GfxPaint32::kernelAddLine(const reg_t planeObject, const Common::Point &st
CelInfo32 celInfo;
celInfo.type = kCelTypeMem;
celInfo.bitmap = bitmapId;
- // SSCI stores the line color on `celInfo`, even though
- // this is not a `kCelTypeColor`, as a hack so that
- // `kUpdateLine` can get the originally used color
+ // SSCI stores the line color on `celInfo`, even though this is not a
+ // `kCelTypeColor`, as a hack so that `kUpdateLine` can get the originally
+ // used color
celInfo.color = color;
ScreenItem *screenItem = new ScreenItem(planeObject, celInfo, gameRect);
@@ -93,7 +93,8 @@ void GfxPaint32::plotter(int x, int y, int color, void *data) {
const uint32 index = bitmapWidth * y + x;
// Only draw the points in the bitmap, and ignore the rest. SSCI scripts
- // can draw lines ending outside the visible area (e.g. negative coordinates)
+ // can draw lines ending outside the visible area (e.g. negative
+ // coordinates)
if (x >= 0 && x < bitmapWidth && y >= 0 && y < bitmapHeight) {
if (properties.solid) {
pixels[index] = (uint8)color;
@@ -125,8 +126,8 @@ reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common::
thickness = (MAX<uint8>(1, thickness) - 1) | 1;
const uint8 halfThickness = thickness >> 1;
- const uint16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const uint16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const uint16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const uint16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
outRect.left = MIN<int16>(startPoint.x, endPoint.x);
outRect.top = MIN<int16>(startPoint.y, endPoint.y);
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index d8a2ead66d..7a3b396da8 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -39,11 +39,10 @@ namespace Sci {
HunkPalette::HunkPalette(const SciSpan<const byte> &rawPalette) :
_version(0),
- // NOTE: The header size in palettes is garbage. In at least KQ7 2.00b and
- // Phant1, the 999.pal sets this value to 0. In most other palettes it is
- // set to 14, but the *actual* size of the header structure used in SSCI is
- // 13, which is reflected by `kHunkPaletteHeaderSize`.
- // _headerSize(rawPalette[0]),
+ // The header size in palettes is garbage. In at least KQ7 2.00b and Phant1,
+ // the 999.pal sets this value to 0. In most other palettes it is set to 14,
+ // but the *actual* size of the header structure used in SSCI is 13, which
+ // is reflected by `kHunkPaletteHeaderSize`.
_numPalettes(rawPalette.getUint8At(kNumPaletteEntriesOffset)),
_data() {
assert(_numPalettes == 0 || _numPalettes == 1);
@@ -371,18 +370,17 @@ static const uint8 gammaTables[GfxPalette32::numGammaTables][256] = {
_varyLastTick(0),
_varyTime(0),
_varyDirection(0),
+ _varyPercent(0),
_varyTargetPercent(0),
_varyNumTimesPaused(0),
// Palette cycling
- _cyclers(),
_cycleMap(),
// Gamma correction
_gammaLevel(-1),
_gammaChanged(false) {
- _varyPercent = _varyTargetPercent;
for (int i = 0, len = ARRAYSIZE(_fadeTable); i < len; ++i) {
_fadeTable[i] = 100;
}
@@ -390,11 +388,6 @@ static const uint8 gammaTables[GfxPalette32::numGammaTables][256] = {
loadPalette(999);
}
-GfxPalette32::~GfxPalette32() {
- varyOff();
- cycleAllOff();
-}
-
bool GfxPalette32::loadPalette(const GuiResourceId resourceId) {
Resource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false);
@@ -604,16 +597,16 @@ void GfxPalette32::setVary(const Palette &target, const int16 percent, const int
}
void GfxPalette32::setVaryPercent(const int16 percent, const int32 ticks) {
- if (_varyTargetPalette != nullptr) {
+ if (_varyTargetPalette) {
setVaryTime(percent, ticks);
}
- // NOTE: SSCI had two additional parameters for this function to change the
+ // SSCI had two additional parameters for this function to change the
// `_varyFromColor`, but they were always hardcoded to be ignored
}
void GfxPalette32::setVaryTime(const int32 time) {
- if (_varyTargetPalette != nullptr) {
+ if (_varyTargetPalette) {
setVaryTime(_varyTargetPercent, time);
}
}
@@ -645,16 +638,8 @@ void GfxPalette32::varyOff() {
_varyFromColor = 0;
_varyToColor = 255;
_varyDirection = 0;
-
- if (_varyTargetPalette != nullptr) {
- delete _varyTargetPalette;
- _varyTargetPalette = nullptr;
- }
-
- if (_varyStartPalette != nullptr) {
- delete _varyStartPalette;
- _varyStartPalette = nullptr;
- }
+ _varyTargetPalette.reset();
+ _varyStartPalette.reset();
}
void GfxPalette32::varyPause() {
@@ -667,7 +652,7 @@ void GfxPalette32::varyOn() {
--_varyNumTimesPaused;
}
- if (_varyTargetPalette != nullptr && _varyNumTimesPaused == 0) {
+ if (_varyTargetPalette && _varyNumTimesPaused == 0) {
if (_varyPercent != _varyTargetPercent && _varyTime != 0) {
_varyDirection = (_varyTargetPercent - _varyPercent > 0) ? 1 : -1;
} else {
@@ -677,28 +662,26 @@ void GfxPalette32::varyOn() {
}
void GfxPalette32::setTarget(const Palette &palette) {
- delete _varyTargetPalette;
- _varyTargetPalette = new Palette(palette);
+ _varyTargetPalette.reset(new Palette(palette));
}
void GfxPalette32::setStart(const Palette &palette) {
- delete _varyStartPalette;
- _varyStartPalette = new Palette(palette);
+ _varyStartPalette.reset(new Palette(palette));
}
void GfxPalette32::mergeStart(const Palette &palette) {
- if (_varyStartPalette != nullptr) {
+ if (_varyStartPalette) {
mergePalette(*_varyStartPalette, palette);
} else {
- _varyStartPalette = new Palette(palette);
+ _varyStartPalette.reset(new Palette(palette));
}
}
void GfxPalette32::mergeTarget(const Palette &palette) {
- if (_varyTargetPalette != nullptr) {
+ if (_varyTargetPalette) {
mergePalette(*_varyTargetPalette, palette);
} else {
- _varyTargetPalette = new Palette(palette);
+ _varyTargetPalette.reset(new Palette(palette));
}
}
@@ -714,9 +697,9 @@ void GfxPalette32::applyVary() {
_varyPercent += _varyDirection;
}
- if (_varyPercent == 0 || _varyTargetPalette == nullptr) {
+ if (_varyPercent == 0 || !_varyTargetPalette) {
for (int i = 0; i < ARRAYSIZE(_nextPalette.colors); ++i) {
- if (_varyStartPalette != nullptr && i >= _varyFromColor && i <= _varyToColor) {
+ if (_varyStartPalette && i >= _varyFromColor && i <= _varyToColor) {
_nextPalette.colors[i] = _varyStartPalette->colors[i];
} else {
_nextPalette.colors[i] = _sourcePalette.colors[i];
@@ -728,7 +711,7 @@ void GfxPalette32::applyVary() {
Color targetColor = _varyTargetPalette->colors[i];
Color sourceColor;
- if (_varyStartPalette != nullptr) {
+ if (_varyStartPalette) {
sourceColor = _varyStartPalette->colors[i];
} else {
sourceColor = _sourcePalette.colors[i];
@@ -816,27 +799,28 @@ void GfxPalette32::setCycle(const uint8 fromColor, const uint8 toColor, const in
clearCycleMap(fromColor, cycler->numColorsToCycle);
} else {
for (int i = 0; i < kNumCyclers; ++i) {
- if (_cyclers[i] == nullptr) {
- _cyclers[i] = cycler = new PalCycler;
+ if (!_cyclers[i]) {
+ cycler = new PalCycler;
+ _cyclers[i].reset(cycler);
break;
}
}
}
- // If there are no free cycler slots, SCI engine overrides the first oldest
- // cycler that it finds, where "oldest" is determined by the difference
- // between the tick and now
+ // If there are no free cycler slots, SSCI overrides the first oldest cycler
+ // that it finds, where "oldest" is determined by the difference between the
+ // tick and now
if (cycler == nullptr) {
const uint32 now = g_sci->getTickCount();
uint32 minUpdateDelta = 0xFFFFFFFF;
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const candidate = _cyclers[i];
+ PalCyclerOwner &candidate = _cyclers[i];
const uint32 updateDelta = now - candidate->lastUpdateTick;
if (updateDelta < minUpdateDelta) {
minUpdateDelta = updateDelta;
- cycler = candidate;
+ cycler = candidate.get();
}
}
@@ -882,19 +866,18 @@ void GfxPalette32::cyclePause(const uint8 fromColor) {
void GfxPalette32::cycleAllOn() {
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const cycler = _cyclers[i];
- if (cycler != nullptr && cycler->numTimesPaused > 0) {
+ PalCyclerOwner &cycler = _cyclers[i];
+ if (cycler && cycler->numTimesPaused > 0) {
--cycler->numTimesPaused;
}
}
}
void GfxPalette32::cycleAllPause() {
- // NOTE: The original engine did not check for null pointers in the
- // palette cyclers pointer array.
+ // SSCI did not check for null pointers in the palette cyclers pointer array
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const cycler = _cyclers[i];
- if (cycler != nullptr) {
+ PalCyclerOwner &cycler = _cyclers[i];
+ if (cycler) {
// This seems odd, because currentCycle is 0..numColorsPerCycle,
// but fromColor is 0..255. When applyAllCycles runs, the values
// end up back in range
@@ -905,8 +888,8 @@ void GfxPalette32::cycleAllPause() {
applyAllCycles();
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const cycler = _cyclers[i];
- if (cycler != nullptr) {
+ PalCyclerOwner &cycler = _cyclers[i];
+ if (cycler) {
++cycler->numTimesPaused;
}
}
@@ -914,11 +897,10 @@ void GfxPalette32::cycleAllPause() {
void GfxPalette32::cycleOff(const uint8 fromColor) {
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const cycler = _cyclers[i];
- if (cycler != nullptr && cycler->fromColor == fromColor) {
+ PalCyclerOwner &cycler = _cyclers[i];
+ if (cycler && cycler->fromColor == fromColor) {
clearCycleMap(fromColor, cycler->numColorsToCycle);
- delete cycler;
- _cyclers[i] = nullptr;
+ _cyclers[i].reset();
break;
}
}
@@ -926,11 +908,10 @@ void GfxPalette32::cycleOff(const uint8 fromColor) {
void GfxPalette32::cycleAllOff() {
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const cycler = _cyclers[i];
- if (cycler != nullptr) {
+ PalCyclerOwner &cycler = _cyclers[i];
+ if (cycler) {
clearCycleMap(cycler->fromColor, cycler->numColorsToCycle);
- delete cycler;
- _cyclers[i] = nullptr;
+ _cyclers[i].reset();
}
}
}
@@ -969,9 +950,9 @@ void GfxPalette32::setCycleMap(const uint16 fromColor, const uint16 numColorsToS
PalCycler *GfxPalette32::getCycler(const uint16 fromColor) {
for (int cyclerIndex = 0; cyclerIndex < kNumCyclers; ++cyclerIndex) {
- PalCycler *cycler = _cyclers[cyclerIndex];
- if (cycler != nullptr && cycler->fromColor == fromColor) {
- return cycler;
+ PalCyclerOwner &cycler = _cyclers[cyclerIndex];
+ if (cycler && cycler->fromColor == fromColor) {
+ return cycler.get();
}
}
@@ -980,12 +961,12 @@ PalCycler *GfxPalette32::getCycler(const uint16 fromColor) {
void GfxPalette32::applyAllCycles() {
Color paletteCopy[256];
- memcpy(paletteCopy, _nextPalette.colors, sizeof(Color) * 256);
+ memcpy(paletteCopy, _nextPalette.colors, sizeof(paletteCopy));
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const cycler = _cyclers[i];
- if (cycler != nullptr) {
- cycler->currentCycle = (((int) cycler->currentCycle) + 1) % cycler->numColorsToCycle;
+ PalCyclerOwner &cycler = _cyclers[i];
+ if (cycler) {
+ cycler->currentCycle = (cycler->currentCycle + 1) % cycler->numColorsToCycle;
for (int j = 0; j < cycler->numColorsToCycle; j++) {
_nextPalette.colors[cycler->fromColor + j] = paletteCopy[cycler->fromColor + (cycler->currentCycle + j) % cycler->numColorsToCycle];
}
@@ -995,12 +976,12 @@ void GfxPalette32::applyAllCycles() {
void GfxPalette32::applyCycles() {
Color paletteCopy[256];
- memcpy(paletteCopy, _nextPalette.colors, sizeof(Color) * 256);
+ memcpy(paletteCopy, _nextPalette.colors, sizeof(paletteCopy));
const uint32 now = g_sci->getTickCount();
for (int i = 0; i < kNumCyclers; ++i) {
- PalCycler *const cycler = _cyclers[i];
- if (cycler == nullptr) {
+ PalCyclerOwner &cycler = _cyclers[i];
+ if (!cycler) {
continue;
}
diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h
index b8ba85eb4a..2d00b86501 100644
--- a/engines/sci/graphics/palette32.h
+++ b/engines/sci/graphics/palette32.h
@@ -23,6 +23,8 @@
#ifndef SCI_GRAPHICS_PALETTE32_H
#define SCI_GRAPHICS_PALETTE32_H
+#include "common/ptr.h"
+
namespace Sci {
#pragma mark HunkPalette
@@ -233,7 +235,6 @@ struct PalCycler {
class GfxPalette32 {
public:
GfxPalette32(ResourceManager *resMan);
- ~GfxPalette32();
void saveLoadWithSerializer(Common::Serializer &s);
@@ -440,13 +441,13 @@ private:
* operation. If this palette is not specified, `_sourcePalette` is used
* instead.
*/
- Palette *_varyStartPalette;
+ Common::ScopedPtr<Palette> _varyStartPalette;
/**
* An optional palette used to provide target colors for a palette vary
* operation.
*/
- Palette *_varyTargetPalette;
+ Common::ScopedPtr<Palette> _varyTargetPalette;
/**
* The minimum palette index that has been varied from the source palette.
@@ -553,7 +554,8 @@ private:
kNumCyclers = 10
};
- PalCycler *_cyclers[kNumCyclers];
+ typedef Common::ScopedPtr<PalCycler> PalCyclerOwner;
+ PalCyclerOwner _cyclers[kNumCyclers];
/**
* Updates the `currentCycle` of the given `cycler` by `speed` entries.
@@ -564,8 +566,8 @@ private:
* The cycle map is used to detect overlapping cyclers, and to avoid
* remapping to palette entries that are being cycled.
*
- * According to SCI engine code, when two cyclers overlap, a fatal error has
- * occurred and the engine will display an error and then exit.
+ * According to SSCI, when two cyclers overlap, a fatal error has occurred
+ * and the engine will display an error and then exit.
*
* The color remapping system avoids attempts to remap to palette entries
* that are cycling because they won't be the expected color once the cycler
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp
index d9e0d2d9ff..46a8aedbb0 100644
--- a/engines/sci/graphics/plane32.cpp
+++ b/engines/sci/graphics/plane32.cpp
@@ -137,10 +137,10 @@ void Plane::init() {
}
void Plane::convertGameRectToPlaneRect() {
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
const Ratio ratioX = Ratio(screenWidth, scriptWidth);
const Ratio ratioY = Ratio(screenHeight, scriptHeight);
@@ -201,10 +201,9 @@ void Plane::addPicInternal(const GuiResourceId pictureId, const Common::Point *p
} else {
screenItem->_position = celObj->_relativePosition;
}
- _screenItemList.add(screenItem);
+ screenItem->_celObj.reset(celObj);
- delete screenItem->_celObj;
- screenItem->_celObj = celObj;
+ _screenItemList.add(screenItem);
}
_type = (g_sci->_features->hasTransparentPicturePlanes() && transparent) ? kPlaneTypeTransparentPicture : kPlaneTypePicture;
}
@@ -321,9 +320,9 @@ void Plane::calcLists(Plane &visiblePlane, const PlaneList &planeList, DrawList
for (ScreenItemList::size_type i = 0; i < screenItemCount; ++i) {
// Items can be added to ScreenItemList and we don't want to process
- // those new items, but the list also can grow smaller, so we need
- // to check that we are still within the upper bound of the list and
- // quit if we aren't any more
+ // those new items, but the list also can grow smaller, so we need to
+ // check that we are still within the upper bound of the list and quit
+ // if we aren't any more
if (i >= _screenItemList.size()) {
break;
}
@@ -333,18 +332,17 @@ void Plane::calcLists(Plane &visiblePlane, const PlaneList &planeList, DrawList
continue;
}
- // NOTE: The original engine used an array without bounds checking
- // so could just get the visible screen item directly; we need to
- // verify that the index is actually within the valid range for
- // the visible plane before accessing the item to avoid a range
- // error.
+ // SSCI used an array without bounds checking so could just get the
+ // visible screen item directly; we need to verify that the index is
+ // actually within the valid range for the visible plane before
+ // accessing the item to avoid a range error.
const ScreenItem *visibleItem = nullptr;
if (i < visiblePlaneItemCount) {
visibleItem = visiblePlane._screenItemList[i];
}
- // Keep erase rects for this screen item from drawing outside
- // of its owner plane
+ // Keep erase rects for this screen item from drawing outside of its
+ // owner plane
Common::Rect visibleItemScreenRect;
if (visibleItem != nullptr) {
visibleItemScreenRect = visibleItem->_screenRect;
@@ -428,8 +426,8 @@ void Plane::calcLists(Plane &visiblePlane, const PlaneList &planeList, DrawList
breakEraseListByPlanes(eraseList, planeList);
breakDrawListByPlanes(drawList, planeList);
- // We store the current size of the drawlist, as we want to loop
- // over the currently inserted entries later.
+ // The current size of the draw list is stored here, as we need to loop over
+ // only the already-inserted entries later.
DrawList::size_type drawListSizePrimary = drawList.size();
const RectList::size_type eraseListCount = eraseList.size();
@@ -824,8 +822,8 @@ void Plane::sync(const Plane *other, const Common::Rect &screenRect) {
convertGameRectToPlaneRect();
_screenRect = _planeRect;
- // NOTE: screenRect originally was retrieved through globals
- // instead of being passed into the function
+ // screenRect was retrieved through globals in SSCI instead of being passed
+ // into the function. We don't do that just to avoid the extra indirection
clipScreenRect(screenRect);
}
diff --git a/engines/sci/graphics/plane32.h b/engines/sci/graphics/plane32.h
index a34df1cc1a..406c3f8a30 100644
--- a/engines/sci/graphics/plane32.h
+++ b/engines/sci/graphics/plane32.h
@@ -40,8 +40,7 @@ enum PlaneType {
};
enum PlanePictureCodes {
- // NOTE: Any value at or below 65531 means the plane
- // is a kPlaneTypePicture.
+ // Any value at or below 65531 means the plane is a kPlaneTypePicture
kPlanePic = 65531,
kPlanePicTransparentPicture = 65532,
kPlanePicOpaque = 65533,
@@ -104,61 +103,52 @@ class PlaneList;
class Plane {
private:
/**
- * A serial used for planes that are generated inside
- * the graphics engine, rather than the interpreter.
+ * A serial used for planes that are generated inside the graphics engine,
+ * rather than the interpreter.
*/
static uint16 _nextObjectId;
/**
- * A serial used to identify the creation order of
- * planes, to ensure a stable sort order for planes
- * with identical priorities.
+ * A serial used to identify the creation order of planes, to ensure a
+ * stable sort order for planes with identical priorities.
*/
static uint32 _nextCreationId;
/**
- * The creation order number, which ensures a stable
- * sort when planes with identical priorities are added
- * to the plane list.
+ * The creation order number, which ensures a stable sort when planes with
+ * identical priorities are added to the plane list.
*/
uint32 _creationId;
/**
- * For planes that are used to render picture data, the
- * resource ID of the picture to be displayed. This
- * value may also be one of the special
- * PlanePictureCodes, in which case the plane becomes a
- * non-picture plane.
+ * For planes that are used to render picture data, the resource ID of the
+ * picture to be displayed. This value may also be one of the special
+ * PlanePictureCodes, in which case the plane becomes a non-picture plane.
*/
GuiResourceId _pictureId;
/**
- * Whether or not the contents of picture planes should
- * be drawn horizontally mirrored. Only applies to
- * planes of type kPlaneTypePicture.
+ * Whether or not the contents of picture planes should be drawn
+ * horizontally mirrored. Only applies to planes of type kPlaneTypePicture.
*/
bool _mirrored;
/**
- * Whether the picture ID for this plane has changed.
- * This flag is set when the plane is created or updated
- * from a VM object, and is cleared when the plane is
- * synchronised to another plane (which calls
- * changePic).
+ * Whether the picture ID for this plane has changed. This flag is set when
+ * the plane is created or updated from a VM object, and is cleared when the
+ * plane is synchronised to another plane (which calls changePic).
*/
bool _pictureChanged;
/**
- * Converts the dimensions of the game rect used by
- * scripts to the dimensions of the plane rect used to
- * render content to the screen. Coordinates with
- * remainders are rounded up to the next whole pixel.
+ * Converts the dimensions of the game rect used by scripts to the
+ * dimensions of the plane rect used to render content to the screen.
+ * Coordinates with remainders are rounded up to the next whole pixel.
*/
void convertGameRectToPlaneRect();
/**
- * Sets the type of the plane according to its assigned
- * picture resource ID.
+ * Sets the type of the plane according to its assigned picture resource ID.
*/
void setType();
@@ -169,80 +159,73 @@ public:
PlaneType _type;
/**
- * The color to use when erasing the plane. Only
- * applies to planes of type kPlaneTypeColored.
+ * The color to use when erasing the plane. Only applies to planes of type
+ * kPlaneTypeColored.
*/
byte _back;
/**
- * Whether the priority of this plane has changed.
- * This flag is set when the plane is updated from
- * another plane and cleared when draw list calculation
- * occurs.
+ * Whether the priority of this plane has changed. This flag is set when the
+ * plane is updated from another plane and cleared when draw list
+ * calculation occurs.
*/
int _priorityChanged;
/**
- * A handle to the VM object corresponding to this
- * plane. Some planes are generated purely within the
- * graphics engine and have a numeric object value.
+ * A handle to the VM object corresponding to this plane. Some planes are
+ * generated purely within the graphics engine and have a numeric object
+ * value.
*/
reg_t _object;
/**
- * The rendering priority of the plane. Higher
- * priorities are drawn above lower priorities.
+ * The rendering priority of the plane. Higher priorities are drawn above
+ * lower priorities.
*/
int16 _priority;
/**
- * Whether or not all screen items in this plane should
- * be redrawn on the next frameout, instead of just
- * the screen items marked as updated. This is set when
- * visual changes to the plane itself are made that
- * affect the rendering of the entire plane, and cleared
- * once those changes are rendered by `redrawAll`.
+ * Whether or not all screen items in this plane should be redrawn on the
+ * next frameout, instead of just the screen items marked as updated. This
+ * is set when visual changes to the plane itself are made that affect the
+ * rendering of the entire plane, and cleared once those changes are
+ * rendered by `redrawAll`.
*/
int _redrawAllCount;
/**
* Flags indicating the state of the plane.
- * - `created` is set when the plane is first created,
- * either from a VM object or from within the engine
- * itself
- * - `updated` is set when the plane is updated from
- * another plane and the two planes' `planeRect`s do
- * not match
- * - `deleted` is set when the plane is deleted by a
- * kernel call
- * - `moved` is set when the plane has been moved or
- * resized
+ * - `created` is set when the plane is first created, either from a VM
+ * object or from within the engine itself
+ * - `updated` is set when the plane is updated from another plane and the
+ * two planes' `planeRect`s do not match
+ * - `deleted` is set when the plane is deleted by a kernel call
+ * - `moved` is set when the plane has been moved or resized
*/
int _created, _updated, _deleted, _moved;
/**
- * The vanishing point for the plane. Used when
- * automatically calculating the correct scaling of the
- * plane's screen items according to their position.
+ * The vanishing point for the plane. Used when automatically calculating
+ * the correct scaling of the plane's screen items according to their
+ * position.
*/
Common::Point _vanishingPoint;
/**
- * The position & dimensions of the plane in screen
- * coordinates. This rect is not clipped to the screen,
- * so may include coordinates that are offscreen.
+ * The position & dimensions of the plane in screen coordinates. This rect
+ * is not clipped to the screen, so may include coordinates that are
+ * offscreen.
*/
Common::Rect _planeRect;
/**
- * The position & dimensions of the plane in game script
- * coordinates.
+ * The position & dimensions of the plane in game script coordinates.
*/
Common::Rect _gameRect;
/**
- * The position & dimensions of the plane in screen
- * coordinates. This rect is clipped to the screen.
+ * The position & dimensions of the plane in screen coordinates. This rect
+ * is clipped to the screen.
*/
Common::Rect _screenRect;
@@ -257,10 +240,10 @@ public:
*/
static void init();
- // NOTE: This constructor signature originally did not accept a
- // picture ID, but some calls to construct planes with this signature
- // immediately set the picture ID and then called setType again, so
- // it made more sense to just make the picture ID a parameter instead.
+ // In SSCI this constructor signature did not accept a picture ID, but some
+ // calls to construct planes with this signature immediately set the picture
+ // ID and then called setType again, so it made more sense to just make the
+ // picture ID a parameter instead.
Plane(const Common::Rect &gameRect, PlanePictureCodes pictureId = kPlanePicColored);
Plane(const reg_t object);
@@ -284,14 +267,13 @@ public:
}
/**
- * Clips the screen rect of this plane to fit within the
- * given screen rect.
+ * Clips the screen rect of this plane to fit within the given screen rect.
*/
inline void clipScreenRect(const Common::Rect &screenRect) {
- // LSL6 hires creates planes with invalid rects; SSCI does not
- // care about this, but `Common::Rect::clip` does, so we need to
- // check whether or not the rect is actually valid before clipping
- // and only clip valid rects
+ // LSL6 hires creates planes with invalid rects; SSCI does not care
+ // about this, but `Common::Rect::clip` does, so we need to check
+ // whether or not the rect is actually valid before clipping and only
+ // clip valid rects
if (_screenRect.isValidRect() && _screenRect.intersects(screenRect)) {
_screenRect.clip(screenRect);
} else {
@@ -305,30 +287,25 @@ public:
void printDebugInfo(Console *con) const;
/**
- * Compares the properties of the current plane against
- * the properties of the `other` plane (which is the
- * corresponding plane from the visible plane list) to
- * discover which properties have been changed on this
- * plane by a call to `update(reg_t)`.
+ * Compares the properties of the current plane against the properties of
+ * the `other` plane (which is the corresponding plane from the visible
+ * plane list) to discover which properties have been changed on this plane
+ * by a call to `update(reg_t)`.
*
- * @note This method was originally called UpdatePlane
- * in SCI engine.
+ * @note This method was called UpdatePlane in SSCI.
*/
void sync(const Plane *other, const Common::Rect &screenRect);
/**
- * Updates the plane to match the state of the plane
- * object from the virtual machine.
+ * Updates the plane to match the state of the plane object from the VM.
*
- * @note This method was originally called UpdatePlane
- * in SCI engine.
+ * @note This method was called UpdatePlane in SSCI.
*/
void update(const reg_t object);
/**
- * Modifies the position of all non-pic screen items
- * by the given delta. If `scrollPics` is true, pic
- * items are also repositioned.
+ * Modifies the position of all non-pic screen items by the given delta. If
+ * `scrollPics` is true, pic items are also repositioned.
*/
void scrollScreenItems(const int16 deltaX, const int16 deltaY, const bool scrollPics);
@@ -336,47 +313,43 @@ public:
#pragma mark Plane - Pic
private:
/**
- * Adds all cels from the specified picture resource to
- * the plane as screen items. If a position is provided,
- * the screen items will be given that position;
- * otherwise, the default relative positions for each
- * cel will be taken from the picture resource data.
+ * Adds all cels from the specified picture resource to the plane as screen
+ * items. If a position is provided, the screen items will be given that
+ * position; otherwise, the default relative positions for each cel will be
+ * taken from the picture resource data.
*/
inline void addPicInternal(const GuiResourceId pictureId, const Common::Point *position, const bool mirrorX);
/**
- * Marks all screen items to be deleted that are within
- * this plane and match the given picture ID.
+ * Marks all screen items to be deleted that are within this plane and match
+ * the given picture ID.
*/
void deletePic(const GuiResourceId pictureId);
/**
- * Marks all screen items to be deleted that are within
- * this plane and are picture cels.
+ * Marks all screen items to be deleted that are within this plane and are
+ * picture cels.
*/
void deleteAllPics();
public:
/**
- * Marks all existing screen items matching the current
- * picture to be deleted, then adds all cels from the
- * new picture resource to the plane at the given
- * position.
+ * Marks all existing screen items matching the current picture to be
+ * deleted, then adds all cels from the new picture resource to the plane at
+ * the given position.
*/
GuiResourceId addPic(const GuiResourceId pictureId, const Common::Point &position, const bool mirrorX, const bool deleteDuplicate = true);
/**
- * If the plane is a picture plane, re-adds all cels
- * from its picture resource to the plane. Otherwise,
- * just clears the _pictureChanged flag.
+ * If the plane is a picture plane, re-adds all cels from its picture
+ * resource to the plane. Otherwise, just clears the _pictureChanged flag.
*/
void changePic();
/**
- * Marks all screen items to be deleted that are within
- * this plane and match the given picture ID, then sets
- * the picture ID of the plane to the new picture ID
- * without adding any screen items.
+ * Marks all screen items to be deleted that are within this plane and match
+ * the given picture ID, then sets the picture ID of the plane to the new
+ * picture ID without adding any screen items.
*/
void deletePic(const GuiResourceId oldPictureId, const GuiResourceId newPictureId);
@@ -384,120 +357,111 @@ public:
#pragma mark Plane - Rendering
private:
/**
- * Splits all rects in the given draw list at the edges
- * of all higher-priority, non-transparent, intersecting
- * planes.
+ * Splits all rects in the given draw list at the edges of all
+ * higher-priority, non-transparent, intersecting planes.
*/
void breakDrawListByPlanes(DrawList &drawList, const PlaneList &planeList) const;
/**
- * Splits all rects in the given erase list at the
- * edges of higher-priority, non-transparent,
- * intersecting planes.
+ * Splits all rects in the given erase list at the edges of higher-priority,
+ * non-transparent, intersecting planes.
*/
void breakEraseListByPlanes(RectList &eraseList, const PlaneList &planeList) const;
/**
- * Adds the screen item at `index` into `drawList`,
- * ensuring it is only drawn within the bounds of
- * `rect`. If an existing draw list entry exists
- * for this screen item, it will be modified.
- * Otherwise, a new entry will be added.
+ * Adds the screen item at `index` into `drawList`, ensuring it is only
+ * drawn within the bounds of `rect`. If an existing draw list entry exists
+ * for this screen item, it will be modified. Otherwise, a new entry will be
+ * added.
*/
void mergeToDrawList(const DrawList::size_type index, const Common::Rect &rect, DrawList &drawList) const;
/**
- * Merges `rect` with an existing rect in `eraseList`,
- * if possible. Otherwise, adds the rect as a new entry
- * to `eraseList`.
+ * Merges `rect` with an existing rect in `eraseList`, if possible.
+ * Otherwise, adds the rect as a new entry to `eraseList`.
*/
void mergeToRectList(const Common::Rect &rect, RectList &eraseList) const;
public:
/**
- * Calculates the location and dimensions of dirty rects
- * of the screen items in this plane and adds them to
- * the given draw and erase lists, and synchronises this
- * plane's list of screen items to the given visible
+ * Calculates the location and dimensions of dirty rects of the screen items
+ * in this plane and adds them to the given draw and erase lists, and
+ * synchronises this plane's list of screen items to the given visible
* plane.
*/
void calcLists(Plane &visiblePlane, const PlaneList &planeList, DrawList &drawList, RectList &eraseList);
/**
- * Synchronises changes to screen items from the current
- * plane to the visible plane and deletes screen items
- * from the current plane that have been marked as
- * deleted. If `forceUpdate` is true, all screen items
- * on the visible plane will be updated, even if they
- * are not marked as having changed.
+ * Synchronises changes to screen items from the current plane to the
+ * visible plane and deletes screen items from the current plane that have
+ * been marked as deleted. If `forceUpdate` is true, all screen items on the
+ * visible plane will be updated, even if they are not marked as having
+ * changed.
*/
void decrementScreenItemArrayCounts(Plane *visiblePlane, const bool forceUpdate);
/**
- * This method is called from the highest priority plane
- * to the lowest priority plane.
+ * This method is called from the highest priority plane to the lowest
+ * priority plane.
*
- * Adds screen items from this plane to the draw list
- * that must be redrawn because they intersect entries
- * in the `higherEraseList`.
+ * Adds screen items from this plane to the draw list that must be redrawn
+ * because they intersect entries in the `higherEraseList`.
*
- * If this plane is opaque, all intersecting erase rects
- * in `lowerEraseList` are removed, as they would be
- * completely overwritten by the contents of this plane.
+ * If this plane is opaque, all intersecting erase rects in `lowerEraseList`
+ * are removed, as they would be completely overwritten by the contents of
+ * this plane.
*
- * If this plane is transparent, erase rects from the
- * `lowerEraseList` are added to the erase list for this
- * plane, so that lower planes.
+ * If this plane is transparent, erase rects from the `lowerEraseList` are
+ * added to the erase list for this plane, so that lower planes.
*
* @param drawList The draw list for this plane.
* @param eraseList The erase list for this plane.
- * @param higherEraseList The erase list for a plane
- * above this plane.
+ * @param higherEraseList The erase list for a plane above this plane.
*/
void filterDownEraseRects(DrawList &drawList, RectList &eraseList, RectList &higherEraseList) const;
/**
- * This method is called from the lowest priority plane
- * to the highest priority plane.
+ * This method is called from the lowest priority plane to the highest
+ * priority plane.
*
- * Adds screen items from this plane to the draw list
- * that must be drawn because the lower plane is being
- * redrawn and potentially transparent screen items
- * from this plane would draw over the lower priority
- * plane's screen items.
+ * Adds screen items from this plane to the draw list that must be drawn
+ * because the lower plane is being redrawn and potentially transparent
+ * screen items from this plane would draw over the lower priority plane's
+ * screen items.
*
* This method applies only to transparent planes.
*
* @param drawList The draw list for this plane.
- * @param eraseList The erase list for a plane below
- * this plane.
+ * @param eraseList The erase list for a plane below this plane.
*/
void filterUpEraseRects(DrawList &drawList, const RectList &lowerEraseList) const;
/**
- * This method is called from the lowest priority plane
- * to the highest priority plane.
+ * This method is called from the lowest priority plane to the highest
+ * priority plane.
*
- * Adds screen items from this plane to the draw list
- * that must be drawn because the lower plane is being
- * redrawn and potentially transparent screen items
- * from this plane would draw over the lower priority
- * plane's screen items.
+ * Adds screen items from this plane to the draw list that must be drawn
+ * because the lower plane is being redrawn and potentially transparent
+ * screen items from this plane would draw over the lower priority plane's
+ * screen items.
*
* This method applies only to transparent planes.
*
* @param drawList The draw list for this plane.
- * @param lowerDrawList The draw list for a plane below
- * this plane.
+ * @param lowerDrawList The draw list for a plane below this plane.
*/
void filterUpDrawRects(DrawList &drawList, const DrawList &lowerDrawList) const;
/**
- * Updates all of the plane's non-deleted screen items
- * and adds them to the given draw and erase lists.
+ * Updates all of the plane's non-deleted screen items and adds them to the
+ * given draw and erase lists.
*/
void redrawAll(Plane *visiblePlane, const PlaneList &planeList, DrawList &drawList, RectList &eraseList);
+ /**
+ * Marks all non-deleted remapped screen items within the plane as needing
+ * to be updated during the next frameout.
+ */
void remapMarkRedraw();
};
@@ -514,10 +478,9 @@ private:
using PlaneListBase::push_back;
public:
- // A method for finding the index of a plane inside a
- // PlaneList is used because entries in the main plane
- // list and visible plane list of GfxFrameout are
- // synchronised by index
+ // A method for finding the index of a plane inside a PlaneList is used
+ // because entries in the main plane list and visible plane list of
+ // GfxFrameout are synchronised by index
int findIndexByObject(const reg_t object) const;
Plane *findByObject(const reg_t object) const;
@@ -527,8 +490,8 @@ public:
int16 getTopPlanePriority() const;
/**
- * Gets the priority of the top plane in the plane list
- * created by a game script.
+ * Gets the priority of the top plane in the plane list created by a game
+ * script.
*/
int16 getTopSciPlanePriority() const;
diff --git a/engines/sci/graphics/remap32.cpp b/engines/sci/graphics/remap32.cpp
index 9b5ffcd2f7..6fe0a53f71 100644
--- a/engines/sci/graphics/remap32.cpp
+++ b/engines/sci/graphics/remap32.cpp
@@ -100,9 +100,9 @@ bool SingleRemap::updateBrightness() {
}
if (_percent != _lastPercent || _originalColorsChanged[i]) {
- // NOTE: SSCI checked if percent was over 100 and only
- // then clipped values, but we always unconditionally
- // ensure the result is in the correct range
+ // SSCI checked if percent was over 100 and only then clipped
+ // values, but we always unconditionally ensure the result is in the
+ // correct range for simplicity's sake
color.r = MIN(255, (uint16)color.r * _percent / 100);
color.g = MIN(255, (uint16)color.g * _percent / 100);
color.b = MIN(255, (uint16)color.b * _percent / 100);
@@ -188,8 +188,7 @@ bool SingleRemap::apply() {
const GfxRemap32 *const gfxRemap32 = g_sci->_gfxRemap32;
const uint8 remapStartColor = gfxRemap32->getStartColor();
- // Blocked colors are not allowed to be used as target
- // colors for the remap
+ // Blocked colors are not allowed to be used as target colors for the remap
bool blockedColors[236];
Common::fill(blockedColors, blockedColors + remapStartColor, false);
@@ -207,9 +206,8 @@ bool SingleRemap::apply() {
}
}
- // NOTE: SSCI did a loop over colors here to create a
- // new array of updated, unblocked colors, but then
- // never used it
+ // SSCI did a loop over colors here to create a new array of updated,
+ // unblocked colors, but then never used it
bool updated = false;
for (uint i = 1; i < remapStartColor; ++i) {
@@ -280,8 +278,8 @@ int16 SingleRemap::matchColor(const Color &color, const int minimumDistance, int
bestIndex = i;
}
- // This value is only valid if the last index to
- // perform a distance calculation was the best index
+ // This value is only valid if the last index to perform a distance
+ // calculation was the best index
outDistance = distance;
return bestIndex;
}
@@ -295,10 +293,9 @@ GfxRemap32::GfxRemap32() :
_blockedRangeCount(0),
_remapStartColor(236),
_numActiveRemaps(0) {
- // The `_remapStartColor` seems to always be 236 in SSCI,
- // but if it is ever changed then the various C-style
- // member arrays hard-coded to 236 need to be changed to
- // match the highest possible value of `_remapStartColor`
+ // The `_remapStartColor` seems to always be 236 in SSCI, but if it is ever
+ // changed then the various C-style member arrays hard-coded to 236 need to
+ // be changed to match the highest possible value of `_remapStartColor`
assert(_remapStartColor == 236);
if (g_sci->_features->hasMidPaletteCode()) {
@@ -316,9 +313,8 @@ void GfxRemap32::remapOff(const uint8 color) {
return;
}
- // NOTE: SSCI simply ignored invalid input values, but
- // we at least give a warning so games can be investigated
- // for script bugs
+ // SSCI simply ignored invalid input values, but we at least give a warning
+ // so games can be investigated for script bugs
if (color < _remapStartColor || color > _remapEndColor) {
warning("GfxRemap32::remapOff: %d out of remap range", color);
return;
@@ -341,9 +337,8 @@ void GfxRemap32::remapAllOff() {
}
void GfxRemap32::remapByRange(const uint8 color, const int16 from, const int16 to, const int16 delta) {
- // NOTE: SSCI simply ignored invalid input values, but
- // we at least give a warning so games can be investigated
- // for script bugs
+ // SSCI simply ignored invalid input values, but we at least give a warning
+ // so games can be investigated for script bugs
if (color < _remapStartColor || color > _remapEndColor) {
warning("GfxRemap32::remapByRange: %d out of remap range", color);
return;
@@ -375,9 +370,8 @@ void GfxRemap32::remapByRange(const uint8 color, const int16 from, const int16 t
}
void GfxRemap32::remapByPercent(const uint8 color, const int16 percent) {
- // NOTE: SSCI simply ignored invalid input values, but
- // we at least give a warning so games can be investigated
- // for script bugs
+ // SSCI simply ignored invalid input values, but we at least give a warning
+ // so games can be investigated for script bugs
if (color < _remapStartColor || color > _remapEndColor) {
warning("GfxRemap32::remapByPercent: %d out of remap range", color);
return;
@@ -397,9 +391,8 @@ void GfxRemap32::remapByPercent(const uint8 color, const int16 percent) {
}
void GfxRemap32::remapToGray(const uint8 color, const int8 gray) {
- // NOTE: SSCI simply ignored invalid input values, but
- // we at least give a warning so games can be investigated
- // for script bugs
+ // SSCI simply ignored invalid input values, but we at least give a warning
+ // so games can be investigated for script bugs
if (color < _remapStartColor || color > _remapEndColor) {
warning("GfxRemap32::remapToGray: %d out of remap range", color);
return;
@@ -423,9 +416,8 @@ void GfxRemap32::remapToGray(const uint8 color, const int8 gray) {
}
void GfxRemap32::remapToPercentGray(const uint8 color, const int16 gray, const int16 percent) {
- // NOTE: SSCI simply ignored invalid input values, but
- // we at least give a warning so games can be investigated
- // for script bugs
+ // SSCI simply ignored invalid input values, but we at least give a warning
+ // so games can be investigated for script bugs
if (color < _remapStartColor || color > _remapEndColor) {
warning("GfxRemap32::remapToPercentGray: %d out of remap range", color);
return;
diff --git a/engines/sci/graphics/remap32.h b/engines/sci/graphics/remap32.h
index 407e879e7c..9fc7ef637d 100644
--- a/engines/sci/graphics/remap32.h
+++ b/engines/sci/graphics/remap32.h
@@ -55,8 +55,7 @@ public:
RemapType _type;
/**
- * The first color that should be shifted by a range
- * remap.
+ * The first color that should be shifted by a range remap.
*/
uint8 _from;
@@ -66,158 +65,140 @@ public:
uint8 _to;
/**
- * The direction and amount that the colors should be
- * shifted in a range remap.
+ * The direction and amount that the colors should be shifted in a range
+ * remap.
*/
int16 _delta;
/**
- * The difference in brightness that should be
- * applied by a brightness (percent) remap.
+ * The difference in brightness that should be applied by a brightness
+ * (percent) remap.
*
- * This value may be be greater than 100, in
- * which case the color will be oversaturated.
+ * This value may be be greater than 100, in which case the color will be
+ * oversaturated.
*/
int16 _percent;
/**
- * The amount of desaturation that should be
- * applied by a saturation (gray) remap, where
- * 0 is full saturation and 100 is full
- * desaturation.
+ * The amount of desaturation that should be applied by a saturation (gray)
+ * remap, where 0 is full saturation and 100 is full desaturation.
*/
uint8 _gray;
/**
- * The final array used by CelObj renderers to composite
- * remapped pixels to the screen buffer.
+ * The final array used by CelObj renderers to composite remapped pixels to
+ * the screen buffer.
*
* Here is how it works:
*
- * The source bitmap being rendered will have pixels
- * within the remap range (236-245 or 236-254), and the
- * target buffer will have colors in the non-remapped
- * range (0-235).
+ * The source bitmap being rendered will have pixels within the remap range
+ * (236-245 or 236-254), and the target buffer will have colors in the
+ * non-remapped range (0-235).
*
- * To arrive at the correct color, first the source
- * pixel is used to look up the correct SingleRemap for
- * that pixel. Then, the final composited color is
- * looked up in this array using the target's pixel
- * color. In other words,
+ * To arrive at the correct color, first the source pixel is used to look up
+ * the correct SingleRemap for that pixel. Then, the final composited color
+ * is looked up in this array using the target's pixel color. In other
+ * words,
* `target = _remaps[remapEndColor - source].remapColors[target]`.
*/
uint8 _remapColors[236];
/**
- * Resets this SingleRemap's color information to
- * default values.
+ * Resets this SingleRemap's color information to default values.
*/
void reset();
/**
- * Recalculates and reapplies remap colors to the
- * `_remapColors` array.
+ * Recalculates and reapplies remap colors to the `_remapColors` array.
*/
bool update();
private:
/**
- * The previous brightness value. Used to
- * determine whether or not targetColors needs
- * to be updated.
+ * The previous brightness value. Used to determine whether or not
+ * `_idealColors` needs to be updated.
*/
int16 _lastPercent;
/**
- * The previous saturation value. Used to
- * determine whether or not targetColors needs
- * to be updated.
+ * The previous saturation value. Used to determine whether or not
+ * `_idealColors` needs to be updated.
*/
uint8 _lastGray;
/**
- * The colors from the current GfxPalette32 palette
- * before this SingleRemap is applied.
+ * The colors from the current GfxPalette32 palette before this SingleRemap
+ * is applied.
*/
Color _originalColors[236];
/**
- * Map of colors that changed in `_originalColors`
- * when this SingleRemap was updated. This map is
- * transient and gets reset to `false` after the
+ * Map of colors that changed in `_originalColors` when this SingleRemap was
+ * updated. This map is transient and gets reset to `false` after the
* SingleRemap finishes updating.
*/
bool _originalColorsChanged[236];
/**
- * The ideal target RGB color values for each generated
- * remap color.
+ * The ideal target RGB color values for each generated remap color.
*/
Color _idealColors[236];
/**
- * Map of colors that changed in `_idealColors` when
- * this SingleRemap was updated. This map is transient
- * and gets reset to `false` after the SingleRemap
- * finishes applying.
+ * Map of colors that changed in `_idealColors` when this SingleRemap was
+ * updated. This map is transient and gets reset to `false` after the
+ * SingleRemap finishes applying.
*/
bool _idealColorsChanged[236];
/**
- * When applying a SingleRemap, finding an appropriate
- * color in the palette is the responsibility of a
- * distance function. Once a match is found, the
- * distance of that match is stored here so that the
- * next time the SingleRemap is applied, it can check
- * the distance from the previous application and avoid
- * triggering an expensive redraw of the entire screen
+ * When applying a SingleRemap, finding an appropriate color in the palette
+ * is the responsibility of a distance function. Once a match is found, the
+ * distance of that match is stored here so that the next time the
+ * SingleRemap is applied, it can check the distance from the previous
+ * application and avoid triggering an expensive redraw of the entire screen
* if the new palette value only changed slightly.
*/
int _matchDistances[236];
/**
- * Computes the final target values for a range remap
- * and applies them directly to the `_remaps` map.
+ * Computes the final target values for a range remap and applies them
+ * directly to the `_remaps` map.
*
* @note Was ByRange in SSCI.
*/
bool updateRange();
/**
- * Computes the intermediate target values for a
- * brightness remap and applies them indirectly via
- * the `apply` method.
+ * Computes the intermediate target values for a brightness remap and
+ * applies them indirectly via the `apply` method.
*
* @note Was ByPercent in SSCI.
*/
bool updateBrightness();
/**
- * Computes the intermediate target values for a
- * saturation remap and applies them indirectly via
- * the `apply` method.
+ * Computes the intermediate target values for a saturation remap and
+ * applies them indirectly via the `apply` method.
*
* @note Was ToGray in SSCI.
*/
bool updateSaturation();
/**
- * Computes the intermediate target values for a
- * saturation + brightness bitmap and applies them
- * indirectly via the `apply` method.
+ * Computes the intermediate target values for a saturation + brightness
+ * bitmap and applies them indirectly via the `apply` method.
*
* @note Was ToPercentGray in SSCI.
*/
bool updateSaturationAndBrightness();
/**
- * Computes and applies the final values to the
- * `_remaps` map.
+ * Computes and applies the final values to the `_remaps` map.
*
- * @note In SSCI, a boolean array of changed values
- * was passed into this method, but this was done by
- * creating arrays on the stack in the caller. Instead
- * of doing this, we simply add another member property
+ * @note In SSCI, a boolean array of changed values was passed into this
+ * method, but this was done by creating arrays on the stack in the caller.
+ * Instead of doing this, we simply add another member property
* `_idealColorsChanged` and use that instead.
*/
bool apply();
@@ -225,19 +206,18 @@ private:
/**
* Calculates the square distance of two colors.
*
- * @note In SSCI this method is Rgb24::Dist, but it is
- * only used by SingleRemap.
+ * @note In SSCI this method is Rgb24::Dist, but it is only used by
+ * SingleRemap.
*/
int colorDistance(const Color &a, const Color &b) const;
/**
- * Finds the closest index in the next palette matching
- * the given RGB color. Returns -1 if no match can be
- * found that is closer than `minimumDistance`.
+ * Finds the closest index in the next palette matching the given RGB color.
+ * Returns -1 if no match can be found that is closer than
+ * `minimumDistance`.
*
- * @note In SSCI, this method is SOLPalette::Match, but
- * this particular signature is only used by
- * SingleRemap.
+ * @note In SSCI, this method is SOLPalette::Match, but this particular
+ * signature is only used by SingleRemap.
*/
int16 matchColor(const Color &color, const int minimumDistance, int &outDistance, const bool *const blockedIndexes) const;
};
@@ -246,8 +226,7 @@ private:
#pragma mark GfxRemap32
/**
- * This class provides color remapping support for SCI32
- * games.
+ * This class provides color remapping support for SCI32 games.
*/
class GfxRemap32 : public Common::Serializable {
public:
@@ -262,8 +241,8 @@ public:
inline int16 getBlockedRangeCount() const { return _blockedRangeCount; }
/**
- * Turns off remapping of the given color. If `color` is
- * 0, all remaps are turned off.
+ * Turns off remapping of the given color. If `color` is 0, all remaps are
+ * turned off.
*/
void remapOff(const uint8 color);
@@ -273,55 +252,48 @@ public:
void remapAllOff();
/**
- * Configures a SingleRemap for the remap color `color`.
- * The SingleRemap will shift palette colors between
- * `from` and `to` (inclusive) by `delta` palette
- * entries when the remap is applied.
+ * Configures a SingleRemap for the remap color `color`. The SingleRemap
+ * will shift palette colors between `from` and `to` (inclusive) by `delta`
+ * palette entries when the remap is applied.
*/
void remapByRange(const uint8 color, const int16 from, const int16 to, const int16 delta);
/**
- * Configures a SingleRemap for the remap color `color`
- * to modify the brightness of remapped colors by
- * `percent`.
+ * Configures a SingleRemap for the remap color `color` to modify the
+ * brightness of remapped colors by `percent`.
*/
void remapByPercent(const uint8 color, const int16 percent);
/**
- * Configures a SingleRemap for the remap color `color`
- * to modify the saturation of remapped colors by
- * `gray`.
+ * Configures a SingleRemap for the remap color `color` to modify the
+ * saturation of remapped colors by `gray`.
*/
void remapToGray(const uint8 color, const int8 gray);
/**
- * Configures a SingleRemap for the remap color `color`
- * to modify the brightness of remapped colors by
- * `percent`, and saturation of remapped colors by
- * `gray`.
+ * Configures a SingleRemap for the remap color `color` to modify the
+ * brightness of remapped colors by `percent`, and saturation of remapped
+ * colors by `gray`.
*/
void remapToPercentGray(const uint8 color, const int16 gray, const int16 percent);
/**
- * Prevents GfxRemap32 from using the given range of
- * palette entries as potential remap targets.
+ * Prevents GfxRemap32 from using the given range of palette entries as
+ * potential remap targets.
*
* @NOTE Was DontMapToRange in SSCI.
*/
void blockRange(const uint8 from, const int16 count);
/**
- * Determines whether or not the given color has an
- * active remapper. If it does not, it is treated as a
- * skip color and the pixel is not drawn.
+ * Determines whether or not the given color has an active remapper. If it
+ * does not, it is treated as a skip color and the pixel is not drawn.
*
- * @note SSCI uses a boolean array to decide whether a
- * a pixel is remapped, but it is possible to get the
- * same information from `_remaps`, as this function
- * does.
- * Presumably, the separate array was created for
- * performance reasons, since this is called a lot in
- * the most critical section of the renderer.
+ * @note SSCI uses a boolean array to decide whether a pixel is remapped,
+ * but it is possible to get the same information from `_remaps`, as this
+ * function does. Presumably, the separate array was created for performance
+ * reasons, since this is called a lot in the most critical section of the
+ * renderer.
*/
inline bool remapEnabled(uint8 color) const {
const uint8 index = _remapEndColor - color;
@@ -335,10 +307,9 @@ public:
}
/**
- * Calculates the correct color for a target by looking
- * up the target color in the SingleRemap that controls
- * the given sourceColor. If there is no remap for the
- * given color, it will be treated as a skip color.
+ * Calculates the correct color for a target by looking up the target color
+ * in the SingleRemap that controls the given sourceColor. If there is no
+ * remap for the given color, it will be treated as a skip color.
*/
inline uint8 remapColor(const uint8 sourceColor, const uint8 targetColor) const {
const uint8 index = _remapEndColor - sourceColor;
@@ -358,12 +329,11 @@ public:
}
/**
- * Updates all active remaps in response to a palette
- * change or a remap settings change.
+ * Updates all active remaps in response to a palette change or a remap
+ * settings change.
*
- * `paletteChanged` is true if the next palette in
- * GfxPalette32 has been previously modified by other
- * palette operations.
+ * `paletteChanged` is true if the next palette in GfxPalette32 has been
+ * previously modified by other palette operations.
*/
bool remapAllTables(const bool paletteUpdated);
@@ -371,14 +341,12 @@ private:
typedef Common::Array<SingleRemap> SingleRemapsList;
/**
- * The first index of the remap area in the system
- * palette.
+ * The first index of the remap area in the system palette.
*/
const uint8 _remapStartColor;
/**
- * The last index of the remap area in the system
- * palette.
+ * The last index of the remap area in the system palette.
*/
uint8 _remapEndColor;
@@ -393,20 +361,19 @@ private:
SingleRemapsList _remaps;
/**
- * If true, indicates that one or more SingleRemaps were
- * reconfigured and all remaps need to be recalculated.
+ * If true, indicates that one or more SingleRemaps were reconfigured and
+ * all remaps need to be recalculated.
*/
bool _needsUpdate;
/**
- * The first color that is blocked from being used as a
- * remap target color.
+ * The first color that is blocked from being used as a remap target color.
*/
uint8 _blockedRangeStart;
/**
- * The size of the range of blocked colors. If zero,
- * all colors are potential targets for remapping.
+ * The size of the range of blocked colors. If zero, all colors are
+ * potential targets for remapping.
*/
int16 _blockedRangeCount;
};
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 1af36677b3..b9cef360dc 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -179,13 +179,13 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
// We add 2 to the height of the icon bar to add a buffer between the screen and the
// icon bar (as did the original interpreter).
if (g_sci->getGameId() == GID_KQ6)
- initGraphics(_displayWidth, _displayHeight + 26 + 2, _displayWidth > 320);
+ initGraphics(_displayWidth, _displayHeight + 26 + 2);
else if (g_sci->getGameId() == GID_FREDDYPHARKAS)
- initGraphics(_displayWidth, _displayHeight + 28 + 2, _displayWidth > 320);
+ initGraphics(_displayWidth, _displayHeight + 28 + 2);
else
error("Unknown SCI1.1 Mac game");
} else
- initGraphics(_displayWidth, _displayHeight, _displayWidth > 320);
+ initGraphics(_displayWidth, _displayHeight);
}
GfxScreen::~GfxScreen() {
diff --git a/engines/sci/graphics/screen_item32.cpp b/engines/sci/graphics/screen_item32.cpp
index 5a35d30c54..0addd773de 100644
--- a/engines/sci/graphics/screen_item32.cpp
+++ b/engines/sci/graphics/screen_item32.cpp
@@ -39,7 +39,6 @@ uint32 ScreenItem::_nextCreationId = 0;
ScreenItem::ScreenItem(const reg_t object) :
_creationId(_nextCreationId++),
-_celObj(nullptr),
_object(object),
_pictureId(-1),
_created(g_sci->_gfxFrameout->getScreenCount()),
@@ -59,7 +58,6 @@ _plane(plane),
_useInsetRect(false),
_z(0),
_celInfo(celInfo),
-_celObj(nullptr),
_fixedPriority(false),
_position(0, 0),
_object(make_reg(0, _nextObjectId++)),
@@ -76,7 +74,6 @@ _plane(plane),
_useInsetRect(false),
_z(0),
_celInfo(celInfo),
-_celObj(nullptr),
_fixedPriority(false),
_position(rect.left, rect.top),
_object(make_reg(0, _nextObjectId++)),
@@ -98,7 +95,6 @@ _scale(scaleInfo),
_useInsetRect(false),
_z(0),
_celInfo(celInfo),
-_celObj(nullptr),
_fixedPriority(false),
_position(position),
_object(make_reg(0, _nextObjectId++)),
@@ -115,7 +111,6 @@ _plane(other._plane),
_scale(other._scale),
_useInsetRect(other._useInsetRect),
_celInfo(other._celInfo),
-_celObj(nullptr),
_object(other._object),
_mirrorX(other._mirrorX),
_scaledPosition(other._scaledPosition),
@@ -127,18 +122,18 @@ _drawBlackLines(other._drawBlackLines) {
}
void ScreenItem::operator=(const ScreenItem &other) {
- // NOTE: The original engine did not check for differences in `_celInfo`
- // to clear `_celObj` here; instead, it unconditionally set `_celInfo`,
- // didn't clear `_celObj`, and did hacky stuff in `kIsOnMe` to avoid
- // testing a mismatched `_celObj`. See `GfxFrameout::kernelIsOnMe` for
- // more detail. kCelTypeMem types are unconditionally invalidated because
- // the properties of a CelObjMem can "change" when a game deletes a bitmap
- // and then creates a new one that reuses the old bitmap's offset in
- // BitmapTable (as happens in the LSL7 About screen when hovering names).
+ // SSCI did not check for differences in `_celInfo` to clear `_celObj` here;
+ // instead, it unconditionally set `_celInfo`, didn't clear `_celObj`, and
+ // did hacky stuff in `kIsOnMe` to avoid testing a mismatched `_celObj`. See
+ // `GfxFrameout::kernelIsOnMe` for more detail.
+ //
+ // kCelTypeMem types are unconditionally invalidated because the properties
+ // of a CelObjMem can "change" when a game deletes a bitmap and then creates
+ // a new one that reuses the old bitmap's offset in BitmapTable (as happens
+ // in the LSL7 About screen when hovering names).
if (_celInfo.type == kCelTypeMem || _celInfo != other._celInfo) {
_celInfo = other._celInfo;
- delete _celObj;
- _celObj = nullptr;
+ _celObj.reset();
}
_creationId = other._creationId;
@@ -153,10 +148,6 @@ void ScreenItem::operator=(const ScreenItem &other) {
_drawBlackLines = other._drawBlackLines;
}
-ScreenItem::~ScreenItem() {
- delete _celObj;
-}
-
void ScreenItem::init() {
_nextObjectId = 20000;
_nextCreationId = 0;
@@ -176,17 +167,12 @@ void ScreenItem::setFromObject(SegManager *segMan, const reg_t object, const boo
_celInfo.celNo = readSelectorValue(segMan, object, SELECTOR(cel));
if (_celInfo.resourceId <= kPlanePic) {
- // TODO: Enhance GfxView or ResourceManager to allow
- // metadata for resources to be retrieved once, from a
- // single location
Resource *view = g_sci->getResMan()->findResource(ResourceId(kResourceTypeView, _celInfo.resourceId), false);
if (!view) {
error("Failed to load %s", _celInfo.toString().c_str());
}
- // NOTE: +2 because the header size field itself is excluded from
- // the header size in the data
- const uint16 headerSize = view->getUint16SEAt(0) + 2;
+ const uint16 headerSize = view->getUint16SEAt(0) + /* header size field */ sizeof(uint16);
const uint8 loopCount = view->getUint8At(2);
const uint8 loopSize = view->getUint8At(12);
@@ -225,8 +211,7 @@ void ScreenItem::setFromObject(SegManager *segMan, const reg_t object, const boo
}
if (updateCel || updateBitmap) {
- delete _celObj;
- _celObj = nullptr;
+ _celObj.reset();
}
if (readSelectorValue(segMan, object, SELECTOR(fixPriority))) {
@@ -266,10 +251,10 @@ void ScreenItem::setFromObject(SegManager *segMan, const reg_t object, const boo
}
void ScreenItem::calcRects(const Plane &plane) {
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
const CelObj &celObj = getCelObj();
@@ -299,19 +284,19 @@ void ScreenItem::calcRects(const Plane &plane) {
Ratio celToScreenX;
Ratio celToScreenY;
- if (getSciVersion() < SCI_VERSION_3) {
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
celToScreenX = Ratio(screenWidth, celObj._xResolution);
celToScreenY = Ratio(screenHeight, celObj._yResolution);
}
// Cel may use a coordinate system that is not the same size as the
- // script coordinate system (usually this means high-resolution
- // pictures with low-resolution scripts)
+ // script coordinate system (usually this means high-resolution pictures
+ // with low-resolution scripts)
if (celObj._xResolution != kLowResX || celObj._yResolution != kLowResY) {
// high resolution coordinates
if (_useInsetRect) {
- if (getSciVersion() < SCI_VERSION_3) {
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
const Ratio scriptToCelX(celObj._xResolution, scriptWidth);
const Ratio scriptToCelY(celObj._yResolution, scriptHeight);
mulru(_screenItemRect, scriptToCelX, scriptToCelY, 0);
@@ -386,7 +371,7 @@ void ScreenItem::calcRects(const Plane &plane) {
mulinc(temp, celToScreenX, Ratio());
- CelObjPic *celObjPic = dynamic_cast<CelObjPic *>(_celObj);
+ CelObjPic *celObjPic = dynamic_cast<CelObjPic *>(_celObj.get());
if (celObjPic == nullptr) {
error("Expected a CelObjPic");
}
@@ -415,9 +400,8 @@ void ScreenItem::calcRects(const Plane &plane) {
if (!scaleX.isOne() || !scaleY.isOne()) {
mulinc(_screenItemRect, scaleX, scaleY);
- // TODO: This was in the original code, baked into the
- // multiplication though it is not immediately clear
- // why this is the only one that reduces the BR corner
+ // TODO: This was in SSCI, baked into the multiplication. It is
+ // not clear why this is the only one that reduces the BR corner
_screenItemRect.right -= 1;
_screenItemRect.bottom -= 1;
}
@@ -434,7 +418,7 @@ void ScreenItem::calcRects(const Plane &plane) {
temp.right -= 1;
}
- CelObjPic *celObjPic = dynamic_cast<CelObjPic *>(_celObj);
+ CelObjPic *celObjPic = dynamic_cast<CelObjPic *>(_celObj.get());
if (celObjPic == nullptr) {
error("Expected a CelObjPic");
}
@@ -487,19 +471,19 @@ void ScreenItem::calcRects(const Plane &plane) {
}
CelObj &ScreenItem::getCelObj() const {
- if (_celObj == nullptr) {
+ if (!_celObj) {
switch (_celInfo.type) {
case kCelTypeView:
- _celObj = new CelObjView(_celInfo.resourceId, _celInfo.loopNo, _celInfo.celNo);
+ _celObj.reset(new CelObjView(_celInfo.resourceId, _celInfo.loopNo, _celInfo.celNo));
break;
case kCelTypePic:
error("Internal error, pic screen item with no cel.");
break;
case kCelTypeMem:
- _celObj = new CelObjMem(_celInfo.bitmap);
+ _celObj.reset(new CelObjMem(_celInfo.bitmap));
break;
case kCelTypeColor:
- _celObj = new CelObjColor(_celInfo.color, _insetRect.width(), _insetRect.height());
+ _celObj.reset(new CelObjColor(_celInfo.color, _insetRect.width(), _insetRect.height()));
break;
}
}
@@ -534,7 +518,7 @@ void ScreenItem::printDebugInfo(Console *con) const {
con->debugPrintf(" %s\n", _celInfo.toString().c_str());
- if (_celObj != nullptr) {
+ if (_celObj) {
con->debugPrintf(" width %d, height %d, x-resolution %d, y-resolution %d\n",
_celObj->_width,
_celObj->_height,
@@ -583,8 +567,7 @@ void ScreenItem::update() {
}
_deleted = 0;
- delete _celObj;
- _celObj = nullptr;
+ _celObj.reset();
}
Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const {
@@ -604,8 +587,8 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const {
nsRect = celObjRect;
}
- const uint16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const uint16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const uint16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const uint16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
Ratio scaleX, scaleY;
if (_scale.signal == kScaleSignalManual) {
@@ -632,7 +615,7 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const {
// high resolution coordinates
if (_useInsetRect) {
- if (getSciVersion() < SCI_VERSION_3) {
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
const Ratio scriptToCelX(celObj._xResolution, scriptWidth);
const Ratio scriptToCelY(celObj._yResolution, scriptHeight);
mulru(nsRect, scriptToCelX, scriptToCelY, 0);
@@ -647,15 +630,13 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const {
if (!scaleX.isOne() || !scaleY.isOne()) {
// Different games use a different cel scaling mode, but the
- // difference isn't consistent across SCI versions; instead,
- // it seems to be related to an update that happened during
- // SCI2.1mid where games started using hi-resolution game
- // scripts
+ // difference isn't consistent across SCI versions; instead, it
+ // seems to be related to an update that happened during SCI2.1mid
+ // where games started using high-resolution game scripts
if (scriptWidth == kLowResX) {
mulinc(nsRect, scaleX, scaleY);
- // TODO: This was in the original code, baked into the
- // multiplication though it is not immediately clear
- // why this is the only one that reduces the BR corner
+ // TODO: This was in SSCI, baked into the multiplication. It is
+ // not clear why this is the only one that reduces the BR corner
nsRect.right -= 1;
nsRect.bottom -= 1;
} else {
@@ -678,7 +659,7 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const {
Ratio celToScriptX;
Ratio celToScriptY;
- if (getSciVersion() < SCI_VERSION_3) {
+ if (getSciVersion() < SCI_VERSION_2_1_LATE) {
celToScriptX = Ratio(scriptWidth, celObj._xResolution);
celToScriptY = Ratio(scriptHeight, celObj._yResolution);
}
@@ -693,9 +674,8 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const {
if (!scaleX.isOne() || !scaleY.isOne()) {
mulinc(nsRect, scaleX, scaleY);
- // TODO: This was in the original code, baked into the
- // multiplication though it is not immediately clear
- // why this is the only one that reduces the BR corner
+ // TODO: This was in SSCI, baked into the multiplication. It is not
+ // clear why this is the only one that reduces the BR corner
nsRect.right -= 1;
nsRect.bottom -= 1;
}
diff --git a/engines/sci/graphics/screen_item32.h b/engines/sci/graphics/screen_item32.h
index ef29609da6..5acf759c32 100644
--- a/engines/sci/graphics/screen_item32.h
+++ b/engines/sci/graphics/screen_item32.h
@@ -49,22 +49,20 @@ class SegManager;
#pragma mark ScreenItem
/**
- * A ScreenItem is the engine-side representation of a
- * game script View.
+ * A ScreenItem is the engine-side representation of a game script View.
*/
class ScreenItem {
private:
/**
- * A serial used for screen items that are generated
- * inside the graphics engine, rather than the
- * interpreter.
+ * A serial used for screen items that are generated inside the graphics
+ * engine, rather than the interpreter.
*/
static uint16 _nextObjectId;
/**
- * A serial used to identify the creation order of
- * screen items, to ensure a stable sort order for
- * screen items with identical priorities and z-indexes.
+ * A serial used to identify the creation order of screen items, to ensure a
+ * stable sort order for screen items with identical priorities and
+ * z-indexes.
*/
static uint32 _nextCreationId;
@@ -75,160 +73,145 @@ public:
reg_t _plane;
/**
- * Scaling data used to calculate the final screen
- * dimensions of the screen item as well as the scaling
- * ratios used when drawing the item to screen.
+ * Scaling data used to calculate the final screen dimensions of the screen
+ * item as well as the scaling ratios used when drawing the item to screen.
*/
ScaleInfo _scale;
private:
/**
- * The position & dimensions of the screen item in
- * screen coordinates. This rect includes the offset
- * of the parent plane, but is not clipped to the
- * screen, so may include coordinates that are
- * offscreen.
+ * The position & dimensions of the screen item in screen coordinates. This
+ * rect includes the offset of the parent plane, but is not clipped to the
+ * screen, so may include coordinates that are offscreen.
*/
Common::Rect _screenItemRect;
/**
- * If true, the `_insetRect` rectangle will be used
- * when calculating the dimensions of the screen item
- * instead of the cel's intrinsic width and height.
+ * If true, the `_insetRect` rectangle will be used when calculating the
+ * dimensions of the screen item instead of the cel's intrinsic width and
+ * height.
*
- * In other words, using an inset rect means that
- * the cel is cropped to the dimensions given in
- * `_insetRect`.
+ * In other words, using an inset rect means that the cel is cropped to the
+ * dimensions given in `_insetRect`.
*/
bool _useInsetRect;
/**
- * The cropping rectangle used when `_useInsetRect`
- * is true.
+ * The cropping rectangle used when `_useInsetRect` is true.
*
- * `_insetRect` is also used to describe the fill
- * rectangle of a screen item with a CelObjColor
- * cel.
+ * `_insetRect` is also used to describe the fill rectangle of a screen item
+ * with a CelObjColor cel.
*/
Common::Rect _insetRect;
/**
- * The z-index of the screen item in pseudo-3D space.
- * Higher values are drawn on top of lower values.
+ * The z-index of the screen item in pseudo-3D space. Higher values are
+ * drawn on top of lower values.
*/
int _z;
/**
- * Sets the common properties of a screen item that must
- * be set both during creation and update of a screen
- * item.
+ * Sets the common properties of a screen item that must be set both during
+ * creation and update of a screen item.
*/
void setFromObject(SegManager *segMan, const reg_t object, const bool updateCel, const bool updateBitmap);
public:
/**
- * The creation order number, which ensures a stable
- * sort when screen items with identical priorities and
- * z-indexes are added to the screen item list.
+ * The creation order number, which ensures a stable sort when screen items
+ * with identical priorities and z-indexes are added to the screen item
+ * list.
*/
uint32 _creationId;
/**
- * A descriptor for the cel object represented by the
- * screen item.
+ * A descriptor for the cel object represented by the screen item.
*/
CelInfo32 _celInfo;
/**
- * The cel object used to actually render the screen
- * item. This member is populated by calling
- * `getCelObj`.
+ * The cel object used to actually render the screen item. This member is
+ * populated by calling `getCelObj`.
*/
- mutable CelObj *_celObj;
+ mutable Common::ScopedPtr<CelObj> _celObj;
/**
- * If set, the priority for this screen item is fixed
- * in place. Otherwise, the priority of the screen item
- * is calculated from its y-position + z-index.
+ * If set, the priority for this screen item is fixed in place. Otherwise,
+ * the priority of the screen item is calculated from its y-position +
+ * z-index.
*/
bool _fixedPriority;
/**
- * The rendering priority of the screen item, relative
- * only to the other screen items within the same plane.
- * Higher priorities are drawn above lower priorities.
+ * The rendering priority of the screen item, relative only to the other
+ * screen items within the same plane. Higher priorities are drawn above
+ * lower priorities.
*/
int16 _priority;
/**
- * The top-left corner of the screen item, in game
- * script coordinates, relative to the parent plane.
+ * The top-left corner of the screen item, in game script coordinates,
+ * relative to the parent plane.
*/
Common::Point _position;
/**
- * The associated View script object that was
- * used to create the ScreenItem, or a numeric
- * value in the case of a ScreenItem that was
- * generated outside of the VM.
+ * The associated View script object that was used to create the ScreenItem,
+ * or a numeric value in the case of a ScreenItem that was generated by the
+ * kernel.
*/
reg_t _object;
/**
- * For screen items representing picture resources,
- * the resource ID of the picture.
+ * For screen items representing picture resources, the resource ID of the
+ * picture.
*/
GuiResourceId _pictureId;
/**
* Flags indicating the state of the screen item.
- * - `created` is set when the screen item is first
- * created, either from a VM object or from within the
- * engine itself
- * - `updated` is set when `created` is not already set
- * and the screen item is updated from a VM object
- * - `deleted` is set by the parent plane, if the parent
- * plane is a pic type and its picture resource ID has
- * changed
+ * - `created` is set when the screen item is first created, either from a
+ * VM object or from within the kernel
+ * - `updated` is set when `created` is not already set and the screen item
+ * is updated from a VM object
+ * - `deleted` is set by the parent plane, if the parent plane is a pic type
+ * and its picture resource ID has changed
*/
int _created, _updated, _deleted;
/**
- * For screen items that represent picture cels, this
- * value is set to match the `_mirrorX` property of the
- * parent plane and indicates that the cel should be
- * drawn horizontally mirrored. For final drawing, it is
- * XORed with the `_mirrorX` property of the cel object.
- * The cel object's `_mirrorX` property comes from the
- * resource data itself.
+ * For screen items that represent picture cels, this value is set to match
+ * the `_mirrorX` property of the parent plane and indicates that the cel
+ * should be
+ * drawn horizontally mirrored. For final drawing, it is XORed with the
+ * `_mirrorX` property of the cel object. The cel object's `_mirrorX`
+ * property comes from the resource data.
*/
bool _mirrorX;
/**
- * The scaling ratios to use when drawing this screen
- * item. These values are calculated according to the
- * scale info whenever the screen item is updated.
+ * The scaling ratios to use when drawing this screen item. These values are
+ * calculated according to the scale info whenever the screen item is
+ * updated.
*/
Ratio _ratioX, _ratioY;
/**
- * The top-left corner of the screen item, in screen
- * coordinates.
+ * The top-left corner of the screen item, in screen coordinates.
*/
Common::Point _scaledPosition;
/**
- * The position & dimensions of the screen item in
- * screen coordinates. This rect includes the offset of
- * the parent plane and is clipped to the screen.
+ * The position & dimensions of the screen item in screen coordinates. This
+ * rect includes the offset of the parent plane and is clipped to the
+ * screen.
*/
Common::Rect _screenRect;
/**
- * Whether or not the screen item should be drawn
- * with black lines drawn every second line. This is
- * used when pixel doubling videos to improve apparent
- * sharpness at the cost of your eyesight.
+ * Whether or not the screen item should be drawn with black lines drawn
+ * every second line. This is used when pixel doubling videos to improve
+ * apparent sharpness at the cost of your eyesight.
*/
bool _drawBlackLines;
@@ -242,7 +225,6 @@ public:
ScreenItem(const reg_t plane, const CelInfo32 &celInfo, const Common::Rect &rect);
ScreenItem(const reg_t plane, const CelInfo32 &celInfo, const Common::Point &position, const ScaleInfo &scaleInfo);
ScreenItem(const ScreenItem &other);
- ~ScreenItem();
void operator=(const ScreenItem &);
inline bool operator<(const ScreenItem &other) const {
@@ -256,6 +238,16 @@ public:
}
if (_position.y + _z == other._position.y + other._z) {
+ // Synthetic object IDs (numeric IDs) are used for screen items
+ // generated by the kernel, like the screen items generated by
+ // plane pics. In SSCI, these synthetic IDs started at 20000 so
+ // would deterministically always sort higher than any
+ // script-generated view in SSCI at the same position and
+ // priority.
+ if (other._object.isNumber() && !_object.isNumber()) {
+ return true;
+ }
+
// SSCI's last resort comparison here is to compare the _object
// IDs, but this is wrong and randomly breaks (at least):
//
@@ -295,6 +287,10 @@ public:
}
if (_position.y + _z == other._position.y + other._z) {
+ if (_object.isNumber() && !other._object.isNumber()) {
+ return true;
+ }
+
// This is different than SSCI; see ScreenItem::operator< for an
// explanation
return _creationId > other._creationId;
@@ -310,6 +306,10 @@ public:
}
if (_priority == other._priority) {
+ if (_object.isNumber() && !other._object.isNumber()) {
+ return true;
+ }
+
// This is different than SSCI; see ScreenItem::operator< for an
// explanation
return _creationId > other._creationId;
@@ -319,39 +319,36 @@ public:
}
/**
- * Calculates the dimensions and scaling parameters for
- * the screen item, using the given plane as the parent
- * plane for screen rect positioning.
+ * Calculates the dimensions and scaling parameters for the screen item,
+ * using the given plane as the parent plane for screen rect positioning.
*
- * @note This method was called Update in SCI engine.
+ * @note This method was called Update in SSCI.
*/
void calcRects(const Plane &plane);
/**
- * Retrieves the corresponding cel object for this
- * screen item. If a cel object does not already exist,
- * one will be created and assigned.
+ * Retrieves the corresponding cel object for this screen item. If a cel
+ * object does not already exist, one will be created and assigned.
*/
CelObj &getCelObj() const;
void printDebugInfo(Console *con) const;
/**
- * Updates the properties of the screen item from a
- * VM object.
+ * Updates the properties of the screen item from a VM object.
*/
void update(const reg_t object);
/**
- * Updates the properties of the screen item for one not belonging
- * to a VM object. Originally GraphicsMgr::UpdateScreenItem.
+ * Updates the properties of the screen item for one not belonging to a VM
+ * object. Originally GraphicsMgr::UpdateScreenItem.
*/
void update();
/**
- * Gets the "now seen" rect for the screen item, which
- * represents the current size and position of the
- * screen item on the screen in script coordinates.
+ * Gets the "now seen" rect for the screen item, which represents the
+ * current size and position of the screen item on the screen in script
+ * coordinates.
*/
Common::Rect getNowSeenRect(const Plane &plane) const;
};
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index 7399fe0268..6ebbcc0f0e 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -44,7 +44,7 @@ int16 GfxText32::_yResolution = 0;
GfxText32::GfxText32(SegManager *segMan, GfxCache *fonts) :
_segMan(segMan),
_cache(fonts),
- // Not a typo, the original engine did not initialise height, only width
+ // SSCI did not initialise height, so we intentionally do not do so also
_width(0),
_text(""),
_bitmap(NULL_REG) {
@@ -53,8 +53,8 @@ GfxText32::GfxText32(SegManager *segMan, GfxCache *fonts) :
}
void GfxText32::init() {
- _xResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- _yResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ _xResolution = g_sci->_gfxFrameout->getScriptWidth();
+ _yResolution = g_sci->_gfxFrameout->getScriptHeight();
}
reg_t GfxText32::createFontBitmap(int16 width, int16 height, const Common::Rect &rect, const Common::String &text, const uint8 foreColor, const uint8 backColor, const uint8 skipColor, const GuiResourceId fontId, const TextAlign alignment, const int16 borderColor, const bool dimmed, const bool doScaling, const bool gc) {
@@ -73,8 +73,8 @@ reg_t GfxText32::createFontBitmap(int16 width, int16 height, const Common::Rect
setFont(fontId);
if (doScaling) {
- int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
Ratio scaleX(_xResolution, scriptWidth);
Ratio scaleY(_yResolution, scriptHeight);
@@ -84,8 +84,8 @@ reg_t GfxText32::createFontBitmap(int16 width, int16 height, const Common::Rect
mulinc(_textRect, scaleX, scaleY);
}
- // _textRect represents where text is drawn inside the
- // bitmap; clipRect is the entire bitmap
+ // `_textRect` represents where text is drawn inside the bitmap; `clipRect`
+ // is the entire bitmap
Common::Rect bitmapRect(_width, _height);
if (_textRect.intersects(bitmapRect)) {
@@ -115,8 +115,8 @@ reg_t GfxText32::createFontBitmap(const CelInfo32 &celInfo, const Common::Rect &
setFont(fontId);
- int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
mulinc(_textRect, Ratio(_xResolution, scriptWidth), Ratio(_yResolution, scriptHeight));
@@ -134,9 +134,9 @@ reg_t GfxText32::createFontBitmap(const CelInfo32 &celInfo, const Common::Rect &
SciBitmap &bitmap = *_segMan->allocateBitmap(&_bitmap, _width, _height, _skipColor, 0, 0, _xResolution, _yResolution, 0, false, gc);
- // NOTE: The engine filled the bitmap pixels with 11 here, which is silly
- // because then it just erased the bitmap using the skip color. So we don't
- // fill the bitmap redundantly here.
+ // SSCI filled the bitmap pixels with 11 here, which is silly because then
+ // it just erased the bitmap using the skip color. So we don't fill the
+ // bitmap redundantly here.
_backColor = _skipColor;
erase(bitmapRect, false);
@@ -164,9 +164,10 @@ reg_t GfxText32::createFontBitmap(const CelInfo32 &celInfo, const Common::Rect &
}
void GfxText32::setFont(const GuiResourceId fontId) {
- // NOTE: In SCI engine this calls FontMgr::BuildFontTable and then a font
- // table is built on the FontMgr directly; instead, because we already have
- // font resources, this code just grabs a font out of GfxCache.
+ // In SSCI, this calls FontMgr::BuildFontTable, and then a font table is
+ // built on the FontMgr directly; instead, because we already have GfxFont
+ // resources from SCI16 and those resources did not change in SCI32, this
+ // code just grabs those out of GfxCache
if (fontId != _fontId) {
_fontId = fontId;
_font = _cache->getFont(_fontId);
@@ -179,7 +180,7 @@ void GfxText32::drawFrame(const Common::Rect &rect, const int16 size, const uint
SciBitmap &bitmap = *_segMan->lookupBitmap(_bitmap);
byte *pixels = bitmap.getPixels() + rect.top * _width + rect.left;
- // NOTE: Not fully disassembled, but this should be right
+ // Not fully disassembled, but appears to be correct in all cases
int16 rectWidth = targetRect.width();
int16 heightRemaining = targetRect.height();
int16 sidesHeight = heightRemaining - size * 2;
@@ -217,7 +218,7 @@ void GfxText32::drawChar(const char charIndex) {
}
int16 GfxText32::getScaledFontHeight() const {
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
return (_font->getHeight() * scriptHeight + _yResolution - 1) / _yResolution;
}
@@ -275,10 +276,9 @@ void GfxText32::drawTextBox(const Common::String &text) {
void GfxText32::drawText(const uint index, uint length) {
assert(index + length <= _text.size());
- // NOTE: This draw loop implementation is somewhat different than the
- // implementation in the actual engine, but should be accurate. Primarily
- // the changes revolve around eliminating some extra temporaries and
- // fixing the logic to match.
+ // This draw loop implementation is somewhat different than the
+ // implementation in SSCI, but is accurate. Primarily the changes revolve
+ // around eliminating some extra temporaries and fixing the logic to match.
const char *text = _text.c_str() + index;
while (length-- > 0) {
char currentChar = *text++;
@@ -335,16 +335,16 @@ void GfxText32::drawText(const uint index, uint length) {
void GfxText32::invertRect(const reg_t bitmapId, int16 bitmapStride, const Common::Rect &rect, const uint8 foreColor, const uint8 backColor, const bool doScaling) {
Common::Rect targetRect = rect;
if (doScaling) {
- bitmapStride = bitmapStride * _xResolution / g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
+ bitmapStride = bitmapStride * _xResolution / g_sci->_gfxFrameout->getScriptWidth();
targetRect = scaleRect(rect);
}
SciBitmap &bitmap = *_segMan->lookupBitmap(bitmapId);
- // NOTE: SCI code is super weird here; it seems to be trying to look at the
- // entire size of the bitmap including the header, instead of just the pixel
- // data size. We just look at the pixel size. This function generally is an
- // odd duck since the stride dimension for a bitmap is built in to the bitmap
+ // SSCI is super weird here; it seems to be trying to look at the entire
+ // size of the bitmap including the header, instead of just the pixel data
+ // size. We just look at the pixel size. This function generally is an odd
+ // duck since the stride dimension for a bitmap is built in to the bitmap
// header, so perhaps it was once an unheadered bitmap format and this
// function was never updated to match? Or maybe they exploit the
// configurable stride length somewhere else to do stair stepping inverts...
@@ -355,7 +355,7 @@ void GfxText32::invertRect(const reg_t bitmapId, int16 bitmapStride, const Commo
error("InvertRect too big: %u >= %u", invertSize, bitmapSize);
}
- // NOTE: Actual engine just added the bitmap header size hardcoded here
+ // SSCI just added a hardcoded bitmap header size here
byte *pixel = bitmap.getPixels() + bitmapStride * targetRect.top + targetRect.left;
int16 stride = bitmapStride - targetRect.width();
@@ -392,16 +392,17 @@ uint GfxText32::getLongest(uint *charIndex, const int16 width) {
char currentChar;
while ((currentChar = *text++) != '\0') {
- // NOTE: In the original engine, the font, color, and alignment were
- // reset here to their initial values
+ // In SSCI, the font, color, and alignment were reset here to their
+ // initial values; this does not seem to be necessary and really
+ // complicates the font system, so we do not do it
// The text to render contains a line break; stop at the line break
if (currentChar == '\r' || currentChar == '\n') {
- // Skip the rest of the line break if it is a Windows-style
- // \r\n or non-standard \n\r
- // NOTE: In the original engine, the `text` pointer had not been
- // advanced yet so the indexes used to access characters were
- // one higher
+ // Skip the rest of the line break if it is a Windows-style \r\n (or
+ // non-standard \n\r)
+
+ // In SSCI, the `text` pointer had not been advanced yet here, so
+ // the indexes used to access characters were one higher there
if (
(currentChar == '\r' && text[0] == '\n') ||
(currentChar == '\n' && text[0] == '\r' && text[1] != '\n')
@@ -418,16 +419,20 @@ uint GfxText32::getLongest(uint *charIndex, const int16 width) {
}
// Skip the line break and return all text seen up to now
- // NOTE: In original engine, the font, color, and alignment were
- // reset, then getTextWidth was called to use its side-effects to
- // set font, color, and alignment according to the text from
- // `initialCharIndex` to `testLength`
+ // In SSCI, the font, color, and alignment were reset, then
+ // getTextWidth was called to use its side-effects to set font,
+ // color, and alignment according to the text from
+ // `initialCharIndex` to `testLength`. This is complicated and
+ // apparently not necessary for correct operation, so we do not do
+ // it
+
++*charIndex;
return testLength;
} else if (currentChar == ' ') {
- // The last word in the line made it too wide to fit in the text area;
- // return up to the previous word, then collapse the whitespace
- // between that word and its next sibling word into the line break
+ // The last word in the line made it too wide to fit in the text
+ // area; return up to the previous word, then collapse the
+ // whitespace between that word and its next sibling word into the
+ // line break
if (getTextWidth(initialCharIndex, testLength) > width) {
*charIndex = lastWordBreakIndex;
const char *nextChar = _text.c_str() + lastWordBreakIndex;
@@ -435,14 +440,17 @@ uint GfxText32::getLongest(uint *charIndex, const int16 width) {
++*charIndex;
}
- // NOTE: In original engine, the font, color, and alignment were
- // set here to the values that were seen at the last space character
+ // In SSCI, the font, color, and alignment were set here to the
+ // values that were seen at the last space character, but this
+ // is complicated and unnecessary so we do not do it
+
return length;
}
- // NOTE: In the original engine, the values of _fontId, _foreColor,
- // and _alignment were stored for use in the return path mentioned
- // just above here
+ // In SSCI, the values of `_fontId`, `_foreColor`, and `_alignment`
+ // were stored for use in the return path mentioned just above here,
+ // but we do not need to do this because we do not cause
+ // side-effects when calculating text dimensions
// We found a word break that was within the text area, memorise it
// and continue processing. +1 on the character index because it has
@@ -456,8 +464,9 @@ uint GfxText32::getLongest(uint *charIndex, const int16 width) {
++*charIndex;
++testLength;
- // NOTE: In the original engine, the font, color, and alignment were
- // reset here to their initial values
+ // In SSCI, the font, color, and alignment were reset here to their
+ // initial values, but we do not need to do this because we do not cause
+ // side-effects when calculating text dimensions
// The text to render contained no word breaks yet but is already too
// wide for the text area; just split the word in half at the point
@@ -471,10 +480,11 @@ uint GfxText32::getLongest(uint *charIndex, const int16 width) {
// The complete text to render was a single word, or was narrower than
// the text area, so return the entire line
if (length == 0 || getTextWidth(initialCharIndex, testLength) <= width) {
- // NOTE: In original engine, the font, color, and alignment were
- // reset, then getTextWidth was called to use its side-effects to
- // set font, color, and alignment according to the text from
- // `initialCharIndex` to `testLength`
+ // In SSCI, the font, color, and alignment were reset, then getTextWidth
+ // was called to use its side-effects to set font, color, and alignment
+ // according to the text from `initialCharIndex` to `testLength`. This
+ // is not necessary because we do not cause side-effects when
+ // calculating text dimensions
return testLength;
}
@@ -495,14 +505,13 @@ int16 GfxText32::getTextWidth(const uint index, uint length) const {
while (length > 0 && currentChar != '\0') {
// Control codes are in the format `|<code><value>|`
if (currentChar == '|') {
- // NOTE: Original engine code changed the global state of the
- // FontMgr here upon encountering any color, alignment, or
- // font control code.
- // To avoid requiring all callers to manually restore these
- // values on every call, we ignore control codes other than
- // font change (since alignment and color do not change the
- // width of characters), and simply update the font pointer
- // on stack instead of the member property font.
+ // SSCI changed the global state of the FontMgr here upon
+ // encountering any color, alignment, or font control code. To avoid
+ // requiring all callers to manually restore these values on every
+ // call, we ignore control codes other than font change (since
+ // alignment and color do not change the width of characters), and
+ // simply update the font pointer on stack instead of the member
+ // property font to avoid these unnecessary side-effects.
currentChar = *text++;
--length;
@@ -548,17 +557,17 @@ int16 GfxText32::getTextWidth(const Common::String &text, const uint index, cons
}
Common::Rect GfxText32::getTextSize(const Common::String &text, int16 maxWidth, bool doScaling) {
- // NOTE: Like most of the text rendering code, this function was pretty
- // weird in the original engine. The initial result rectangle was actually
- // a 1x1 rectangle (0, 0, 0, 0), which was then "fixed" after the main
- // text size loop finished running by subtracting 1 from the right and
- // bottom edges. Like other functions in SCI32, this has been converted
- // to use exclusive rects with inclusive rounding.
+ // Like most of the text rendering code, this function was pretty weird in
+ // SSCI. The initial result rectangle was actually a 1x1 rectangle
+ // (0, 0, 0, 0), which was then "fixed" after the main text size loop
+ // finished running by subtracting 1 from the right and bottom edges. Like
+ // other functions in SCI32, this has been converted to use exclusive rects
+ // with inclusive rounding.
Common::Rect result;
- int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
maxWidth = maxWidth * _xResolution / scriptWidth;
@@ -598,17 +607,18 @@ Common::Rect GfxText32::getTextSize(const Common::String &text, int16 maxWidth,
if (getSciVersion() < SCI_VERSION_2_1_MIDDLE) {
result.bottom = 0;
} else {
- // NOTE: In the original engine code, the bottom was not decremented
- // by 1, which means that the rect was actually a pixel taller than
- // the height of the font. This was not the case in the other branch,
- // which decremented the bottom by 1 at the end of the loop.
+ // In SSCI, the bottom was not decremented by 1, which means that
+ // the rect was actually a pixel taller than the height of the font.
+ // This was not the case in the other branch, which decremented the
+ // bottom by 1 at the end of the loop. For accuracy, we do what SSCI
+ // did, even though this means the result is a pixel off
result.bottom = _font->getHeight() + 1;
}
}
if (doScaling) {
- // NOTE: The original engine code also scaled top/left but these are
- // always zero so there is no reason to do that.
+ // SSCI also scaled top/left but these are always zero so there is no
+ // reason to do that
result.right = ((result.right - 1) * scriptWidth + _xResolution - 1) / _xResolution + 1;
result.bottom = ((result.bottom - 1) * scriptHeight + _yResolution - 1) / _yResolution + 1;
}
@@ -628,8 +638,8 @@ int16 GfxText32::getStringWidth(const Common::String &text) {
}
int16 GfxText32::getTextCount(const Common::String &text, const uint index, const Common::Rect &textRect, const bool doScaling) {
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
Common::Rect scaledRect(textRect);
if (doScaling) {
@@ -700,7 +710,10 @@ void GfxText32::scrollLine(const Common::String &lineText, int numLines, uint8 c
_foreColor = color;
_alignment = align;
- //int fc = _foreColor;
+
+ // As with other font functions, SSCI saved _foreColor here so it could be
+ // restored after the getTextWidth call, but this call is side-effect-free
+ // in our implementation so this is not necessary
setFont(fontId);
@@ -713,8 +726,8 @@ void GfxText32::scrollLine(const Common::String &lineText, int numLines, uint8 c
_drawPosition.x += _textRect.width() - textWidth;
}
- //_foreColor = fc;
- //setFont(fontId);
+ // _foreColor and font were restored here in SSCI due to side-effects of
+ // getTextWidth which do not exist in our implementation
drawText(0, lineText.size());
}
diff --git a/engines/sci/graphics/text32.h b/engines/sci/graphics/text32.h
index c8fafb287f..f9de3ad5fb 100644
--- a/engines/sci/graphics/text32.h
+++ b/engines/sci/graphics/text32.h
@@ -45,11 +45,11 @@ enum ScrollDirection {
class GfxFont;
/**
- * This class handles text calculation and rendering for
- * SCI32 games. The text calculation system in SCI32 is
- * nearly the same as SCI16, which means this class behaves
- * similarly. Notably, GfxText32 maintains drawing
- * parameters across multiple calls.
+ * This class handles text calculation and rendering for SCI32 games. The text
+ * calculation system in SCI32 is nearly the same as SCI16, which means this
+ * class behaves similarly. Notably, GfxText32 maintains drawing parameters
+ * across multiple calls, instead of requiring all text parameters to be
+ * provided on every draw call.
*/
class GfxText32 {
private:
@@ -57,10 +57,10 @@ private:
GfxCache *_cache;
/**
- * The width and height of the currently active text
- * bitmap, in text-system coordinates.
+ * The width and height of the currently active text bitmap, in text-system
+ * coordinates.
*
- * @note These are unsigned in the actual engine.
+ * @note These are unsigned in SSCI.
*/
int16 _width, _height;
@@ -75,20 +75,19 @@ private:
uint8 _backColor;
/**
- * The transparent color of the text box. Used when
- * compositing the bitmap onto the screen.
+ * The transparent color of the text box. Used when compositing the bitmap
+ * onto the screen.
*/
uint8 _skipColor;
/**
- * The rect where the text is drawn within the bitmap.
- * This rect is clipped to the dimensions of the bitmap.
+ * The rect where the text is drawn within the bitmap. This rect is clipped
+ * to the dimensions of the bitmap.
*/
Common::Rect _textRect;
/**
- * The text being drawn to the currently active text
- * bitmap.
+ * The text being drawn to the currently active text bitmap.
*/
Common::String _text;
@@ -103,7 +102,8 @@ private:
int16 _borderColor;
/**
- * TODO: Document
+ * If true, text will be drawn using a dither that draws only every other
+ * pixel of the text.
*/
bool _dimmed;
@@ -123,28 +123,26 @@ private:
void drawText(const uint index, uint length);
/**
- * Gets the length of the longest run of text available
- * within the currently loaded text, starting from the
- * given `charIndex` and running for up to `maxWidth`
- * pixels. Returns the number of characters that can be
- * written, and mutates the value pointed to by
- * `charIndex` to point to the index of the next
- * character to render.
+ * Gets the length of the longest run of text available within the currently
+ * loaded text, starting from the given `charIndex` and running for up to
+ * `maxWidth` pixels. Returns the number of characters that can be written,
+ * and mutates the value pointed to by `charIndex` to point to the index of
+ * the next character to render.
*/
uint getLongest(uint *charIndex, const int16 maxWidth);
/**
- * Gets the pixel width of a substring of the currently
- * loaded text, without scaling.
+ * Gets the pixel width of a substring of the currently loaded text, without
+ * scaling.
*/
int16 getTextWidth(const uint index, uint length) const;
inline Common::Rect scaleRect(const Common::Rect &rect) {
Common::Rect scaledRect(rect);
- int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
- Ratio scaleX(_xResolution, scriptWidth);
- Ratio scaleY(_yResolution, scriptHeight);
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
+ const Ratio scaleX(_xResolution, scriptWidth);
+ const Ratio scaleY(_yResolution, scriptHeight);
mulinc(scaledRect, scaleX, scaleY);
return scaledRect;
}
@@ -163,29 +161,27 @@ public:
reg_t _bitmap;
/**
- * The size of the x-dimension of the coordinate system
- * used by the text renderer. Static since it was global in SSCI.
+ * The size of the x-dimension of the coordinate system used by the text
+ * renderer. Static since it was global in SSCI.
*/
static int16 _xResolution;
/**
- * The size of the y-dimension of the coordinate system
- * used by the text renderer. Static since it was global in SSCI.
+ * The size of the y-dimension of the coordinate system used by the text
+ * renderer. Static since it was global in SSCI.
*/
static int16 _yResolution;
/**
- * The currently active font resource used to write text
- * into the bitmap.
+ * The currently active font resource used to write text into the bitmap.
*
- * @note SCI engine builds the font table directly
- * inside of FontMgr; we use GfxFont instead.
+ * @note SSCI builds the font table directly inside of FontMgr; we use
+ * GfxFont instead.
*/
GfxFont *_font;
/**
- * Creates a plain font bitmap with a flat color
- * background.
+ * Creates a plain font bitmap with a flat color background.
*/
reg_t createFontBitmap(int16 width, int16 height, const Common::Rect &rect, const Common::String &text, const uint8 foreColor, const uint8 backColor, const uint8 skipColor, const GuiResourceId fontId, TextAlign alignment, const int16 borderColor, bool dimmed, const bool doScaling, const bool gc);
@@ -195,12 +191,12 @@ public:
reg_t createFontBitmap(const CelInfo32 &celInfo, const Common::Rect &rect, const Common::String &text, const int16 foreColor, const int16 backColor, const GuiResourceId fontId, const int16 skipColor, const int16 borderColor, const bool dimmed, const bool gc);
inline int scaleUpWidth(int value) const {
- const int scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
+ const int scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
return (value * scriptWidth + _xResolution - 1) / _xResolution;
}
inline int scaleUpHeight(int value) const {
- const int scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const int scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
return (value * scriptHeight + _yResolution - 1) / _yResolution;
}
@@ -212,26 +208,22 @@ public:
/**
* Draws the given text to the bitmap.
*
- * @note The original engine holds a reference to a
- * shared string which lets the text be updated from
- * outside of the font manager. Instead, we give this
- * extra signature to send the text to draw.
- *
- * TODO: Use shared string instead?
+ * @note SSCI holds a reference to a shared string which lets the text be
+ * updated from outside of the font manager. Instead, we use this extra
+ * signature to send the text to draw.
*/
void drawTextBox(const Common::String &text);
/**
- * Erases the given rect by filling with the background
- * color.
+ * Erases the given rect by filling with the background color.
*/
void erase(const Common::Rect &rect, const bool doScaling);
void invertRect(const reg_t bitmap, const int16 bitmapStride, const Common::Rect &rect, const uint8 foreColor, const uint8 backColor, const bool doScaling);
/**
- * Sets the font to be used for rendering and
- * calculation of text dimensions.
+ * Sets the font to be used for rendering and calculation of text
+ * dimensions.
*/
void setFont(const GuiResourceId fontId);
@@ -251,8 +243,8 @@ public:
Common::Rect getTextSize(const Common::String &text, const int16 maxWidth, bool doScaling);
/**
- * Gets the pixel width of a substring of the currently
- * loaded text, with scaling.
+ * Gets the pixel width of a substring of the currently loaded text, with
+ * scaling.
*/
int16 getTextWidth(const Common::String &text, const uint index, const uint length);
@@ -262,23 +254,21 @@ public:
int16 getStringWidth(const Common::String &text);
/**
- * Gets the number of characters of `text`, starting
- * from `index`, that can be safely rendered into
- * `textRect`.
+ * Gets the number of characters of `text`, starting from `index`, that can
+ * be safely rendered into `textRect`.
*/
int16 getTextCount(const Common::String &text, const uint index, const Common::Rect &textRect, const bool doScaling);
/**
- * Gets the number of characters of `text`, starting
- * from `index`, that can be safely rendered into
- * `textRect` using the given font.
+ * Gets the number of characters of `text`, starting from `index`, that can
+ * be safely rendered into `textRect` using the given font.
*/
int16 getTextCount(const Common::String &text, const uint index, const GuiResourceId fontId, const Common::Rect &textRect, const bool doScaling);
/**
* Scroll up/down one line. `numLines` is the number of the lines in the
- * textarea, and `textLine` contains the text to draw as the newly
- * visible line. Originally FontMgr::DrawOneLine and FontMgr::UpOneLine.
+ * textarea, and `textLine` contains the text to draw as the newly visible
+ * line. Originally FontMgr::DrawOneLine and FontMgr::UpOneLine.
*/
void scrollLine(const Common::String &textLine, int numLines, uint8 color, TextAlign align, GuiResourceId fontId, ScrollDirection dir);
};
diff --git a/engines/sci/graphics/transitions32.cpp b/engines/sci/graphics/transitions32.cpp
index df9c2da82b..43479a2505 100644
--- a/engines/sci/graphics/transitions32.cpp
+++ b/engines/sci/graphics/transitions32.cpp
@@ -126,7 +126,7 @@ void GfxTransitions32::processShowStyles() {
g_sci->_gfxFrameout->frameOut(true);
throttle();
}
- } while(continueProcessing && doFrameOut);
+ } while (continueProcessing && doFrameOut);
}
void GfxTransitions32::processEffects(PlaneShowStyle &showStyle) {
@@ -249,14 +249,13 @@ void GfxTransitions32::kernelSetShowStyle(const uint16 argc, const reg_t planeOb
if (createNewEntry) {
entry = new PlaneShowStyle;
- // NOTE: SCI2.1 engine tests if allocation returned a null pointer
- // but then only avoids setting currentStep if this is so. Since
- // this is a nonsensical approach, we do not do that here
+ // SSCI2.1 tests if allocation returned a null pointer but then only
+ // avoids setting currentStep if this is so. Since this nonsensical, we
+ // do not do that here
entry->currentStep = 0;
entry->processed = false;
entry->divisions = hasDivisions ? divisions : _defaultDivisions[type];
entry->plane = planeObj;
- entry->fadeColorRangesCount = 0;
if (getSciVersion() < SCI_VERSION_2_1_MIDDLE) {
// for pixel dissolve
@@ -267,32 +266,26 @@ void GfxTransitions32::kernelSetShowStyle(const uint16 argc, const reg_t planeOb
entry->screenItems.clear();
entry->width = plane->_gameRect.width();
entry->height = plane->_gameRect.height();
- } else {
- entry->fadeColorRanges = nullptr;
- if (hasFadeArray) {
- // NOTE: SCI2.1mid engine does no check to verify that an array is
- // successfully retrieved, and SegMan will cause a fatal error
- // if we try to use a memory segment that is not an array
- SciArray &table = *_segMan->lookupArray(pFadeArray);
-
- uint32 rangeCount = table.size();
- entry->fadeColorRangesCount = rangeCount;
-
- // NOTE: SCI engine code always allocates memory even if the range
- // table has no entries, but this does not really make sense, so
- // we avoid the allocation call in this case
- if (rangeCount > 0) {
- entry->fadeColorRanges = new uint16[rangeCount];
- for (size_t i = 0; i < rangeCount; ++i) {
- entry->fadeColorRanges[i] = table.getAsInt16(i);
- }
+ } else if (hasFadeArray) {
+ // SSCI2.1mid does no check to verify that an array is successfully
+ // retrieved
+ SciArray &table = *_segMan->lookupArray(pFadeArray);
+
+ const uint32 rangeCount = table.size();
+
+ // SSCI always allocates memory even if the range table has no
+ // entries, but this does not really make sense, so we avoid the
+ // allocation call in this case
+ if (rangeCount > 0) {
+ entry->fadeColorRanges.reserve(rangeCount);
+ for (uint32 i = 0; i < rangeCount; ++i) {
+ entry->fadeColorRanges.push_back(table.getAsInt16(i));
}
}
}
}
- // NOTE: The original engine had no nullptr check and would just crash
- // if it got to here
+ // SSCI had no nullptr check and would just crash if it got to here
if (entry == nullptr) {
error("Cannot edit non-existing ShowStyle entry");
}
@@ -397,10 +390,9 @@ ShowStyleList::iterator GfxTransitions32::deleteShowStyle(const ShowStyleList::i
break;
case kShowStyleFadeIn:
case kShowStyleFadeOut:
- if (getSciVersion() > SCI_VERSION_2_1_EARLY && showStyle->fadeColorRangesCount > 0) {
- delete[] showStyle->fadeColorRanges;
- }
- break;
+ // SSCI manually allocated the color ranges for fades and deleted that
+ // memory here, but we use a container so there is no extra cleanup
+ // needed
case kShowStyleNone:
case kShowStyleMorph:
case kShowStyleHShutterIn:
@@ -552,7 +544,8 @@ void GfxTransitions32::configure21EarlyDissolve(PlaneShowStyle &showStyle, const
showStyle.bitmap = bitmapId;
const Buffer &source = g_sci->_gfxFrameout->getCurrentBuffer();
- Buffer target(showStyle.width, showStyle.height, bitmap.getPixels());
+ Buffer target;
+ target.init(showStyle.width, showStyle.height, showStyle.width, bitmap.getPixels(), Graphics::PixelFormat::createFormatCLUT8());
target.fillRect(Common::Rect(bitmap.getWidth(), bitmap.getHeight()), kDefaultSkipColor);
target.copyRectToSurface(source, 0, 0, gameRect);
@@ -762,7 +755,8 @@ bool GfxTransitions32::processPixelDissolve21Early(PlaneShowStyle &showStyle) {
bool unchanged = true;
SciBitmap &bitmap = *_segMan->lookupBitmap(showStyle.bitmap);
- Buffer buffer(showStyle.width, showStyle.height, bitmap.getPixels());
+ Buffer buffer;
+ buffer.init(showStyle.width, showStyle.height, showStyle.width, bitmap.getPixels(), Graphics::PixelFormat::createFormatCLUT8());
uint32 numPixels = showStyle.width * showStyle.height;
uint32 numPixelsPerDivision = (numPixels + showStyle.divisions) / showStyle.divisions;
@@ -944,8 +938,8 @@ bool GfxTransitions32::processFade(const int8 direction, PlaneShowStyle &showSty
percent *= 100;
percent /= showStyle.divisions - 1;
- if (showStyle.fadeColorRangesCount > 0) {
- for (int i = 0, len = showStyle.fadeColorRangesCount; i < len; i += 2) {
+ if (showStyle.fadeColorRanges.size()) {
+ for (uint i = 0, len = showStyle.fadeColorRanges.size(); i < len; i += 2) {
g_sci->_gfxPalette32->setFade(percent, showStyle.fadeColorRanges[i], showStyle.fadeColorRanges[i + 1]);
}
} else {
diff --git a/engines/sci/graphics/transitions32.h b/engines/sci/graphics/transitions32.h
index c4c52283d1..4dbacf41b9 100644
--- a/engines/sci/graphics/transitions32.h
+++ b/engines/sci/graphics/transitions32.h
@@ -28,7 +28,7 @@
#include "sci/engine/vm_types.h"
namespace Sci {
-enum ShowStyleType /* : uint8 */ {
+enum ShowStyleType {
kShowStyleNone = 0,
kShowStyleHShutterOut = 1,
kShowStyleHShutterIn = 2,
@@ -48,14 +48,12 @@ enum ShowStyleType /* : uint8 */ {
};
/**
- * Show styles represent transitions applied to draw planes.
- * One show style per plane can be active at a time.
+ * A show style represents a transition applied to a Plane. One show style per
+ * plane can be active at a time.
*/
struct PlaneShowStyle {
/**
- * The ID of the plane this show style belongs to.
- * In SCI2.1mid (at least SQ6), per-plane transitions
- * were removed and a single plane ID is used.
+ * The ID of the plane this transition applies to.
*/
reg_t plane;
@@ -65,9 +63,8 @@ struct PlaneShowStyle {
ShowStyleType type;
/**
- * When true, the show style is an entry transition
- * to a new room. When false, it is an exit
- * transition away from an old room.
+ * When true, the show style is an entry transition to a new room. When
+ * false, it is an exit transition away from an old room.
*/
bool fadeUp;
@@ -77,38 +74,35 @@ struct PlaneShowStyle {
int16 divisions;
/**
- * The color used by transitions that draw CelObjColor
- * screen items. -1 for transitions that do not draw
- * screen items.
+ * The color used by transitions that draw CelObjColor screen items. -1 for
+ * transitions that do not draw screen items.
*/
int16 color;
- // TODO: Probably uint32
- // TODO: This field probably should be used in order to
- // provide time-accurate processing of show styles. In the
- // actual SCI engine (at least 2т€“2.1mid) it appears that
- // style transitions are drawn т€œas fast as possibleт€, one
- // step per loop, even though this delay field exists
+ /**
+ * The amount of time, in ticks, between each cycle of the animation.
+ */
int delay;
- // TODO: Probably bool, but never seems to be true?
+ /**
+ * If true, GfxTransitions32 will yield back to the main game loop after
+ * calculating the next frame. Otherwise, GfxTransitions32 takes exclusive
+ * control over the game loop until the transition has completed.
+ */
bool animate;
/**
- * The wall time at which the next step of the animation
- * should execute.
+ * The time at which the next step of the animation should execute.
*/
uint32 nextTick;
/**
- * During playback of the show style, the current step
- * (out of divisions).
+ * During playback of the show style, the current step (out of `divisions`).
*/
int currentStep;
/**
- * Whether or not this style has finished running and
- * is ready for disposal.
+ * Whether or not this style has finished running and is ready for disposal.
*/
bool processed;
@@ -117,32 +111,30 @@ struct PlaneShowStyle {
//
/**
- * A list of screen items, each representing one
- * block of a wipe transition.
+ * A list of screen items, each representing one block of a wipe transition.
+ * These screen items are owned by GfxFrameout.
*/
Common::Array<ScreenItem *> screenItems;
/**
- * For wipe transitions, the number of edges with a
- * moving wipe (1, 2, or 4).
+ * For wipe transitions, the number of edges with a moving wipe (1, 2, or
+ * 4).
*/
uint8 numEdges;
/**
- * The dimensions of the plane, in game script
- * coordinates.
+ * The dimensions of the plane, in game script coordinates.
*/
int16 width, height;
/**
- * For pixel dissolve transitions, the screen item
- * used to render the transition.
+ * For pixel dissolve transitions, the screen item used to render the
+ * transition. This screen item is owned by GfxFrameout.
*/
ScreenItem *bitmapScreenItem;
/**
- * For pixel dissolve transitions, the bitmap used
- * to render the transition.
+ * For pixel dissolve transitions, the bitmap used to render the transition.
*/
reg_t bitmap;
@@ -152,15 +144,13 @@ struct PlaneShowStyle {
uint32 dissolveMask;
/**
- * The first pixel that was dissolved in a pixel
- * dissolve transition.
+ * The first pixel that was dissolved in a pixel dissolve transition.
*/
uint32 firstPixel;
/**
- * The last pixel that was dissolved. Once all
- * pixels have been dissolved, `pixel` will once
- * again equal `firstPixel`.
+ * The last pixel that was dissolved. Once all pixels have been dissolved,
+ * `pixel` will once again equal `firstPixel`.
*/
uint32 pixel;
@@ -169,21 +159,15 @@ struct PlaneShowStyle {
//
/**
- * The number of entries in the fadeColorRanges array.
- */
- uint8 fadeColorRangesCount;
-
- /**
- * A pointer to an dynamically sized array of palette
- * indexes, in the order [ fromColor, toColor, ... ].
+ * An array of palette indexes, in the order [ fromColor, toColor, ... ].
* Only colors within this range are transitioned.
*/
- uint16 *fadeColorRanges;
+ Common::Array<uint16> fadeColorRanges;
};
/**
- * PlaneScroll describes a transition between two different
- * pictures within a single plane.
+ * PlaneScroll describes a transition between two different pictures within a
+ * single plane.
*/
struct PlaneScroll {
/**
@@ -197,28 +181,26 @@ struct PlaneScroll {
int16 x, y;
/**
- * The distance that should be scrolled. Only one of
- * `deltaX` or `deltaY` may be set.
+ * The distance that should be scrolled. Only one of `deltaX` or `deltaY`
+ * may be set.
*/
int16 deltaX, deltaY;
/**
- * The pic that should be created and scrolled into
- * view inside the plane.
+ * The pic that should be created and scrolled into view inside the plane.
*/
GuiResourceId newPictureId;
/**
- * The picture that should be scrolled out of view
- * and deleted from the plane.
+ * The picture that should be scrolled out of view and deleted from the
+ * plane.
*/
GuiResourceId oldPictureId;
/**
- * If true, the scroll animation is interleaved
- * with other updates to the graphics. If false,
- * the scroll will be exclusively animated until
- * it is finished.
+ * If true, GfxTransitions32 will yield back to the main game loop after
+ * calculating the next frame. Otherwise, GfxTransitions32 takes exclusive
+ * control over the game loop until the transition has completed.
*/
bool animate;
@@ -235,6 +217,7 @@ class GfxTransitions32 {
public:
GfxTransitions32(SegManager *_segMan);
~GfxTransitions32();
+
private:
SegManager *_segMan;
@@ -264,209 +247,185 @@ public:
inline bool hasShowStyles() const { return !_showStyles.empty(); }
/**
- * Processes all active show styles in a loop
- * until they are finished.
+ * Processes all active show styles in a loop until they are finished.
*/
void processShowStyles();
/**
- * Processes show styles that are applied
- * through `GfxFrameout::palMorphFrameOut`.
+ * Processes show styles that are applied through
+ * `GfxFrameout::palMorphFrameOut`.
*/
void processEffects(PlaneShowStyle &showStyle);
- // NOTE: This signature is taken from SCI3 Phantasmagoria 2
- // and is valid for all implementations of SCI32
void kernelSetShowStyle(const uint16 argc, const reg_t planeObj, const ShowStyleType type, const int16 seconds, const int16 direction, const int16 priority, const int16 animate, const int16 frameOutNow, reg_t pFadeArray, int16 divisions, const int16 blackScreen);
/**
- * Sets the range that will be used by
- * `GfxFrameout::palMorphFrameOut` to alter
- * palette entries.
+ * Sets the range that will be used by `GfxFrameout::palMorphFrameOut` to
+ * alter palette entries.
*/
void kernelSetPalStyleRange(const uint8 fromColor, const uint8 toColor);
/**
- * A map of palette entries that can be morphed
- * by the Morph show style.
+ * A map of palette entries that can be morphed by the Morph show style.
*/
int8 _styleRanges[256];
private:
/**
- * Default sequence values for pixel dissolve
- * transition bit masks.
+ * Default sequence values for pixel dissolve transition bit masks.
*/
int *_dissolveSequenceSeeds;
/**
- * Default values for `PlaneShowStyle::divisions`
- * for the current SCI version.
+ * Default values for `PlaneShowStyle::divisions` for the current SCI
+ * version.
*/
int16 *_defaultDivisions;
/**
- * The list of PlaneShowStyles that are
- * currently active.
+ * The list of PlaneShowStyles that are currently active.
*/
ShowStyleList _showStyles;
/**
- * Finds a show style that applies to the given
- * plane.
+ * Finds a show style that applies to the given plane.
*/
PlaneShowStyle *findShowStyleForPlane(const reg_t planeObj);
/**
- * Finds the iterator for a show style that
- * applies to the given plane.
+ * Finds the iterator for a show style that applies to the given plane.
*/
ShowStyleList::iterator findIteratorForPlane(const reg_t planeObj);
/**
- * Deletes the given PlaneShowStyle and returns
- * the next PlaneShowStyle from the list of
- * styles.
+ * Deletes the given PlaneShowStyle and returns the next PlaneShowStyle from
+ * the list of styles.
*/
ShowStyleList::iterator deleteShowStyle(const ShowStyleList::iterator &showStyle);
/**
- * Initializes the given PlaneShowStyle for a
- * horizontal wipe effect for SCI2 to 2.1early.
+ * Initializes the given PlaneShowStyle for a horizontal wipe effect for
+ * SCI2 to 2.1early.
*/
void configure21EarlyHorizontalWipe(PlaneShowStyle &showStyle, const int16 priority);
/**
- * Initializes the given PlaneShowStyle for a
- * horizontal shutter effect for SCI2 to 2.1early.
+ * Initializes the given PlaneShowStyle for a horizontal shutter effect for
+ * SCI2 to 2.1early.
*/
void configure21EarlyHorizontalShutter(PlaneShowStyle &showStyle, const int16 priority);
/**
- * Initializes the given PlaneShowStyle for an
- * iris effect for SCI2 to 2.1early.
+ * Initializes the given PlaneShowStyle for an iris effect for SCI2 to
+ * 2.1early.
*/
void configure21EarlyIris(PlaneShowStyle &showStyle, const int16 priority);
/**
- * Initializes the given PlaneShowStyle for a
- * pixel dissolve effect for SCI2 to 2.1early.
+ * Initializes the given PlaneShowStyle for a pixel dissolve effect for SCI2
+ * to 2.1early.
*/
void configure21EarlyDissolve(PlaneShowStyle &showStyle, const int16 priority, const Common::Rect &gameRect);
/**
- * Processes one tick of the given
- * PlaneShowStyle.
+ * Processes one tick of the given PlaneShowStyle.
*/
bool processShowStyle(PlaneShowStyle &showStyle, uint32 now);
/**
- * Performs an instant transition between two
- * rooms.
+ * Performs an instant transition between two rooms.
*/
bool processNone(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders into a room
- * with a horizontal shutter effect.
+ * Performs a transition that renders into a room with a horizontal shutter
+ * effect.
*/
bool processHShutterOut(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders to black
- * with a horizontal shutter effect.
+ * Performs a transition that renders to black with a horizontal shutter
+ * effect.
*/
void processHShutterIn(const PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders into a room
- * with a vertical shutter effect.
+ * Performs a transition that renders into a room with a vertical shutter
+ * effect.
*/
void processVShutterOut(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders to black
- * with a vertical shutter effect.
+ * Performs a transition that renders to black with a vertical shutter
+ * effect.
*/
void processVShutterIn(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders into a room
- * with a wipe to the left.
+ * Performs a transition that renders into a room with a wipe to the left.
*/
void processWipeLeft(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders to black
- * with a wipe to the right.
+ * Performs a transition that renders to black with a wipe to the right.
*/
void processWipeRight(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders into a room
- * with a wipe upwards.
+ * Performs a transition that renders into a room with a wipe upwards.
*/
void processWipeUp(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders to black
- * with a wipe downwards.
+ * Performs a transition that renders to black with a wipe downwards.
*/
void processWipeDown(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders into a room
- * with an iris effect.
+ * Performs a transition that renders into a room with an iris effect.
*/
bool processIrisOut(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders to black
- * with an iris effect.
+ * Performs a transition that renders to black with an iris effect.
*/
bool processIrisIn(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders between
- * rooms using a block dissolve effect.
+ * Performs a transition that renders between rooms using a block dissolve
+ * effect.
*/
void processDissolveNoMorph(PlaneShowStyle &showStyle);
/**
- * Performs a transition that renders between
- * rooms with a pixel dissolve effect.
+ * Performs a transition that renders between rooms with a pixel dissolve
+ * effect.
*/
bool processPixelDissolve(PlaneShowStyle &showStyle);
/**
- * SCI2 to 2.1early implementation of pixel
- * dissolve.
+ * SCI2 to 2.1early implementation of pixel dissolve.
*/
bool processPixelDissolve21Early(PlaneShowStyle &showStyle);
/**
- * SCI2.1mid and later implementation of
- * pixel dissolve.
+ * SCI2.1mid and later implementation of pixel dissolve.
*/
bool processPixelDissolve21Mid(const PlaneShowStyle &showStyle);
/**
- * Performs a transition that fades to black
- * between rooms.
+ * Performs a transition that fades to black between rooms.
*/
bool processFade(const int8 direction, PlaneShowStyle &showStyle);
/**
- * Morph transition calls back into the
- * transition system's `processEffects`
- * method, which then applies transitions
- * other than None, Fade, or Morph.
+ * Morph transition calls back into the transition system's `processEffects`
+ * method, which then applies transitions other than None, Fade, or Morph.
*/
bool processMorph(PlaneShowStyle &showStyle);
/**
- * Performs a generic transition for any of
- * the wipe/shutter/iris effects.
+ * Performs a generic transition for any of the wipe/shutter/iris effects.
*/
bool processWipe(const int8 direction, PlaneShowStyle &showStyle);
@@ -476,8 +435,7 @@ public:
inline bool hasScrolls() const { return !_scrolls.empty(); }
/**
- * Processes all active plane scrolls
- * in a loop until they are finished.
+ * Processes all active plane scrolls in a loop until they are finished.
*/
void processScrolls();
@@ -490,8 +448,7 @@ private:
ScrollList _scrolls;
/**
- * Performs a scroll of the content of
- * a plane.
+ * Performs a scroll of the content of a plane.
*/
bool processScroll(PlaneScroll &scroll);
};
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 736ee15428..8d68c8e3bb 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -63,8 +63,8 @@ bool VideoPlayer::open(const Common::String &fileName) {
}
#ifndef USE_RGB_COLOR
- // KQ7 2.00b videos are compressed in 24bpp Cinepak, so cannot play on
- // a system with no RGB support
+ // KQ7 2.00b videos are compressed in 24bpp Cinepak, so cannot play on a
+ // system with no RGB support
if (_decoder->getPixelFormat().bytesPerPixel != 1) {
void showScummVMDialog(const Common::String &message);
showScummVMDialog(Common::String::format(_("Cannot play back %dbpp video on a system with maximum color depth of 8bpp"), _decoder->getPixelFormat().bpp()));
@@ -117,8 +117,8 @@ bool VideoPlayer::endHQVideo() {
}
VideoPlayer::EventFlags VideoPlayer::playUntilEvent(const EventFlags flags, const uint32 maxSleepMs) {
- // Flushing all the keyboard and mouse events out of the event manager
- // keeps events queued from before the start of playback from accidentally
+ // Flushing all the keyboard and mouse events out of the event manager keeps
+ // events queued from before the start of playback from accidentally
// activating a video stop flag
_eventMan->flushEvents();
@@ -201,11 +201,10 @@ void VideoPlayer::submitPalette(const uint8 palette[256 * 3]) const {
g_system->getPaletteManager()->setPalette(palette, 0, 256);
// KQ7 1.x has videos encoded using Microsoft Video 1 where palette 0 is
- // white and 255 is black, which is basically the opposite of DOS/Win
- // SCI palettes. So, when drawing to an 8bpp hwscreen, whenever a new
- // palette is seen, the screen must be re-filled with the new black
- // entry to ensure areas outside the video are always black and not some
- // other color
+ // white and 255 is black, which is basically the opposite of DOS/Win SCI
+ // palettes. So, when drawing to an 8bpp hwscreen, whenever a new palette is
+ // seen, the screen must be re-filled with the new black entry to ensure
+ // areas outside the video are always black and not some other color
for (int color = 0; color < 256; ++color) {
if (palette[0] == 0 && palette[1] == 0 && palette[2] == 0) {
g_system->fillScreen(color);
@@ -231,7 +230,8 @@ void VideoPlayer::renderFrame(const Graphics::Surface &nextFrame) const {
if (_decoder->getWidth() != _drawRect.width() || _decoder->getHeight() != _drawRect.height()) {
Graphics::Surface *const unscaledFrame(convertedFrame);
// TODO: The only reason TransparentSurface is used here because it is
- // where common scaler code is right now.
+ // where common scaler code is right now, which should just be part of
+ // Graphics::Surface (or some free functions).
const Graphics::TransparentSurface tsUnscaledFrame(*unscaledFrame);
#ifdef USE_RGB_COLOR
if (_hqVideoMode) {
@@ -307,17 +307,17 @@ void SEQPlayer::play(const Common::String &fileName, const int16 numTicks, const
return;
}
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
const int16 scaledWidth = (_decoder->getWidth() * Ratio(screenWidth, scriptWidth)).toInt();
const int16 scaledHeight = (_decoder->getHeight() * Ratio(screenHeight, scriptHeight)).toInt();
- // Normally we would use the coordinates passed into the play function
- // to position the video, but since we are scaling the video (which SSCI
- // did not do), the coordinates are not correct. Since videos are always
+ // Normally we would use the coordinates passed into the play function to
+ // position the video, but since we are scaling the video (which SSCI did
+ // not do), the coordinates are not correct. Since videos are always
// intended to play in the center of the screen, we just recalculate the
// origin here.
_drawRect.left = (screenWidth - scaledWidth) / 2;
@@ -392,8 +392,8 @@ AVIPlayer::IOStatus AVIPlayer::init(const bool doublePixels) {
height *= 2;
}
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
// When scaling videos, they must not grow larger than the hardware screen
// or else the engine will crash. This is particularly important for the GK1
@@ -449,9 +449,9 @@ AVIPlayer::IOStatus AVIPlayer::play(const int16 from, const int16 to, const int1
}
AVIPlayer::EventFlags AVIPlayer::playUntilEvent(const EventFlags flags, const uint32 maxSleepMs) {
- // NOTE: In SSCI, whether or not a video could be skipped was controlled by
- // game scripts; here, we always allow skipping video with the mouse or
- // escape key, to improve the user experience
+ // In SSCI, whether or not a video could be skipped was controlled by game
+ // scripts; here, we always allow skipping video with the mouse or escape
+ // key, to improve the user experience
return VideoPlayer::playUntilEvent(flags | kEventFlagMouseDown | kEventFlagEscapeKey, maxSleepMs);
}
@@ -599,20 +599,26 @@ VMDPlayer::IOStatus VMDPlayer::close() {
return kIOSuccess;
}
- if (_isComposited) {
- closeComposited();
- } else {
- closeOverlay();
- }
+ if (_isInitialized) {
+ if (_isComposited) {
+ closeComposited();
+ } else {
+ closeOverlay();
+ }
- if (_blackoutPlane != nullptr) {
- g_sci->_gfxFrameout->deletePlane(*_blackoutPlane);
- _blackoutPlane = nullptr;
- }
+ if (_blackoutPlane != nullptr) {
+ g_sci->_gfxFrameout->deletePlane(*_blackoutPlane);
+ _blackoutPlane = nullptr;
+ }
- if (!_leaveLastFrame && !_leaveScreenBlack) {
- // This call *actually* deletes the blackout plane
- g_sci->_gfxFrameout->frameOut(true);
+ if (!_leaveLastFrame && !_leaveScreenBlack) {
+ // This call *actually* deletes the blackout plane
+ g_sci->_gfxFrameout->frameOut(true);
+ }
+
+ if (!_showCursor) {
+ g_sci->_gfxCursor32->unhide();
+ }
}
_decoder->close();
@@ -622,10 +628,6 @@ VMDPlayer::IOStatus VMDPlayer::close() {
_bundledVmd = nullptr;
}
- if (!_showCursor) {
- g_sci->_gfxCursor32->unhide();
- }
-
_isOpen = false;
_isInitialized = false;
_ignorePalettes = false;
@@ -679,8 +681,8 @@ VMDPlayer::EventFlags VMDPlayer::kernelPlayUntilEvent(const EventFlags flags, co
VMDPlayer::EventFlags VMDPlayer::playUntilEvent(const EventFlags flags, const uint32) {
if (flags & kEventFlagReverse) {
- // NOTE: This flag may not work properly since SSCI does not care
- // if a video has audio, but the VMD decoder does.
+ // This flag may not work properly since SSCI does not care if a video
+ // has audio, but the VMD decoder does.
warning("VMD reverse playback flag was set. Please report this event to the bug tracker");
const bool success = _decoder->setReverse(true);
assert(success);
@@ -781,20 +783,7 @@ void VMDPlayer::redrawGameScreen() const {
return;
}
- Graphics::Surface *game = g_sci->_gfxFrameout->getCurrentBuffer().convertTo(g_system->getScreenFormat(), g_sci->_gfxPalette32->getHardwarePalette());
- assert(game);
-
- Common::Rect rects[4];
- int splitCount = splitRects(Common::Rect(game->w, game->h), _drawRect, rects);
- if (splitCount != -1) {
- while (splitCount--) {
- const Common::Rect &drawRect = rects[splitCount];
- g_system->copyRectToScreen(game->getBasePtr(drawRect.left, drawRect.top), game->pitch, drawRect.left, drawRect.top, drawRect.width(), drawRect.height());
- }
- }
-
- game->free();
- delete game;
+ g_sci->_gfxFrameout->redrawGameScreen(_drawRect);
}
#endif
@@ -836,10 +825,10 @@ void VMDPlayer::submitPalette(const uint8 rawPalette[256 * 3]) const {
if (_isComposited) {
SciBitmap *bitmap = _segMan->lookupBitmap(_bitmapId);
bitmap->setPalette(palette);
- // NOTE: SSCI calls updateScreenItem and frameOut here, but this should
- // not be necessary in ScummVM since the new palette gets submitted
- // before the next frame is rendered, and the frame rendering call will
- // perform the same operations.
+ // SSCI calls updateScreenItem and frameOut here, but this is not
+ // necessary in ScummVM since the new palette gets submitted before the
+ // next frame is rendered, and the frame rendering call will perform the
+ // same operations.
} else {
g_sci->_gfxPalette32->submit(palette);
g_sci->_gfxPalette32->updateForFrame();
@@ -898,8 +887,8 @@ void VMDPlayer::initComposited() {
}
const uint32 hunkPaletteSize = HunkPalette::calculateHunkPaletteSize(256, false);
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
SciBitmap &vmdBitmap = *_segMan->allocateBitmap(&_bitmapId, _drawRect.width(), _drawRect.height(), 255, 0, 0, screenWidth, screenHeight, hunkPaletteSize, false, false);
vmdBitmap.getBuffer().fillRect(Common::Rect(_drawRect.width(), _drawRect.height()), 0);
@@ -929,7 +918,7 @@ void VMDPlayer::initComposited() {
_screenItem->_drawBlackLines = true;
}
- // NOTE: There was code for positioning the screen item using insetRect
+ // In SSCI, there was code for positioning the screen item using insetRect
// here, but none of the game scripts seem to use this functionality.
g_sci->_gfxFrameout->addScreenItem(*_screenItem);
@@ -1014,9 +1003,8 @@ void VMDPlayer::setPlane(const int16 priority, const reg_t planeId) {
void VMDPlayer::restrictPalette(const uint8 startColor, const int16 endColor) {
_startColor = startColor;
- // At least GK2 sends 256 as the end color, which is wrong,
- // but works in the original engine as the storage size is 4 bytes
- // and used values are clamped to 0-255
+ // At least GK2 sends 256 as the end color, which is wrong, but works in
+ // SSCI as the storage size is 4 bytes and used values are clamped to 0-255
_endColor = MIN<int16>(255, endColor);
}
diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h
index 7b2cffa2ae..ce5e4ba883 100644
--- a/engines/sci/graphics/video32.h
+++ b/engines/sci/graphics/video32.h
@@ -331,7 +331,7 @@ public:
*/
VMDStatus getStatus() const;
- // NOTE: Was WaitForEvent in SSCI
+ // Was WaitForEvent in SSCI
EventFlags kernelPlayUntilEvent(const EventFlags flags, const int16 lastFrameNo, const int16 yieldInterval);
private:
@@ -347,7 +347,8 @@ private:
/**
* The Resource object for VMDs that are read out of a resource bundle
- * instead of being streamed from the filesystem.
+ * instead of being streamed from the filesystem. The resource is owned by
+ * ResourceManager.
*/
Resource *_bundledVmd;
@@ -399,12 +400,13 @@ protected:
private:
/**
- * The plane where the VMD will be drawn.
+ * The plane where the VMD will be drawn. The plane is owned by GfxFrameout.
*/
Plane *_plane;
/**
- * The screen item representing the VMD surface.
+ * The screen item representing the VMD surface. The screen item is owned by
+ * GfxFrameout.
*/
ScreenItem *_screenItem;
@@ -538,7 +540,7 @@ private:
/**
* An optional plane that will be used to black out areas of the screen
- * outside of the VMD surface.
+ * outside of the VMD surface. The plane is owned by GfxFrameout.
*/
Plane *_blackoutPlane;
@@ -675,6 +677,7 @@ protected:
private:
/**
* An empty plane drawn behind the video when the doFrameOut flag is true.
+ * The plane is owned by GfxFrameout.
*/
Plane *_plane;
diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp
index 59ebc86bf3..f9a0140323 100644
--- a/engines/sci/sound/audio32.cpp
+++ b/engines/sci/sound/audio32.cpp
@@ -153,6 +153,7 @@ Audio32::Audio32(ResourceManager *resMan) :
_handle(),
_mutex(),
+ _channels(getSciVersion() < SCI_VERSION_2_1_EARLY ? 10 : getSciVersion() < SCI_VERSION_3 ? 5 : 8),
_numActiveChannels(0),
_inAudioThread(false),
@@ -170,22 +171,10 @@ Audio32::Audio32(ResourceManager *resMan) :
_startedAtTick(0),
_attenuatedMixing(true),
+ _useModifiedAttenuation(g_sci->_features->usesModifiedAudioAttenuation()),
_monitoredChannelIndex(-1),
- _monitoredBuffer(nullptr),
- _monitoredBufferSize(0),
_numMonitoredSamples(0) {
-
- if (getSciVersion() < SCI_VERSION_2_1_EARLY) {
- _channels.resize(10);
- } else if (getSciVersion() < SCI_VERSION_3) {
- _channels.resize(5);
- } else {
- _channels.resize(8);
- }
-
- _useModifiedAttenuation = g_sci->_features->usesModifiedAudioAttenuation();
-
// In games where scripts premultiply master audio volumes into the volumes
// of the individual audio channels sent to the mixer, Audio32 needs to use
// the kPlainSoundType so that the master SFX volume is not applied twice.
@@ -202,15 +191,14 @@ Audio32::Audio32(ResourceManager *resMan) :
Audio32::~Audio32() {
stop(kAllChannels);
_mixer->stopHandle(_handle);
- free(_monitoredBuffer);
}
#pragma mark -
#pragma mark AudioStream implementation
-int Audio32::writeAudioInternal(Audio::AudioStream *const sourceStream, Audio::RateConverter *const converter, Audio::st_sample_t *targetBuffer, const int numSamples, const Audio::st_volume_t leftVolume, const Audio::st_volume_t rightVolume) {
+int Audio32::writeAudioInternal(Audio::AudioStream &sourceStream, Audio::RateConverter &converter, Audio::st_sample_t *targetBuffer, const int numSamples, const Audio::st_volume_t leftVolume, const Audio::st_volume_t rightVolume) {
const int samplePairsToRead = numSamples >> 1;
- const int samplePairsWritten = converter->flow(*sourceStream, targetBuffer, samplePairsToRead, leftVolume, rightVolume);
+ const int samplePairsWritten = converter.flow(sourceStream, targetBuffer, samplePairsToRead, leftVolume, rightVolume);
return samplePairsWritten << 1;
}
@@ -243,34 +231,28 @@ bool Audio32::channelShouldMix(const AudioChannel &channel) const {
return true;
}
-// In earlier versions of SCI32 engine, audio mixing is
-// split into three different functions.
+// In earlier versions of SCI32 engine, audio mixing is split into three
+// different functions.
//
-// The first function is called from the main game thread in
-// AsyncEventCheck; later versions of SSCI also call it when
-// getting the playback position. This function is
-// responsible for cleaning up finished channels and
-// filling active channel buffers with decompressed audio
-// matching the hardware output audio format so they can
-// just be copied into the main DAC buffer directly later.
+// The first function is called from the main game thread in AsyncEventCheck;
+// later versions of SSCI also call it when getting the playback position. This
+// function is responsible for cleaning up finished channels and filling active
+// channel buffers with decompressed audio matching the hardware output audio
+// format so they can just be copied into the main DAC buffer directly later.
//
-// The second function is called by the audio hardware when
-// the DAC buffer needs to be filled, and by `play` when
-// there is only one active sample (so it can just blow away
-// whatever was already in the DAC buffer). It merges all
-// active channels into the DAC buffer and then updates the
-// offset into the DAC buffer.
+// The second function is called by the audio hardware when the DAC buffer needs
+// to be filled, and by `play` when there is only one active sample (so it can
+// just blow away whatever was already in the DAC buffer). It merges all active
+// channels into the DAC buffer and then updates the offset into the DAC buffer.
//
-// Finally, a third function is called by the second
-// function, and it actually puts data into the DAC buffer,
-// performing volume, distortion, and balance adjustments.
+// Finally, a third function is called by the second function, and it actually
+// puts data into the DAC buffer, performing volume, distortion, and balance
+// adjustments.
//
-// Since we only have one callback from the audio thread,
-// and should be able to do all audio processing in
-// real time, and we have streams, and we do not need to
-// completely fill the audio buffer, the functionality of
-// all these original functions is combined here and
-// simplified.
+// Since we only have one callback from the audio thread, and should be able to
+// do all audio processing in real time, and we have streams, and we do not need
+// to completely fill the audio buffer, the functionality of all these original
+// functions is combined here and simplified.
int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples) {
Common::StackLock lock(_mutex);
@@ -278,20 +260,17 @@ int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples)
return 0;
}
- // ResourceManager is not thread-safe so we need to
- // avoid calling into it from the audio thread, but at
- // the same time we need to be able to clear out any
- // finished channels on a regular basis
+ // ResourceManager is not thread-safe so we need to avoid calling into it
+ // from the audio thread, but at the same time we need to be able to clear
+ // out any finished channels on a regular basis
_inAudioThread = true;
freeUnusedChannels();
const bool playOnlyMonitoredChannel = getSciVersion() != SCI_VERSION_3 && _monitoredChannelIndex != -1;
- // The caller of `readBuffer` is a rate converter,
- // which reuses (without clearing) an intermediate
- // buffer, so we need to zero the intermediate buffer
- // to prevent mixing into audio data from the last
- // callback.
+ // The caller of `readBuffer` is a rate converter, which reuses (without
+ // clearing) an intermediate buffer, so we need to zero the intermediate
+ // buffer to prevent mixing into audio data from the last callback.
memset(buffer, 0, numSamples * sizeof(Audio::st_sample_t));
// This emulates the attenuated mixing mode of SSCI engine, which reduces
@@ -340,8 +319,8 @@ int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples)
continue;
}
- // Channel finished fading and had the
- // stopChannelOnFade flag set, so no longer exists
+ // Channel finished fading and had the stopChannelOnFade flag set, so no
+ // longer exists
if (channel.fadeStartTick && processFade(channelIndex)) {
--channelIndex;
continue;
@@ -352,10 +331,10 @@ int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples)
if (channel.pan == -1 || !isStereo()) {
int volume = channel.volume;
if (getSciVersion() == SCI_VERSION_2) {
- // NOTE: In SSCI, audio is decompressed into a temporary
- // buffer, then the samples in that buffer are looped over,
- // shifting each sample right 3, 2, or 1 bits to reduce the
- // volume.
+ // In SSCI, audio is decompressed into a temporary buffer, then
+ // the samples in that buffer are looped over, shifting each
+ // sample right 3, 2, or 1 bits to reduce the volume within the
+ // ranges given here
if (volume > 0 && volume <= 42) {
volume = 15;
} else if (volume > 42 && volume <= 84) {
@@ -367,20 +346,18 @@ int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples)
// In SCI3, granularity of the non-maximum volumes is 1/32
volume &= ~4;
- // NOTE: In the SSCI DOS interpreter, non-maximum volumes are
- // divided by 8 which puts them in a range of [0, 16). That
- // reduced volume range gets passed into a volume function which
- // expects values [0, 32). So, effectively, all non-maximum
- // volumes are half-volume in DOS in SCI3. In Windows, volumes
- // [120, 124) are the same as 127 due to a programming bug.
- // We do not emulate either of these incorrect behaviors.
+ // In the SSCI DOS interpreter, non-maximum volumes are divided
+ // by 8 which puts them in a range of [0, 16). That reduced
+ // volume range gets passed into a volume function which expects
+ // values [0, 32). So, effectively, all non-maximum volumes are
+ // half-volume in DOS in SCI3 due to a programming bug. In
+ // Windows, volumes [120, 124) are the same as 127 due to
+ // another programming bug. We do not emulate either of these
+ // incorrect behaviors.
}
leftVolume = rightVolume = volume * Audio::Mixer::kMaxChannelVolume / kMaxVolume;
} else {
- // TODO: This should match the SCI3 algorithm,
- // which seems to halve the volume of each
- // channel when centered; is this intended?
leftVolume = channel.volume * (100 - channel.pan) / 100 * Audio::Mixer::kMaxChannelVolume / kMaxVolume;
rightVolume = channel.volume * channel.pan / 100 * Audio::Mixer::kMaxChannelVolume / kMaxVolume;
}
@@ -397,19 +374,15 @@ int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples)
}
if (channelIndex == _monitoredChannelIndex) {
- const size_t bufferSize = numSamples * sizeof(Audio::st_sample_t);
- if (_monitoredBufferSize < bufferSize) {
- _monitoredBuffer = (Audio::st_sample_t *)realloc(_monitoredBuffer, bufferSize);
- _monitoredBufferSize = bufferSize;
+ if (numSamples > (int)_monitoredBuffer.size()) {
+ _monitoredBuffer.resize(numSamples);
}
+ memset(_monitoredBuffer.data(), 0, _monitoredBuffer.size() * sizeof(Audio::st_sample_t));
+ _numMonitoredSamples = writeAudioInternal(*channel.stream, *channel.converter, _monitoredBuffer.data(), numSamples, leftVolume, rightVolume);
- memset(_monitoredBuffer, 0, _monitoredBufferSize);
-
- _numMonitoredSamples = writeAudioInternal(channel.stream, channel.converter, _monitoredBuffer, numSamples, leftVolume, rightVolume);
-
- Audio::st_sample_t *sourceBuffer = _monitoredBuffer;
+ Audio::st_sample_t *sourceBuffer = _monitoredBuffer.data();
Audio::st_sample_t *targetBuffer = buffer;
- const Audio::st_sample_t *const end = _monitoredBuffer + _numMonitoredSamples;
+ const Audio::st_sample_t *const end = _monitoredBuffer.data() + _numMonitoredSamples;
while (sourceBuffer != end) {
Audio::clampedAdd(*targetBuffer++, *sourceBuffer++);
}
@@ -428,7 +401,7 @@ int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples)
leftVolume = rightVolume = 0;
}
- const int channelSamplesWritten = writeAudioInternal(channel.stream, channel.converter, buffer, numSamples, leftVolume, rightVolume);
+ const int channelSamplesWritten = writeAudioInternal(*channel.stream, *channel.converter, buffer, numSamples, leftVolume, rightVolume);
if (channelSamplesWritten > maxSamplesWritten) {
maxSamplesWritten = channelSamplesWritten;
}
@@ -458,10 +431,9 @@ uint8 Audio32::getNumUnlockedChannels() const {
}
int16 Audio32::findChannelByArgs(int argc, const reg_t *argv, const int startIndex, const reg_t soundNode) const {
- // NOTE: argc/argv are already reduced by one in our engine because
- // this call is always made from a subop, so no reduction for the
- // subop is made in this function. SSCI takes extra steps to skip
- // the subop argument.
+ // SSCI takes extra steps to skip the subop argument here, but argc/argv are
+ // already reduced by one in our engine by the kernel since these calls are
+ // always subops so we do not need to do anything extra
argc -= startIndex;
if (argc <= 0) {
@@ -501,10 +473,10 @@ int16 Audio32::findChannelById(const ResourceId resourceId, const reg_t soundNod
if (resourceId.getType() == kResourceTypeAudio) {
for (int16 i = 0; i < _numActiveChannels; ++i) {
- const AudioChannel channel = _channels[i];
+ const AudioChannel &candidate = _channels[i];
if (
- channel.id == resourceId &&
- (soundNode.isNull() || soundNode == channel.soundNode)
+ candidate.id == resourceId &&
+ (soundNode.isNull() || soundNode == candidate.soundNode)
) {
return i;
}
@@ -553,7 +525,7 @@ void Audio32::freeUnusedChannels() {
}
void Audio32::freeChannel(const int16 channelIndex) {
- // The original engine did this:
+ // SSCI did this:
// 1. Unlock memory-cached resource, if one existed
// 2. Close patched audio file descriptor, if one existed
// 3. Free decompression memory buffer, if one existed
@@ -563,14 +535,13 @@ void Audio32::freeChannel(const int16 channelIndex) {
// Robots have no corresponding resource to free
if (channel.robot) {
- delete channel.stream;
- channel.stream = nullptr;
+ channel.stream.reset();
channel.robot = false;
} else {
- // We cannot unlock resources from the audio thread
- // because ResourceManager is not thread-safe; instead,
- // we just record that the resource needs unlocking and
- // unlock it whenever we are on the main thread again
+ // We cannot unlock resources from the audio thread because
+ // ResourceManager is not thread-safe; instead, we just record that the
+ // resource needs unlocking and unlock it whenever we are on the main
+ // thread again
if (_inAudioThread) {
_resourcesToUnlock.push_back(channel.resource);
} else {
@@ -578,12 +549,10 @@ void Audio32::freeChannel(const int16 channelIndex) {
}
channel.resource = nullptr;
- delete channel.stream;
- channel.stream = nullptr;
+ channel.stream.reset();
}
- delete channel.converter;
- channel.converter = nullptr;
+ channel.converter.reset();
if (_monitoredChannelIndex == channelIndex) {
_monitoredChannelIndex = -1;
@@ -677,13 +646,12 @@ bool Audio32::playRobotAudio(const RobotAudioStream::RobotAudioPacket &packet) {
channel.pausedAtTick = 0;
channel.soundNode = NULL_REG;
channel.volume = kMaxVolume;
- // TODO: SCI3 introduces stereo audio
channel.pan = -1;
- channel.converter = Audio::makeRateConverter(RobotAudioStream::kRobotSampleRate, getRate(), false);
+ channel.converter.reset(Audio::makeRateConverter(RobotAudioStream::kRobotSampleRate, getRate(), false));
// The RobotAudioStream buffer size is
// ((bytesPerSample * channels * sampleRate * 2000ms) / 1000ms) & ~3
// where bytesPerSample = 2, channels = 1, and sampleRate = 22050
- channel.stream = new RobotAudioStream(88200);
+ channel.stream.reset(new RobotAudioStream(88200));
_robotAudioPaused = false;
if (_numActiveChannels == 1) {
@@ -691,7 +659,7 @@ bool Audio32::playRobotAudio(const RobotAudioStream::RobotAudioPacket &packet) {
}
}
- return static_cast<RobotAudioStream *>(channel.stream)->addPacket(packet);
+ return static_cast<RobotAudioStream *>(channel.stream.get())->addPacket(packet);
}
bool Audio32::queryRobotAudio(RobotAudioStream::StreamState &status) const {
@@ -703,7 +671,7 @@ bool Audio32::queryRobotAudio(RobotAudioStream::StreamState &status) const {
return false;
}
- status = static_cast<RobotAudioStream *>(getChannel(channelIndex).stream)->getStatus();
+ status = static_cast<RobotAudioStream *>(getChannel(channelIndex).stream.get())->getStatus();
return true;
}
@@ -715,7 +683,7 @@ bool Audio32::finishRobotAudio() {
return false;
}
- static_cast<RobotAudioStream *>(getChannel(channelIndex).stream)->finish();
+ static_cast<RobotAudioStream *>(getChannel(channelIndex).stream.get())->finish();
return true;
}
@@ -741,7 +709,7 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool
if (channelIndex != kNoExistingChannel) {
AudioChannel &channel = getChannel(channelIndex);
- MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream);
+ MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream.get());
if (stream == nullptr) {
error("[Audio32::play]: Unable to cast stream for resource %s", resourceId.toString().c_str());
}
@@ -760,43 +728,42 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool
return 0;
}
- // NOTE: SCI engine itself normally searches in this order:
+ // SSCI normally searches in this order:
//
// For Audio36:
//
- // 1. First, request a FD using Audio36 name and use it as the
- // source FD for reading the audio resource data.
- // 2a. If the returned FD is -1, or equals the audio map, or
- // equals the audio bundle, try to get the offset of the
- // data from the audio map, using the Audio36 name.
+ // 1. First, request a FD using Audio36 name and use it as the source FD for
+ // reading the audio resource data.
+ // 2a. If the returned FD is -1, or equals the audio map, or equals the
+ // audio bundle, try to get the offset of the data from the audio map,
+ // using the Audio36 name.
//
- // If the returned offset is -1, this is not a valid resource;
- // return 0. Otherwise, set the read offset for the FD to the
- // returned offset.
- // 2b. Otherwise, use the FD as-is (it is a patch file), with zero
- // offset, and record it separately so it can be closed later.
+ // If the returned offset is -1, this is not a valid resource; return 0.
+ // Otherwise, set the read offset for the FD to the returned offset.
+ // 2b. Otherwise, use the FD as-is (it is a patch file), with zero offset,
+ // and record it separately so it can be closed later.
//
// For plain audio:
//
- // 1. First, request an Audio resource from the resource cache. If
- // one does not exist, make the same request for a Wave resource.
- // 2a. If an audio resource was discovered, record its memory ID
- // and clear the streaming FD
- // 2b. Otherwise, request an Audio FD. If one does not exist, make
- // the same request for a Wave FD. If neither exist, this is not
- // a valid resource; return 0. Otherwise, use the returned FD as
- // the streaming ID and set the memory ID to null.
+ // 1. First, request an Audio resource from the resource cache. If one does
+ // not exist, make the same request for a Wave resource.
+ // 2a. If an audio resource was discovered, record its memory ID and clear
+ // the streaming FD
+ // 2b. Otherwise, request an Audio FD. If one does not exist, make the same
+ // request for a Wave FD. If neither exist, this is not a valid
+ // resource; return 0. Otherwise, use the returned FD as the streaming
+ // ID and set the memory ID to null.
//
// Once these steps are complete, the audio engine either has a file
- // descriptor + offset that it can use to read streamed audio, or it
- // has a memory ID that it can use to read cached audio.
+ // descriptor + offset that it can use to read streamed audio, or it has a
+ // memory ID that it can use to read cached audio.
//
- // Here in ScummVM we just ask the resource manager to give us the
- // resource and we get a seekable stream.
+ // Here in ScummVM we just ask the resource manager to give us the resource
+ // and we get a seekable stream.
- // TODO: This should be fixed to use streaming, which means
- // fixing the resource manager to allow streaming, which means
- // probably rewriting a bunch of the resource manager.
+ // TODO: This should be fixed to use streaming, which means fixing the
+ // resource manager to allow streaming, which means probably rewriting a
+ // bunch of the resource manager.
Resource *resource = _resMan->findResource(resourceId, true);
if (resource == nullptr) {
warning("[Audio32::play]: %s could not be found", resourceId.toString().c_str());
@@ -812,7 +779,6 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool
channel.fadeStartTick = 0;
channel.soundNode = soundNode;
channel.volume = volume < 0 || volume > kMaxVolume ? (int)kMaxVolume : volume;
- // TODO: SCI3 introduces stereo audio
channel.pan = -1;
if (monitor) {
@@ -842,18 +808,17 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool
audioStream = Audio::makeRawStream(dataStream, _globalSampleRate, flags, DisposeAfterUse::YES);
}
- channel.stream = new MutableLoopAudioStream(audioStream, loop);
- channel.converter = Audio::makeRateConverter(channel.stream->getRate(), getRate(), channel.stream->isStereo(), false);
+ channel.stream.reset(new MutableLoopAudioStream(audioStream, loop));
+ channel.converter.reset(Audio::makeRateConverter(channel.stream->getRate(), getRate(), channel.stream->isStereo(), false));
- // NOTE: SCI engine sets up a decompression buffer here for the audio
- // stream, plus writes information about the sample to the channel to
- // convert to the correct hardware output format, and allocates the
- // monitoring buffer to match the bitrate/samplerate/channels of the
- // original stream. We do not need to do any of these things since we
- // use audio streams, and allocate and fill the monitoring buffer
- // when reading audio data from the stream.
+ // SSCI sets up a decompression buffer here for the audio stream, plus
+ // writes information about the sample to the channel to convert to the
+ // correct hardware output format, and allocates the monitoring buffer to
+ // match the bitrate/samplerate/channels of the original stream. We do not
+ // need to do any of these things since we use audio streams, and allocate
+ // and fill the monitoring buffer when reading audio data from the stream.
- MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream);
+ MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream.get());
if (stream == nullptr) {
error("[Audio32::play]: Unable to cast stream for resource %s", resourceId.toString().c_str());
}
@@ -958,8 +923,8 @@ bool Audio32::pause(const int16 channelIndex) {
}
}
- // NOTE: The actual engine returns false here regardless of whether
- // or not channels were paused
+ // SSCI returns false here regardless of whether or not channels were
+ // paused, so we emulate this behaviour
} else {
AudioChannel &channel = getChannel(channelIndex);
@@ -996,9 +961,10 @@ int16 Audio32::stop(const int16 channelIndex) {
}
}
- // NOTE: SSCI stops the DSP interrupt and frees the
- // global decompression buffer here if there are no
- // more active channels
+ // SSCI stops the DSP interrupt and frees the global decompression buffer
+ // here if there are no more active channels, which we do not need to do
+ // since the system manages audio callbacks and we have no static
+ // decompression buffer
return oldNumChannels;
}
@@ -1015,13 +981,14 @@ int16 Audio32::getPosition(const int16 channelIndex) const {
return -1;
}
- // NOTE: SSCI treats this as an unsigned short except for
- // when the value is 65535, then it treats it as signed
+ // SSCI treats this as an unsigned short except for when the value is 65535,
+ // then it treats it as signed
int position = -1;
const uint32 now = g_sci->getTickCount();
- // NOTE: The original engine also queried the audio driver to see whether
- // it thought that there was audio playback occurring via driver opcode 9
+ // SSCI also queried the audio driver to see whether it thought that there
+ // was audio playback occurring via driver opcode 9, but we have no analogue
+ // to query
if (channelIndex == kAllChannels) {
if (_pausedAtTick) {
position = _pausedAtTick - _startedAtTick;
@@ -1052,7 +1019,7 @@ void Audio32::setLoop(const int16 channelIndex, const bool loop) {
AudioChannel &channel = getChannel(channelIndex);
- MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream);
+ MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream.get());
assert(stream);
stream->loop() = loop;
}
@@ -1161,8 +1128,8 @@ bool Audio32::hasSignal() const {
return false;
}
- const Audio::st_sample_t *buffer = _monitoredBuffer;
- const Audio::st_sample_t *const end = _monitoredBuffer + _numMonitoredSamples;
+ const Audio::st_sample_t *buffer = _monitoredBuffer.data();
+ const Audio::st_sample_t *const end = _monitoredBuffer.data() + _numMonitoredSamples;
while (buffer != end) {
const Audio::st_sample_t sample = *buffer++;
@@ -1193,9 +1160,9 @@ reg_t Audio32::kernelPlay(const bool autoPlay, const int argc, const reg_t *cons
if (argc < 6 || argv[5].toSint16() == 1) {
loop = false;
} else {
- // NOTE: Uses -1 for infinite loop. Presumably the
- // engine was supposed to allow counter loops at one
- // point, but ended up only using loop as a boolean.
+ // SSCI uses -1 for infinite loop. Presumably the engine was
+ // supposed to allow counter loops at one point, but ended up only
+ // using loop as a boolean.
loop = (bool)argv[5].toSint16();
}
@@ -1311,8 +1278,10 @@ reg_t Audio32::kernelFade(const int argc, const reg_t *const argv) {
Common::StackLock lock(_mutex);
- // NOTE: In SSCI, this call to find the channel is hacked up; argc is
- // set to 2 before the call, and then restored after the call.
+ // In SSCI, this call to find the channel is hacked up; argc is set to 2
+ // before the call, and then restored after the call. We just implemented
+ // findChannelByArgs in a manner that allows us to pass this information
+ // without messing with argc/argv instead
const int16 channelIndex = findChannelByArgs(2, argv, 0, argc > 5 ? argv[5] : NULL_REG);
const int16 volume = argv[1].toSint16();
const int16 speed = argv[2].toSint16();
@@ -1359,7 +1328,7 @@ void Audio32::printAudioList(Console *con) const {
Common::StackLock lock(_mutex);
for (int i = 0; i < _numActiveChannels; ++i) {
const AudioChannel &channel = _channels[i];
- const MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream);
+ const MutableLoopAudioStream *stream = dynamic_cast<MutableLoopAudioStream *>(channel.stream.get());
con->debugPrintf(" %d[%04x:%04x]: %s, started at %d, pos %d/%d, vol %d, pan %d%s%s\n",
i,
PRINT_REG(channel.soundNode),
diff --git a/engines/sci/sound/audio32.h b/engines/sci/sound/audio32.h
index 71f5883541..a0167f3d2d 100644
--- a/engines/sci/sound/audio32.h
+++ b/engines/sci/sound/audio32.h
@@ -50,22 +50,23 @@ struct AudioChannel {
ResourceId id;
/**
- * The resource loaded into this channel.
+ * The resource loaded into this channel. The resource is owned by
+ * ResourceManager.
*/
Resource *resource;
/**
- * The audio stream loaded into this channel. Can cast
- * to `SeekableAudioStream` for normal channels and
- * `RobotAudioStream` for robot channels.
+ * The audio stream loaded into this channel. Can cast to
+ * `SeekableAudioStream` for normal channels and `RobotAudioStream` for
+ * robot channels.
*/
- Audio::AudioStream *stream;
+ Common::ScopedPtr<Audio::AudioStream> stream;
/**
- * The converter used to transform and merge the input
- * stream into the mixer's output buffer.
+ * The converter used to transform and merge the input stream into the
+ * mixer's output buffer.
*/
- Audio::RateConverter *converter;
+ Common::ScopedPtr<Audio::RateConverter> converter;
/**
* Duration of the channel, in ticks.
@@ -83,8 +84,8 @@ struct AudioChannel {
uint32 pausedAtTick;
/**
- * The time, in ticks, that the channel fade began.
- * If 0, the channel is not being faded.
+ * The time, in ticks, that the channel fade began. If 0, the channel is not
+ * being faded.
*/
uint32 fadeStartTick;
@@ -104,20 +105,19 @@ struct AudioChannel {
int fadeTargetVolume;
/**
- * Whether or not the channel should be stopped and
- * freed when the fade is complete.
+ * Whether or not the channel should be stopped and freed when the fade is
+ * complete.
*/
bool stopChannelOnFade;
/**
- * Whether or not this channel contains a Robot
- * audio block.
+ * Whether or not this channel contains a Robot audio block.
*/
bool robot;
/**
- * For digital sound effects, the related VM
- * Sound::nodePtr object for the sound.
+ * For digital sound effects, the related VM Sound::nodePtr object for the
+ * sound.
*/
reg_t soundNode;
@@ -127,17 +127,37 @@ struct AudioChannel {
int volume;
/**
- * The amount to pan to the right, from 0 to 100.
- * 50 is centered, -1 is not panned.
+ * The amount to pan to the right, from 0 to 100. 50 is centered, -1 is not
+ * panned.
*/
int pan;
+
+ AudioChannel &operator=(AudioChannel &other) {
+ id = other.id;
+ resource = other.resource;
+ stream.reset(other.stream.release());
+ converter.reset(other.converter.release());
+ duration = other.duration;
+ startedAtTick = other.startedAtTick;
+ pausedAtTick = other.pausedAtTick;
+ fadeStartTick = other.fadeStartTick;
+ fadeStartVolume = other.fadeStartVolume;
+ fadeDuration = other.fadeDuration;
+ fadeTargetVolume = other.fadeTargetVolume;
+ stopChannelOnFade = other.stopChannelOnFade;
+ robot = other.robot;
+ soundNode = other.soundNode;
+ volume = other.volume;
+ pan = other.pan;
+ return *this;
+ }
};
#pragma mark -
/**
- * Special audio channel indexes used to select a channel
- * for digital audio playback.
+ * Special audio channel indexes used to select a channel for digital audio
+ * playback.
*/
enum AudioChannelIndex {
kRobotChannel = -3,
@@ -146,10 +166,9 @@ enum AudioChannelIndex {
};
/**
- * Audio32 acts as a permanent audio stream into the system
- * mixer and provides digital audio services for the SCI32
- * engine, since the system mixer does not support all the
- * features of SCI.
+ * Audio32 acts as a permanent audio stream into the system mixer and provides
+ * digital audio services for the SCI32 engine, since the system mixer does not
+ * support all the features of SCI.
*/
class Audio32 : public Audio::AudioStream, public Common::Serializable {
public:
@@ -196,10 +215,10 @@ private:
bool channelShouldMix(const AudioChannel &channel) const;
/**
- * Mixes audio from the given source stream into the
- * target buffer using the given rate converter.
+ * Mixes audio from the given source stream into the target buffer using the
+ * given rate converter.
*/
- int writeAudioInternal(Audio::AudioStream *const sourceStream, Audio::RateConverter *const converter, Audio::st_sample_t *targetBuffer, const int numSamples, const Audio::st_volume_t leftVolume, const Audio::st_volume_t rightVolume);
+ int writeAudioInternal(Audio::AudioStream &sourceStream, Audio::RateConverter &converter, Audio::st_sample_t *targetBuffer, const int numSamples, const Audio::st_volume_t leftVolume, const Audio::st_volume_t rightVolume);
#pragma mark -
#pragma mark Channel management
@@ -226,17 +245,15 @@ public:
uint8 getNumUnlockedChannels() const;
/**
- * Finds a channel that is already configured for the
- * given audio sample.
+ * Finds a channel that is already configured for the given audio sample.
*
- * @param startIndex The location of the audio resource
- * information in the arguments list.
+ * @param startIndex The location of the audio resource information in the
+ * arguments list.
*/
int16 findChannelByArgs(int argc, const reg_t *argv, const int startIndex, const reg_t soundNode) const;
/**
- * Finds a channel that is already configured for the
- * given audio sample.
+ * Finds a channel that is already configured for the given audio sample.
*/
int16 findChannelById(const ResourceId resourceId, const reg_t soundNode = NULL_REG) const;
@@ -255,26 +272,24 @@ private:
Common::Array<AudioChannel> _channels;
/**
- * The number of active audio channels in the mixer.
- * Being active is not the same as playing; active
- * channels may be paused.
+ * The number of active audio channels in the mixer. Being active is not the
+ * same as playing; active channels may be paused.
*/
uint8 _numActiveChannels;
/**
* Whether or not we are in the audio thread.
*
- * This flag is used instead of passing a parameter to
- * `freeUnusedChannels` because a parameter would
- * require forwarding through the public method `stop`,
- * and there is not currently any reason for this
- * implementation detail to be exposed.
+ * This flag is used instead of passing a parameter to `freeUnusedChannels`
+ * because a parameter would require forwarding through the public method
+ * `stop`, and there is not currently any reason for this implementation
+ * detail to be exposed.
*/
bool _inAudioThread;
/**
- * The list of resources from freed channels that need
- * to be unlocked from the main thread.
+ * The list of resources from freed channels that need to be unlocked from
+ * the main thread.
*/
UnlockList _resourcesToUnlock;
@@ -302,8 +317,7 @@ private:
}
/**
- * Frees all non-looping channels that have reached the
- * end of their stream.
+ * Frees all non-looping channels that have reached the end of their stream.
*/
void freeUnusedChannels();
@@ -313,8 +327,7 @@ private:
void freeChannel(const int16 channelIndex);
/**
- * Unlocks all resources that were freed by the audio
- * thread.
+ * Unlocks all resources that were freed by the audio thread.
*/
void unlockResources();
@@ -322,58 +335,58 @@ private:
#pragma mark Script compatibility
public:
/**
- * Gets the (fake) sample rate of the hardware DAC.
- * For script compatibility only.
+ * Gets the (fake) sample rate of the hardware DAC. For script compatibility
+ * only.
*/
inline uint16 getSampleRate() const {
return _globalSampleRate;
}
/**
- * Sets the (fake) sample rate of the hardware DAC.
- * For script compatibility only.
+ * Sets the (fake) sample rate of the hardware DAC. For script compatibility
+ * only.
*/
void setSampleRate(uint16 rate);
/**
- * Gets the (fake) bit depth of the hardware DAC.
- * For script compatibility only.
+ * Gets the (fake) bit depth of the hardware DAC. For script compatibility
+ * only.
*/
inline uint8 getBitDepth() const {
return _globalBitDepth;
}
/**
- * Sets the (fake) sample rate of the hardware DAC.
- * For script compatibility only.
+ * Sets the (fake) sample rate of the hardware DAC. For script compatibility
+ * only.
*/
void setBitDepth(uint8 depth);
/**
- * Gets the (fake) number of output (speaker) channels
- * of the hardware DAC. For script compatibility only.
+ * Gets the (fake) number of output (speaker) channels of the hardware DAC.
+ * For script compatibility only.
*/
inline uint8 getNumOutputChannels() const {
return _globalNumOutputChannels;
}
/**
- * Sets the (fake) number of output (speaker) channels
- * of the hardware DAC. For script compatibility only.
+ * Sets the (fake) number of output (speaker) channels of the hardware DAC.
+ * For script compatibility only.
*/
void setNumOutputChannels(int16 numChannels);
/**
- * Gets the (fake) number of preloaded channels.
- * For script compatibility only.
+ * Gets the (fake) number of preloaded channels. For script compatibility
+ * only.
*/
inline uint8 getPreload() const {
return _preload;
}
/**
- * Sets the (fake) number of preloaded channels.
- * For script compatibility only.
+ * Sets the (fake) number of preloaded channels. For script compatibility
+ * only.
*/
inline void setPreload(uint8 preload) {
_preload = preload;
@@ -381,49 +394,43 @@ public:
private:
/**
- * The hardware DAC sample rate. Stored only for script
- * compatibility.
+ * The hardware DAC sample rate. Stored only for script compatibility.
*/
uint16 _globalSampleRate;
/**
- * The maximum allowed sample rate of the system mixer.
- * Stored only for script compatibility.
+ * The maximum allowed sample rate of the system mixer. Stored only for
+ * script compatibility.
*/
uint16 _maxAllowedSampleRate;
/**
- * The hardware DAC bit depth. Stored only for script
- * compatibility.
+ * The hardware DAC bit depth. Stored only for script compatibility.
*/
uint8 _globalBitDepth;
/**
- * The maximum allowed bit depth of the system mixer.
- * Stored only for script compatibility.
+ * The maximum allowed bit depth of the system mixer. Stored only for script
+ * compatibility.
*/
uint8 _maxAllowedBitDepth;
/**
- * The hardware DAC output (speaker) channel
- * configuration. Stored only for script compatibility.
+ * The hardware DAC output (speaker) channel configuration. Stored only for
+ * script compatibility.
*/
uint8 _globalNumOutputChannels;
/**
- * The maximum allowed number of output (speaker)
- * channels of the system mixer. Stored only for script
- * compatibility.
+ * The maximum allowed number of output (speaker) channels of the system
+ * mixer. Stored only for script compatibility.
*/
uint8 _maxAllowedOutputChannels;
/**
- * The number of audio channels that should have their
- * data preloaded into memory instead of streaming from
- * disk.
- * 1 = all channels, 2 = 2nd active channel and above,
- * etc.
- * Stored only for script compatibility.
+ * The number of audio channels that should have their data preloaded into
+ * memory instead of streaming from disk. 1 = all channels, 2 = 2nd active
+ * channel and above, etc. Stored only for script compatibility.
*/
uint8 _preload;
@@ -442,8 +449,7 @@ private:
int16 findRobotChannel() const;
/**
- * When true, channels marked as robot audio will not be
- * played.
+ * When true, channels marked as robot audio will not be played.
*/
bool _robotAudioPaused;
@@ -456,8 +462,8 @@ public:
uint16 play(int16 channelIndex, const ResourceId resourceId, const bool autoPlay, const bool loop, const int16 volume, const reg_t soundNode, const bool monitor);
/**
- * Resumes playback of a paused audio channel, or of
- * the entire audio player.
+ * Resumes playback of a paused audio channel, or of the entire audio
+ * player.
*/
bool resume(const int16 channelIndex);
bool resume(const ResourceId resourceId, const reg_t soundNode = NULL_REG) {
@@ -475,8 +481,7 @@ public:
}
/**
- * Stops and unloads an audio channel, or the entire
- * audio player.
+ * Stops and unloads an audio channel, or the entire audio player.
*/
int16 stop(const int16 channelIndex);
int16 stop(const ResourceId resourceId, const reg_t soundNode = NULL_REG) {
@@ -490,8 +495,7 @@ public:
uint16 restart(const ResourceId resourceId, const bool autoPlay, const bool loop, const int16 volume, const reg_t soundNode, const bool monitor);
/**
- * Returns the playback position for the given channel
- * number, in ticks.
+ * Returns the playback position for the given channel number, in ticks.
*/
int16 getPosition(const int16 channelIndex) const;
int16 getPosition(const ResourceId resourceId, const reg_t soundNode = NULL_REG) {
@@ -531,8 +535,8 @@ private:
#pragma mark Effects
public:
/**
- * Gets the volume for a given channel. Passing
- * `kAllChannels` will get the global volume.
+ * Gets the volume for a given channel. Passing `kAllChannels` will get the
+ * global volume.
*/
int16 getVolume(const int16 channelIndex) const;
int16 getVolume(const ResourceId resourceId, const reg_t soundNode) const {
@@ -541,8 +545,8 @@ public:
}
/**
- * Sets the volume of an audio channel. Passing
- * `kAllChannels` will set the global volume.
+ * Sets the volume of an audio channel. Passing `kAllChannels` will set the
+ * global volume.
*/
void setVolume(const int16 channelIndex, int16 volume);
void setVolume(const ResourceId resourceId, const reg_t soundNode, const int16 volume) {
@@ -583,24 +587,21 @@ public:
private:
/**
- * If true, audio will be mixed by reducing the target
- * buffer by half every time a new channel is mixed in.
- * The final channel is not attenuated.
+ * If true, audio will be mixed by reducing the target buffer by half every
+ * time a new channel is mixed in. The final channel is not attenuated.
*/
bool _attenuatedMixing;
/**
- * When true, a modified attenuation algorithm is used
- * (`A/4 + B`) instead of standard linear attenuation
- * (`A/2 + B/2`).
+ * When true, a modified attenuation algorithm is used (`A/4 + B`) instead
+ * of standard linear attenuation (`A/2 + B/2`).
*/
bool _useModifiedAttenuation;
/**
* Processes an audio fade for the given channel.
*
- * @returns true if the fade was completed and the
- * channel was stopped.
+ * @returns true if the fade was completed and the channel was stopped.
*/
bool processFade(const int16 channelIndex);
@@ -608,35 +609,27 @@ private:
#pragma mark Signal monitoring
public:
/**
- * Returns whether the currently monitored audio channel
- * contains any signal within the next audio frame.
+ * Returns whether the currently monitored audio channel contains any signal
+ * within the next audio frame.
*/
bool hasSignal() const;
private:
/**
- * The index of the channel being monitored for signal,
- * or -1 if no channel is monitored. When a channel is
- * monitored, it also causes the engine to play only the
- * monitored channel.
+ * The index of the channel being monitored for signal, or -1 if no channel
+ * is monitored. When a channel is monitored, it also causes the engine to
+ * play only the monitored channel.
*/
int16 _monitoredChannelIndex;
/**
- * The data buffer holding decompressed audio data for
- * the channel that will be monitored for an audio
- * signal.
- */
- Audio::st_sample_t *_monitoredBuffer;
-
- /**
- * The size of the buffer, in bytes.
+ * The data buffer holding decompressed audio data for the channel that will
+ * be monitored for an audio signal.
*/
- size_t _monitoredBufferSize;
+ Common::Array<Audio::st_sample_t> _monitoredBuffer;
/**
- * The number of valid audio samples in the signal
- * monitoring buffer.
+ * The number of valid audio samples in the signal monitoring buffer.
*/
int _numMonitoredSamples;
diff --git a/engines/sci/sound/decoders/sol.cpp b/engines/sci/sound/decoders/sol.cpp
index 50d353cf18..a6eb8a47b8 100644
--- a/engines/sci/sound/decoders/sol.cpp
+++ b/engines/sci/sound/decoders/sol.cpp
@@ -157,11 +157,10 @@ SOLStream<STEREO, S16BIT, OLDDPCM8>::SOLStream(Common::SeekableReadStream *strea
template <bool STEREO, bool S16BIT, bool OLDDPCM8>
bool SOLStream<STEREO, S16BIT, OLDDPCM8>::seek(const Audio::Timestamp &where) {
if (where != 0) {
- // In order to seek in compressed SOL files, all
- // previous bytes must be known since it uses
- // differential compression. Therefore, only seeking
- // to the beginning is supported now (SSCI does not
- // offer seeking anyway)
+ // In order to seek in compressed SOL files, all previous bytes must be
+ // known since it uses differential compression. Therefore, only seeking
+ // to the beginning is supported now (SSCI does not offer seeking
+ // anyway)
return false;
}
diff --git a/engines/sci/sound/decoders/sol.h b/engines/sci/sound/decoders/sol.h
index 1141132365..2b84b8bc35 100644
--- a/engines/sci/sound/decoders/sol.h
+++ b/engines/sci/sound/decoders/sol.h
@@ -47,8 +47,7 @@ private:
uint16 _sampleRate;
/**
- * The raw (possibly-compressed) size of audio data in
- * the stream.
+ * The raw (possibly-compressed) size of audio data in the stream.
*/
int32 _rawDataSize;
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 3f6149daf9..46d08a5997 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -158,6 +158,7 @@ public:
int getFirstChannel() const;
int getLastChannel() const;
void setVolume(byte volume);
+ virtual void onNewSound() override;
int getVolume();
void setReverb(int8 reverb);
void playSwitch(bool play);
@@ -204,6 +205,7 @@ private:
int _masterVolume;
byte _reverbConfig[kReverbConfigNr][3];
+ int8 _defaultReverb;
Channel _channels[16];
uint8 _percussionMap[128];
int8 _keyShift[128];
@@ -220,7 +222,7 @@ private:
byte _sysExBuf[kMaxSysExSize];
};
-MidiPlayer_Midi::MidiPlayer_Midi(SciVersion version) : MidiPlayer(version), _playSwitch(true), _masterVolume(15), _mt32Type(kMt32TypeNone), _hasReverb(false), _useMT32Track(true) {
+MidiPlayer_Midi::MidiPlayer_Midi(SciVersion version) : MidiPlayer(version), _playSwitch(true), _masterVolume(15), _mt32Type(kMt32TypeNone), _hasReverb(false), _defaultReverb(-1), _useMT32Track(true) {
MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI);
_driver = MidiDriver::createMidi(dev);
@@ -477,6 +479,14 @@ int MidiPlayer_Midi::getVolume() {
return _masterVolume;
}
+void MidiPlayer_Midi::onNewSound() {
+ if (_defaultReverb >= 0)
+ // SCI0 in combination with MT-32 requires a reset of the reverb to
+ // the default value that is present in either the MT-32 patch data
+ // or MT32.DRV itself.
+ setReverb(_defaultReverb);
+}
+
void MidiPlayer_Midi::setReverb(int8 reverb) {
assert(reverb < kReverbConfigNr);
@@ -610,7 +620,7 @@ void MidiPlayer_Midi::readMt32Patch(const SciSpan<const byte> &data) {
setMt32Volume(volume);
// Reverb default only used in (roughly) SCI0/SCI01
- byte reverb = stream.readByte();
+ _defaultReverb = stream.readSByte();
_hasReverb = true;
@@ -649,10 +659,6 @@ void MidiPlayer_Midi::readMt32Patch(const SciSpan<const byte> &data) {
sendMt32SysEx(0x100004, stream, 9);
}
- // Reverb for SCI0
- if (_version <= SCI_VERSION_0_LATE)
- setReverb(reverb);
-
// Send after-SysEx text
stream.seek(0);
sendMt32SysEx(0x200000, stream, 20);
@@ -780,7 +786,7 @@ void MidiPlayer_Midi::readMt32DrvData() {
if (size == 2771) {
// MT32.DRV in LSL2 early contains more data, like a normal patch
- byte reverb = f.readByte();
+ _defaultReverb = f.readByte();
_hasReverb = true;
@@ -800,8 +806,6 @@ void MidiPlayer_Midi::readMt32DrvData() {
sendMt32SysEx(0x50000, f, 256);
sendMt32SysEx(0x50200, f, 128);
- setReverb(reverb);
-
// Send the after-SysEx text
f.seek(0x3d);
sendMt32SysEx(0x200000, f, 20);
diff --git a/engines/sci/sound/drivers/mididriver.h b/engines/sci/sound/drivers/mididriver.h
index fee0154096..f12d47f344 100644
--- a/engines/sci/sound/drivers/mididriver.h
+++ b/engines/sci/sound/drivers/mididriver.h
@@ -106,6 +106,8 @@ public:
return _driver ? _driver->property(MIDI_PROP_MASTER_VOLUME, 0xffff) : 0;
}
+ virtual void onNewSound() {}
+
// Returns the current reverb, or -1 when no reverb is active
int8 getReverb() const { return _reverb; }
// Sets the current reverb, used mainly in MT-32
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index bdd0d1b36e..1644eb6956 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -392,6 +392,8 @@ void MidiParser_SCI::sendInitCommands() {
// Set initial voice count
if (_pSnd) {
if (_soundVersion <= SCI_VERSION_0_LATE) {
+ static_cast<MidiPlayer *>(_driver)->onNewSound();
+
for (int i = 0; i < 15; ++i) {
byte voiceCount = 0;
if (_channelUsed[i]) {
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 647f588d1e..b2bd72e669 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -350,8 +350,27 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) {
pSnd->time = ++_timeCounter;
if (track) {
+ bool playSample;
+
+ if (_soundVersion <= SCI_VERSION_0_LATE && !_useDigitalSFX) {
+ // For SCI0 the digital sample is present in the same track as the
+ // MIDI. If the user specifically requests not to use the digital
+ // samples, play the MIDI data instead. If the MIDI portion of the
+ // track is empty however, play the digital sample anyway. This is
+ // necessary for e.g. the "Where am I?" sample in the SQ3 intro.
+ playSample = false;
+
+ if (track->channelCount == 2) {
+ SoundResource::Channel &chan = track->channels[0];
+ if (chan.data.size() < 2 || chan.data[1] == SCI_MIDI_EOT) {
+ playSample = true;
+ }
+ }
+ } else
+ playSample = (track->digitalChannelNr != -1);
+
// Play digital sample
- if (track->digitalChannelNr != -1) {
+ if (playSample) {
const SciSpan<const byte> &channelData = track->channels[track->digitalChannelNr].data;
delete pSnd->pStreamAud;
byte flags = Audio::FLAG_UNSIGNED;
@@ -607,13 +626,7 @@ void SciMusic::soundStop(MusicEntry *pSnd) {
void SciMusic::soundSetVolume(MusicEntry *pSnd, byte volume) {
assert(volume <= MUSIC_VOLUME_MAX);
- if (pSnd->isSample) {
-#ifdef ENABLE_SCI32
- if (_soundVersion >= SCI_VERSION_2_1_EARLY) {
- g_sci->_audio32->setVolume(ResourceId(kResourceTypeAudio, pSnd->resourceId), pSnd->soundObj, volume);
- }
-#endif
- } else if (pSnd->pMidiParser) {
+ if (!pSnd->isSample && pSnd->pMidiParser) {
Common::StackLock lock(_mutex);
pSnd->pMidiParser->mainThreadBegin();
pSnd->pMidiParser->setVolume(volume);
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 0bb295d41e..54fdcf5f8f 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -350,11 +350,9 @@ reg_t SoundCommandParser::kDoSoundPause(EngineState *s, int argc, reg_t *argv) {
}
#ifdef ENABLE_SCI32
- // NOTE: The original engine also expected a global
- // "kernel call" flag to be true in order to perform
- // this action, but the architecture of the ScummVM
- // implementation is so different that it doesn't
- // matter here
+ // SSCI also expected a global "kernel call" flag to be true in order to
+ // perform this action, but the architecture of the ScummVM
+ // implementation is so different that it doesn't matter here
if (_soundVersion >= SCI_VERSION_2_1_EARLY && musicSlot->isSample) {
if (shouldPause) {
g_sci->_audio32->pause(ResourceId(kResourceTypeAudio, musicSlot->resourceId), musicSlot->soundObj);
@@ -741,8 +739,8 @@ reg_t SoundCommandParser::kDoSoundSetVolume(EngineState *s, int argc, reg_t *arg
#ifdef ENABLE_SCI32
// SSCI unconditionally sets volume if it is digital audio
if (_soundVersion >= SCI_VERSION_2_1_EARLY && musicSlot->isSample) {
- _music->soundSetVolume(musicSlot, value);
- } else
+ g_sci->_audio32->setVolume(ResourceId(kResourceTypeAudio, musicSlot->resourceId), musicSlot->soundObj, value);
+ }
#endif
if (musicSlot->volume != value) {
musicSlot->volume = value;
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index 7eaa5cff38..4711a971a4 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -112,8 +112,8 @@ bool RobotAudioStream::addPacket(const RobotAudioPacket &packet) {
// 4 (odd).
const int8 bufferIndex = packet.position % 4 ? 1 : 0;
- // Packet 0 is the first primer, packet 2 is the second primer,
- // packet 4+ are regular audio data
+ // Packet 0 is the first primer, packet 2 is the second primer, packet 4+
+ // are regular audio data
if (packet.position <= 2 && _firstPacketPosition == -1) {
_readHead = 0;
_readHeadAbs = 0;
@@ -445,10 +445,10 @@ void RobotDecoder::initVideo(const int16 x, const int16 y, const int16 scale, co
_maxFrameRate = _frameRate + kMaxFrameRateDrift;
if (_xResolution == 0 || _yResolution == 0) {
- // TODO: Default values were taken from RESOURCE.CFG hires property
- // if it exists, so need to check games' configuration files for those
- _xResolution = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- _yResolution = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ // In SSCI, default values were taken from RESOURCE.CFG hires property
+ // if it exists, but no games seem to take advantage of this
+ _xResolution = g_sci->_gfxFrameout->getScreenWidth();
+ _yResolution = g_sci->_gfxFrameout->getScreenHeight();
}
if (hasPalette) {
@@ -677,10 +677,10 @@ void RobotDecoder::showFrame(const uint16 frameNo, const uint16 newX, const uint
if (_isHiRes) {
SciBitmap &bitmap = *_segMan->lookupBitmap(_celHandles[i].bitmapId);
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
if (scriptWidth == kLowResX && scriptHeight == kLowResY) {
const Ratio lowResToScreenX(screenWidth, kLowResX);
@@ -1386,12 +1386,8 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) {
for (RobotScreenItemList::size_type i = 0; i < screenItemCount; ++i) {
Common::Point position(_screenItemX[i], _screenItemY[i]);
-// TODO: Version 6 robot?
-// int scaleXRemainder;
if (_scaleInfo.signal == kScaleSignalManual) {
position.x = (position.x * _scaleInfo.x) / 128;
-// TODO: Version 6 robot?
-// scaleXRemainder = (position.x * _scaleInfo.x) % 128;
position.y = (position.y * _scaleInfo.y) / 128;
}
@@ -1400,8 +1396,6 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) {
celInfo.bitmap = _celHandles[i].bitmapId;
ScreenItem *screenItem = new ScreenItem(_planeId, celInfo, position, _scaleInfo);
_screenItemList[i] = screenItem;
- // TODO: Version 6 robot?
- // screenItem->_field_30 = scaleXRemainder;
if (_priority == -1) {
screenItem->_fixedPriority = false;
@@ -1414,8 +1408,6 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) {
ScreenItem *screenItem = _screenItemList[i];
screenItem->_celInfo.bitmap = _celHandles[i].bitmapId;
screenItem->_position = position;
- // TODO: Version 6 robot?
- // screenItem->_field_30 = scaleXRemainder;
if (_priority == -1) {
screenItem->_fixedPriority = false;
@@ -1461,10 +1453,10 @@ uint32 RobotDecoder::createCel5(const byte *rawVideoData, const int16 screenItem
rawVideoData += kCelHeaderSize;
- const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
- const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth;
- const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight;
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
+ const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+ const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
Common::Point origin;
if (scriptWidth == kLowResX && scriptHeight == kLowResY) {
@@ -1570,7 +1562,7 @@ void RobotDecoder::preallocateCelMemory(const byte *rawVideoData, const int16 nu
for (int i = 0; i < numFixedCels; ++i) {
CelHandleInfo &celHandle = _celHandles[i];
- // NOTE: There was a check to see if the cel handle was not allocated
+ // In SSCI, there was a check to see if the cel handle was not allocated
// here, for some reason, which would mean that nothing was ever
// allocated from fixed cels, because the _celHandles array just got
// deleted and recreated...
@@ -1594,16 +1586,18 @@ void RobotDecoder::preallocateCelMemory(const byte *rawVideoData, const int16 nu
maxFrameArea = area;
}
+ const bool remap = (getSciVersion() == SCI_VERSION_3);
+
CelHandleInfo &celHandle = _celHandles[i];
if (celHandle.status == CelHandleInfo::kRobotLifetime) {
if (_maxCelArea[i] < area) {
_segMan->freeBitmap(celHandle.bitmapId);
- _segMan->allocateBitmap(&celHandle.bitmapId, celWidth, celHeight, 255, 0, 0, _xResolution, _yResolution, kRawPaletteSize, false, false);
+ _segMan->allocateBitmap(&celHandle.bitmapId, celWidth, celHeight, 255, 0, 0, _xResolution, _yResolution, kRawPaletteSize, remap, false);
celHandle.area = area;
celHandle.status = CelHandleInfo::kFrameLifetime;
}
} else if (celHandle.status == CelHandleInfo::kNoCel) {
- _segMan->allocateBitmap(&celHandle.bitmapId, celWidth, celHeight, 255, 0, 0, _xResolution, _yResolution, kRawPaletteSize, false, false);
+ _segMan->allocateBitmap(&celHandle.bitmapId, celWidth, celHeight, 255, 0, 0, _xResolution, _yResolution, kRawPaletteSize, remap, false);
celHandle.area = area;
celHandle.status = CelHandleInfo::kFrameLifetime;
} else {
diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h
index aa1d9da75c..314628ee01 100644
--- a/engines/sci/video/robot_decoder.h
+++ b/engines/sci/video/robot_decoder.h
@@ -52,7 +52,10 @@ class SegManager;
// Unlike traditional AV formats, Robot videos almost always require playback
// within the game engine because certain information (like the resolution of
// the Robot coordinates and the background for the video) is dependent on data
-// that does not exist within the Robot file itself.
+// that does not exist within the Robot file itself. In version 6, robots could
+// also participate in palette remapping by drawing remap pixels, and the
+// information for processing these pixels is also not stored within the Robot
+// file.
//
// The Robot container consists of a file header, an optional primer audio
// section, an optional colour palette, a frame seek index, a set of cuepoints,
@@ -66,9 +69,9 @@ class SegManager;
// contiguous data blocks, each of which can be independently compressed with
// LZS or left uncompressed. An entire cel can also be line decimated, where
// lines are deleted from the source bitmap at compression time and are
-// reconstructed by decompression using line doubling. Each cel also includes
-// coordinates where it should be placed within the video frame, relative to the
-// top-left corner of the frame.
+// reconstructed by decompression using line interpolation. Each cel also
+// includes coordinates where it should be placed within the video frame,
+// relative to the top-left corner of the frame.
//
// Audio coding is fixed-length, and all audio blocks except for the primer
// audio are the same size. Audio is encoded with Sierra SOL DPCM16 compression,
@@ -254,8 +257,8 @@ class SegManager;
#pragma mark RobotAudioStream
/**
- * A Robot audio stream is a simple loop buffer
- * that accepts audio blocks from the Robot engine.
+ * A Robot audio stream is a simple loop buffer that accepts audio blocks from
+ * the Robot engine.
*/
class RobotAudioStream : public Audio::AudioStream {
public:
@@ -266,40 +269,34 @@ public:
kRobotSampleRate = 22050,
/**
- * Multiplier for the size of a packet that
- * is being expanded by writing to every other
- * byte of the target buffer.
+ * Multiplier for the size of a packet that is being expanded by writing
+ * to every other byte of the target buffer.
*/
kEOSExpansion = 2
};
/**
- * Playback state information. Used for framerate
- * calculation.
+ * Playback state information. Used for framerate calculation.
*/
struct StreamState {
/**
- * The current position of the read head of
- * the audio stream.
+ * The current position of the read head of the audio stream.
*/
int bytesPlaying;
/**
- * The sample rate of the audio stream.
- * Always 22050.
+ * The sample rate of the audio stream. Always 22050.
*/
uint16 rate;
/**
- * The bit depth of the audio stream.
- * Always 16.
+ * The bit depth of the audio stream. Always 16.
*/
uint8 bits;
};
/**
- * A single packet of compressed audio from a
- * Robot data stream.
+ * A single packet of compressed audio from a Robot data stream.
*/
struct RobotAudioPacket {
/**
@@ -314,8 +311,7 @@ public:
int dataSize;
/**
- * The uncompressed, file-relative position
- * of this audio packet.
+ * The uncompressed, file-relative position of this audio packet.
*/
int position;
@@ -328,20 +324,19 @@ public:
/**
* Adds a new audio packet to the stream.
- * @returns `true` if the audio packet was fully
- * consumed, otherwise `false`.
+ * @returns `true` if the audio packet was fully consumed, otherwise
+ * `false`.
*/
bool addPacket(const RobotAudioPacket &packet);
/**
- * Prevents any additional audio packets from
- * being added to the audio stream.
+ * Prevents any additional audio packets from being added to the audio
+ * stream.
*/
void finish();
/**
- * Returns the current status of the audio
- * stream.
+ * Returns the current status of the audio stream.
*/
StreamState getStatus() const;
@@ -349,8 +344,7 @@ private:
Common::Mutex _mutex;
/**
- * Loop buffer for playback. Contains decompressed
- * 16-bit PCM samples.
+ * Loop buffer for playback. Contains decompressed 16-bit PCM samples.
*/
byte *_loopBuffer;
@@ -360,66 +354,57 @@ private:
int32 _loopBufferSize;
/**
- * The position of the read head within the loop
- * buffer, in bytes.
+ * The position of the read head within the loop buffer, in bytes.
*/
int32 _readHead;
/**
- * The lowest file position that can be buffered,
- * in uncompressed bytes.
+ * The lowest file position that can be buffered, in uncompressed bytes.
*/
int32 _readHeadAbs;
/**
- * The highest file position that can be buffered,
- * in uncompressed bytes.
+ * The highest file position that can be buffered, in uncompressed bytes.
*/
int32 _maxWriteAbs;
/**
- * The highest file position, in uncompressed bytes,
- * that has been written to the stream.
- * Different from `_maxWriteAbs`, which is the highest
- * uncompressed position which *can* be written right
- * now.
+ * The highest file position, in uncompressed bytes, that has been written
+ * to the stream. This is different from `_maxWriteAbs`, which is the
+ * highest uncompressed position which *can* be written right now.
*/
int32 _writeHeadAbs;
/**
- * The highest file position, in uncompressed bytes,
- * that has been written to the even & odd sides of
- * the stream.
+ * The highest file position, in uncompressed bytes, that has been written
+ * to the even & odd sides of the stream.
*
- * Index 0 corresponds to the 'even' side; index
- * 1 correspond to the 'odd' side.
+ * Index 0 corresponds to the 'even' side; index 1 corresponds to the 'odd'
+ * side.
*/
int32 _jointMin[2];
/**
- * When `true`, the stream is waiting for all primer
- * blocks to be received before allowing playback to
- * begin.
+ * When `true`, the stream is waiting for all primer blocks to be received
+ * before allowing playback to begin.
*/
bool _waiting;
/**
- * When `true`, the stream will accept no more audio
- * blocks.
+ * When `true`, the stream will accept no more audio blocks.
*/
bool _finished;
/**
- * The uncompressed position of the first packet of
- * robot data. Used to decide whether all primer
- * blocks have been received and the stream should
+ * The uncompressed position of the first packet of robot data. Used to
+ * decide whether all primer blocks have been received and the stream should
* be started.
*/
int32 _firstPacketPosition;
/**
- * Decompression buffer, used to temporarily store
- * an uncompressed block of audio data.
+ * Decompression buffer, used to temporarily store an uncompressed block of
+ * audio data.
*/
byte *_decompressionBuffer;
@@ -429,23 +414,20 @@ private:
int32 _decompressionBufferSize;
/**
- * The position of the packet currently in the
- * decompression buffer. Used to avoid
- * re-decompressing audio data that has already
- * been decompressed during a partial packet read.
+ * The position of the packet currently in the decompression buffer. Used to
+ * avoid re-decompressing audio data that has already been decompressed
+ * during a partial packet read.
*/
int32 _decompressionBufferPosition;
/**
- * Calculates the absolute ranges for new fills
- * into the loop buffer.
+ * Calculates the absolute ranges for new fills into the loop buffer.
*/
void fillRobotBuffer(const RobotAudioPacket &packet, const int8 bufferIndex);
/**
- * Interpolates `numSamples` samples from the read
- * head, if no true samples were written for one
- * (or both) of the joint channels.
+ * Interpolates `numSamples` samples from the read head, if no true samples
+ * were written for one (or both) of the joint channels.
*/
void interpolateMissingSamples(const int32 numSamples);
@@ -501,9 +483,8 @@ public:
};
enum {
- // Special high value used to represent
- // parameters that should be left unchanged
- // when calling `showFrame`
+ // Special high value used to represent parameters that should be left
+ // unchanged when calling `showFrame`
kUnspecified = 50000
};
@@ -530,8 +511,8 @@ private:
kCueListSize = 256,
/**
- * Maximum number of 'fixed' cels that never
- * change for the duration of a robot.
+ * Maximum number of 'fixed' cels that never change for the duration of
+ * a robot.
*/
kFixedCelListSize = 4,
@@ -541,27 +522,22 @@ private:
kRawPaletteSize = 1200,
/**
- * The size of a frame of Robot data. This
- * value was used to align the first block of
- * data after the main Robot header to the next
- * CD sector.
+ * The size of a frame of Robot data. This value was used to align the
+ * first block of data after the main Robot header to the next CD
+ * sector.
*/
kRobotFrameSize = 2048,
/**
- * The size of a block of zero-compressed
- * audio. Used to fill audio when the size of
- * an audio packet does not match the expected
- * packet size.
+ * The size of a block of zero-compressed audio. Used to fill audio when
+ * the size of an audio packet does not match the expected packet size.
*/
kRobotZeroCompressSize = 2048,
/**
- * The size of the audio block header, in bytes.
- * The audio block header consists of the
- * compressed size of the audio in the record,
- * plus the position of the audio in the
- * compressed data stream.
+ * The size of the audio block header, in bytes. The audio block header
+ * consists of the compressed size of the audio in the record, plus the
+ * position of the audio in the compressed data stream.
*/
kAudioBlockHeaderSize = 8,
@@ -571,23 +547,20 @@ private:
kCelHeaderSize = 22,
/**
- * The maximum amount that the frame rate is
- * allowed to drift from the nominal frame rate
- * in order to correct for AV drift or slow
- * playback.
+ * The maximum amount that the frame rate is allowed to drift from the
+ * nominal frame rate in order to correct for AV drift or slow playback.
*/
kMaxFrameRateDrift = 1
};
/**
- * The version number for the currently loaded
- * robot.
+ * The version number for the currently loaded robot.
*
* There are several known versions of robot:
*
* v2: before Nov 1994; no known examples
* v3: before Nov 1994; no known examples
- * v4: Jan 1995; PQ:SWAT demo
+ * v4: Jan 1995; KQ7 1.65, PQ:SWAT demo
* v5: Mar 1995; SCI2.1 and SCI3 games
* v6: SCI3 games
*/
@@ -625,8 +598,8 @@ private:
#pragma mark Playback
public:
/**
- * Opens a robot file for playback.
- * Newly opened robots are paused by default.
+ * Opens a robot file for playback. Newly opened robots are paused by
+ * default.
*/
void open(const GuiResourceId robotId, const reg_t plane, const int16 priority, const int16 x, const int16 y, const int16 scale);
@@ -636,8 +609,8 @@ public:
void close();
/**
- * Pauses the robot. Once paused, the audio for a robot
- * is disabled until the end of playback.
+ * Pauses the robot. Once paused, the audio for a robot is disabled until
+ * the end of playback.
*/
void pause();
@@ -654,8 +627,7 @@ public:
void showFrame(const uint16 frameNo, const uint16 newX, const uint16 newY, const uint16 newPriority);
/**
- * Retrieves the value associated with the
- * current cue point.
+ * Retrieves the value associated with the current cue point.
*/
int16 getCue() const;
@@ -688,27 +660,23 @@ private:
PositionList _recordPositions;
/**
- * The offset of the Robot file within a
- * resource bundle.
+ * The offset of the Robot file within a resource bundle.
*/
int32 _fileOffset;
/**
- * A list of cue times that is updated to
- * prevent earlier cue values from being
- * given to the game more than once.
+ * A list of cue times that is updated to prevent earlier cue values from
+ * being given to the game more than once.
*/
mutable int32 _cueTimes[kCueListSize];
/**
- * The original list of cue times from the
- * raw Robot data.
+ * The original list of cue times from the raw Robot data.
*/
int32 _masterCueTimes[kCueListSize];
/**
- * The list of values to provide to a game
- * when a cue value is requested.
+ * The list of values to provide to a game when a cue value is requested.
*/
int32 _cueValues[kCueListSize];
@@ -723,23 +691,20 @@ private:
int16 _normalFrameRate;
/**
- * The minimal playback frame rate. Used to
- * correct for AV sync drift when the video
- * is more than one frame ahead of the audio.
+ * The minimal playback frame rate. Used to correct for AV sync drift when
+ * the video is more than one frame ahead of the audio.
*/
int16 _minFrameRate;
/**
- * The maximum playback frame rate. Used to
- * correct for AV sync drift when the video
- * is more than one frame behind the audio.
+ * The maximum playback frame rate. Used to correct for AV sync drift when
+ * the video is more than one frame behind the audio.
*/
int16 _maxFrameRate;
/**
- * The maximum number of record blocks that
- * can be skipped without causing audio to
- * drop out.
+ * The maximum number of record blocks that can be skipped without causing
+ * audio to drop out.
*/
int16 _maxSkippablePackets;
@@ -754,32 +719,28 @@ private:
int _previousFrameNo;
/**
- * The time, in ticks, when the robot was
- * last started or resumed.
+ * The time, in ticks, when the robot was last started or resumed.
*/
int32 _startTime;
/**
- * The first frame displayed when the
- * robot was resumed.
+ * The first frame displayed when the robot was resumed.
*/
int32 _startFrameNo;
/**
- * The last frame displayed when the robot
- * was resumed.
+ * The last frame displayed when the robot was resumed.
*/
int32 _startingFrameNo;
/**
- * Seeks the raw data stream to the record for
- * the given frame number.
+ * Seeks the raw data stream to the record for the given frame number.
*/
bool seekToFrame(const int frameNo);
/**
- * Sets the start time and frame of the robot
- * when the robot is started or resumed.
+ * Sets the start time and frame of the robot when the robot is started or
+ * resumed.
*/
void setRobotTime(const int frameNo);
@@ -787,11 +748,10 @@ private:
#pragma mark Timing
private:
/**
- * This class tracks the amount of time it takes for
- * a frame of robot animation to be rendered. This
- * information is used by the player to speculatively
- * skip rendering of future frames to keep the
- * animation in sync with the robot audio.
+ * This class tracks the amount of time it takes for a frame of robot
+ * animation to be rendered. This information is used by the player to
+ * speculatively skip rendering of future frames to keep the animation in
+ * sync with the robot audio.
*/
class DelayTime {
public:
@@ -808,14 +768,13 @@ private:
void endTiming();
/**
- * Returns whether or not timing is currently in
- * progress.
+ * Returns whether or not timing is currently in progress.
*/
bool timingInProgress() const;
/**
- * Returns the median time, in ticks, of the
- * currently stored timing samples.
+ * Returns the median time, in ticks, of the currently stored timing
+ * samples.
*/
int predictedTicks() const;
@@ -823,24 +782,23 @@ private:
RobotDecoder *_decoder;
/**
- * The start time, in ticks, of the current timing
- * loop. If no loop is in progress, the value is 0.
+ * The start time, in ticks, of the current timing loop. If no loop is
+ * in progress, the value is 0.
*
- * @note This is slightly different than SSCI where
- * the not-timing value was -1.
+ * @note This is slightly different than SSCI where the not-timing value
+ * was -1.
*/
uint32 _startTime;
/**
- * A sorted list containing the timing data for
- * the last `kDelayListSize` frames, in ticks.
+ * A sorted list containing the timing data for the last
+ * `kDelayListSize` frames, in ticks.
*/
int _delays[kDelayListSize];
/**
- * A list of monotonically increasing identifiers
- * used to identify and replace the oldest sample
- * in the `_delays` array when finishing the
+ * A list of monotonically increasing identifiers used to identify and
+ * replace the oldest sample in the `_delays` array when finishing the
* next timing operation.
*/
uint _timestamps[kDelayListSize];
@@ -862,17 +820,14 @@ private:
};
/**
- * Calculates the next frame number that needs
- * to be rendered, using the timing data
- * collected by DelayTime.
+ * Calculates the next frame number that needs to be rendered, using the
+ * timing data collected by DelayTime.
*/
uint16 calculateNextFrameNo(const uint32 extraTicks = 0) const;
/**
- * Calculates and returns the number of frames
- * that should be rendered in `ticks` time,
- * according to the current target frame rate
- * of the robot.
+ * Calculates and returns the number of frames that should be rendered in
+ * `ticks` time, according to the current target frame rate of the robot.
*/
uint32 ticksToFrames(const uint32 ticks) const;
@@ -891,15 +846,13 @@ private:
private:
enum {
/**
- * The number of ticks that should elapse
- * between each AV sync check.
+ * The number of ticks that should elapse between each AV sync check.
*/
kAudioSyncCheckInterval = 5 * 60 /* 5 seconds */
};
/**
- * The status of the audio track of a Robot
- * animation.
+ * The status of the audio track of a Robot animation.
*/
enum RobotAudioStatus {
kRobotAudioReady = 1,
@@ -913,8 +866,7 @@ private:
#pragma mark Audio - AudioList
private:
/**
- * This class manages packetized audio playback
- * for robots.
+ * This class manages packetized audio playback for robots.
*/
class AudioList {
public:
@@ -926,8 +878,8 @@ private:
void startAudioNow();
/**
- * Stops playback of robot audio, allowing
- * any queued audio to finish playing back.
+ * Stops playback of robot audio, allowing any queued audio to finish
+ * playing back.
*/
void stopAudio();
@@ -937,40 +889,36 @@ private:
void stopAudioNow();
/**
- * Submits as many blocks of audio as possible
- * to the audio engine.
+ * Submits as many blocks of audio as possible to the audio engine.
*/
void submitDriverMax();
/**
* Adds a new AudioBlock to the queue.
*
- * @param position The absolute position of the
- * audio for the block, in compressed bytes.
+ * @param position The absolute position of the audio for the block, in
+ * compressed bytes.
* @param size The size of the buffer.
- * @param buffer A pointer to compressed audio
- * data that will be copied into the new
- * AudioBlock.
+ * @param buffer A pointer to compressed audio data that will be copied
+ * into the new AudioBlock.
*/
void addBlock(const int position, const int size, const byte *buffer);
/**
- * Immediately stops any active playback and
- * purges all audio data in the audio list.
+ * Immediately stops any active playback and purges all audio data in
+ * the audio list.
*/
void reset();
/**
- * Pauses the robot audio channel in
- * preparation for the first block of audio
- * data to be read.
+ * Pauses the robot audio channel in preparation for the first block of
+ * audio data to be read.
*/
void prepareForPrimer();
/**
- * Sets the audio offset which is used to
- * offset the position of audio packets
- * sent to the audio stream.
+ * Sets the audio offset which is used to offset the position of audio
+ * packets sent to the audio stream.
*/
void setAudioOffset(const int offset);
@@ -979,8 +927,7 @@ private:
private:
/**
- * AudioBlock represents a block of audio
- * from the Robot's audio track.
+ * AudioBlock represents a block of audio from the Robot's audio track.
*/
class AudioBlock {
public:
@@ -988,44 +935,37 @@ private:
~AudioBlock();
/**
- * Submits the block of audio to the
- * audio manager.
- * @returns true if the block was fully
- * read, or false if the block was not
- * read or only partially read.
+ * Submits the block of audio to the audio manager.
+ * @returns true if the block was fully read, or false if the block
+ * was not read or only partially read.
*/
bool submit(const int startOffset);
private:
/**
- * The absolute position, in compressed
- * bytes, of this audio block's audio
- * data in the audio stream.
+ * The absolute position, in compressed bytes, of this audio block's
+ * audio data in the audio stream.
*/
int _position;
/**
- * The compressed size, in bytes, of
- * this audio block's audio data.
+ * The compressed size, in bytes, of this audio block's audio data.
*/
int _size;
/**
- * A buffer containing raw
- * SOL-compressed audio data.
+ * A buffer containing raw SOL-compressed audio data.
*/
byte *_data;
};
/**
- * The list of compressed audio blocks
- * submitted for playback.
+ * The list of compressed audio blocks submitted for playback.
*/
AudioBlock *_blocks[kAudioListSize];
/**
- * The number of blocks in `_blocks` that are
- * ready to be submitted.
+ * The number of blocks in `_blocks` that are ready to be submitted.
*/
uint8 _blocksSize;
@@ -1040,8 +980,7 @@ private:
uint8 _newestBlockIndex;
/**
- * The offset used when sending packets to the
- * audio stream.
+ * The offset used when sending packets to the audio stream.
*/
int _startOffset;
@@ -1068,46 +1007,42 @@ private:
AudioList _audioList;
/**
- * The size, in bytes, of a block of audio data,
- * excluding the audio block header.
+ * The size, in bytes, of a block of audio data, excluding the audio block
+ * header.
*/
uint16 _audioBlockSize;
/**
- * The expected size of a block of audio data,
- * in bytes, excluding the audio block header.
+ * The expected size of a block of audio data, in bytes, excluding the audio
+ * block header.
*/
int16 _expectedAudioBlockSize;
/**
- * The number of compressed audio bytes that are
- * needed per frame to fill the audio buffer
- * without causing audio to drop out.
+ * The number of compressed audio bytes that are needed per frame to fill
+ * the audio buffer without causing audio to drop out.
*/
int16 _audioRecordInterval;
/**
- * If true, primer audio buffers should be filled
- * with silence instead of trying to read buffers
- * from the Robot data.
+ * If true, primer audio buffers should be filled with silence instead of
+ * trying to read buffers from the Robot data.
*/
uint16 _primerZeroCompressFlag;
/**
- * The size, in bytes, of the primer audio in the
- * Robot, including any extra alignment padding.
+ * The size, in bytes, of the primer audio in the Robot, including any extra
+ * alignment padding.
*/
uint16 _primerReservedSize;
/**
- * The combined size, in bytes, of the even and odd
- * primer channels.
+ * The combined size, in bytes, of the even and odd primer channels.
*/
int32 _totalPrimerSize;
/**
- * The absolute offset of the primer audio data in
- * the robot data stream.
+ * The absolute offset of the primer audio data in the robot data stream.
*/
int32 _primerPosition;
@@ -1122,54 +1057,47 @@ private:
int32 _oddPrimerSize;
/**
- * The absolute position in the audio stream of
- * the first audio packet.
+ * The absolute position in the audio stream of the first audio packet.
*/
int32 _firstAudioRecordPosition;
/**
- * A temporary buffer used to hold one frame of
- * raw (DPCM-compressed) audio when reading audio
- * records from the robot stream.
+ * A temporary buffer used to hold one frame of raw (DPCM-compressed) audio
+ * when reading audio records from the robot stream.
*/
byte *_audioBuffer;
/**
- * The next tick count when AV sync should be
- * checked and framerate adjustments made, if
- * necessary.
+ * The next tick count when AV sync should be checked and framerate
+ * adjustments made, if necessary.
*/
uint32 _checkAudioSyncTime;
/**
- * Primes the audio buffer with the first frame
- * of audio data.
+ * Primes the audio buffer with the first frame of audio data.
*
* @note `primeAudio` was `InitAudio` in SSCI
*/
bool primeAudio(const uint32 startTick);
/**
- * Reads primer data from the robot data stream
- * and puts it into the given buffers.
+ * Reads primer data from the robot data stream and puts it into the given
+ * buffers.
*/
bool readPrimerData(byte *outEvenBuffer, byte *outOddBuffer);
/**
- * Reads audio data for the given frame number
- * into the given buffer.
+ * Reads audio data for the given frame number into the given buffer.
*
- * @param outAudioPosition The position of the
- * audio, in compressed bytes, in the data stream.
- * @param outAudioSize The size of the audio data,
- * in compressed bytes.
+ * @param outAudioPosition The position of the audio, in compressed bytes,
+ * in the data stream.
+ * @param outAudioSize The size of the audio data, in compressed bytes.
*/
bool readAudioDataFromRecord(const int frameNo, byte *outBuffer, int &outAudioPosition, int &outAudioSize);
/**
- * Submits part of the audio packet of the given
- * frame to the audio list, starting `startPosition`
- * bytes into the audio.
+ * Submits part of the audio packet of the given frame to the audio list,
+ * starting `startPosition` bytes into the audio.
*/
bool readPartialAudioRecordAndSubmit(const int startFrame, const int startPosition);
@@ -1198,35 +1126,33 @@ public:
}
/**
- * Puts the current dimensions of the robot, in game script
- * coordinates, into the given rect, and returns the total
- * number of frames in the robot animation.
+ * Puts the current dimensions of the robot, in game script coordinates,
+ * into the given rect, and returns the total number of frames in the robot
+ * animation.
*/
uint16 getFrameSize(Common::Rect &outRect) const;
/**
- * Pumps the robot player for the next frame of video.
- * This is the main rendering function.
+ * Pumps the robot player for the next frame of video. This is the main
+ * rendering function.
*/
void doRobot();
/**
- * Submits any outstanding audio blocks that should
- * be added to the queue before the robot frame
- * becomes visible.
+ * Submits any outstanding audio blocks that should be added to the queue
+ * before the robot frame becomes visible.
*/
void frameAlmostVisible();
/**
- * Evaluates frame drift and makes modifications to
- * the player in order to ensure that future frames
- * will arrive on time.
+ * Evaluates frame drift and makes modifications to the player in order to
+ * ensure that future frames will arrive on time.
*/
void frameNowVisible();
/**
- * Scales a vertically compressed cel to its original
- * uncompressed dimensions.
+ * Scales a vertically compressed cel to its original uncompressed
+ * dimensions.
*/
void expandCel(byte *target, const byte* source, const int16 celWidth, const int16 celHeight) const;
@@ -1258,21 +1184,18 @@ private:
};
/**
- * A reg_t pointer to an in-memory
- * bitmap containing the cel.
+ * A reg_t pointer to an in-memory bitmap containing the cel.
*/
reg_t bitmapId;
/**
- * The lifetime of the cel, either just
- * for this frame or for the entire
+ * The lifetime of the cel, either just for this frame or for the entire
* duration of the robot playback.
*/
CelHandleLifetime status;
/**
- * The size, in pixels, of the decompressed
- * cel.
+ * The size, in pixels, of the decompressed cel.
*/
int area;
@@ -1298,16 +1221,14 @@ private:
void createCels5(const byte *rawVideoData, const int16 numCels, const bool usePalette);
/**
- * Creates a single screen item for a cel in a
- * version 5/6 robot.
+ * Creates a single screen item for a cel in a version 5/6 robot.
*
* Returns the size, in bytes, of the raw cel data.
*/
uint32 createCel5(const byte *rawVideoData, const int16 screenItemIndex, const bool usePalette);
/**
- * Preallocates memory for the next `numCels` cels
- * in the robot data stream.
+ * Preallocates memory for the next `numCels` cels in the robot data stream.
*/
void preallocateCelMemory(const byte *rawVideoData, const int16 numCels);
@@ -1322,8 +1243,7 @@ private:
reg_t _planeId;
/**
- * The origin of the robot animation, in screen
- * coordinates.
+ * The origin of the robot animation, in screen coordinates.
*/
Common::Point _position;
@@ -1338,80 +1258,72 @@ private:
int16 _xResolution, _yResolution;
/**
- * Whether or not the coordinates read from robot
- * data are high resolution.
+ * Whether or not the coordinates read from robot data are high resolution.
*/
bool _isHiRes;
/**
- * The maximum number of cels that will be rendered
- * on any given frame in this robot. Used for
- * preallocation of cel memory.
+ * The maximum number of cels that will be rendered on any given frame in
+ * this robot. Used for preallocation of cel memory.
*/
int16 _maxCelsPerFrame;
/**
- * The maximum areas, in pixels, for each of
- * the fixed cels in the robot. Used for
- * preallocation of cel memory.
+ * The maximum areas, in pixels, for each of the fixed cels in the robot.
+ * Used for preallocation of cel memory.
*/
MaxCelAreaList _maxCelArea;
/**
- * The hunk palette to use when rendering the
- * current frame, if the `usePalette` flag was set
- * in the robot header.
+ * The hunk palette to use when rendering the current frame, if the
+ * `usePalette` flag was set in the robot header.
*/
uint8 *_rawPalette;
/**
- * A list of the raw video data sizes, in bytes,
- * for each frame of the robot.
+ * A list of the raw video data sizes, in bytes, for each frame of the
+ * robot.
*/
VideoSizeList _videoSizes;
/**
- * A list of cels that will be present for the
- * entire duration of the robot animation.
+ * A list of cels that will be present for the entire duration of the robot
+ * animation.
*/
FixedCelsList _fixedCels;
/**
- * A list of handles for each cel in the current
- * frame.
+ * A list of handles for each cel in the current frame.
*/
CelHandleList _celHandles;
/**
- * Scratch memory used to temporarily store
- * decompressed cel data for vertically squashed
- * cels.
+ * Scratch memory used to temporarily store decompressed cel data for
+ * vertically squashed cels.
*/
ScratchMemory _celDecompressionBuffer;
/**
- * The size, in bytes, of the squashed cel
- * decompression buffer.
+ * The size, in bytes, of the squashed cel decompression buffer.
*/
int _celDecompressionArea;
/**
- * If true, the robot just started playing and
- * is awaiting output for the first frame.
+ * If true, the robot just started playing and is awaiting output for the
+ * first frame.
*/
bool _syncFrame;
/**
- * Scratch memory used to store the compressed robot
- * video data for the current frame.
+ * Scratch memory used to store the compressed robot video data for the
+ * current frame.
*/
ScratchMemory _doVersion5Scratch;
/**
- * When set to a non-negative value, forces the next
- * call to doRobot to render the given frame number
- * instead of whatever frame would have normally been
- * rendered.
+ * When set to a non-negative value, forces the next call to doRobot to
+ * render the given frame number instead of whatever frame would have
+ * normally been rendered.
*/
mutable int _cueForceShowFrame;
@@ -1426,14 +1338,14 @@ private:
RobotScreenItemList _screenItemList;
/**
- * The positions of the various screen items in this
- * robot, in screen coordinates.
+ * The positions of the various screen items in this robot, in screen
+ * coordinates.
*/
Common::Array<int16> _screenItemX, _screenItemY;
/**
- * The raw position values from the cel header for
- * each screen item currently on-screen.
+ * The raw position values from the cel header for each screen item
+ * currently on-screen.
*/
Common::Array<int16> _originalScreenItemX, _originalScreenItemY;
@@ -1449,11 +1361,10 @@ private:
int16 _priority;
/**
- * The amount of visual vertical compression applied
- * to the current cel. A value of 100 means no
- * compression; a value above 100 indicates how much
- * the cel needs to be scaled along the y-axis to
- * return to its original dimensions.
+ * The amount of visual vertical compression applied to the current cel. A
+ * value of 100 means no compression; a value above 100 indicates how much
+ * the cel needs to be scaled along the y-axis to return to its original
+ * dimensions.
*/
uint8 _verticalScaleFactor;
};
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index aec5773a3b..767e85d3ae 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -962,7 +962,7 @@ ScummEngine_vCUPhe::~ScummEngine_vCUPhe() {
}
Common::Error ScummEngine_vCUPhe::run() {
- initGraphics(CUP_Player::kDefaultVideoWidth, CUP_Player::kDefaultVideoHeight, true);
+ initGraphics(CUP_Player::kDefaultVideoWidth, CUP_Player::kDefaultVideoHeight);
if (_cupPlayer->open(_filenamePattern.pattern)) {
_cupPlayer->play();
@@ -1247,7 +1247,7 @@ Common::Error ScummEngine::init() {
// Initialize backend
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
- initGraphics(kHercWidth, kHercHeight, true);
+ initGraphics(kHercWidth, kHercHeight);
} else {
int screenWidth = _screenWidth;
int screenHeight = _screenHeight;
@@ -1266,7 +1266,7 @@ Common::Error ScummEngine::init() {
_outputPixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
if (_game.platform != Common::kPlatformFMTowns && _game.platform != Common::kPlatformPCEngine) {
- initGraphics(screenWidth, screenHeight, screenWidth > 320, &_outputPixelFormat);
+ initGraphics(screenWidth, screenHeight, &_outputPixelFormat);
if (_outputPixelFormat != _system->getScreenFormat())
return Common::kUnsupportedColorMode;
} else {
@@ -1281,14 +1281,14 @@ Common::Error ScummEngine::init() {
}
}
- initGraphics(screenWidth, screenHeight, screenWidth > 320, tryModes);
+ initGraphics(screenWidth, screenHeight, tryModes);
if (_system->getScreenFormat().bytesPerPixel != 2)
return Common::kUnsupportedColorMode;
}
#else
if (_game.platform == Common::kPlatformFMTowns && _game.version == 3) {
warning("Starting game without the required 16bit color support.\nYou may experience color glitches");
- initGraphics(screenWidth, screenHeight, (screenWidth > 320));
+ initGraphics(screenWidth, screenHeight);
} else {
return Common::Error(Common::kUnsupportedColorMode, "16bit color support is required for this game");
}
@@ -1298,7 +1298,7 @@ Common::Error ScummEngine::init() {
if (_game.platform == Common::kPlatformFMTowns && _game.version == 5)
return Common::Error(Common::kUnsupportedColorMode, "This game requires dual graphics layer support which is disabled in this build");
#endif
- initGraphics(screenWidth, screenHeight, (screenWidth > 320));
+ initGraphics(screenWidth, screenHeight);
}
}
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index 5050062938..2aa6ae8902 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -251,14 +251,14 @@ ScalpelEngine::~ScalpelEngine() {
void ScalpelEngine::setupGraphics() {
if (getPlatform() != Common::kPlatform3DO) {
// 320x200 palettized
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
} else {
// 3DO actually uses RGB555, but some platforms of ours only support RGB565, so we use that
const Graphics::PixelFormat pixelFormatRGB565 = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
// First try for a 640x400 mode
g_system->beginGFXTransaction();
- initCommonGFX(true);
+ initCommonGFX();
g_system->initSize(640, 400, &pixelFormatRGB565);
OSystem::TransactionError gfxError = g_system->endGFXTransaction();
@@ -266,7 +266,7 @@ void ScalpelEngine::setupGraphics() {
_isScreenDoubled = true;
} else {
// System doesn't support it, so fall back on 320x200 mode
- initGraphics(320, 200, false, &pixelFormatRGB565);
+ initGraphics(320, 200, &pixelFormatRGB565);
}
}
}
diff --git a/engines/sherlock/tattoo/tattoo.cpp b/engines/sherlock/tattoo/tattoo.cpp
index 31a65783e3..38466a9459 100644
--- a/engines/sherlock/tattoo/tattoo.cpp
+++ b/engines/sherlock/tattoo/tattoo.cpp
@@ -51,7 +51,7 @@ void TattooEngine::showOpening() {
}
void TattooEngine::initialize() {
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
// Initialize the base engine
SherlockEngine::initialize();
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index 40b6959a9b..674bfab95b 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -259,7 +259,7 @@ Common::Error SkyEngine::go() {
}
Common::Error SkyEngine::init() {
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
_skyDisk = new Disk();
_skySound = new Sound(_mixer, _skyDisk, Audio::Mixer::kMaxChannelVolume);
diff --git a/engines/sludge/graphics.cpp b/engines/sludge/graphics.cpp
index 3bcb5aa043..578e6f65fe 100644
--- a/engines/sludge/graphics.cpp
+++ b/engines/sludge/graphics.cpp
@@ -143,7 +143,7 @@ void GraphicsManager::kill() {
}
bool GraphicsManager::initGfx() {
- initGraphics(_winWidth, _winHeight, true, _vm->getScreenPixelFormat());
+ initGraphics(_winWidth, _winHeight, _vm->getScreenPixelFormat());
_renderSurface.create(_winWidth, _winHeight, *_vm->getScreenPixelFormat());
if (!killResizeBackdrop(_winWidth, _winHeight))
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index ac358e774b..e58eb97c23 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -191,12 +191,12 @@ bool MoviePlayer::load(uint32 id) {
// Need to switch to true color for PSX/MP2 videos
if (_decoderType == kVideoDecoderPSX || _decoderType == kVideoDecoderMP2)
- initGraphics(g_system->getWidth(), g_system->getHeight(), true, 0);
+ initGraphics(g_system->getWidth(), g_system->getHeight(), nullptr);
if (!_decoder->loadFile(filename)) {
// Go back to 8bpp color
if (_decoderType == kVideoDecoderPSX || _decoderType == kVideoDecoderMP2)
- initGraphics(g_system->getWidth(), g_system->getHeight(), true);
+ initGraphics(g_system->getWidth(), g_system->getHeight());
return false;
}
@@ -422,7 +422,7 @@ bool MoviePlayer::playVideo() {
// Need to jump back to paletted color
if (_decoderType == kVideoDecoderPSX || _decoderType == kVideoDecoderMP2)
- initGraphics(g_system->getWidth(), g_system->getHeight(), true);
+ initGraphics(g_system->getWidth(), g_system->getHeight());
return !_vm->shouldQuit() && !skipped;
}
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 1e7b6da4f4..8b12fef9aa 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -94,7 +94,7 @@ SwordEngine::~SwordEngine() {
Common::Error SwordEngine::init() {
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
if (0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1mac") ||
0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1macdemo"))
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index e93f27f76c..d25133fe99 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -103,12 +103,12 @@ bool MoviePlayer::load(const char *name) {
// Need to switch to true color for PSX/MP2 videos
if (_decoderType == kVideoDecoderPSX || _decoderType == kVideoDecoderMP2)
- initGraphics(g_system->getWidth(), g_system->getHeight(), true, 0);
+ initGraphics(g_system->getWidth(), g_system->getHeight(), nullptr);
if (!_decoder->loadFile(filename)) {
// Go back to 8bpp color
if (_decoderType == kVideoDecoderPSX || _decoderType == kVideoDecoderMP2)
- initGraphics(g_system->getWidth(), g_system->getHeight(), true);
+ initGraphics(g_system->getWidth(), g_system->getHeight());
return false;
}
@@ -145,7 +145,7 @@ void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadI
// Need to jump back to paletted color
if (_decoderType == kVideoDecoderPSX || _decoderType == kVideoDecoderMP2)
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
}
void MoviePlayer::openTextObject(uint32 index) {
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 4f3caa437e..a2761eb5ce 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -442,7 +442,7 @@ Common::Error Sword2Engine::run() {
_resman = NULL;
_memory = NULL;
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
_screen = new Screen(this, 640, 480);
// Create the debugger as early as possible (but not before the
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index b6f2641714..9d8d02ef68 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -97,7 +97,7 @@ Common::Error Sword25Engine::run() {
Common::Error Sword25Engine::appStart() {
// Initialize the graphics mode to RGBA8888
Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
- initGraphics(800, 600, true, &format);
+ initGraphics(800, 600, &format);
if (format != g_system->getScreenFormat())
return Common::kUnsupportedColorMode;
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 2d10b82f51..d5777bb3dc 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -540,7 +540,7 @@ Common::Error TeenAgentEngine::run() {
Common::EventManager *_event = _system->getEventManager();
- initGraphics(kScreenWidth, kScreenHeight, false);
+ initGraphics(kScreenWidth, kScreenHeight);
console = new Console(this);
scene = new Scene(this);
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index b6364c98ad..6e14fc0ec8 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -185,7 +185,7 @@ void TestbedEngine::invokeTestsuites(TestbedConfigManager &cfMan) {
Common::Error TestbedEngine::run() {
// Initialize graphics using following:
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
// As of now we are using GUI::MessageDialog for interaction, Test if it works.
// interactive mode could also be modified by a config parameter "non-interactive=1"
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 8ad177abbb..76a8325879 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -900,13 +900,13 @@ Common::Error TinselEngine::run() {
// Initialize backend
if (getGameID() == GID_DW2) {
#ifndef DW2_EXACT_SIZE
- initGraphics(640, 480, true);
+ initGraphics(640, 480);
#else
- initGraphics(640, 432, true);
+ initGraphics(640, 432);
#endif
_screenSurface.create(640, 432, Graphics::PixelFormat::createFormatCLUT8());
} else {
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
_screenSurface.create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
}
diff --git a/engines/titanic/configure.engine b/engines/titanic/configure.engine
index 23a3b4e599..7c9516cd4a 100644
--- a/engines/titanic/configure.engine
+++ b/engines/titanic/configure.engine
@@ -1,3 +1,3 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine titanic "Starship Titanic" no "" "" "16bit jpeg highres mad zlib"
+add_engine titanic "Starship Titanic" yes "" "" "16bit jpeg highres mad zlib"
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index b6923c27a4..af34526329 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -465,7 +465,7 @@ bool CGameObject::isSoundActive(int handle) const {
return false;
}
-void CGameObject::playGlobalSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
+void CGameObject::playAmbientSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
int handleIndex, Audio::Mixer::SoundType soundType) {
if (handleIndex < 0 || handleIndex > 3)
return;
@@ -524,7 +524,7 @@ void CGameObject::setSoundVolume(int handle, uint percent, uint seconds) {
}
}
-void CGameObject::stopGlobalSound(bool transition, int handleIndex) {
+void CGameObject::stopAmbientSound(bool transition, int handleIndex) {
CGameManager *gameManager = getGameManager();
if (!gameManager)
return;
@@ -550,7 +550,7 @@ void CGameObject::stopGlobalSound(bool transition, int handleIndex) {
}
}
-void CGameObject::setGlobalSoundVolume(VolumeMode mode, uint seconds, int handleIndex) {
+void CGameObject::setAmbientSoundVolume(VolumeMode mode, uint seconds, int handleIndex) {
CGameManager *gameManager = getGameManager();
if (!gameManager)
return;
@@ -559,7 +559,7 @@ void CGameObject::setGlobalSoundVolume(VolumeMode mode, uint seconds, int handle
if (handleIndex == -1) {
// Iterate through calling the method for each handle
for (int idx = 0; idx < 3; ++idx)
- setGlobalSoundVolume(mode, seconds, idx);
+ setAmbientSoundVolume(mode, seconds, idx);
} else if (handleIndex >= 0 && handleIndex <= 3 && _soundHandles[handleIndex] != -1) {
uint newVolume = sound._soundManager.getModeVolume(mode);
sound.setVolume(_soundHandles[handleIndex], newVolume, seconds);
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index b592806977..f699d3a66a 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -254,7 +254,7 @@ protected:
void setSoundVolume(int handle, uint percent, uint seconds);
/**
- * Plays a sound, and saves it's handle in the global sound handles list
+ * Plays an ambient sound, and saves it's handle in the ambient sound handles list
* @param resName Filename of sound to play
* @param mode Volume mode level
* @param initialMute If set, sound transitions in from mute over 2 seconds
@@ -262,23 +262,23 @@ protected:
* @param handleIndex Slot 0 to 3 in the shared sound handle list to store the sound's handle
* @param soundType Specifies whether the sound is a sound effect or music
*/
- void playGlobalSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
+ void playAmbientSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
int handleIndex, Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType);
/**
- * Stops a sound saved in the global sound handle list
+ * Stops playing an ambient sound
* @param transition If set, the sound transitions to silent before stopping
- * @param handleIndex Index of sound to stop. If -1, all global sounds are stopped
+ * @param handleIndex Index of sound to stop. If -1, all ambient sounds are stopped
*/
- void stopGlobalSound(bool transition, int handleIndex);
+ void stopAmbientSound(bool transition, int handleIndex);
/**
- * Updates the volume for a global sound based on the specified mode's volume
+ * Updates the volume for an ambient sound based on the specified mode's volume
* @param mode Volume level mode
* @param seconds Number of seconds to transition to new volume
- * @param handleIndex Index of global sound to update. If -1, all global sounds are updated
+ * @param handleIndex Index of ambient sound to update. If -1, all ambient sounds are updated
*/
- void setGlobalSoundVolume(VolumeMode mode, uint seconds, int handleIndex);
+ void setAmbientSoundVolume(VolumeMode mode, uint seconds, int handleIndex);
/**
* Stops sound channel 3 or 0
diff --git a/engines/titanic/detection_tables.h b/engines/titanic/detection_tables.h
index bff065cf1c..d6f7c0065a 100644
--- a/engines/titanic/detection_tables.h
+++ b/engines/titanic/detection_tables.h
@@ -31,7 +31,7 @@ static const TitanicGameDescription gameDescriptions[] = {
AD_ENTRY1s("newgame.st", "c276f2661f0d0a547445a65db78b2292", 87227),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_TESTING,
+ 0,
GUIO1(GUIO_NONE)
},
},
@@ -44,7 +44,7 @@ static const TitanicGameDescription gameDescriptions[] = {
AD_ENTRY1s("newgame.st", "db22924adfd6730f4b79f4e51b25e779", 87608),
Common::DE_DEU,
Common::kPlatformWindows,
- ADGF_UNSTABLE,
+ ADGF_TESTING,
GUIO1(GUIO_NONE)
},
},
diff --git a/engines/titanic/game/bridge_view.cpp b/engines/titanic/game/bridge_view.cpp
index 608724c16c..d98cee13c0 100644
--- a/engines/titanic/game/bridge_view.cpp
+++ b/engines/titanic/game/bridge_view.cpp
@@ -77,7 +77,7 @@ bool CBridgeView::ActMsg(CActMsg *msg) {
hideMouse();
CChangeMusicMsg musicMsg;
- musicMsg._flags = 1;
+ musicMsg._action = MUSIC_STOP;
musicMsg.execute("BridgeAutoMusicPlayer");
playSound(TRANSLATE("a#42.wav", "a#35.wav"));
playMovie(MOVIE_NOTIFY_OBJECT);
diff --git a/engines/titanic/game/code_wheel.cpp b/engines/titanic/game/code_wheel.cpp
index 441c481dfe..29ae8e683f 100644
--- a/engines/titanic/game/code_wheel.cpp
+++ b/engines/titanic/game/code_wheel.cpp
@@ -21,8 +21,6 @@
*/
#include "titanic/game/code_wheel.h"
-#include "titanic/titanic.h"
-#include "titanic/translation.h"
#include "titanic/translation.h"
namespace Titanic {
@@ -35,15 +33,52 @@ BEGIN_MESSAGE_MAP(CodeWheel, CBomb)
ON_MESSAGE(CheckCodeWheelsMsg)
END_MESSAGE_MAP()
-static const int START_FRAMES[15] = {
+static const int START_FRAMES_EN[15] = {
0, 5, 10, 15, 19, 24, 28, 33, 38, 42, 47, 52, 57, 61, 66
};
-static const int END_FRAMES[15] = {
+static const int END_FRAMES_EN[15] = {
5, 10, 15, 19, 24, 28, 33, 38, 42, 47, 52, 57, 61, 66, 70
};
+static const int START_FRAMES_DE2[28] = {
+ 390, 383, 375, 368, 361, 353, 346, 339, 331, 324,
+ 317, 309, 302, 295, 287, 280, 272, 265, 258, 251,
+ 244, 236, 229, 221, 214, 207, 199, 0
+};
+static const int END_FRAMES_DE2[28] = {
+ 397, 390, 383, 375, 368, 361, 353, 346, 339, 331,
+ 324, 317, 309, 302, 295, 287, 280, 272, 265, 258,
+ 251, 244, 236, 229, 221, 214, 207, 0
+};
+
+static const int CORRECT_VALUES_DE[3][8] = {
+ { 2, 7, 4, 8, 18, 18, 4, 17 },
+ { 12, 0, 6, 10, 11, 20, 6, 18 },
+ { 13, 8, 4, 12, 0, 13, 3, 26 }
+};
+static const int START_FRAMES_DE[28] = {
+ 0, 7, 15, 22, 29, 37, 44, 51, 58, 66,
+ 73, 80, 88, 95, 102, 110, 117, 125, 132, 139,
+ 146, 154, 161, 168, 175, 183, 190, 0
+};
+static const int END_FRAMES_DE[28] = {
+ 7, 15, 22, 29, 37, 44, 51, 58, 66, 73,
+ 80, 88, 95, 102, 110, 117, 125, 132, 139, 146,
+ 154, 161, 168, 175, 183, 190, 198, 0
+};
+static const int START_FRAMES_REV_DE[28] = {
+ 390, 383, 375, 368, 361, 353, 346, 339, 331, 324,
+ 317, 309, 302, 295, 287, 280, 272, 265, 258, 251,
+ 244, 236, 229, 221, 214, 207, 199, 0
+};
+static const int END_FRAMES_REV_DE[28] = {
+ 397, 390, 383, 375, 368, 361, 353, 346, 339, 331,
+ 324, 317, 309, 302, 295, 287, 280, 272, 265, 258,
+ 251, 244, 236, 229, 221, 214, 207, 0
+};
+
CodeWheel::CodeWheel() : CBomb(), _correctValue(0), _value(4),
- _matched(false), _field114(0), _field118(0) {
+ _matched(false), _column(0), _row(0) {
}
void CodeWheel::save(SimpleFile *file, int indent) {
@@ -51,9 +86,10 @@ void CodeWheel::save(SimpleFile *file, int indent) {
file->writeNumberLine(_correctValue, indent);
file->writeNumberLine(_value, indent);
file->writeNumberLine(_matched, indent);
- if (g_vm->isGerman()) {
- file->writeNumberLine(_field114, indent);
- file->writeNumberLine(_field118, indent);
+
+ if (g_language == Common::DE_DEU) {
+ file->writeNumberLine(_row, indent);
+ file->writeNumberLine(_column, indent);
}
CBomb::save(file, indent);
@@ -64,9 +100,14 @@ void CodeWheel::load(SimpleFile *file) {
_correctValue = file->readNumber();
_value = file->readNumber();
_matched = file->readNumber();
- if (g_vm->isGerman()) {
- _field114 = file->readNumber();
- _field118 = file->readNumber();
+
+ if (g_language == Common::DE_DEU) {
+ _row = file->readNumber();
+ _column = file->readNumber();
+
+ assert(_column >= 1 && _column <= 8);
+ assert(_row >= 0 && _row <= 2);
+ _correctValue = CORRECT_VALUES_DE[_row][_column - 1];
}
CBomb::load(file);
@@ -77,29 +118,30 @@ bool CodeWheel::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
_matched = false;
if (msg->_mousePos.y > yp) {
- if (_value == _correctValue)
- _matched = true;
+ _value = (_value + 1) % TRANSLATE(15, 27);
- _value = (_value + 1) % 15;
- playMovie(START_FRAMES[_value], END_FRAMES[_value],
+ playMovie(TRANSLATE(START_FRAMES_EN[_value], START_FRAMES_DE[_value]),
+ TRANSLATE(END_FRAMES_EN[_value], END_FRAMES_DE[_value]),
MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
- } else {
- if (_value == _correctValue)
- _matched = true;
- playMovie(START_FRAMES[14 - _value] + 68, END_FRAMES[14 - _value] + 68,
+ } else {
+ playMovie(TRANSLATE(START_FRAMES_EN[14 - _value] + 68, START_FRAMES_REV_DE[_value]),
+ TRANSLATE(END_FRAMES_EN[14 - _value] + 68, END_FRAMES_REV_DE[_value]),
MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
- _value = (_value <= 0) ? 14 : _value - 1;
+ _value = (_value <= 0) ? TRANSLATE(14, 26) : _value - 1;
}
+ if (_value == _correctValue)
+ _matched = true;
+
playSound(TRANSLATE("z#59.wav", "z#590.wav"));
return true;
}
bool CodeWheel::EnterViewMsg(CEnterViewMsg *msg) {
// WORKAROUND: Don't keep resetting code wheels back to default
- loadFrame(END_FRAMES[_value]);
+ loadFrame(TRANSLATE(END_FRAMES_EN[_value], END_FRAMES_DE[_value]));
return true;
}
@@ -123,4 +165,8 @@ bool CodeWheel::CheckCodeWheelsMsg(CCheckCodeWheelsMsg *msg) {
return true;
}
+void CodeWheel::reset() {
+ _value = TRANSLATE(4, 14);
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/game/code_wheel.h b/engines/titanic/game/code_wheel.h
index 3d19eeb53c..4af1c6f388 100644
--- a/engines/titanic/game/code_wheel.h
+++ b/engines/titanic/game/code_wheel.h
@@ -39,8 +39,7 @@ private:
int _value;
bool _matched;
// German specific fields
- int _field114;
- int _field118;
+ int _row, _column;
public:
CLASSDEF;
CodeWheel();
@@ -58,7 +57,7 @@ public:
/**
* Resets a code wheel back to the default 'O' value
*/
- void reset() { _value = 4; }
+ void reset();
};
} // End of namespace Titanic
diff --git a/engines/titanic/game/computer_screen.cpp b/engines/titanic/game/computer_screen.cpp
index dee469af1c..8150448be7 100644
--- a/engines/titanic/game/computer_screen.cpp
+++ b/engines/titanic/game/computer_screen.cpp
@@ -116,7 +116,7 @@ bool CComputerScreen::TimerMsg(CTimerMsg *msg) {
break;
case 2: {
- CChangeMusicMsg musicMsg(CString(), 1);
+ CChangeMusicMsg musicMsg(CString(), MUSIC_STOP);
musicMsg.execute("HomeMusicPlayer");
playSound(TRANSLATE("a#33.wav", "a#28.wav"));
playSound(TRANSLATE("a#31.wav", "a#26.wav"));
diff --git a/engines/titanic/game/credits.cpp b/engines/titanic/game/credits.cpp
index ddb44f127c..016245dbb0 100644
--- a/engines/titanic/game/credits.cpp
+++ b/engines/titanic/game/credits.cpp
@@ -57,13 +57,13 @@ bool CCredits::SignalObject(CSignalObject *msg) {
}
bool CCredits::TimerMsg(CTimerMsg *msg) {
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
setVisible(true);
loadSound(TRANSLATE("a#16.wav", "a#11.wav"));
loadSound(TRANSLATE("a#24.wav", "a#19.wav"));
if (playCutscene(0, 18)) {
- playGlobalSound(TRANSLATE("a#16.wav", "a#11.wav"), VOL_NORMAL, false, false, 0);
+ playAmbientSound(TRANSLATE("a#16.wav", "a#11.wav"), VOL_NORMAL, false, false, 0);
if (playCutscene(19, 642)) {
playSound(TRANSLATE("a#24.wav", "a#19.wav"));
playCutscene(643, 750);
@@ -77,7 +77,7 @@ bool CCredits::TimerMsg(CTimerMsg *msg) {
setVisible(false);
petShow();
enableMouse();
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
return true;
}
diff --git a/engines/titanic/game/ear_sweet_bowl.cpp b/engines/titanic/game/ear_sweet_bowl.cpp
index 387392b26d..703dfde261 100644
--- a/engines/titanic/game/ear_sweet_bowl.cpp
+++ b/engines/titanic/game/ear_sweet_bowl.cpp
@@ -47,10 +47,6 @@ bool CEarSweetBowl::MovieEndMsg(CMovieEndMsg *msg) {
doneMsg.execute(findRoom());
if (!doneMsg._value) {
- CPetControl *pet = getPetControl();
- if (pet)
- pet->hasRoomFlags();
-
CIsParrotPresentMsg parrotMsg;
parrotMsg.execute(findRoom());
diff --git a/engines/titanic/game/emma_control.cpp b/engines/titanic/game/emma_control.cpp
index e3ba7cc42c..46cde9bfcd 100644
--- a/engines/titanic/game/emma_control.cpp
+++ b/engines/titanic/game/emma_control.cpp
@@ -57,7 +57,7 @@ bool CEmmaControl::EnterViewMsg(CEnterViewMsg *msg) {
bool CEmmaControl::StatusChangeMsg(CStatusChangeMsg *msg) {
_flag = !_flag;
setVisible(_flag);
- CChangeMusicMsg changeMsg(_flag ? _visibleSoundName : _hiddenSoundName, 0);
+ CChangeMusicMsg changeMsg(_flag ? _visibleSoundName : _hiddenSoundName, MUSIC_NONE);
changeMsg.execute(findRoom(), CAutoMusicPlayer::_type,
MSGFLAG_SCAN | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_CLASS_DEF);
return true;
diff --git a/engines/titanic/game/end_credit_text.cpp b/engines/titanic/game/end_credit_text.cpp
index 8809799a27..2392f9d321 100644
--- a/engines/titanic/game/end_credit_text.cpp
+++ b/engines/titanic/game/end_credit_text.cpp
@@ -44,7 +44,7 @@ void CEndCreditText::load(SimpleFile *file) {
}
bool CEndCreditText::ActMsg(CActMsg *msg) {
- playGlobalSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
+ playAmbientSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
createCredits();
_flag = true;
return true;
@@ -64,7 +64,7 @@ bool CEndCreditText::FrameMsg(CFrameMsg *msg) {
}
bool CEndCreditText::TimerMsg(CTimerMsg *msg) {
- setGlobalSoundVolume(VOL_MUTE, 2, -1);
+ setAmbientSoundVolume(VOL_MUTE, 2, -1);
sleep(1000);
quitGame();
return true;
diff --git a/engines/titanic/game/end_credits.cpp b/engines/titanic/game/end_credits.cpp
index 4ea54a3b76..84ac020a2c 100644
--- a/engines/titanic/game/end_credits.cpp
+++ b/engines/titanic/game/end_credits.cpp
@@ -45,11 +45,11 @@ void CEndCredits::load(SimpleFile *file) {
bool CEndCredits::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
if (_flag) {
deinit();
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
_flag = false;
} else {
loadSound(TRANSLATE("z#41.wav", "z#573.wav"));
- playGlobalSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
+ playAmbientSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
_flag = true;
}
diff --git a/engines/titanic/game/end_explode_ship.cpp b/engines/titanic/game/end_explode_ship.cpp
index 5f90604fd7..5ad046b5ad 100644
--- a/engines/titanic/game/end_explode_ship.cpp
+++ b/engines/titanic/game/end_explode_ship.cpp
@@ -56,7 +56,7 @@ bool CEndExplodeShip::ActMsg(CActMsg *msg) {
} else if (msg->_action == "TakeOff") {
loadSound(TRANSLATE("a#31.wav", "a#26.wav"));
loadSound(TRANSLATE("a#14.wav", "a#7.wav"));
- playGlobalSound(TRANSLATE("a#13.wav", "a#6.wav"), VOL_NORMAL, true, true, 0);
+ playAmbientSound(TRANSLATE("a#13.wav", "a#6.wav"), VOL_NORMAL, true, true, 0);
addTimer(1, 10212, 0);
}
@@ -72,7 +72,7 @@ bool CEndExplodeShip::TimerMsg(CTimerMsg *msg) {
}
if (msg->_actionVal == 3) {
- setGlobalSoundVolume(VOL_MUTE, 2, -1);
+ setAmbientSoundVolume(VOL_MUTE, 2, -1);
CActMsg actMsg(_isExploding ? "ExplodeCredits" : "Credits");
actMsg.execute("EndGameCredits");
}
diff --git a/engines/titanic/game/end_sequence_control.cpp b/engines/titanic/game/end_sequence_control.cpp
index e8bc04aa85..a7abf01da0 100644
--- a/engines/titanic/game/end_sequence_control.cpp
+++ b/engines/titanic/game/end_sequence_control.cpp
@@ -62,7 +62,7 @@ bool CEndSequenceControl::TimerMsg(CTimerMsg *msg) {
}
bool CEndSequenceControl::MovieEndMsg(CMovieEndMsg *msg) {
- setGlobalSoundVolume(VOL_MUTE, 2, -1);
+ setAmbientSoundVolume(VOL_MUTE, 2, -1);
changeView("TheEnd.Node 3.N");
addTimer(2, 1000, 0);
return true;
@@ -72,7 +72,7 @@ bool CEndSequenceControl::EnterRoomMsg(CEnterRoomMsg *msg) {
petHide();
disableMouse();
addTimer(1, 1000, 0);
- playGlobalSound(TRANSLATE("a#15.wav", "a#8.wav"), VOL_NORMAL, true, true, 0, Audio::Mixer::kSpeechSoundType);
+ playAmbientSound(TRANSLATE("a#15.wav", "a#8.wav"), VOL_NORMAL, true, true, 0, Audio::Mixer::kSpeechSoundType);
return true;
}
diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp
index e60f695e88..0c74787113 100644
--- a/engines/titanic/game/missiveomat.cpp
+++ b/engines/titanic/game/missiveomat.cpp
@@ -145,7 +145,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
// Check whether a valid username and password has been entered
static const char *const PASSWORDS_EN[3] = { "other", "this", "that" };
static const char *const PASSWORDS_DE[3] = { "t'ok", "t'ik", "t'ak" };
- static const char *const *pwds = g_vm->isGerman() ? PASSWORDS_DE : PASSWORDS_EN;
+ static const char *const *pwds = TRANSLATE(PASSWORDS_EN, PASSWORDS_DE);
bool validFlag = false;
if ((_username == "leovinus" && _password == pwds[0]) ||
@@ -336,6 +336,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
editMsg._mode = EDIT_BORDERS;
editMsg._param = 8;
editMsg.execute("MissiveOMat Login Control");
+ petHideCursor();
editMsg._mode = EDIT_SHOW_CURSOR;
editMsg.execute("MissiveOMat Login Control");
diff --git a/engines/titanic/game/phonograph.cpp b/engines/titanic/game/phonograph.cpp
index 71fd42861a..71b3df768b 100644
--- a/engines/titanic/game/phonograph.cpp
+++ b/engines/titanic/game/phonograph.cpp
@@ -83,8 +83,8 @@ bool CPhonograph::PhonographPlayMsg(CPhonographPlayMsg *msg) {
_isPlaying = true;
msg->_value = 1;
} else {
- stopGlobalSound(false, -1);
- playGlobalSound(cylinderMsg._name, VOL_QUIET, true, true, 0);
+ stopAmbientSound(false, -1);
+ playAmbientSound(cylinderMsg._name, VOL_QUIET, true, true, 0);
_isPlaying = true;
msg->_value = 1;
}
@@ -107,7 +107,7 @@ bool CPhonograph::PhonographStopMsg(CPhonographStopMsg *msg) {
CStopMusicMsg stopMsg;
stopMsg.execute(this);
} else {
- stopGlobalSound(msg->_leavingRoom, -1);
+ stopAmbientSound(msg->_leavingRoom, -1);
}
msg->_cylinderPresent = true;
}
diff --git a/engines/titanic/game/season_background.cpp b/engines/titanic/game/season_background.cpp
index d663c405ce..bea3b35afc 100644
--- a/engines/titanic/game/season_background.cpp
+++ b/engines/titanic/game/season_background.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/game/season_background.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -65,40 +66,46 @@ bool CSeasonBackground::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
switch (_seasonNum) {
case SEASON_SUMMER:
- playMovie(0, 45, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- _defaultFrame = 45;
+ playMovie(0, TRANSLATE(45, 49), MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
+ _defaultFrame = TRANSLATE(45, 49);
break;
case SEASON_AUTUMN:
if (_flag) {
- playMovie(232, 278, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- _defaultFrame = 278;
+ playMovie(TRANSLATE(232, 49), TRANSLATE(278, 98),
+ MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
+ _defaultFrame = TRANSLATE(278, 98);
} else {
- playMovie(45, 91, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- _defaultFrame = 91;
+ playMovie(TRANSLATE(45, 196), TRANSLATE(91, 245),
+ MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
+ _defaultFrame = TRANSLATE(91, 245);
}
break;
case SEASON_WINTER:
if (_flag) {
- playMovie(278, 326, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- _defaultFrame = 326;
+ playMovie(TRANSLATE(278, 98), TRANSLATE(326, 147),
+ MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
+ _defaultFrame = TRANSLATE(326, 147);
} else {
CStatusChangeMsg changeMsg;
changeMsg._newStatus = 0;
changeMsg.execute("PickUpSpeechCentre");
- playMovie(91, 139, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- _defaultFrame = 139;
+ playMovie(TRANSLATE(91, 245), TRANSLATE(139, 294),
+ MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
+ _defaultFrame = TRANSLATE(139, 294);
}
break;
case SEASON_SPRING:
if (_flag) {
- playMovie(326, 417, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- _defaultFrame = 417;
+ playMovie(TRANSLATE(326, 147), TRANSLATE(417, 195),
+ MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
+ _defaultFrame = TRANSLATE(417, 195);
} else {
- playMovie(139, 228, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- _defaultFrame = 228;
+ playMovie(TRANSLATE(139, 294), TRANSLATE(228, 342),
+ MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
+ _defaultFrame = TRANSLATE(228, 342);
}
break;
@@ -115,7 +122,7 @@ bool CSeasonBackground::MovieEndMsg(CMovieEndMsg *msg) {
onMsg.execute("SeasonalAdjust");
}
- if (msg->_endFrame == 91 && !_flag) {
+ if (msg->_endFrame == TRANSLATE(91, 245) && !_flag) {
CStatusChangeMsg changeMsg;
changeMsg.execute("PickUpSpeechCentre");
}
@@ -125,8 +132,8 @@ bool CSeasonBackground::MovieEndMsg(CMovieEndMsg *msg) {
bool CSeasonBackground::ActMsg(CActMsg *msg) {
if (msg->_action == "PlayerGetsSpeechCentre") {
- loadFrame(278);
- _defaultFrame = 278;
+ _defaultFrame = TRANSLATE(278, 98);
+ loadFrame(_defaultFrame);
_flag = true;
}
diff --git a/engines/titanic/game/sgt/sgt_nav.cpp b/engines/titanic/game/sgt/sgt_nav.cpp
index 3be92b4828..904ce64217 100644
--- a/engines/titanic/game/sgt/sgt_nav.cpp
+++ b/engines/titanic/game/sgt/sgt_nav.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/game/sgt/sgt_nav.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -43,7 +44,9 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
CTurnOn onMsg;
CTurnOff offMsg;
- if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open") {
+ CPetControl *pet = getPetControl();
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open"
+ && pet->isInAssignedRoom()) {
if (_statics->_vase == "Open")
offMsg.execute("Vase");
if (_statics->_tv == "Closed")
@@ -68,10 +71,14 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
}
bool SGTNav::MouseMoveMsg(CMouseMoveMsg *msg) {
- if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open")
- _cursorId = CURSOR_MOVE_FORWARD;
- else
- _cursorId = CURSOR_ARROW;
+ _cursorId = CURSOR_ARROW;
+
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open") {
+ CPetControl *pet = getPetControl();
+ if (pet->isInAssignedRoom()) {
+ _cursorId = CURSOR_MOVE_FORWARD;
+ }
+ }
return true;
}
diff --git a/engines/titanic/game/sgt/sgt_state_room.cpp b/engines/titanic/game/sgt/sgt_state_room.cpp
index ca6acaef16..b4927e6828 100644
--- a/engines/titanic/game/sgt/sgt_state_room.cpp
+++ b/engines/titanic/game/sgt/sgt_state_room.cpp
@@ -125,10 +125,10 @@ bool CSGTStateRoom::VisibleMsg(CVisibleMsg *msg) {
bool CSGTStateRoom::EnterRoomMsg(CEnterRoomMsg *msg) {
CPetControl *pet = getPetControl();
- uint roomFlags = pet->getRoomFlags();
- uint assignedRoom = pet->getAssignedRoomFlags();
- if (roomFlags == assignedRoom) {
+ // WORKAROUND: Correctly show SGT furniture states in assigned stateroom
+ // even when the user has already upgraded to 2nd or 1st class
+ if (pet->isInAssignedRoom()) {
loadFrame(_savedFrame);
_isClosed = _savedIsClosed;
setVisible(_savedVisible);
@@ -139,7 +139,7 @@ bool CSGTStateRoom::EnterRoomMsg(CEnterRoomMsg *msg) {
if (isEquals("Drawer")) {
petSetArea(PET_REMOTE);
- if (roomFlags == assignedRoom && getPassengerClass() == 3
+ if (pet->isInAssignedRoom() && getPassengerClass() == 3
&& _statics->_announcementFlag) {
// Congratulations, you may have won an upgrade
playSound(TRANSLATE("b#21.wav", "b#2.wav"));
@@ -149,7 +149,7 @@ bool CSGTStateRoom::EnterRoomMsg(CEnterRoomMsg *msg) {
_statics->_drawer = "Closed";
setVisible(false);
_isClosed = true;
- } else if (roomFlags != assignedRoom) {
+ } else if (!pet->isInAssignedRoom()) {
loadFrame(0);
if (_displayFlag) {
setVisible(true);
diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp
index 568e5becaf..95a4a8ebb9 100644
--- a/engines/titanic/game/transport/lift.cpp
+++ b/engines/titanic/game/transport/lift.cpp
@@ -190,23 +190,23 @@ bool CLift::StatusChangeMsg(CStatusChangeMsg *msg) {
bool CLift::MovieEndMsg(CMovieEndMsg *msg) {
switch (msg->_endFrame) {
case 108:
- setGlobalSoundVolume(VOL_MUTE, 1, 0);
- setGlobalSoundVolume(VOL_QUIET, 1, 1);
+ setAmbientSoundVolume(VOL_MUTE, 1, 0);
+ setAmbientSoundVolume(VOL_QUIET, 1, 1);
break;
case 190:
- setGlobalSoundVolume(VOL_MUTE, 1, 1);
- setGlobalSoundVolume(VOL_QUIET, 1, 2);
+ setAmbientSoundVolume(VOL_MUTE, 1, 1);
+ setAmbientSoundVolume(VOL_QUIET, 1, 2);
break;
case 407:
- setGlobalSoundVolume(VOL_MUTE, 1, 2);
- setGlobalSoundVolume(VOL_QUIET, 1, 1);
+ setAmbientSoundVolume(VOL_MUTE, 1, 2);
+ setAmbientSoundVolume(VOL_QUIET, 1, 1);
break;
case 489:
- setGlobalSoundVolume(VOL_MUTE, 1, 1);
- setGlobalSoundVolume(VOL_QUIET, 1, 0);
+ setAmbientSoundVolume(VOL_MUTE, 1, 1);
+ setAmbientSoundVolume(VOL_QUIET, 1, 0);
break;
default: {
@@ -252,17 +252,17 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) {
}
if (floorNum < 20) {
- playGlobalSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_QUIET, true, true, 0);
- playGlobalSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
- playGlobalSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
+ playAmbientSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_QUIET, true, true, 0);
+ playAmbientSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
+ playAmbientSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
} else if (floorNum < 28) {
- playGlobalSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
- playGlobalSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_QUIET, true, true, 1);
- playGlobalSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
+ playAmbientSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
+ playAmbientSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_QUIET, true, true, 1);
+ playAmbientSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
} else {
- playGlobalSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
- playGlobalSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
- playGlobalSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_QUIET, true, true, 2);
+ playAmbientSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
+ playAmbientSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
+ playAmbientSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_QUIET, true, true, 2);
}
}
@@ -270,7 +270,7 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) {
}
bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) {
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
CPetControl *pet = getPetControl();
if (pet->getRoomsElevatorNum() == 4 && _hasHead && !_hasCorrectHead) {
diff --git a/engines/titanic/game/transport/pellerator.cpp b/engines/titanic/game/transport/pellerator.cpp
index 9958226c6b..55f701f0f0 100644
--- a/engines/titanic/game/transport/pellerator.cpp
+++ b/engines/titanic/game/transport/pellerator.cpp
@@ -69,7 +69,6 @@ void CPellerator::load(SimpleFile *file) {
bool CPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
setVisible(true);
- playGlobalSound(TRANSLATE("z#74.wav", "z#605.wav"), VOL_QUIET, true, true, 0);
int classNum = getPassengerClass();
int newDest = msg->_newStatus;
@@ -78,6 +77,8 @@ bool CPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
} else if (classNum == 3 || (msg->_newStatus > 4 && classNum != 1)) {
petDisplayMessage(1, CLASS_NOT_ALLOWED_AT_DEST);
} else if (newDest > _destination) {
+ playAmbientSound(TRANSLATE("z#74.wav", "z#605.wav"), VOL_QUIET, true, true, 0);
+
CString name = getName();
changeView(name == "PelleratorObject2" ?
"Pellerator.Node 1.N" : "Pellerator.Node 1.S");
@@ -179,6 +180,8 @@ bool CPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
playMovie(264, 264, MOVIE_NOTIFY_OBJECT);
_destination = newDest;
} else if (newDest < _destination) {
+ playAmbientSound(TRANSLATE("z#74.wav", "z#605.wav"), VOL_QUIET, true, true, 0);
+
CString name = getName();
changeView(name == "PelleratorObject2" ?
"Pellerator.Node 1.N" : "Pellerator.Node 1.S");
@@ -338,7 +341,7 @@ bool CPellerator::EnterRoomMsg(CEnterRoomMsg *msg) {
bool CPellerator::MovieEndMsg(CMovieEndMsg *msg) {
setVisible(false);
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
switch (_destination) {
case 0:
diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp
index 1e76c63e01..e3e6306e3a 100644
--- a/engines/titanic/game/transport/service_elevator.cpp
+++ b/engines/titanic/game/transport/service_elevator.cpp
@@ -127,8 +127,8 @@ bool CServiceElevator::ServiceElevatorMsg(CServiceElevatorMsg *msg) {
switch (_fieldDC) {
case 0:
_string1 = "DeepSpace";
- _string2 = "a#2.wav";
- queueSound("z#416.wav", _soundHandle2, 50);
+ _string2 = TRANSLATE("a#2.wav", "a#54.wav");
+ queueSound(TRANSLATE("z#416.wav", "z#160.wav"), _soundHandle2, 50);
break;
case 1:
diff --git a/engines/titanic/game_manager.h b/engines/titanic/game_manager.h
index 89c40d0356..c319e18e22 100644
--- a/engines/titanic/game_manager.h
+++ b/engines/titanic/game_manager.h
@@ -81,8 +81,8 @@ public:
CInputHandler _inputHandler;
CInputTranslator _inputTranslator;
CTreeItem *_dragItem;
- CMusicRoom _musicRoom;
CSound _sound;
+ CMusicRoom _musicRoom;
public:
CGameManager(CProjectItem *project, CGameView *gameView, Audio::Mixer *mixer);
~CGameManager();
diff --git a/engines/titanic/gfx/music_slider_pitch.cpp b/engines/titanic/gfx/music_slider_pitch.cpp
index 48dee03d0c..59933b52e3 100644
--- a/engines/titanic/gfx/music_slider_pitch.cpp
+++ b/engines/titanic/gfx/music_slider_pitch.cpp
@@ -47,7 +47,7 @@ bool CMusicSliderPitch::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
_controlVal = 0;
loadFrame(3 - _controlVal);
- playSound("z#54.wav", 50);
+ playSound(TRANSLATE("z#54.wav", "z#585.wav"), 50);
} else {
playSound(TRANSLATE("z#46.wav", "z#577.wav"));
}
diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h
index 115976a70d..925898acc3 100644
--- a/engines/titanic/messages/messages.h
+++ b/engines/titanic/messages/messages.h
@@ -226,6 +226,9 @@ enum Movement {
MOVE_NONE = 0, MOVE_FORWARDS, MOVE_BACKWARDS, TURN_LEFT, TURN_RIGHT
};
+enum ChangeMusicAction {
+ MUSIC_NONE = 0, MUSIC_STOP = 1, MUSIC_START = 2
+};
class CMovementMsg : public CMessage {
public:
@@ -258,7 +261,7 @@ MESSAGE0(CArmPickedUpFromTableMsg);
MESSAGE0(CBodyInBilgeRoomMsg);
MESSAGE1(CBowlStateChangeMsg, int, state, 0);
MESSAGE2(CCarryObjectArrivedMsg, CString, strValue, "", int, numValue, 0);
-MESSAGE2(CChangeMusicMsg, CString, filename, "", int, flags, 0);
+MESSAGE2(CChangeMusicMsg, CString, filename, "", ChangeMusicAction, action, MUSIC_NONE);
MESSAGE1(CChangeSeasonMsg, CString, season, "Summer");
MESSAGE0(CCheckAllPossibleCodes);
MESSAGE2(CCheckChevCode, int, classNum, 0, uint, chevCode, 0);
diff --git a/engines/titanic/npcs/bilge_succubus.cpp b/engines/titanic/npcs/bilge_succubus.cpp
index 827e39fb4b..49c4190fa5 100644
--- a/engines/titanic/npcs/bilge_succubus.cpp
+++ b/engines/titanic/npcs/bilge_succubus.cpp
@@ -144,7 +144,7 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
playMovie(_trayOutStartFrame, _trayOutEndFrame, MOVIE_WAIT_FOR_FINISH);
playMovie(_sneezing1StartFrame, _sneezing1EndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
playMovie(_sneezing2StartFrame, _sneezing2EndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
- incTransitions();
+ lockMouse();
}
} else {
startTalking(this, 230012);
@@ -271,7 +271,7 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
startTalking(this, 150);
CBodyInBilgeRoomMsg bodyMsg;
bodyMsg.execute("Service Elevator Entity");
- decTransitions();
+ unlockMouse();
_sendAction = SA_SENT;
} else {
diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp
index aa9ec7e6cd..ee639c908f 100644
--- a/engines/titanic/npcs/deskbot.cpp
+++ b/engines/titanic/npcs/deskbot.cpp
@@ -102,6 +102,11 @@ bool CDeskbot::EnterViewMsg(CEnterViewMsg *msg) {
_fieldC4 = 0;
loadFrame(625);
+ // WORKAROUND: If loading directly from the launcher when Marcinta
+ // is active, reset the active NPC back to none at the same time
+ CPetControl *pet = getPetControl();
+ pet->resetActiveNPC();
+
return true;
}
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
index ba07d1d15c..e322b81701 100644
--- a/engines/titanic/npcs/parrot.cpp
+++ b/engines/titanic/npcs/parrot.cpp
@@ -278,7 +278,7 @@ bool CParrot::MovieEndMsg(CMovieEndMsg *msg) {
if (_takeOff) {
// Perch has been taken, so take off
- loadMovie("z168.avi", false);
+ loadMovie(TRANSLATE("z168.avi", "z191.avi"), false);
playClip("Take Off", MOVIE_NOTIFY_OBJECT);
setPosition(Point(20, 10));
_npcFlags |= NPCFLAG_TAKE_OFF;
@@ -697,7 +697,7 @@ bool CParrot::PutParrotBackMsg(CPutParrotBackMsg *msg) {
bool CParrot::PreEnterViewMsg(CPreEnterViewMsg *msg) {
if (_state == PARROT_IN_CAGE) {
- loadMovie("z167.avi", false);
+ loadMovie(TRANSLATE("z167.avi", "z190.avi"), false);
loadFrame(0);
}
@@ -711,7 +711,7 @@ bool CParrot::PanningAwayFromParrotMsg(CPanningAwayFromParrotMsg *msg) {
_panTarget = nullptr;
} else if (_takeOff) {
_panTarget = msg->_target;
- loadMovie("z168.avi", false);
+ loadMovie(TRANSLATE("z168.avi", "z191.avi"), false);
stopMovie();
playClip("Take Off", MOVIE_NOTIFY_OBJECT);
_npcFlags |= NPCFLAG_TAKE_OFF;
diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp
index b8fddf2079..8cc2e99878 100644
--- a/engines/titanic/npcs/succubus.cpp
+++ b/engines/titanic/npcs/succubus.cpp
@@ -426,7 +426,7 @@ bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
_sendAction = SA_SENT;
_mailPresent = false;
_inProgress = true;
- incTransitions();
+ lockMouse();
if (_isFeathers) {
// The feather has special handling to be rejected by the SuccUBus
@@ -521,7 +521,7 @@ bool CSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) {
if (_receiveStartFrame >= 0) {
_sendAction = SA_FEATHERS;
_inProgress = true;
- incTransitions();
+ lockMouse();
playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT);
}
}
@@ -625,7 +625,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
if (_inProgress) {
_inProgress = false;
- decTransitions();
+ unlockMouse();
}
CSUBTransition transMsg;
@@ -642,7 +642,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
_mailP = nullptr;
if (_inProgress) {
_inProgress = false;
- decTransitions();
+ unlockMouse();
}
CSUBTransition transMsg;
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index 6408c8a29b..a95b896159 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -438,10 +438,10 @@ public:
}
/**
- * Returns true if the Rooms list has a room with the given flags
+ * Returns true if the player is in the current or previously assigned rooms
*/
- bool hasRoomFlags() const {
- return _rooms.hasRoomFlags(getRoomFlags());
+ bool isInAssignedRoom() const {
+ return _rooms.isAssignedRoom(getRoomFlags());
}
uint getRoomFlags() const {
diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp
index 738116ed8f..1805bb0fd6 100644
--- a/engines/titanic/pet_control/pet_frame.cpp
+++ b/engines/titanic/pet_control/pet_frame.cpp
@@ -22,7 +22,7 @@
#include "titanic/pet_control/pet_frame.h"
#include "titanic/pet_control/pet_control.h"
-#include "titanic/titanic.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -103,10 +103,10 @@ bool CPetFrame::setPetControl(CPetControl *petControl) {
// Set up the PET areas we'll have buttons for
_petAreas.clear();
- if (g_vm->isGerman())
- _petAreas.assign(&PET_AREAS_DE[0], &PET_AREAS_DE[0] + 6);
- else
+ if (g_language == Common::EN_ANY)
_petAreas.assign(&PET_AREAS_EN[0], &PET_AREAS_EN[0] + 5);
+ else
+ _petAreas.assign(&PET_AREAS_DE[0], &PET_AREAS_DE[0] + 6);
// Set the bounds of the individual elements
_background.setBounds(Rect(20, 350, 620, 480));
@@ -126,15 +126,22 @@ bool CPetFrame::setPetControl(CPetControl *petControl) {
_modeButtons.resize(_petAreas.size());
for (uint idx = 0; idx < _modeButtons.size(); ++idx) {
_modeButtons[idx].setBounds(r);
- _modeButtons[idx].translate(4, g_vm->isGerman() ? YLIST_DE[idx] : YLIST_EN[idx]);
+ _modeButtons[idx].translate(TRANSLATE(4, 0),
+ TRANSLATE(YLIST_EN[idx], YLIST_DE[idx]));
}
setArea(PET_CONVERSATION);
- const int XLIST_EN[] = { 73, 54, 85, 109, 38, 71 };
- for (uint idx = 0; idx < _petAreas.size(); ++idx) {
- _titles[idx].setBounds(Rect(0, 0, 110, 11));
- _titles[idx].translate(g_vm->isGerman() ? 608 - 107 :
- 608 - XLIST_EN[idx], 471);
+ if (g_language == Common::EN_ANY) {
+ const int XLIST_EN[] = { 73, 54, 85, 109, 38, 71 };
+ for (uint idx = 0; idx < _petAreas.size(); ++idx) {
+ _titles[idx].setBounds(Rect(0, 0, 110, 11));
+ _titles[idx].translate(608 - XLIST_EN[idx], 471);
+ }
+ } else {
+ for (uint idx = 0; idx < 7; ++idx) {
+ _titles[idx].setBounds(Rect(0, 0, 110, 11));
+ _titles[idx].translate(501, 469);
+ }
}
}
diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp
index f26f98aea3..8fa0f6b4f8 100644
--- a/engines/titanic/pet_control/pet_rooms.cpp
+++ b/engines/titanic/pet_control/pet_rooms.cpp
@@ -22,6 +22,7 @@
#include "titanic/pet_control/pet_rooms.h"
#include "titanic/pet_control/pet_control.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -202,8 +203,8 @@ bool CPetRooms::setupControl(CPetControl *petControl) {
if (!petControl)
return false;
- Rect rect1(0, 0, 470, 15);
- rect1.moveTo(32, 445);
+ Rect rect1(0, 0, 470, TRANSLATE(15, 32));
+ rect1.moveTo(32, TRANSLATE(445, 439));
_text.setBounds(rect1);
_text.setHasBorder(false);
@@ -338,7 +339,7 @@ bool CPetRooms::changeLocationClass(PassengerClass newClassNum) {
return true;
}
-bool CPetRooms::hasRoomFlags(uint roomFlags) const {
+bool CPetRooms::isAssignedRoom(uint roomFlags) const {
for (CPetRoomsGlyphs::const_iterator i = _glyphs.begin(); i != _glyphs.end(); ++i) {
const CPetRoomsGlyph *glyph = static_cast<const CPetRoomsGlyph *>(*i);
if (glyph->isAssigned() && glyph->getRoomFlags() == roomFlags)
diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h
index ecfeadf2b9..a893e9a49d 100644
--- a/engines/titanic/pet_control/pet_rooms.h
+++ b/engines/titanic/pet_control/pet_rooms.h
@@ -164,9 +164,10 @@ public:
bool changeLocationClass(PassengerClass newClassNum);
/**
- * Returns true if a room glyph exists with the given flags
+ * Returns true if the specified location is the current or
+ * previously assigned room
*/
- bool hasRoomFlags(uint roomFlags) const;
+ bool isAssignedRoom(uint roomFlags) const;
/**
* Returns the room flags for the player's currently assigned room
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
index af73cb803c..02f6860d31 100644
--- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
@@ -28,6 +28,7 @@
#include "titanic/support/screen_manager.h"
#include "titanic/support/simple_file.h"
#include "titanic/titanic.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -161,12 +162,12 @@ void CPetRoomsGlyph::getTooltip(CTextControl *text) {
// Get the room description
CString roomStr = roomFlags.getRoomDesc();
- if (roomStr == "The Elevator") {
+ if (roomStr == TRANSLATE("The Elevator", "Der Aufzug")) {
int elevNum = owner->getElevatorNum();
- roomStr = CString::format("Elevator %d", elevNum);
+ roomStr = CString::format(g_vm->_strings[ELEVATOR_NUM].c_str(), elevNum);
}
- roomStr += " (shift-click edits)";
+ roomStr += g_vm->_strings[SHIFT_CLICK_TO_EDIT];
text->setText(prefix + roomStr);
}
diff --git a/engines/titanic/pet_control/pet_translation.cpp b/engines/titanic/pet_control/pet_translation.cpp
index 9509047325..e74d2e0340 100644
--- a/engines/titanic/pet_control/pet_translation.cpp
+++ b/engines/titanic/pet_control/pet_translation.cpp
@@ -26,14 +26,12 @@
namespace Titanic {
CPetTranslation::CPetTranslation() {
- Rect rect1(0, 0, 580, 70);
- rect1.translate(32, 368);
+ Rect rect1(32, 368, 586, 438);
_message.setBounds(rect1);
_message.resize(50);
_message.setHasBorder(false);
- Rect rect2(0, 0, 580, 15);
- rect2.translate(32, 445);
+ Rect rect2(32, 445, 586, 460);
_tooltip.setBounds(rect2);
_tooltip.setHasBorder(false);
}
@@ -61,7 +59,7 @@ void CPetTranslation::clearTranslation() {
void CPetTranslation::addTranslation(const CString &str1, const CString &str2) {
CString msg = CString::format("%s%s - %s%s",
- CTextControl::getColorText(0, 0x80, 0).c_str(), str1.c_str(),
+ CTextControl::getColorText(0, 0, 0x80).c_str(), str1.c_str(),
CTextControl::getColorText(0, 0, 0).c_str(), str2.c_str());
_message.addLine(msg);
_petControl->makeDirty();
diff --git a/engines/titanic/room_flags.cpp b/engines/titanic/room_flags.cpp
index a28a4bd68c..8ca1a9e07d 100644
--- a/engines/titanic/room_flags.cpp
+++ b/engines/titanic/room_flags.cpp
@@ -22,6 +22,7 @@
#include "titanic/room_flags.h"
#include "titanic/titanic.h"
+#include "titanic/support/strings.h"
namespace Titanic {
@@ -440,6 +441,18 @@ void CRoomFlags::changeClass(PassengerClass newClassNum) {
setRoomBits(roomNum);
}
+CString CRoomFlags::getElevatorDesc() const {
+ return CString::format(g_vm->_strings[ELEVATOR_NUM].c_str(), getElevatorNum());
+}
+
+CString CRoomFlags::getFloorDesc() const {
+ return CString::format(g_vm->_strings[FLOOR_NUM].c_str(), getFloorNum());
+}
+
+CString CRoomFlags::getRoomNumDesc() const {
+ return CString::format(g_vm->_strings[ROOM_NUM].c_str(), getRoomNum());
+}
+
bool CRoomFlags::compareClassElevator(uint flags1, uint flags2) {
CRoomFlags f1(flags1);
CRoomFlags f2(flags2);
diff --git a/engines/titanic/room_flags.h b/engines/titanic/room_flags.h
index 3ce86bbddd..95b65330cf 100644
--- a/engines/titanic/room_flags.h
+++ b/engines/titanic/room_flags.h
@@ -124,13 +124,6 @@ public:
uint getElevatorNum() const { return getElevatorBits() + 1; }
/**
- * Get a description for the elevator number
- */
- CString getElevatorDesc() const {
- return CString::format("Elevator %d", getElevatorNum());
- }
-
- /**
* Gets the bits for the passenger class
*/
uint getPassengerClassBits() const;
@@ -168,13 +161,6 @@ public:
uint getFloorNum() const;
/**
- * Get a description for the floor number
- */
- CString getFloorDesc() const {
- return CString::format("Floor %d", getFloorNum());
- }
-
- /**
* Sets the bits for the room number
*/
void setRoomBits(uint roomBits);
@@ -190,11 +176,19 @@ public:
uint getRoomNum() const { return getRoomBits(); }
/**
+ * Get a description for the elevator number
+ */
+ CString getElevatorDesc() const;
+
+ /**
+ * Get a description for the floor number
+ */
+ CString getFloorDesc() const;
+
+ /**
* Gets a string for the room number
*/
- CString getRoomNumDesc() const {
- return CString::format("Room %d", getRoomNum());
- }
+ CString getRoomNumDesc() const;
bool getBit0() const;
diff --git a/engines/titanic/sound/audio_buffer.h b/engines/titanic/sound/audio_buffer.h
index c775c5bb35..6d074a356d 100644
--- a/engines/titanic/sound/audio_buffer.h
+++ b/engines/titanic/sound/audio_buffer.h
@@ -44,7 +44,7 @@ private:
* Leave a critical section
*/
void leaveCriticalSection();
-public:
+private:
bool _finished;
public:
CAudioBuffer(int maxSize);
@@ -75,6 +75,11 @@ public:
bool full() const { return _data.full(); }
/**
+ * Returns true if the audio buffering is finished
+ */
+ bool isFinished() const { return _finished && empty(); }
+
+ /**
* Adds a value to the buffer
*/
void push(int16 value);
@@ -93,6 +98,11 @@ public:
* Reads out a specified number of samples
*/
int read(int16 *values, int count);
+
+ /**
+ * Marks the buffer as finishing, and that no more new data will arrive
+ */
+ void finalize() { _finished = true; }
};
} // End of namespace Titanic
diff --git a/engines/titanic/sound/auto_music_player.cpp b/engines/titanic/sound/auto_music_player.cpp
index ce20c33765..d77424c97f 100644
--- a/engines/titanic/sound/auto_music_player.cpp
+++ b/engines/titanic/sound/auto_music_player.cpp
@@ -47,7 +47,7 @@ void CAutoMusicPlayer::load(SimpleFile *file) {
}
bool CAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) {
- if (!_isRepeated) {
+ if (!_isEnabled) {
CRoomItem *room = findRoom();
if (msg->_newRoom == room)
addTimer(2000);
@@ -57,11 +57,11 @@ bool CAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) {
}
bool CAutoMusicPlayer::LeaveRoomMsg(CLeaveRoomMsg *msg) {
- if (_isRepeated) {
+ if (_isEnabled) {
CRoomItem *room = findRoom();
if (msg->_oldRoom == room) {
CChangeMusicMsg changeMsg;
- changeMsg._flags = 1;
+ changeMsg._action = MUSIC_STOP;
changeMsg.execute(this);
}
}
diff --git a/engines/titanic/sound/auto_music_player_base.cpp b/engines/titanic/sound/auto_music_player_base.cpp
index 96874768de..a22a113329 100644
--- a/engines/titanic/sound/auto_music_player_base.cpp
+++ b/engines/titanic/sound/auto_music_player_base.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/sound/auto_music_player_base.h"
+#include "titanic/game_manager.h"
namespace Titanic {
@@ -32,13 +33,13 @@ BEGIN_MESSAGE_MAP(CAutoMusicPlayerBase, CGameObject)
END_MESSAGE_MAP()
CAutoMusicPlayerBase::CAutoMusicPlayerBase() : CGameObject(),
- _initialMute(true), _isRepeated(false), _volumeMode(VOL_NORMAL), _transition(1) {
+ _initialMute(true), _isEnabled(false), _volumeMode(VOL_NORMAL), _transition(1) {
}
void CAutoMusicPlayerBase::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeQuotedLine(_filename, indent);
file->writeNumberLine(_initialMute, indent);
- file->writeNumberLine(_isRepeated, indent);
+ file->writeNumberLine(_isEnabled, indent);
file->writeNumberLine(_volumeMode, indent);
file->writeNumberLine(_transition, indent);
@@ -49,7 +50,7 @@ void CAutoMusicPlayerBase::load(SimpleFile *file) {
file->readNumber();
_filename = file->readString();
_initialMute = file->readNumber();
- _isRepeated = file->readNumber();
+ _isEnabled = file->readNumber();
_volumeMode = (VolumeMode)file->readNumber();
_transition = file->readNumber();
@@ -62,39 +63,49 @@ bool CAutoMusicPlayerBase::StatusChangeMsg(CStatusChangeMsg *msg) {
bool CAutoMusicPlayerBase::TimerMsg(CTimerMsg *msg) {
CChangeMusicMsg musicMsg;
- musicMsg._flags = 2;
+ musicMsg._action = MUSIC_START;
musicMsg.execute(this);
return true;
}
bool CAutoMusicPlayerBase::LoadSuccessMsg(CLoadSuccessMsg *msg) {
- if (_isRepeated)
- playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
+ if (_isEnabled) {
+ // WORKAROUND: A problem was encountered with the EmbLobby music player
+ // not getting turned off when room was left, so was turned on again
+ // when loading a savegame elsewhere. This guards against it
+ CRoomItem *newRoom = getGameManager()->getRoom();
+ if (findRoom() != newRoom) {
+ _isEnabled = false;
+ return true;
+ }
+
+ playAmbientSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
+ }
return true;
}
bool CAutoMusicPlayerBase::ChangeMusicMsg(CChangeMusicMsg *msg) {
- if (_isRepeated && msg->_flags == 1) {
- _isRepeated = false;
- stopGlobalSound(_transition, -1);
+ if (_isEnabled && msg->_action == MUSIC_STOP) {
+ _isEnabled = false;
+ stopAmbientSound(_transition, -1);
}
if (!msg->_filename.empty()) {
_filename = msg->_filename;
- if (_isRepeated) {
- stopGlobalSound(_transition, -1);
- playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
+ if (_isEnabled) {
+ stopAmbientSound(_transition, -1);
+ playAmbientSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
}
}
- if (!_isRepeated && msg->_flags == 2) {
- _isRepeated = true;
- playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
+ if (!_isEnabled && msg->_action == MUSIC_START) {
+ _isEnabled = true;
+ playAmbientSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
}
diff --git a/engines/titanic/sound/auto_music_player_base.h b/engines/titanic/sound/auto_music_player_base.h
index 4dd0665488..d0392951bc 100644
--- a/engines/titanic/sound/auto_music_player_base.h
+++ b/engines/titanic/sound/auto_music_player_base.h
@@ -36,7 +36,7 @@ class CAutoMusicPlayerBase : public CGameObject {
protected:
CString _filename;
bool _initialMute;
- bool _isRepeated;
+ bool _isEnabled;
VolumeMode _volumeMode;
int _transition;
public:
diff --git a/engines/titanic/sound/music_player.cpp b/engines/titanic/sound/music_player.cpp
index fe75382dc3..ae0b64fdd9 100644
--- a/engines/titanic/sound/music_player.cpp
+++ b/engines/titanic/sound/music_player.cpp
@@ -22,6 +22,7 @@
#include "titanic/sound/music_player.h"
#include "titanic/sound/music_room.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -131,32 +132,32 @@ bool CMusicPlayer::CreateMusicPlayerMsg(CCreateMusicPlayerMsg *msg) {
if (musicHandler) {
ins = musicHandler->createInstrument(BELLS, 3);
- ins->load(0, "z#490.wav", 60);
- ins->load(1, "z#488.wav", 62);
- ins->load(2, "z#489.wav", 63);
+ ins->load(0, TRANSLATE("z#490.wav", "z#227.wav"), 60);
+ ins->load(1, TRANSLATE("z#488.wav", "z#225.wav"), 62);
+ ins->load(2, TRANSLATE("z#489.wav", "z#226.wav"), 63);
ins = musicHandler->createInstrument(SNAKE, 5);
- ins->load(0, "z#493.wav", 22);
- ins->load(1, "z#495.wav", 29);
- ins->load(2, "z#492.wav", 34);
- ins->load(3, "z#494.wav", 41);
- ins->load(4, "z#491.wav", 46);
+ ins->load(0, TRANSLATE("z#493.wav", "z#230.wav"), 22);
+ ins->load(1, TRANSLATE("z#495.wav", "z#232.wav"), 29);
+ ins->load(2, TRANSLATE("z#492.wav", "z#229.wav"), 34);
+ ins->load(3, TRANSLATE("z#494.wav", "z#231.wav"), 41);
+ ins->load(4, TRANSLATE("z#491.wav", "z#228.wav"), 46);
ins = musicHandler->createInstrument(PIANO, 5);
- ins->load(0, "z#499.wav", 26);
- ins->load(1, "z#497.wav", 34);
- ins->load(2, "z#498.wav", 38);
- ins->load(3, "z#496.wav", 46);
- ins->load(4, "z#500.wav", 60);
+ ins->load(0, TRANSLATE("z#499.wav", "z#236.wav"), 26);
+ ins->load(1, TRANSLATE("z#497.wav", "z#234.wav"), 34);
+ ins->load(2, TRANSLATE("z#498.wav", "z#235.wav"), 38);
+ ins->load(3, TRANSLATE("z#496.wav", "z#233.wav"), 46);
+ ins->load(4, TRANSLATE("z#500.wav", "z#237.wav"), 60);
ins = musicHandler->createInstrument(BASS, 7);
- ins->load(0, "z#504.wav", 22);
- ins->load(1, "z#507.wav", 29);
- ins->load(2, "z#503.wav", 34);
- ins->load(3, "z#506.wav", 41);
- ins->load(4, "z#502.wav", 46);
- ins->load(5, "z#505.wav", 53);
- ins->load(6, "z#501.wav", 58);
+ ins->load(0, TRANSLATE("z#504.wav", "z#241.wav"), 22);
+ ins->load(1, TRANSLATE("z#507.wav", "z#244.wav"), 29);
+ ins->load(2, TRANSLATE("z#503.wav", "z#240.wav"), 34);
+ ins->load(3, TRANSLATE("z#506.wav", "z#243.wav"), 41);
+ ins->load(4, TRANSLATE("z#502.wav", "z#239.wav"), 46);
+ ins->load(5, TRANSLATE("z#505.wav", "z#242.wav"), 53);
+ ins->load(6, TRANSLATE("z#501.wav", "z#238.wav"), 58);
CMusicRoom::_musicHandler->setActive(_musicActive);
}
diff --git a/engines/titanic/sound/music_room_handler.cpp b/engines/titanic/sound/music_room_handler.cpp
index 5c1cd6012d..2265e46bb2 100644
--- a/engines/titanic/sound/music_room_handler.cpp
+++ b/engines/titanic/sound/music_room_handler.cpp
@@ -38,7 +38,7 @@ CMusicRoomHandler::CMusicRoomHandler(CProjectItem *project, CSoundManager *sound
for (int idx = 0; idx < 4; ++idx)
_songs[idx] = new CMusicSong(idx);
Common::fill(&_startPos[0], &_startPos[4], 0);
- Common::fill(&_animTime[0], &_animTime[4], 0.0);
+ Common::fill(&_animExpiryTime[0], &_animExpiryTime[4], 0.0);
Common::fill(&_position[0], &_position[4], 0);
_audioBuffer = new CAudioBuffer(88200);
@@ -89,7 +89,7 @@ void CMusicRoomHandler::setup(int volume) {
}
_position[idx] = _startPos[idx];
- _animTime[idx] = 0.0;
+ _animExpiryTime[idx] = 0.0;
}
_instrumentsActive = 4;
@@ -180,7 +180,7 @@ void CMusicRoomHandler::start() {
}
bool CMusicRoomHandler::update() {
- uint currentTicks = g_vm->_events->getTicksCount();
+ uint currentTicks = g_system->getMillis();
if (!_startTicks) {
start();
@@ -195,10 +195,12 @@ bool CMusicRoomHandler::update() {
_soundStartTicks = currentTicks;
}
- updateAudio();
- updateInstruments();
+ if (_instrumentsActive > 0) {
+ updateAudio();
+ updateInstruments();
+ }
- return _instrumentsActive > 0;
+ return !_audioBuffer->isFinished();
}
void CMusicRoomHandler::updateAudio() {
@@ -232,9 +234,15 @@ void CMusicRoomHandler::updateAudio() {
_audioBuffer->push(audioData, size);
delete[] audioData;
}
+
+ if (_instrumentsActive == 0)
+ // Reaching end of music
+ _audioBuffer->finalize();
}
void CMusicRoomHandler::updateInstruments() {
+ uint currentTicks = g_system->getMillis();
+
if (_active && _soundStartTicks) {
for (MusicInstrument instrument = BELLS; instrument <= BASS;
instrument = (MusicInstrument)((int)instrument + 1)) {
@@ -248,12 +256,11 @@ void CMusicRoomHandler::updateInstruments() {
continue;
}
- uint ticks = g_vm->_events->getTicksCount() - _soundStartTicks;
- double time = (double)ticks * 0.001 - 0.6;
- double threshold = _animTime[instrument] - ins->_animTime;
+ double time = (double)(currentTicks - _soundStartTicks) / 1000.0 - 0.6;
+ double threshold = _animExpiryTime[instrument] - ins->_insStartTime;
if (time >= threshold) {
- _animTime[instrument] += getAnimDuration(instrument, _position[instrument]);
+ _animExpiryTime[instrument] += getAnimDuration(instrument, _position[instrument]);
const CValuePair &vp = (*_songs[instrument])[_position[instrument]];
if (vp._data != 0x7FFFFFFF) {
diff --git a/engines/titanic/sound/music_room_handler.h b/engines/titanic/sound/music_room_handler.h
index ec117e3098..0eed315614 100644
--- a/engines/titanic/sound/music_room_handler.h
+++ b/engines/titanic/sound/music_room_handler.h
@@ -55,7 +55,7 @@ private:
CMusicSong *_songs[4];
int _startPos[4];
int _position[4];
- double _animTime[4];
+ double _animExpiryTime[4];
bool _active;
CWaveFile *_waveFile;
diff --git a/engines/titanic/sound/music_room_instrument.cpp b/engines/titanic/sound/music_room_instrument.cpp
index 15ac2cd192..882325c08a 100644
--- a/engines/titanic/sound/music_room_instrument.cpp
+++ b/engines/titanic/sound/music_room_instrument.cpp
@@ -52,7 +52,7 @@ void CMusicRoomInstrument::deinit() {
CMusicRoomInstrument::CMusicRoomInstrument(CProjectItem *project, CSoundManager *soundManager, MusicWaveInstrument instrument) :
_project(project), _soundManager(soundManager), _instrument(instrument) {
Common::fill(&_gameObjects[0], &_gameObjects[4], (CGameObject *)nullptr);
- _animTime = 0.0;
+ _insStartTime = 0.0;
_waveIndex = -1;
_readPos = 0;
_readIncrement = 0;
@@ -66,7 +66,7 @@ CMusicRoomInstrument::CMusicRoomInstrument(CProjectItem *project, CSoundManager
_gameObjects[1] = static_cast<CGameObject *>(_project->findByName("Piano Mouth"));
_gameObjects[2] = static_cast<CGameObject *>(_project->findByName("Piano Left Arm"));
_gameObjects[3] = static_cast<CGameObject *>(_project->findByName("Piano Right Arm"));
- _animTime = 0.45;
+ _insStartTime = 0.45;
break;
case MV_BASS:
@@ -75,14 +75,14 @@ CMusicRoomInstrument::CMusicRoomInstrument(CProjectItem *project, CSoundManager
case MV_BELLS:
_gameObjects[0] = static_cast<CGameObject *>(_project->findByName("Tubular Bells"));
- _animTime = 0.4;
+ _insStartTime = 0.4;
break;
case MV_SNAKE:
_gameObjects[0] = static_cast<CGameObject *>(_project->findByName("Snake_Hammer"));
_gameObjects[1] = static_cast<CGameObject *>(_project->findByName("Snake_Glass"));
_gameObjects[2] = static_cast<CGameObject *>(_project->findByName("Snake_Head"));
- _animTime = 0.17;
+ _insStartTime = 0.17;
break;
}
}
@@ -212,12 +212,12 @@ void CMusicRoomInstrument::update(int val) {
case 60:
_gameObjects[0]->playMovie(0, 512, MOVIE_STOP_PREVIOUS);
_gameObjects[0]->movieSetPlaying(true);
- _animTime = 0.6;
+ _insStartTime = 0.6;
break;
case 62:
_gameObjects[0]->playMovie(828, 1023, MOVIE_STOP_PREVIOUS);
- _animTime = 0.3;
+ _insStartTime = 0.3;
break;
case 63:
diff --git a/engines/titanic/sound/music_room_instrument.h b/engines/titanic/sound/music_room_instrument.h
index d859fe2a0e..ae9536b370 100644
--- a/engines/titanic/sound/music_room_instrument.h
+++ b/engines/titanic/sound/music_room_instrument.h
@@ -73,7 +73,7 @@ private:
*/
void setupArray(int minVal, int maxVal);
public:
- double _animTime;
+ double _insStartTime;
public:
/**
* Handles initialization of static fields
diff --git a/engines/titanic/sound/node_auto_sound_player.cpp b/engines/titanic/sound/node_auto_sound_player.cpp
index 40b3d2ea39..60a93d6b69 100644
--- a/engines/titanic/sound/node_auto_sound_player.cpp
+++ b/engines/titanic/sound/node_auto_sound_player.cpp
@@ -53,7 +53,7 @@ bool CNodeAutoSoundPlayer::EnterNodeMsg(CEnterNodeMsg *msg) {
if (_enabled) {
CChangeMusicMsg changeMsg;
- changeMsg._flags = 1;
+ changeMsg._action = MUSIC_STOP;
changeMsg.execute(room, CAutoMusicPlayer::_type,
MSGFLAG_CLASS_DEF | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
}
@@ -72,7 +72,7 @@ bool CNodeAutoSoundPlayer::LeaveNodeMsg(CLeaveNodeMsg *msg) {
if (_enabled) {
CChangeMusicMsg changeMsg;
- changeMsg._flags = 2;
+ changeMsg._action = MUSIC_START;
changeMsg.execute(room, CAutoMusicPlayer::_type,
MSGFLAG_CLASS_DEF | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
}
diff --git a/engines/titanic/sound/restricted_auto_music_player.cpp b/engines/titanic/sound/restricted_auto_music_player.cpp
index 6b01052ebd..a75a55bb15 100644
--- a/engines/titanic/sound/restricted_auto_music_player.cpp
+++ b/engines/titanic/sound/restricted_auto_music_player.cpp
@@ -58,7 +58,7 @@ bool CRestrictedAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) {
CString roomName = msg->_oldRoom->getName();
if (!_oldRoomName.compareToIgnoreCase(roomName)) {
- _isRepeated = true;
+ _isEnabled = true;
return false;
} else {
return CAutoMusicPlayer::EnterRoomMsg(msg);
@@ -69,7 +69,7 @@ bool CRestrictedAutoMusicPlayer::LeaveRoomMsg(CLeaveRoomMsg *msg) {
CString roomName = msg->_newRoom->getName();
if (petCheckNode(_newNodeName) || !_newRoomName.compareToIgnoreCase(roomName)) {
- _isRepeated = false;
+ _isEnabled = false;
return true;
} else {
return CAutoMusicPlayer::LeaveRoomMsg(msg);
diff --git a/engines/titanic/sound/seasonal_music_player.cpp b/engines/titanic/sound/seasonal_music_player.cpp
index 637a0020ba..92603773ea 100644
--- a/engines/titanic/sound/seasonal_music_player.cpp
+++ b/engines/titanic/sound/seasonal_music_player.cpp
@@ -90,44 +90,44 @@ bool CSeasonalMusicPlayer::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
bool CSeasonalMusicPlayer::ArboretumGateMsg(CArboretumGateMsg *msg) {
CChangeMusicMsg changeMsg;
- changeMsg._flags = msg->_value ? 2 : 1;
+ changeMsg._action = msg->_value ? MUSIC_START : MUSIC_STOP;
changeMsg.execute(this);
return true;
}
bool CSeasonalMusicPlayer::ChangeMusicMsg(CChangeMusicMsg *msg) {
- if (_isRepeated && msg->_flags == 1) {
- _isRepeated = false;
- stopGlobalSound(_transition, -1);
+ if (_isEnabled && msg->_action == MUSIC_STOP) {
+ _isEnabled = false;
+ stopAmbientSound(_transition, -1);
}
if (!msg->_filename.empty()) {
if (_isSummer) {
- setGlobalSoundVolume(VOL_MUTE, 2, 0);
- setGlobalSoundVolume(VOL_QUIET, 2, 1);
+ setAmbientSoundVolume(VOL_MUTE, 2, 0);
+ setAmbientSoundVolume(VOL_QUIET, 2, 1);
} else if (_isAutumn) {
- setGlobalSoundVolume(VOL_MUTE, 2, 1);
- setGlobalSoundVolume(VOL_QUIET, 2, 2);
+ setAmbientSoundVolume(VOL_MUTE, 2, 1);
+ setAmbientSoundVolume(VOL_QUIET, 2, 2);
} else if (_isWinter) {
- setGlobalSoundVolume(VOL_MUTE, 2, 2);
- setGlobalSoundVolume(VOL_QUIET, 2, 3);
+ setAmbientSoundVolume(VOL_MUTE, 2, 2);
+ setAmbientSoundVolume(VOL_QUIET, 2, 3);
} else if (_isSpring) {
- setGlobalSoundVolume(VOL_MUTE, 2, 3);
- setGlobalSoundVolume(VOL_QUIET, 2, 0);
+ setAmbientSoundVolume(VOL_MUTE, 2, 3);
+ setAmbientSoundVolume(VOL_QUIET, 2, 0);
}
}
- if (!_isRepeated && msg->_flags == 2) {
- _isRepeated = true;
+ if (!_isEnabled && msg->_action == MUSIC_START) {
+ _isEnabled = true;
loadSound(TRANSLATE("c#64.wav", "c#47.wav"));
loadSound(TRANSLATE("c#63.wav", "c#46.wav"));
loadSound(TRANSLATE("c#65.wav", "c#48.wav"));
loadSound(TRANSLATE("c#62.wav", "c#47.wav"));
- playGlobalSound(TRANSLATE("c#64.wav", "c#47.wav"), _springMode, _isSpring, true, 0);
- playGlobalSound(TRANSLATE("c#63.wav", "c#46.wav"), _summerMode, _isSummer, true, 1);
- playGlobalSound(TRANSLATE("c#65.wav", "c#48.wav"), _autumnMode, _isAutumn, true, 2);
- playGlobalSound(TRANSLATE("c#62.wav", "c#47.wav"), _winterMode, _isWinter, true, 3);
+ playAmbientSound(TRANSLATE("c#64.wav", "c#47.wav"), _springMode, _isSpring, true, 0);
+ playAmbientSound(TRANSLATE("c#63.wav", "c#46.wav"), _summerMode, _isSummer, true, 1);
+ playAmbientSound(TRANSLATE("c#65.wav", "c#48.wav"), _autumnMode, _isAutumn, true, 2);
+ playAmbientSound(TRANSLATE("c#62.wav", "c#47.wav"), _winterMode, _isWinter, true, 3);
}
return true;
diff --git a/engines/titanic/sound/titania_speech.cpp b/engines/titanic/sound/titania_speech.cpp
index 30446fd992..b227c396fc 100644
--- a/engines/titanic/sound/titania_speech.cpp
+++ b/engines/titanic/sound/titania_speech.cpp
@@ -60,9 +60,14 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
case 1:
loadSound(TRANSLATE("a#12.wav", "a#0.wav"));
sleep(1000);
- playMovie(0, 187, MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
- movieSetPlaying(true);
- movieEvent(0);
+ playMovie(TRANSLATE(0, 584), TRANSLATE(187, 761),
+ MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
+ if (g_language == Common::EN_ANY) {
+ movieSetPlaying(true);
+ movieEvent(0);
+ } else {
+ playSound("a#0.wav", prox);
+ }
break;
case 2:
@@ -73,14 +78,14 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
addTimer(12000);
addTimer(18000);
addTimer(24000);
- startAnimTimer("NextPara", 30000);
+ startAnimTimer("NextPara", TRANSLATE(30000, 33000));
break;
case 3:
visibleMsg._visible = false;
visibleMsg.execute("TitaniaStillControl");
loadSound(TRANSLATE("a#10.wav", "a#2.wav"));
- playMovie(585, 706, MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
+ playMovie(585, TRANSLATE(706, 748), MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
playSound(TRANSLATE("a#10.wav", "a#2.wav"), prox);
break;
@@ -96,7 +101,7 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
visibleMsg._visible = false;
visibleMsg.execute("TitaniaStillControl");
loadSound(TRANSLATE("a#8.wav", "a#1.wav"));
- playMovie(906, 938, MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
+ playMovie(906, TRANSLATE(938, 943), MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
playSound(TRANSLATE("a#8.wav", "a#1.wav"), prox);
break;
diff --git a/engines/titanic/sound/trigger_auto_music_player.cpp b/engines/titanic/sound/trigger_auto_music_player.cpp
index a332570aba..15f1c9f850 100644
--- a/engines/titanic/sound/trigger_auto_music_player.cpp
+++ b/engines/titanic/sound/trigger_auto_music_player.cpp
@@ -47,11 +47,11 @@ bool CTriggerAutoMusicPlayer::TriggerAutoMusicPlayerMsg(CTriggerAutoMusicPlayerM
CRoomItem *room2 = msg->_value == 2 ? locateRoom(_roomName) : findRoom();
CChangeMusicMsg changeMsg;
- changeMsg._flags = 1;
+ changeMsg._action = MUSIC_STOP;
changeMsg.execute(room1, CAutoMusicPlayer::_type,
MSGFLAG_CLASS_DEF | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
- changeMsg._flags = 2;
+ changeMsg._action = MUSIC_START;
changeMsg.execute(room2, CAutoMusicPlayer::_type,
MSGFLAG_CLASS_DEF | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
diff --git a/engines/titanic/sound/view_auto_sound_player.cpp b/engines/titanic/sound/view_auto_sound_player.cpp
index 55501fe340..3937a82ad7 100644
--- a/engines/titanic/sound/view_auto_sound_player.cpp
+++ b/engines/titanic/sound/view_auto_sound_player.cpp
@@ -53,7 +53,7 @@ bool CViewAutoSoundPlayer::EnterViewMsg(CEnterViewMsg *msg) {
if (_enabled) {
CChangeMusicMsg changeMsg;
- changeMsg._flags = 1;
+ changeMsg._action = MUSIC_STOP;
changeMsg.execute(room, CAutoMusicPlayer::_type,
MSGFLAG_CLASS_DEF |MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
}
@@ -72,7 +72,7 @@ bool CViewAutoSoundPlayer::LeaveViewMsg(CLeaveViewMsg *msg) {
if (_enabled) {
CChangeMusicMsg changeMsg;
- changeMsg._flags = 2;
+ changeMsg._action = MUSIC_START;
changeMsg.execute(room, CAutoMusicPlayer::_type,
MSGFLAG_CLASS_DEF | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
}
diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp
index ae633a2149..c2a66cfdcb 100644
--- a/engines/titanic/sound/wave_file.cpp
+++ b/engines/titanic/sound/wave_file.cpp
@@ -52,7 +52,7 @@ int AudioBufferStream::readBuffer(int16 *buffer, const int numSamples) {
}
bool AudioBufferStream::endOfData() const {
- return _audioBuffer->_finished;
+ return _audioBuffer->isFinished();
}
/*------------------------------------------------------------------------*/
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 4b60921e31..3b22a4fee2 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -29,6 +29,7 @@
#include "graphics/pixelformat.h"
#include "graphics/screen.h"
#include "video/avi_decoder.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -57,7 +58,7 @@ AVISurface::AVISurface(const CResourceKey &key) : _movieName(key.getString()) {
_decoder = new AVIDecoder();
// Load the video into it
- if (_movieName == "y222.avi") {
+ if (_movieName == TRANSLATE("y222.avi", "y237.avi")) {
// The y222.avi is the bells animation for the music room.
// It needs on the fly fixing for the video header
_decoder->loadStream(new y222());
@@ -489,6 +490,11 @@ bool AVISurface::playCutscene(const Rect &r, uint startFrame, uint endFrame) {
if (g_vm->shouldQuit())
return false;
+ // TODO: Fixes slight "jumping back" when rotating in place in Top Of Well
+ // balcony between two elevators. Need a more generalized fix at some point
+ if (_movieName == "z48.avi")
+ _currentFrame = -1;
+
if (_currentFrame != ((int)startFrame - 1) || startFrame == 0) {
// Start video playback at the desired starting frame
if (startFrame > 0) {
@@ -547,7 +553,7 @@ uint AVISurface::getBitDepth() const {
y222::y222() {
_innerStream = new File();
- _innerStream->open("y222.avi");
+ _innerStream->open(TRANSLATE("y222.avi", "y237.avi"));
}
y222::~y222() {
diff --git a/engines/titanic/support/direct_draw.cpp b/engines/titanic/support/direct_draw.cpp
index 9559480a3b..4fd34f9791 100644
--- a/engines/titanic/support/direct_draw.cpp
+++ b/engines/titanic/support/direct_draw.cpp
@@ -40,7 +40,7 @@ void DirectDraw::setDisplayMode(int width, int height, int bpp, int refreshRate)
assert(bpp == 16);
Graphics::PixelFormat pixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
- initGraphics(width, height, true, &pixelFormat);
+ initGraphics(width, height, &pixelFormat);
}
void DirectDraw::diagnostics() {
diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp
index fbfb7e0f61..9a07b68e35 100644
--- a/engines/titanic/support/files_manager.cpp
+++ b/engines/titanic/support/files_manager.cpp
@@ -50,7 +50,7 @@ bool CFilesManager::loadResourceIndex() {
return false;
}
- if (_version != 3) {
+ if (_version != 5) {
g_vm->GUIError("titanic.dat is out of date");
return false;
}
diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp
index 1c5e0da487..21b425834e 100644
--- a/engines/titanic/support/mouse_cursor.cpp
+++ b/engines/titanic/support/mouse_cursor.cpp
@@ -54,8 +54,7 @@ static const int CURSOR_DATA[NUM_CURSORS][4] = {
};
CMouseCursor::CursorEntry::~CursorEntry() {
- delete _videoSurface;
- delete _transSurface;
+ delete _surface;
}
CMouseCursor::CMouseCursor(CScreenManager *screenManager) :
@@ -80,15 +79,33 @@ void CMouseCursor::loadCursorImages() {
// Create the surface
CVideoSurface *surface = _screenManager->createSurface(CURSOR_SIZE, CURSOR_SIZE);
- _cursors[idx]._videoSurface = surface;
// Open the cursors video and move to the given frame
- OSMovie movie(key, surface);
- movie.setFrame(idx);
+ OSMovie *movie = new OSMovie(key, surface);
+ movie->setFrame(idx);
+ Graphics::ManagedSurface *transSurface = movie->duplicateTransparency();
- Graphics::ManagedSurface *transSurface = movie.duplicateTransparency();
- _cursors[idx]._transSurface = transSurface;
- surface->setTransparencySurface(transSurface);
+ // Create a managed surface to hold the RGBA version of the cursor
+ Graphics::PixelFormat rgbaFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
+ _cursors[idx]._surface = new Graphics::ManagedSurface(CURSOR_SIZE, CURSOR_SIZE, rgbaFormat);
+
+ // Copy the cursor from the movie's video surface
+ surface->lock();
+ _cursors[idx]._surface->blitFrom(*surface->getRawSurface());
+ surface->unlock();
+
+ // We need to separately merge in the transparency surface
+ for (int y = 0; y < CURSOR_SIZE; ++y) {
+ const byte *srcP = (const byte *)transSurface->getBasePtr(0, y);
+ uint32 *destP = (uint32 *)_cursors[idx]._surface->getBasePtr(0, y);
+
+ for (int x = 0; x < CURSOR_SIZE; ++x, ++srcP, ++destP)
+ *destP = (*destP & ~0xff) | *srcP;
+ }
+
+ delete movie;
+ delete transSurface;
+ delete surface;
}
}
@@ -131,35 +148,12 @@ void CMouseCursor::setCursor(CursorId cursorId) {
++_setCursorCount;
if (cursorId != _cursorId && _busyCount == 0) {
- // The original cursors supported partial alpha when rendering the cursor.
- // Since we're using the ScummVM CursorMan, we can't do that, so we need
- // to build up a surface of the cursor with even partially transparent
- // pixels as wholy transparent
- CursorEntry &ce = _cursors[cursorId - 1];
- CVideoSurface &srcSurface = *ce._videoSurface;
- srcSurface.lock();
-
- Graphics::ManagedSurface surface(CURSOR_SIZE, CURSOR_SIZE, g_system->getScreenFormat());
- const uint16 *srcP = srcSurface.getPixels();
- CTransparencySurface transSurface(&ce._transSurface->rawSurface(), TRANS_ALPHA0);
- uint16 *destP = (uint16 *)surface.getPixels();
-
- for (int y = 0; y < CURSOR_SIZE; ++y) {
- transSurface.setRow(y);
- transSurface.setCol(0);
-
- for (int x = 0; x < CURSOR_SIZE; ++x, ++srcP, ++destP) {
- *destP = transSurface.isPixelTransparent() ? srcSurface.getTransparencyColor() : *srcP;
- transSurface.moveX();
- }
- }
-
- srcSurface.unlock();
+ const CursorEntry &ce = _cursors[cursorId - 1];
+ _cursorId = cursorId;
// Set the cursor
- _cursorId = cursorId;
- CursorMan.replaceCursor(surface.getPixels(), CURSOR_SIZE, CURSOR_SIZE,
- ce._centroid.x, ce._centroid.y, srcSurface.getTransparencyColor(), false, &g_vm->_screen->format);
+ CursorMan.replaceCursor(ce._surface->getPixels(), CURSOR_SIZE, CURSOR_SIZE,
+ ce._centroid.x, ce._centroid.y, 0, false, &ce._surface->format);
}
}
diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h
index aff3bacbc1..efcb1f8ead 100644
--- a/engines/titanic/support/mouse_cursor.h
+++ b/engines/titanic/support/mouse_cursor.h
@@ -54,11 +54,10 @@ class CVideoSurface;
class CMouseCursor {
struct CursorEntry {
- CVideoSurface *_videoSurface;
- Graphics::ManagedSurface *_transSurface;
+ Graphics::ManagedSurface *_surface;
Common::Point _centroid;
- CursorEntry() : _videoSurface(nullptr), _transSurface(nullptr) {}
+ CursorEntry() : _surface(nullptr) {}
~CursorEntry();
};
private:
diff --git a/engines/titanic/support/strings.h b/engines/titanic/support/strings.h
index b7a775cc99..0fa807d85f 100644
--- a/engines/titanic/support/strings.h
+++ b/engines/titanic/support/strings.h
@@ -168,6 +168,10 @@ enum StringId {
PREVIOUSLY_ASSIGNED_ROOM,
SAVED_CHEVRON,
CURRENT_LOCATION,
+ ELEVATOR_NUM,
+ FLOOR_NUM,
+ ROOM_NUM,
+ SHIFT_CLICK_TO_EDIT,
A_HOT,
A_COLD,
LOAD_THE_GAME,
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp
index 430330a35a..241976f9cf 100644
--- a/engines/titanic/true_talk/barbot_script.cpp
+++ b/engines/titanic/true_talk/barbot_script.cpp
@@ -872,8 +872,8 @@ ScriptChangedResult BarbotScript::scriptChanged(const TTroomScript *roomScript,
}
int BarbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder) {
- switch (tagId) {
+ uint tag1, uint tag2, uint remainder) {
+ switch (tag2) {
case MKTAG('A', 'D', 'V', 'T'):
case MKTAG('A', 'R', 'T', 'I'):
case MKTAG('A', 'R', 'T', 'Y'):
@@ -894,7 +894,7 @@ int BarbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *
case MKTAG('T', 'E', 'A', 'M'):
case MKTAG('T', 'U', 'S', 'H'):
case MKTAG('W', 'W', 'E', 'B'):
- tagId = MKTAG('E', 'N', 'T', 'N');
+ tag2 = MKTAG('E', 'N', 'T', 'N');
break;
case MKTAG('A', 'U', 'T', 'H'):
case MKTAG('B', 'A', 'R', 'K'):
@@ -923,61 +923,61 @@ int BarbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *
case MKTAG('T', 'D', 'V', 'P'):
case MKTAG('T', 'W', 'A', 'T'):
case MKTAG('W', 'E', 'A', 'T'):
- tagId = MKTAG('P', 'R', 'S', 'N');
+ tag2 = MKTAG('P', 'R', 'S', 'N');
break;
case MKTAG('C', 'H', 'S', 'E'):
case MKTAG('C', 'M', 'N', 'T'):
case MKTAG('F', 'I', 'L', 'M'):
case MKTAG('J', 'F', 'O', 'D'):
case MKTAG('L', 'I', 'Q', 'D'):
- tagId = MKTAG('F', 'O', 'O', 'D');
+ tag2 = MKTAG('F', 'O', 'O', 'D');
break;
case MKTAG('C', 'R', 'M', 'N'):
case MKTAG('C', 'S', 'P', 'Y'):
case MKTAG('U', 'B', 'A', 'D'):
- tagId = MKTAG('V', 'B', 'A', 'D');
+ tag2 = MKTAG('V', 'B', 'A', 'D');
break;
case MKTAG('E', 'A', 'R', 'T'):
case MKTAG('H', 'O', 'M', 'E'):
case MKTAG('N', 'P', 'L', 'C'):
case MKTAG('P', 'L', 'A', 'C'):
case MKTAG('P', 'L', 'A', 'N'):
- tagId = MKTAG('P', 'L', 'A', 'C');
+ tag2 = MKTAG('P', 'L', 'A', 'C');
break;
case MKTAG('F', 'A', 'U', 'N'):
case MKTAG('F', 'I', 'S', 'H'):
case MKTAG('F', 'L', 'O', 'R'):
- tagId = MKTAG('N', 'A', 'T', 'R');
+ tag2 = MKTAG('N', 'A', 'T', 'R');
break;
case MKTAG('H', 'H', 'L', 'D'):
case MKTAG('T', 'O', 'Y', 'S'):
case MKTAG('W', 'E', 'A', 'P'):
- tagId = MKTAG('M', 'A', 'C', 'H');
+ tag2 = MKTAG('M', 'A', 'C', 'H');
break;
case MKTAG('M', 'L', 'T', 'Y'):
case MKTAG('P', 'G', 'R', 'P'):
case MKTAG('P', 'T', 'I', 'C'):
- tagId = MKTAG('G', 'R', 'U', 'P');
+ tag2 = MKTAG('G', 'R', 'U', 'P');
break;
case MKTAG('P', 'K', 'U', 'P'):
case MKTAG('S', 'E', 'X', '1'):
case MKTAG('S', 'W', 'E', 'R'):
- tagId = MKTAG('R', 'U', 'D', 'E');
+ tag2 = MKTAG('R', 'U', 'D', 'E');
break;
case MKTAG('P', 'H', 'I', 'L'):
case MKTAG('R', 'C', 'K', 'T'):
case MKTAG('S', 'C', 'I', 'E'):
- tagId = MKTAG('S', 'C', 'I', 'E');
+ tag2 = MKTAG('S', 'C', 'I', 'E');
break;
case MKTAG('T', 'R', 'A', '2'):
case MKTAG('T', 'R', 'A', '3'):
- tagId = MKTAG('T', 'R', 'A', 'V');
+ tag2 = MKTAG('T', 'R', 'A', 'V');
break;
default:
break;
}
- if (val == 36) {
+ if (tag1 == 36) {
switch (getValue(1)) {
case 1:
return setResponse(getDialogueId(220837), -1);
@@ -987,11 +987,11 @@ int BarbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *
default:
return setResponse(getDialogueId(220858), -1);
}
- } else if (val == 61 && getValue(1) > 2) {
+ } else if (tag1 == 61 && getValue(1) > 2) {
return setResponse(getDialogueId(222301), -1);
}
- return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder);
+ return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
}
int BarbotScript::updateState(uint oldId, uint newId, int index) {
@@ -1049,124 +1049,136 @@ uint BarbotScript::getDialsBitset() const {
int BarbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) {
uint id = 0;
- if (val1 > 0x200) {
- switch (val1 - 0x201) {
- case 0:
- if (getValue(4) != 2)
- id = 250738;
- break;
- case 1:
- if (getValue(4) != 3)
- id = 250738;
- break;
- case 2:
- if (getValue(4) != 0)
- id = 250738;
- break;
- default:
- break;
- }
- } else if (val1 == 0x200) {
- if (getValue(4) != 1)
- id = 250738;
- } else {
- switch (val1) {
- case 2:
- if (getValue(1) != 1)
- return 1;
- break;
- case 3:
- if (getValue(1) != 2)
- return 1;
- break;
- case 4:
- if (getValue(1) != 3)
- return 1;
- break;
- case 5:
- if (getValue(1) == 3)
- return 1;
- break;
- case 6:
- if (sentence->contains("do not") || sentence->contains("have no") ||
- sentence->contains("got no"))
- return 1;
- break;
- case 7:
- if (!sentence->contains("do not") && !sentence->contains("have no") &&
- !sentence->contains("got no"))
- return 1;
- break;
- case 8:
- if (sentence->_field38 == 2)
- return 1;
- break;
- case 9: {
- uint val = CTrueTalkManager::getStateValue(3);
- bool lemonFlag = (val & 1) != 0;
- bool puretFlag = (val & 4) != 0;
- bool tvFlag = (val & 8) != 0;
-
- if (puretFlag) {
- if (!lemonFlag) {
- id = tvFlag ? 50369 : 250085;
- break;
- } else if (!tvFlag) {
- id = 250627;
- }
- } else {
- if (lemonFlag) {
- id = tvFlag ? 50367 : 50365;
- } else if (tvFlag) {
- id = 50370;
- }
- }
- break;
- }
+ int index = val1;
+ if (g_language == Common::DE_DEU && !(val1 >= 512 && val1 <= 515))
+ index -= 1000;
- case 10: {
- uint val = CTrueTalkManager::getStateValue(3);
- bool lemonFlag = (val & 1) != 0;
- bool puretFlag = (val & 4) != 0;
- bool tvFlag = (val & 8) != 0;
+ switch (index) {
+ case 2:
+ if (getValue(1) != 1)
+ return 1;
+ break;
- if (lemonFlag && puretFlag && tvFlag) {
- addResponse(getDialogueId(251027));
- applyResponse();
- CTrueTalkManager::triggerAction(7, 0);
- return 2;
- } else {
- if (getDialRegion(1) == 1) {
- if (*srcIdP != 251650)
- id = 251651;
- } else {
- addResponse(getDialRegion(0) != 0 ? 51444 : 51530);
- applyResponse();
- return 2;
- }
+ case 3:
+ if (getValue(1) != 2)
+ return 1;
+ break;
+
+ case 4:
+ if (getValue(1) != 3)
+ return 1;
+ break;
+
+ case 5:
+ if (getValue(1) == 3)
+ return 1;
+ break;
+
+ case 6:
+ if (sentence->contains("do not") || sentence->contains("have no") ||
+ sentence->contains("got no"))
+ return 1;
+ break;
+
+ case 7:
+ if (!sentence->contains(TRANSLATE("do not", "idem")) && !sentence->contains(TRANSLATE("have no", "habe kein")) &&
+ !sentence->contains("got no"))
+ return 1;
+ break;
+
+ case 8:
+ if (sentence->_field38 == 2)
+ return 1;
+ break;
+
+ case 9: {
+ uint val = CTrueTalkManager::getStateValue(3);
+ bool lemonFlag = (val & 1) != 0;
+ bool puretFlag = (val & 4) != 0;
+ bool tvFlag = (val & 8) != 0;
+
+ if (puretFlag) {
+ if (!lemonFlag) {
+ id = tvFlag ? 50369 : 250085;
+ break;
+ } else if (!tvFlag) {
+ id = 250627;
+ }
+ } else {
+ if (lemonFlag) {
+ id = tvFlag ? 50367 : 50365;
+ } else if (tvFlag) {
+ id = 50370;
}
- break;
}
+ break;
+ }
- case 11:
- if (CTrueTalkManager::getStateValue(2) != 0) {
- CTrueTalkManager::triggerAction(6, 0);
- id = 251003;
- }
- break;
+ case 10: {
+ uint val = CTrueTalkManager::getStateValue(3);
+ bool lemonFlag = (val & 1) != 0;
+ bool puretFlag = (val & 4) != 0;
+ bool tvFlag = (val & 8) != 0;
- case 12:
- if (getDialRegion(1) == 0) {
- addResponse(getDialogueId(251871));
+ if (lemonFlag && puretFlag && tvFlag) {
+ addResponse(getDialogueId(251027));
+ applyResponse();
+ CTrueTalkManager::triggerAction(7, 0);
+ return 2;
+ } else {
+ if (getDialRegion(1) == 1) {
+ if (*srcIdP != 251650)
+ id = 251651;
+ } else {
+ addResponse(getDialRegion(0) != 0 ? 51444 : 51530);
applyResponse();
return 2;
- } else if (getRandomNumber(100) > 25 && addRandomResponse(false)) {
- return 2;
}
+ }
+ break;
+ }
- default:
- break;
+ case 11:
+ if (CTrueTalkManager::getStateValue(2) != 0) {
+ CTrueTalkManager::triggerAction(6, 0);
+ id = 251003;
}
+ break;
+
+ case 12:
+ if (getDialRegion(1) == 0) {
+ addResponse(getDialogueId(251871));
+ applyResponse();
+ return 2;
+ } else if (getRandomNumber(100) > 25 && addRandomResponse(false)) {
+ return 2;
+ }
+ break;
+
+ case 512:
+ if (getValue(4) != 1)
+ id = 250738;
+ break;
+
+ case 513:
+ if (getValue(4) != 2)
+ id = 250738;
+ break;
+
+ case 514:
+ if (getValue(4) != 3)
+ id = 250738;
+ break;
+
+ case 515:
+ if (getValue(4) != 0)
+ id = 250738;
+ break;
+
+ default:
+ if (g_language == Common::DE_DEU)
+ return TTnpcScript::doSentenceEntry(val1, srcIdP, roomScript, sentence);
+ break;
}
if (id) {
diff --git a/engines/titanic/true_talk/barbot_script.h b/engines/titanic/true_talk/barbot_script.h
index a8c92b2927..1aea21f744 100644
--- a/engines/titanic/true_talk/barbot_script.h
+++ b/engines/titanic/true_talk/barbot_script.h
@@ -73,7 +73,12 @@ public:
virtual ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id);
virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder);
+ uint tag1, uint tag2, uint remainder);
+
+ /**
+ * Returns true if the NPC's dial region affects quote responses
+ */
+ virtual bool isQuoteDialled() const { return true; }
/**
* Handles updating NPC state based on specified dialogue Ids and dial positions
diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp
index 84d5c59713..0256b97ef1 100644
--- a/engines/titanic/true_talk/bellbot_script.cpp
+++ b/engines/titanic/true_talk/bellbot_script.cpp
@@ -483,8 +483,8 @@ ScriptChangedResult BellbotScript::scriptChanged(const TTroomScript *roomScript,
}
int BellbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder) {
- switch (tagId) {
+ uint tag1, uint tag2, uint remainder) {
+ switch (tag2) {
case MKTAG('A', 'D', 'V', 'T'):
case MKTAG('A', 'R', 'T', 'I'):
case MKTAG('A', 'R', 'T', 'Y'):
@@ -505,7 +505,7 @@ int BellbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'E', 'A', 'M'):
case MKTAG('T', 'V', 'S', 'H'):
case MKTAG('W', 'W', 'E', 'B'):
- tagId = MKTAG('E', 'N', 'T', 'N');
+ tag2 = MKTAG('E', 'N', 'T', 'N');
break;
case MKTAG('A', 'C', 'T', 'R'):
case MKTAG('A', 'C', 'T', 'S'):
@@ -538,59 +538,59 @@ int BellbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'O', 'U', 'P'):
case MKTAG('T', 'W', 'A', 'T'):
case MKTAG('W', 'E', 'A', 'T'):
- tagId = MKTAG('P', 'R', 'S', 'N');
+ tag2 = MKTAG('P', 'R', 'S', 'N');
break;
case MKTAG('C', 'H', 'S', 'E'):
case MKTAG('C', 'M', 'N', 't'):
case MKTAG('F', 'I', 'L', 'M'):
case MKTAG('J', 'F', 'O', 'D'):
case MKTAG('L', 'I', 'Q', 'D'):
- tagId = MKTAG('F', 'O', 'O', 'D');
+ tag2 = MKTAG('F', 'O', 'O', 'D');
break;
case MKTAG('C', 'R', 'I', 'M'):
case MKTAG('C', 'S', 'P', 'Y'):
case MKTAG('D', 'R', 'U', 'G'):
- tagId = MKTAG('V', 'B', 'A', 'D');
+ tag2 = MKTAG('V', 'B', 'A', 'D');
break;
case MKTAG('E', 'A', 'R', 'T'):
case MKTAG('H', 'O', 'M', 'E'):
case MKTAG('N', 'P', 'L', 'C'):
case MKTAG('P', 'L', 'A', 'N'):
- tagId = MKTAG('P', 'L', 'A', 'C');
+ tag2 = MKTAG('P', 'L', 'A', 'C');
break;
case MKTAG('F', 'A', 'U', 'N'):
case MKTAG('F', 'I', 'S', 'H'):
case MKTAG('F', 'L', 'O', 'R'):
- tagId = MKTAG('N', 'A', 'T', 'R');
+ tag2 = MKTAG('N', 'A', 'T', 'R');
break;
case MKTAG('H', 'H', 'L', 'D'):
case MKTAG('T', 'O', 'Y', 'S'):
case MKTAG('W', 'E', 'A', 'P'):
- tagId = MKTAG('M', 'A', 'C', 'H');
+ tag2 = MKTAG('M', 'A', 'C', 'H');
break;
case MKTAG('M', 'L', 'T', 'Y'):
case MKTAG('P', 'G', 'R', 'P'):
case MKTAG('P', 'T', 'I', 'C'):
- tagId = MKTAG('G', 'R', 'U', 'P');
+ tag2 = MKTAG('G', 'R', 'U', 'P');
break;
case MKTAG('P', 'K', 'U', 'P'):
case MKTAG('S', 'E', 'X', '1'):
case MKTAG('S', 'W', 'E', 'R'):
- tagId = MKTAG('R', 'U', 'D', 'E');
+ tag2 = MKTAG('R', 'U', 'D', 'E');
break;
case MKTAG('P', 'H', 'I', 'L'):
case MKTAG('R', 'C', 'K', 'T'):
- tagId = MKTAG('S', 'C', 'I', 'E');
+ tag2 = MKTAG('S', 'C', 'I', 'E');
break;
case MKTAG('T', 'R', 'A', '2'):
case MKTAG('T', 'R', 'A', '3'):
- tagId = MKTAG('T', 'R', 'A', 'V');
+ tag2 = MKTAG('T', 'R', 'A', 'V');
break;
default:
break;
}
- return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder);
+ return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
}
int BellbotScript::updateState(uint oldId, uint newId, int index) {
@@ -847,13 +847,11 @@ int BellbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri
if (flag) {
CTrueTalkManager::triggerAction(29, 1);
selectResponse(201771);
- }
- else {
+ } else {
CTrueTalkManager::triggerAction(29, 2);
selectResponse(201554);
}
- }
- else {
+ } else {
selectResponse(21378);
}
diff --git a/engines/titanic/true_talk/bellbot_script.h b/engines/titanic/true_talk/bellbot_script.h
index 7edb182301..17f22ac241 100644
--- a/engines/titanic/true_talk/bellbot_script.h
+++ b/engines/titanic/true_talk/bellbot_script.h
@@ -98,7 +98,7 @@ public:
virtual ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id);
virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder);
+ uint tag1, uint tag2, uint remainder);
/**
* Handles updating NPC state based on specified dialogue Ids and dial positions
diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp
index f45b1b1358..3988002f07 100644
--- a/engines/titanic/true_talk/deskbot_script.cpp
+++ b/engines/titanic/true_talk/deskbot_script.cpp
@@ -181,8 +181,8 @@ ScriptChangedResult DeskbotScript::scriptChanged(const TTroomScript *roomScript,
}
int DeskbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder) {
- switch (tagId) {
+ uint tag1, uint tag2, uint remainder) {
+ switch (tag2) {
case MKTAG('A', 'D', 'V', 'T'):
case MKTAG('A', 'R', 'T', 'I'):
case MKTAG('A', 'R', 'T', 'Y'):
@@ -202,7 +202,7 @@ int DeskbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('S', 'P', 'R', 'T'):
case MKTAG('T', 'E', 'A', 'M'):
case MKTAG('T', 'V', 'S', 'H'):
- tagId = MKTAG('E', 'N', 'T', 'N');
+ tag2 = MKTAG('E', 'N', 'T', 'N');
break;
case MKTAG('A', 'C', 'T', 'R'):
case MKTAG('A', 'C', 'T', 'S'):
@@ -238,60 +238,59 @@ int DeskbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'W', 'A', 'T'):
case MKTAG('W', 'E', 'A', 'T'):
case MKTAG('W', 'W', 'E', 'B'):
- tagId = MKTAG('P', 'R', 'S', 'N');
+ tag2 = MKTAG('P', 'R', 'S', 'N');
break;
case MKTAG('C', 'H', 'S', 'E'):
case MKTAG('C', 'M', 'N', 'T'):
case MKTAG('F', 'I', 'L', 'M'):
case MKTAG('J', 'F', 'O', 'D'):
case MKTAG('L', 'I', 'Q', 'D'):
- tagId = MKTAG('F', 'O', 'O', 'D');
+ tag2 = MKTAG('F', 'O', 'O', 'D');
break;
case MKTAG('C', 'R', 'I', 'M'):
case MKTAG('C', 'S', 'P', 'Y'):
case MKTAG('D', 'R', 'U', 'G'):
- tagId = MKTAG('V', 'B', 'A', 'D');
+ tag2 = MKTAG('V', 'B', 'A', 'D');
break;
case MKTAG('E', 'A', 'R', 'T'):
case MKTAG('H', 'O', 'M', 'E'):
case MKTAG('N', 'P', 'L', 'C'):
case MKTAG('P', 'L', 'A', 'N'):
- tagId = MKTAG('P', 'L', 'A', 'C');
+ tag2 = MKTAG('P', 'L', 'A', 'C');
break;
case MKTAG('F', 'A', 'U', 'N'):
case MKTAG('F', 'I', 'S', 'H'):
case MKTAG('F', 'L', 'O', 'R'):
- tagId = MKTAG('N', 'A', 'T', 'R');
+ tag2 = MKTAG('N', 'A', 'T', 'R');
break;
case MKTAG('H', 'H', 'L', 'D'):
case MKTAG('T', 'O', 'Y', 'S'):
case MKTAG('W', 'E', 'A', 'P'):
- tagId = MKTAG('M', 'A', 'C', 'H');
+ tag2 = MKTAG('M', 'A', 'C', 'H');
break;
case MKTAG('M', 'L', 'T', 'Y'):
case MKTAG('P', 'G', 'R', 'P'):
case MKTAG('P', 'T', 'I', 'C'):
- tagId = MKTAG('G', 'R', 'U', 'P');
+ tag2 = MKTAG('G', 'R', 'U', 'P');
break;
case MKTAG('P', 'K', 'U', 'P'):
case MKTAG('S', 'E', 'X', '1'):
case MKTAG('S', 'W', 'E', 'R'):
- tagId = MKTAG('R', 'U', 'D', 'E');
+ tag2 = MKTAG('R', 'U', 'D', 'E');
break;
case MKTAG('P', 'H', 'I', 'L'):
case MKTAG('R', 'C', 'K', 'T'):
- tagId = MKTAG('S', 'C', 'I', 'E');
+ tag2 = MKTAG('S', 'C', 'I', 'E');
break;
case MKTAG('T', 'R', 'A', '2'):
case MKTAG('T', 'R', 'A', '3'):
- tagId = MKTAG('T', 'R', 'A', 'V');
+ tag2 = MKTAG('T', 'R', 'A', 'V');
break;
default:
break;
}
- return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder);
-
+ return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
}
int DeskbotScript::updateState(uint oldId, uint newId, int index) {
@@ -396,9 +395,11 @@ int DeskbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri
case 1:
id = 240336;
break;
+
case 2:
- addAssignedRoom();
+ id = addAssignedRoomDialogue();
break;
+
case 3:
if (id == 240431 || id == 240432) {
if (getValue(3) == 1) {
@@ -410,9 +411,14 @@ int DeskbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri
}
}
break;
+
default:
break;
}
+
+ addResponse(getDialogueId(id));
+ applyResponse();
+ return 2;
} else {
switch (val1) {
case 1:
@@ -444,15 +450,20 @@ int DeskbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri
case 2:
if (getValue(1) == 1)
- return true;
+ return 1;
+ break;
+
+ case 3:
+ if (getValue(1) != 1)
+ return 1;
break;
default:
break;
}
- }
- return 0;
+ return 0;
+ }
}
bool DeskbotScript::randomResponse(uint index) {
diff --git a/engines/titanic/true_talk/deskbot_script.h b/engines/titanic/true_talk/deskbot_script.h
index 941136d45e..ff07809b08 100644
--- a/engines/titanic/true_talk/deskbot_script.h
+++ b/engines/titanic/true_talk/deskbot_script.h
@@ -104,7 +104,7 @@ public:
virtual ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id);
virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder);
+ uint tag1, uint tag2, uint remainder);
/**
* Handles updating NPC state based on specified dialogue Ids and dial positions
diff --git a/engines/titanic/true_talk/doorbot_script.cpp b/engines/titanic/true_talk/doorbot_script.cpp
index 0e07f2ade8..aa0b533727 100644
--- a/engines/titanic/true_talk/doorbot_script.cpp
+++ b/engines/titanic/true_talk/doorbot_script.cpp
@@ -609,8 +609,8 @@ ScriptChangedResult DoorbotScript::scriptChanged(const TTroomScript *roomScript,
}
int DoorbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder) {
- switch (tagId) {
+ uint tag1, uint tag2, uint remainder) {
+ switch (tag2) {
case MKTAG('A', 'D', 'V', 'T'):
case MKTAG('A', 'R', 'T', 'I'):
case MKTAG('A', 'R', 'T', 'Y'):
@@ -631,7 +631,7 @@ int DoorbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'E', 'A', 'M'):
case MKTAG('T', 'V', 'S', 'H'):
case MKTAG('W', 'W', 'E', 'B'):
- tagId = MKTAG('E', 'N', 'T', 'N');
+ tag2 = MKTAG('E', 'N', 'T', 'N');
break;
case MKTAG('A', 'C', 'T', 'R'):
case MKTAG('A', 'C', 'T', 'S'):
@@ -663,59 +663,59 @@ int DoorbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'D', 'V', 'P'):
case MKTAG('T', 'W', 'A', 'T'):
case MKTAG('W', 'E', 'A', 'T'):
- tagId = MKTAG('P', 'R', 'S', 'N');
+ tag2 = MKTAG('P', 'R', 'S', 'N');
break;
case MKTAG('C', 'H', 'S', 'E'):
case MKTAG('C', 'M', 'N', 'T'):
case MKTAG('F', 'I', 'L', 'M'):
case MKTAG('J', 'F', 'O', 'D'):
case MKTAG('L', 'I', 'Q', 'D'):
- tagId = MKTAG('F', 'O', 'O', 'D');
+ tag2 = MKTAG('F', 'O', 'O', 'D');
break;
case MKTAG('C', 'R', 'I', 'M'):
case MKTAG('C', 'S', 'P', 'Y'):
case MKTAG('D', 'R', 'U', 'G'):
- tagId = MKTAG('V', 'B', 'A', 'D');
+ tag2 = MKTAG('V', 'B', 'A', 'D');
break;
case MKTAG('E', 'A', 'R', 'T'):
case MKTAG('H', 'O', 'M', 'E'):
case MKTAG('N', 'P', 'L', 'C'):
case MKTAG('P', 'L', 'A', 'N'):
- tagId = MKTAG('P', 'L', 'A', 'C');
+ tag2 = MKTAG('P', 'L', 'A', 'C');
break;
case MKTAG('F', 'A', 'U', 'N'):
case MKTAG('F', 'I', 'S', 'H'):
case MKTAG('F', 'L', 'O', 'R'):
- tagId = MKTAG('N', 'A', 'T', 'R');
+ tag2 = MKTAG('N', 'A', 'T', 'R');
break;
case MKTAG('H', 'H', 'L', 'D'):
case MKTAG('T', 'O', 'Y', 'S'):
case MKTAG('W', 'E', 'A', 'P'):
- tagId = MKTAG('M', 'A', 'C', 'H');
+ tag2 = MKTAG('M', 'A', 'C', 'H');
break;
case MKTAG('M', 'L', 'T', 'Y'):
case MKTAG('P', 'G', 'R', 'P'):
case MKTAG('P', 'T', 'I', 'C'):
- tagId = MKTAG('G', 'R', 'U', 'P');
+ tag2 = MKTAG('G', 'R', 'U', 'P');
break;
case MKTAG('P', 'K', 'U', 'P'):
case MKTAG('S', 'E', 'X', '1'):
case MKTAG('S', 'W', 'E', 'R'):
- tagId = MKTAG('R', 'U', 'D', 'E');
+ tag2 = MKTAG('R', 'U', 'D', 'E');
break;
case MKTAG('P', 'H', 'I', 'L'):
case MKTAG('R', 'C', 'K', 'T'):
- tagId = MKTAG('S', 'C', 'I', 'E');
+ tag2 = MKTAG('S', 'C', 'I', 'E');
break;
case MKTAG('T', 'R', 'A', '2'):
case MKTAG('T', 'R', 'A', '3'):
- tagId = MKTAG('T', 'R', 'A', 'V');
+ tag2 = MKTAG('T', 'R', 'A', 'V');
break;
default:
break;
}
- return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder);
+ return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
}
int DoorbotScript::updateState(uint oldId, uint newId, int index) {
diff --git a/engines/titanic/true_talk/doorbot_script.h b/engines/titanic/true_talk/doorbot_script.h
index 536e9d42ca..50d01dfc57 100644
--- a/engines/titanic/true_talk/doorbot_script.h
+++ b/engines/titanic/true_talk/doorbot_script.h
@@ -76,7 +76,12 @@ public:
virtual ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id);
virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder);
+ uint tag1, uint tag2, uint remainder);
+
+ /**
+ * Returns true if the NPC's dial region affects quote responses
+ */
+ virtual bool isQuoteDialled() const { return true; }
/**
* Handles updating NPC state based on specified dialogue Ids and dial positions
diff --git a/engines/titanic/true_talk/liftbot_script.cpp b/engines/titanic/true_talk/liftbot_script.cpp
index 757b640c76..6dfa8d88db 100644
--- a/engines/titanic/true_talk/liftbot_script.cpp
+++ b/engines/titanic/true_talk/liftbot_script.cpp
@@ -215,8 +215,8 @@ ScriptChangedResult LiftbotScript::scriptChanged(const TTroomScript *roomScript,
}
int LiftbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder) {
- switch (tagId) {
+ uint tag1, uint tag2, uint remainder) {
+ switch (tag2) {
case MKTAG('A', 'D', 'V', 'T'):
case MKTAG('A', 'R', 'T', 'I'):
case MKTAG('A', 'R', 'T', 'Y'):
@@ -237,7 +237,7 @@ int LiftbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'E', 'A', 'M'):
case MKTAG('T', 'V', 'S', 'H'):
case MKTAG('W', 'W', 'E', 'B'):
- tagId = MKTAG('E', 'N', 'T', 'N');
+ tag2 = MKTAG('E', 'N', 'T', 'N');
break;
case MKTAG('A', 'C', 'T', 'R'):
case MKTAG('A', 'C', 'T', 'S'):
@@ -272,57 +272,57 @@ int LiftbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'D', 'V', 'P'):
case MKTAG('T', 'W', 'A', 'T'):
case MKTAG('W', 'E', 'A', 'T'):
- tagId = MKTAG('P', 'R', 'S', 'N');
+ tag2 = MKTAG('P', 'R', 'S', 'N');
break;
case MKTAG('C', 'H', 'S', 'E'):
case MKTAG('C', 'M', 'N', 'T'):
case MKTAG('F', 'I', 'L', 'M'):
case MKTAG('J', 'F', 'O', 'D'):
case MKTAG('L', 'I', 'Q', 'D'):
- tagId = MKTAG('F', 'O', 'O', 'D');
+ tag2 = MKTAG('F', 'O', 'O', 'D');
break;
case MKTAG('C', 'R', 'I', 'M'):
case MKTAG('C', 'S', 'P', 'Y'):
case MKTAG('D', 'R', 'U', 'G'):
- tagId = MKTAG('V', 'B', 'A', 'D');
+ tag2 = MKTAG('V', 'B', 'A', 'D');
break;
case MKTAG('E', 'A', 'R', 'T'):
case MKTAG('H', 'O', 'M', 'E'):
case MKTAG('N', 'P', 'L', 'C'):
case MKTAG('P', 'L', 'A', 'N'):
- tagId = MKTAG('P', 'L', 'A', 'C');
+ tag2 = MKTAG('P', 'L', 'A', 'C');
break;
case MKTAG('F', 'A', 'U', 'N'):
case MKTAG('F', 'I', 'S', 'H'):
case MKTAG('F', 'L', 'O', 'R'):
- tagId = MKTAG('N', 'A', 'T', 'R');
+ tag2 = MKTAG('N', 'A', 'T', 'R');
break;
case MKTAG('H', 'H', 'L', 'D'):
case MKTAG('T', 'O', 'Y', 'S'):
case MKTAG('W', 'E', 'A', 'P'):
- tagId = MKTAG('M', 'A', 'C', 'H');
+ tag2 = MKTAG('M', 'A', 'C', 'H');
break;
case MKTAG('M', 'L', 'T', 'Y'):
case MKTAG('P', 'G', 'R', 'P'):
case MKTAG('P', 'T', 'I', 'C'):
- tagId = MKTAG('G', 'R', 'U', 'P');
+ tag2 = MKTAG('G', 'R', 'U', 'P');
break;
case MKTAG('P', 'K', 'U', 'P'):
case MKTAG('S', 'E', 'X', '1'):
case MKTAG('S', 'W', 'E', 'R'):
- tagId = MKTAG('R', 'U', 'D', 'E');
+ tag2 = MKTAG('R', 'U', 'D', 'E');
break;
case MKTAG('P', 'H', 'I', 'L'):
case MKTAG('R', 'C', 'K', 'T'):
- tagId = MKTAG('S', 'C', 'I', 'E');
+ tag2 = MKTAG('S', 'C', 'I', 'E');
break;
case MKTAG('T', 'R', 'A', '2'):
case MKTAG('T', 'R', 'A', '3'):
- tagId = MKTAG('T', 'R', 'A', 'V');
+ tag2 = MKTAG('T', 'R', 'A', 'V');
break;
}
- return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder);
+ return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
}
int LiftbotScript::updateState(uint oldId, uint newId, int index) {
diff --git a/engines/titanic/true_talk/liftbot_script.h b/engines/titanic/true_talk/liftbot_script.h
index 0a9cdfd6f0..b0efa34416 100644
--- a/engines/titanic/true_talk/liftbot_script.h
+++ b/engines/titanic/true_talk/liftbot_script.h
@@ -76,7 +76,7 @@ public:
virtual ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id);
virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder);
+ uint tag1, uint tag2, uint remainder);
/**
* Handles updating NPC state based on specified dialogue Ids and dial positions
diff --git a/engines/titanic/true_talk/maitred_script.cpp b/engines/titanic/true_talk/maitred_script.cpp
index 1033db29e0..99e9c04384 100644
--- a/engines/titanic/true_talk/maitred_script.cpp
+++ b/engines/titanic/true_talk/maitred_script.cpp
@@ -72,7 +72,7 @@ int MaitreDScript::chooseResponse(const TTroomScript *roomScript, const TTsenten
int MaitreDScript::process(const TTroomScript *roomScript, const TTsentence *sentence) {
if (roomScript->_scriptId != 132)
return 2;
- if (preprocess(roomScript, sentence) == 1)
+ if (preprocess(roomScript, sentence) != 1)
return 1;
CTrueTalkManager::setFlags(10, 0);
@@ -381,8 +381,8 @@ ScriptChangedResult MaitreDScript::scriptChanged(const TTroomScript *roomScript,
}
int MaitreDScript::handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder) {
- switch (tagId) {
+ uint tag1, uint tag2, uint remainder) {
+ switch (tag2) {
case MKTAG('A', 'D', 'V', 'T'):
case MKTAG('A', 'R', 'T', 'I'):
case MKTAG('A', 'R', 'T', 'Y'):
@@ -403,7 +403,7 @@ int MaitreDScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'E', 'A', 'M'):
case MKTAG('T', 'V', 'S', 'H'):
case MKTAG('W', 'W', 'E', 'B'):
- tagId = MKTAG('E', 'N', 'T', 'N');
+ tag2 = MKTAG('E', 'N', 'T', 'N');
break;
case MKTAG('A', 'C', 'T', 'R'):
case MKTAG('A', 'C', 'T', 'S'):
@@ -437,57 +437,56 @@ int MaitreDScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'D', 'V', 'P'):
case MKTAG('T', 'W', 'A', 'T'):
case MKTAG('W', 'E', 'A', 'T'):
- tagId = MKTAG('P', 'R', 'S', 'N');
+ tag2 = MKTAG('P', 'R', 'S', 'N');
break;
case MKTAG('C', 'H', 'S', 'E'):
case MKTAG('C', 'M', 'N', 'T'):
case MKTAG('F', 'I', 'L', 'M'):
case MKTAG('L', 'I', 'Q', 'D'):
- tagId = MKTAG('F', 'O', 'O', 'D');
+ tag2 = MKTAG('F', 'O', 'O', 'D');
break;
case MKTAG('C', 'R', 'I', 'M'):
case MKTAG('C', 'S', 'P', 'Y'):
case MKTAG('D', 'R', 'U', 'G'):
- tagId = MKTAG('V', 'B', 'A', 'D');
+ tag2 = MKTAG('V', 'B', 'A', 'D');
break;
case MKTAG('E', 'A', 'R', 'T'):
case MKTAG('H', 'O', 'M', 'E'):
case MKTAG('N', 'P', 'L', 'C'):
case MKTAG('P', 'L', 'A', 'N'):
- tagId = MKTAG('P', 'L', 'A', 'C');
+ tag2 = MKTAG('P', 'L', 'A', 'C');
break;
case MKTAG('F', 'A', 'U', 'N'):
case MKTAG('F', 'I', 'S', 'H'):
case MKTAG('F', 'L', 'O', 'R'):
- tagId = MKTAG('N', 'A', 'T', 'R');
+ tag2 = MKTAG('N', 'A', 'T', 'R');
break;
case MKTAG('H', 'H', 'L', 'D'):
case MKTAG('T', 'O', 'Y', 'S'):
case MKTAG('W', 'E', 'A', 'P'):
- tagId = MKTAG('M', 'A', 'C', 'H');
+ tag2 = MKTAG('M', 'A', 'C', 'H');
break;
case MKTAG('M', 'L', 'T', 'Y'):
case MKTAG('P', 'G', 'R', 'P'):
case MKTAG('P', 'T', 'I', 'C'):
- tagId = MKTAG('G', 'R', 'U', 'P');
+ tag2 = MKTAG('G', 'R', 'U', 'P');
break;
case MKTAG('P', 'K', 'U', 'P'):
case MKTAG('S', 'E', 'X', '1'):
case MKTAG('S', 'W', 'E', 'R'):
- tagId = MKTAG('R', 'U', 'D', 'E');
+ tag2 = MKTAG('R', 'U', 'D', 'E');
break;
case MKTAG('P', 'H', 'I', 'L'):
case MKTAG('R', 'C', 'K', 'T'):
- tagId = MKTAG('S', 'C', 'I', 'E');
+ tag2 = MKTAG('S', 'C', 'I', 'E');
break;
case MKTAG('T', 'R', 'A', '2'):
case MKTAG('T', 'R', 'A', '3'):
- tagId = MKTAG('T', 'R', 'A', 'V');
+ tag2 = MKTAG('T', 'R', 'A', 'V');
break;
-
}
- return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder);
+ return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
}
int MaitreDScript::updateState(uint oldId, uint newId, int index) {
diff --git a/engines/titanic/true_talk/maitred_script.h b/engines/titanic/true_talk/maitred_script.h
index bbeee403e7..c34444f5c2 100644
--- a/engines/titanic/true_talk/maitred_script.h
+++ b/engines/titanic/true_talk/maitred_script.h
@@ -83,7 +83,7 @@ public:
virtual ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id);
virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder);
+ uint tag1, uint tag2, uint remainder);
/**
* Handles updating NPC state based on specified dialogue Ids and dial positions
diff --git a/engines/titanic/true_talk/script_support.cpp b/engines/titanic/true_talk/script_support.cpp
index bba708fb78..fd1d40b12e 100644
--- a/engines/titanic/true_talk/script_support.cpp
+++ b/engines/titanic/true_talk/script_support.cpp
@@ -146,16 +146,15 @@ void TTwordEntries::load(const char *name) {
void TThandleQuoteEntries::load(const char *name) {
Common::SeekableReadStream *r = g_vm->_filesManager->getResource(name);
- _tag1 = r->readUint32LE();
- _tag2 = r->readUint32LE();
_rangeStart = r->readUint32LE();
_rangeEnd = r->readUint32LE();
+ _incr = r->readUint32LE();
while (r->pos() < r->size()) {
TThandleQuoteEntry qe;
+ qe._tag1 = r->readUint32LE();
+ qe._tag2= r->readUint32LE();
qe._index = r->readUint32LE();
- qe._tagId = r->readUint32LE();
- qe._dialogueId = r->readUint32LE();
push_back(qe);
}
diff --git a/engines/titanic/true_talk/script_support.h b/engines/titanic/true_talk/script_support.h
index 3c5b919ccf..25ec713624 100644
--- a/engines/titanic/true_talk/script_support.h
+++ b/engines/titanic/true_talk/script_support.h
@@ -134,19 +134,19 @@ public:
};
struct TThandleQuoteEntry {
+ uint _tag1;
+ uint _tag2;
uint _index;
- uint _tagId;
- uint _dialogueId;
- TThandleQuoteEntry() : _index(0), _tagId(0), _dialogueId(0) {}
+ TThandleQuoteEntry() : _tag1(0), _tag2(0), _index(0) {}
};
class TThandleQuoteEntries : public Common::Array<TThandleQuoteEntry> {
public:
- uint _tag1, _tag2;
uint _rangeStart, _rangeEnd;
+ uint _incr;
public:
- TThandleQuoteEntries() : _tag1(0), _tag2(0), _rangeStart(0), _rangeEnd(0) {}
+ TThandleQuoteEntries() : _rangeStart(0), _rangeEnd(0), _incr(0) {}
void load(const char *name);
};
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index f8ac185351..39d771c086 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -386,7 +386,7 @@ CString CTrueTalkManager::readDialogueString() {
// Strip off any non-printable characters
for (byte *p = buffer; *p != '\0'; ++p) {
- if (*p < 32 || *p > 127)
+ if (*p < 32)
*p = ' ';
}
diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp
index c9d1beb353..83ce50b83c 100644
--- a/engines/titanic/true_talk/tt_npc_script.cpp
+++ b/engines/titanic/true_talk/tt_npc_script.cpp
@@ -282,51 +282,41 @@ bool TTnpcScript::handleWord(uint id) const {
}
int TTnpcScript::handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder) {
+ uint tag1, uint tag2, uint remainder) {
if (_quotes.empty())
return 1;
-
- int loopCounter = 0;
- for (uint idx = 0; idx < _quotes.size() && loopCounter < 2; ++idx) {
+ for (uint idx = 3; idx < _quotes.size(); ++idx) {
const TThandleQuoteEntry *qe = &_quotes[idx];
- if (!qe->_index) {
- // End of list; start at beginning again
- ++loopCounter;
- idx = 0;
- qe = &_quotes[0];
- }
-
- if (qe->_index == val && (
- (tagId == 0 && loopCounter == 2) ||
- (qe->_tagId < MKTAG('A', 'A', 'A', 'A')) ||
- (qe->_tagId == tagId)
- )) {
- uint foundTagId = qe->_tagId;
- if (foundTagId > 0 && foundTagId < 100) {
- if (!tagId)
- foundTagId >>= 1;
- if (getRandomNumber(100) < foundTagId)
+ if (qe->_tag1 == tag1 &&
+ (qe->_tag2 == tag2 || qe->_tag2 < MKTAG('A', 'A', 'A', 'A'))) {
+ uint threshold = qe->_tag2;
+ if (threshold > 0 && threshold < 100) {
+ if (!tag2)
+ threshold >>= 1;
+ if (getRandomNumber(100) < threshold)
return 1;
}
- uint dialogueId = qe->_dialogueId;
+ uint dialogueId = qe->_index;
if (dialogueId >= _quotes._rangeStart && dialogueId <= _quotes._rangeEnd) {
dialogueId -= _quotes._rangeStart;
- if (dialogueId > 3)
- error("Invalid dialogue index in BarbotScript");
-
- const int RANDOM_LIMITS[4] = { 30, 50, 70, 60 };
- int rangeLimit = RANDOM_LIMITS[dialogueId];
- int dialRegion = getDialRegion(0);
-
- if (dialRegion != 1) {
- rangeLimit = MAX(rangeLimit - 20, 20);
+ if (dialogueId >= _quotes.size())
+ error("Invalid dialogue index in bot script");
+ TThandleQuoteEntry &quote = _quotes[dialogueId];
+
+ int rangeLimit = quote._index;
+ if (isQuoteDialled()) {
+ // Barbot and Doorbot response is affected by dial region
+ int dialRegion = getDialRegion(0);
+ if (dialRegion != 1) {
+ rangeLimit = MAX((int)quote._tag1 - 20, 20);
+ }
}
- dialogueId = (((int)remainder + 25) % 100) >= rangeLimit
- ? _quotes._tag1 : _quotes._tag2;
+ dialogueId = ((remainder + _quotes._incr) % 100) >= (uint)rangeLimit
+ ? quote._tag2 : quote._tag1;
}
addResponse(getDialogueId(dialogueId));
@@ -336,7 +326,6 @@ int TTnpcScript::handleQuote(const TTroomScript *roomScript, const TTsentence *s
}
return 1;
-
}
uint TTnpcScript::getRangeValue(uint id) {
diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h
index c2f001f8cc..6a152ccde1 100644
--- a/engines/titanic/true_talk/tt_npc_script.h
+++ b/engines/titanic/true_talk/tt_npc_script.h
@@ -269,7 +269,12 @@ public:
virtual bool handleWord(uint id) const;
virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
- uint val, uint tagId, uint remainder);
+ uint tag1, uint tag2, uint remainder);
+
+ /**
+ * Returns true if the NPC's dial region affects quote responses
+ */
+ virtual bool isQuoteDialled() const { return false; }
/**
* Given an Id for a previously registered set of random number values,
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index 3481587b8d..5c48de4182 100644
--- a/engines/titanic/true_talk/tt_parser.cpp
+++ b/engines/titanic/true_talk/tt_parser.cpp
@@ -30,6 +30,7 @@
#include "titanic/true_talk/tt_sentence.h"
#include "titanic/true_talk/tt_word.h"
#include "titanic/titanic.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -64,7 +65,7 @@ void TTparser::loadArrays() {
loadArray(_replacements1, "TEXT/REPLACEMENTS1");
loadArray(_replacements2, "TEXT/REPLACEMENTS2");
loadArray(_replacements3, "TEXT/REPLACEMENTS3");
- if (g_vm->isGerman())
+ if (g_language == Common::DE_DEU)
loadArray(_replacements4, "TEXT/REPLACEMENTS4");
loadArray(_phrases, "TEXT/PHRASES");
loadArray(_pronouns, "TEXT/PRONOUNS");
@@ -85,12 +86,13 @@ int TTparser::preprocess(TTsentence *sentence) {
if (normalize(sentence))
return 0;
- if (g_vm->isGerman())
+ if (g_language == Common::DE_DEU) {
preprocessGerman(sentence->_normalizedLine);
-
- // Scan for and replace common slang and contractions with verbose versions
- searchAndReplace(sentence->_normalizedLine, _replacements1);
- searchAndReplace(sentence->_normalizedLine, _replacements2);
+ } else {
+ // Scan for and replace common slang and contractions with verbose versions
+ searchAndReplace(sentence->_normalizedLine, _replacements1);
+ searchAndReplace(sentence->_normalizedLine, _replacements2);
+ }
// Check entire normalized line against common phrases to replace
for (uint idx = 0; idx < _phrases.size(); idx += 2) {
@@ -98,6 +100,12 @@ int TTparser::preprocess(TTsentence *sentence) {
sentence->_normalizedLine = _phrases[idx + 1];
}
+ if (g_language == Common::DE_DEU) {
+ // Scan for and replace common slang and contractions with verbose versions
+ searchAndReplace(sentence->_normalizedLine, _replacements1);
+ searchAndReplace(sentence->_normalizedLine, _replacements2);
+ }
+
// Do a further search and replace of roman numerals to decimal
searchAndReplace(sentence->_normalizedLine, _replacements3);
@@ -371,6 +379,7 @@ int TTparser::searchAndReplace(TTstring &line, int startIndex, const StringArray
// Replace the text in the line with it's replacement
line = CString(line.c_str(), line.c_str() + startIndex) + replacementStr +
CString(line.c_str() + startIndex + origStr.size());
+ lineSize = line.size();
startIndex += replacementStr.size();
break;
@@ -1741,9 +1750,10 @@ void TTparser::preprocessGerman(TTstring &line) {
"et ", "st ", "s ", "e ", "n ", "t "
};
- for (uint idx = 0; idx < _replacements4.size(); idx += 3) {
- if (!line.hasSuffix(_replacements4[idx + 2]))
+ for (uint idx = 0; idx < _replacements4.size(); ++idx) {
+ if (!line.hasSuffix(_replacements4[idx]))
continue;
+
const char *lineP = line.c_str();
const char *p = strstr(lineP, _replacements4[idx].c_str());
if (!p || p == lineP || *(p - 1) != ' ')
diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp
index 2c675ba9e5..1bb30d33d6 100644
--- a/engines/titanic/true_talk/tt_sentence.cpp
+++ b/engines/titanic/true_talk/tt_sentence.cpp
@@ -24,6 +24,7 @@
#include "titanic/true_talk/tt_concept.h"
#include "titanic/true_talk/script_handler.h"
#include "titanic/titanic.h"
+#include "titanic/translation.h"
namespace Titanic {
@@ -311,6 +312,12 @@ bool TTsentence::isConcept34(int slotIndex, const TTconceptNode *node) const {
bool TTsentence::localWord(const char *str) const {
CScriptHandler &scriptHandler = *g_vm->_exeResources._owner;
bool foundMatch = false;
+ static const char *const ARTICLES_EN[11] = {
+ "it", "that", "he", "she", "him", "her", "them", "they", "those", "1", "thing"
+ };
+ static const char *const ARTICLES_DE[9] = {
+ "es", "das", "er", "ihn", "ihm", "ihnen", "diese", "man", "ding"
+ };
if (scriptHandler._concept1P) {
TTstring s = scriptHandler._concept1P->getText();
@@ -332,15 +339,15 @@ bool TTsentence::localWord(const char *str) const {
continue;
const TTstring wordStr = nodeP->_wordP->_text;
- if (mode == VOCAB_MODE_EN && wordStr == str) {
+ if ((g_language == Common::DE_DEU || mode == VOCAB_MODE_EN) && wordStr == str) {
result = true;
} else if (nodeP->_wordP->findSynByName(str, &syn, mode)) {
result = true;
} else if (foundMatch) {
- result = wordStr == "it" || wordStr == "that" || wordStr == "he"
- || wordStr == "she" || wordStr == "him" || wordStr == "her"
- || wordStr == "them" || wordStr == "they" || wordStr == "those"
- || wordStr == "1" || wordStr == "thing";
+ result = false;
+ for (int idx = 0; idx < TRANSLATE(11, 9) && !result; ++idx) {
+ result = wordStr == TRANSLATE(ARTICLES_EN[idx], ARTICLES_DE[idx]);
+ }
}
}
diff --git a/engines/titanic/true_talk/tt_sentence.h b/engines/titanic/true_talk/tt_sentence.h
index 01a0346be8..dfbf7ae52f 100644
--- a/engines/titanic/true_talk/tt_sentence.h
+++ b/engines/titanic/true_talk/tt_sentence.h
@@ -119,6 +119,10 @@ public:
bool isConcept34(int slotIndex, const TTconceptNode *node = nullptr) const;
+ /**
+ * Returns true if the sentence contains the specified word,
+ * allowing for common synonyms of the desired word
+ */
bool localWord(const char *str) const;
/**
diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp
index 861d8f89a0..e9fc098749 100644
--- a/engines/titanic/true_talk/tt_vocab.cpp
+++ b/engines/titanic/true_talk/tt_vocab.cpp
@@ -182,10 +182,10 @@ TTword *TTvocab::getWord(TTstring &str, TTword **srcWord) const {
if (!word) {
TTstring tempStr(str);
if (tempStr.size() > 2) {
- word = getSuffixedWord(tempStr);
+ word = getSuffixedWord(tempStr, srcWord);
if (!word)
- word = getPrefixedWord(tempStr);
+ word = getPrefixedWord(tempStr, srcWord);
}
}
@@ -230,11 +230,11 @@ TTword *TTvocab::getPrimeWord(TTstring &str, TTword **srcWord) const {
return newWord;
}
-TTword *TTvocab::getSuffixedWord(TTstring &str) const {
+TTword *TTvocab::getSuffixedWord(TTstring &str, TTword **srcWord) const {
TTstring tempStr(str);
TTword *word = nullptr;
- if (g_vm->isGerman()) {
+ if (g_language == Common::DE_DEU) {
static const char *const SUFFIXES[11] = {
"est", "em", "en", "er", "es", "et", "st",
"s", "e", "n", "t"
@@ -243,7 +243,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
for (int idx = 0; idx < 11; ++idx) {
if (tempStr.hasSuffix(SUFFIXES[idx])) {
tempStr.deleteSuffix(strlen(SUFFIXES[idx]));
- word = getPrimeWord(tempStr);
+ word = getPrimeWord(tempStr, srcWord);
if (word)
break;
tempStr = str;
@@ -315,7 +315,9 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
if (word) {
if (word->_wordClass == WC_ACTION) {
- dynamic_cast<TTaction *>(word)->setVal(1);
+ TTaction *action = dynamic_cast<TTaction *>(word);
+ assert(action);
+ action->setVal(1);
}
} else {
tempStr = str;
@@ -514,7 +516,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
return word;
}
-TTword *TTvocab::getPrefixedWord(TTstring &str) const {
+TTword *TTvocab::getPrefixedWord(TTstring &str, TTword **srcWord) const {
TTstring tempStr(str);
TTword *word = nullptr;
int prefixLen = 0;
diff --git a/engines/titanic/true_talk/tt_vocab.h b/engines/titanic/true_talk/tt_vocab.h
index 7e5cc29bc5..def42ba63d 100644
--- a/engines/titanic/true_talk/tt_vocab.h
+++ b/engines/titanic/true_talk/tt_vocab.h
@@ -68,7 +68,7 @@ private:
* @param str Word to check
* @returns New word instance for found match, or nullptr otherwise
*/
- TTword *getSuffixedWord(TTstring &str) const;
+ TTword *getSuffixedWord(TTstring &str, TTword **srcWord = nullptr) const;
/**
* Checks the passed word for common prefixes, and checks for a word
@@ -76,7 +76,7 @@ private:
* @param str Word to check
* @returns New word instance for found match, or nullptr otherwise
*/
- TTword *getPrefixedWord(TTstring &str) const;
+ TTword *getPrefixedWord(TTstring &str, TTword **srcWord = nullptr) const;
public:
TTvocab(VocabMode vocabMode);
~TTvocab();
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index c91f51bade..5ec3595196 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -70,7 +70,7 @@ ToltecsEngine::~ToltecsEngine() {
}
Common::Error ToltecsEngine::run() {
- initGraphics(640, 400, true);
+ initGraphics(640, 400);
_isSaveAllowed = true;
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index d312d58091..05853e606e 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -54,7 +54,7 @@ RMWindow::~RMWindow() {
*/
void RMWindow::init() {
Graphics::PixelFormat pixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
- initGraphics(RM_SX, RM_SY, true, &pixelFormat);
+ initGraphics(RM_SX, RM_SY, &pixelFormat);
reset();
}
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index dc1c515e1c..05192ae65e 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1116,7 +1116,7 @@ Common::Error ToonEngine::run() {
if (!loadToonDat())
return Common::kUnknownError;
- initGraphics(TOON_SCREEN_WIDTH, TOON_SCREEN_HEIGHT, true);
+ initGraphics(TOON_SCREEN_WIDTH, TOON_SCREEN_HEIGHT);
init();
// do we need to load directly a game?
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index bb21f399c6..15bcbbc0fc 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -199,7 +199,7 @@ ToucheEngine::~ToucheEngine() {
}
Common::Error ToucheEngine::run() {
- initGraphics(kScreenWidth, kScreenHeight, true);
+ initGraphics(kScreenWidth, kScreenHeight);
Graphics::setupFont(_language);
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 9b393132d9..417652da50 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -53,7 +53,7 @@ TSageEngine::TSageEngine(OSystem *system, const tSageGameDescription *gameDesc)
}
Common::Error TSageEngine::init() {
- initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT, false);
+ initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT);
return Common::kNoError;
}
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index ad455c5ded..08ad6a05e7 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -89,7 +89,7 @@ bool TuckerEngine::hasFeature(EngineFeature f) const {
}
Common::Error TuckerEngine::run() {
- initGraphics(kScreenWidth, kScreenHeight, false);
+ initGraphics(kScreenWidth, kScreenHeight);
syncSoundSettings();
_compressedSound.openFile();
if (_startSlot == -1)
diff --git a/engines/util.h b/engines/util.h
index 0e7b1e118b..ccf28f2e22 100644
--- a/engines/util.h
+++ b/engines/util.h
@@ -23,17 +23,29 @@
#ifndef ENGINES_UTIL_H
#define ENGINES_UTIL_H
+#include "common/array.h"
#include "common/scummsys.h"
#include "common/list.h"
#include "graphics/pixelformat.h"
+#include "graphics/mode.h"
/**
* Setup the backend's graphics mode.
*/
-void initCommonGFX(bool defaultTo1XScaler);
+void initCommonGFX();
/**
- * Setup the backend's screen size and graphics mode.
+ * Sends a list of graphics modes to the backend so it can make a decision
+ * about the best way to set up the display hardware.
+ *
+ * Engines that switch between different virtual screen sizes during a game
+ * should call this function prior to any call to initGraphics. Engines that use
+ * only a single screen size do not need to call this function.
+ */
+void initGraphicsModes(const Graphics::ModeList &modes);
+
+/**
+ * Sets up the backend's screen size and graphics mode.
*
* Shows an various warnings on certain backend graphics
* transaction failures (aspect switch, fullscreen switch, etc.).
@@ -45,8 +57,8 @@ void initCommonGFX(bool defaultTo1XScaler);
* Uses the backend's preferred format if graphics format pointer is NULL.
* Finds the best compatible format if a list of graphics formats is provided.
*/
-void initGraphics(int width, int height, bool defaultTo1xScaler);
-void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format);
-void initGraphics(int width, int height, bool defaultTo1xScaler, const Common::List<Graphics::PixelFormat> &formatList);
+void initGraphics(int width, int height);
+void initGraphics(int width, int height, const Graphics::PixelFormat *format);
+void initGraphics(int width, int height, const Common::List<Graphics::PixelFormat> &formatList);
#endif
diff --git a/engines/voyeur/screen.cpp b/engines/voyeur/screen.cpp
index 4d34078439..e7aadcc0d8 100644
--- a/engines/voyeur/screen.cpp
+++ b/engines/voyeur/screen.cpp
@@ -54,7 +54,7 @@ Screen::Screen(VoyeurEngine *vm) : Graphics::Screen(), _vm(vm), _drawPtr(&_defau
}
void Screen::sInitGraphics() {
- initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT, false);
+ initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT);
create(SCREEN_WIDTH, SCREEN_HEIGHT);
clearPalette();
}
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index c5f3673255..4961feca6e 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -106,7 +106,7 @@ WageEngine::~WageEngine() {
Common::Error WageEngine::run() {
debug("WageEngine::init");
- initGraphics(512, 342, true);
+ initGraphics(512, 342);
// Create debugger console. It requires GFX to be initialized
_console = new Console(this);
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 05dfb961cb..e68004d1e5 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -109,7 +109,7 @@ bool WintermuteEngine::hasFeature(EngineFeature f) const {
Common::Error WintermuteEngine::run() {
// Initialize graphics using following:
Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
- initGraphics(800, 600, true, &format);
+ initGraphics(800, 600, &format);
if (g_system->getScreenFormat() != format) {
error("Wintermute currently REQUIRES 32bpp");
}
diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp
index 451afcc198..e2dae4cbf8 100644
--- a/engines/xeen/xeen.cpp
+++ b/engines/xeen/xeen.cpp
@@ -107,7 +107,7 @@ void XeenEngine::initialize() {
_eventData = f.readStream(f.size());
// Set graphics mode
- initGraphics(320, 200, false);
+ initGraphics(320, 200);
// If requested, load a savegame instead of showing the intro
if (ConfMan.hasKey("save_slot")) {
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index 6a18cf8e1b..9eb6465947 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -401,13 +401,13 @@ void ZVision::initScreen() {
((WINDOW_HEIGHT - workingWindowHeight) / 2) + workingWindowHeight
);
- initGraphics(WINDOW_WIDTH, WINDOW_HEIGHT, true, &_screenPixelFormat);
+ initGraphics(WINDOW_WIDTH, WINDOW_HEIGHT, &_screenPixelFormat);
}
void ZVision::initHiresScreen() {
_renderManager->upscaleRect(_workingWindow);
- initGraphics(HIRES_WINDOW_WIDTH, HIRES_WINDOW_HEIGHT, true, &_screenPixelFormat);
+ initGraphics(HIRES_WINDOW_WIDTH, HIRES_WINDOW_HEIGHT, &_screenPixelFormat);
}
} // End of namespace ZVision
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index 5fcd2a3602..678b074360 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -65,9 +65,7 @@ void CursorManager::pushCursor(const void *buf, uint w, uint h, int hotspotX, in
cur->_visible = isVisible();
_cursorStack.push(cur);
- if (buf) {
- g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, dontScale, format);
- }
+ g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, dontScale, format);
}
void CursorManager::popCursor() {
@@ -80,6 +78,8 @@ void CursorManager::popCursor() {
if (!_cursorStack.empty()) {
cur = _cursorStack.top();
g_system->setMouseCursor(cur->_data, cur->_width, cur->_height, cur->_hotspotX, cur->_hotspotY, cur->_keycolor, cur->_dontScale, &cur->_format);
+ } else {
+ g_system->setMouseCursor(nullptr, 0, 0, 0, 0, 0);
}
g_system->showMouse(isVisible());
@@ -99,6 +99,7 @@ void CursorManager::popAllCursors() {
}
}
+ g_system->setMouseCursor(nullptr, 0, 0, 0, 0, 0);
g_system->showMouse(isVisible());
}
diff --git a/graphics/mode.h b/graphics/mode.h
new file mode 100644
index 0000000000..bd8eb25e00
--- /dev/null
+++ b/graphics/mode.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef GRAPHICS_MODE_H
+#define GRAPHICS_MODE_H
+
+#include "common/array.h"
+
+namespace Graphics {
+
+/**
+ * Represents a hardware video mode.
+ */
+struct Mode {
+ int16 width; ///< The width in pixels
+ int16 height; ///< The height in pixels
+
+ Mode(const int16 w, const int16 h) :
+ width(w),
+ height(h) {}
+
+ bool operator<(const Mode &other) const {
+ return width < other.width && height < other.height;
+ }
+};
+
+typedef Common::Array<Mode> ModeList;
+
+}
+
+#endif
diff --git a/graphics/palette.h b/graphics/palette.h
index 2884bef7f4..0b9b861aa9 100644
--- a/graphics/palette.h
+++ b/graphics/palette.h
@@ -96,7 +96,7 @@ public:
*
* @see getScreenFormat
*/
- virtual void grabPalette(byte *colors, uint start, uint num) = 0;
+ virtual void grabPalette(byte *colors, uint start, uint num) const = 0;
};
#endif
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index edfc2cfc79..26f16c7729 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index b82ecc0402..0f933bf7ce 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -33,9 +33,7 @@
namespace GUI {
enum {
- kYesCmd = 'YES ',
- kNoCmd = 'NO ',
- kCheckBoxCmd = 'CHK '
+ kProceedCmd = 'PROC'
};
@@ -49,18 +47,18 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
const char *message = _(
"ScummVM now supports automatic check for updates\n"
- "which requires access to the Internet.\n"
- "\n"
- "Would you like to enable this feature?");
- const char *message2 = _("(You can always enable it in the options dialog on the Misc tab)");
+ "which requires access to the Internet. Would you\n"
+ "like to enable this feature?");
+ const char *message2 = _("You can change this setting later in the Misc tab\n"
+ "in the Options dialog.");
// First, determine the size the dialog needs. For this we have to break
// down the string into lines, and taking the maximum of their widths.
// Using this, and accounting for the space the button(s) need, we can set
// the real size of the dialog
- Common::Array<Common::String> lines, lines2;
+ Common::Array<Common::String> lines, lines2, lines3;
int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
- int maxlineWidth2 = g_gui.getFont(ThemeEngine::kFontStyleTooltip).wordWrapText(message2, screenW - 2 * 20, lines2);
+ int maxlineWidth2 = g_gui.getFont().wordWrapText(message2, screenW - 2 * 20, lines2);
_w = MAX(MAX(maxlineWidth, maxlineWidth2), (2 * buttonWidth) + 10) + 20;
@@ -79,21 +77,19 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
uint y = 10;
for (uint i = 0; i < lines.size(); i++) {
new StaticTextWidget(this, 10, y, maxlineWidth, kLineHeight,
- lines[i], Graphics::kTextAlignCenter);
- y += kLineHeight;
- }
- for (uint i = 0; i < lines2.size(); i++) {
- new StaticTextWidget(this, 10, y, maxlineWidth2, kLineHeight,
- lines2[i], Graphics::kTextAlignCenter, 0, ThemeEngine::kFontStyleTooltip);
+ lines[i], Graphics::kTextAlignLeft);
y += kLineHeight;
}
y += kLineHeight;
- _updatesCheckbox = new CheckboxWidget(this, 10, y, _w, kLineHeight, _("Check for updates automatically"), 0, kCheckBoxCmd);
- y += kLineHeight + 3;
+ const char *updMessage = _("Update check:");
- _updatesPopUp = new PopUpWidget(this, 10, y, _w - 20, g_gui.xmlEval()->getVar("Globals.PopUp.Height", kLineHeight));
+ int updatelineWidth = g_gui.getFont().wordWrapText(updMessage, screenW - 2 * 20, lines3) + 5;
+
+ new StaticTextWidget(this, 10, y, maxlineWidth, kLineHeight, lines3[0], Graphics::kTextAlignLeft);
+
+ _updatesPopUp = new PopUpWidget(this, 10 + updatelineWidth, y, _w - 20 - updatelineWidth, g_gui.xmlEval()->getVar("Globals.PopUp.Height", kLineHeight));
const int *vals = Common::UpdateManager::getUpdateIntervals();
@@ -104,25 +100,28 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalOneWeek);
- int yesButtonPos = (_w - (buttonWidth * 2)) / 2;
- int noButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
+ y += kLineHeight * 2;
- _yesButton = new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
- _("Proceed"), 0, kYesCmd, Common::ASCII_RETURN);
- _noButton = new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
- _("Cancel"), 0, kNoCmd, Common::ASCII_ESCAPE);
+ for (uint i = 0; i < lines2.size(); i++) {
+ new StaticTextWidget(this, 10, y, maxlineWidth2, kLineHeight,
+ lines2[i], Graphics::kTextAlignLeft);
+ y += kLineHeight;
+ }
+
+ y += kLineHeight + 3;
- _updatesPopUp->setEnabled(false);
- _yesButton->setEnabled(false);
+ int buttonPos = _w - buttonWidth - 10;
+
+ _proceedButton = new ButtonWidget(this, buttonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
+ _("Proceed"), 0, kProceedCmd, Common::ASCII_RETURN);
}
void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
- if (cmd == kYesCmd) {
+ if (cmd == kProceedCmd) {
ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
if (g_system->getUpdateManager()) {
- if (_updatesCheckbox->getState() == false ||
- _updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) {
+ if (_updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) {
g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
} else {
g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled);
@@ -130,16 +129,6 @@ void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
}
}
close();
- } else if (cmd == kNoCmd) {
- ConfMan.setInt("updates_check", Common::UpdateManager::kUpdateIntervalNotSupported);
- g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
-
- close();
- } else if (cmd == kCheckBoxCmd) {
- _updatesPopUp->setEnabled(_updatesCheckbox->getState());
- _yesButton->setEnabled(_updatesCheckbox->getState());
-
- draw();
} else {
Dialog::handleCommand(sender, cmd, data);
}
diff --git a/gui/updates-dialog.h b/gui/updates-dialog.h
index 9c429c960c..428a82cfe6 100644
--- a/gui/updates-dialog.h
+++ b/gui/updates-dialog.h
@@ -44,9 +44,7 @@ public:
private:
PopUpWidget *_updatesPopUp;
- ButtonWidget *_yesButton;
- ButtonWidget *_noButton;
- CheckboxWidget *_updatesCheckbox;
+ ButtonWidget *_proceedButton;
};
} // End of namespace GUI
diff --git a/po/be_BY.po b/po/be_BY.po
index 93374f41e7..3f5f39a14d 100644
--- a/po/be_BY.po
+++ b/po/be_BY.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-07-26 18:23+0000\n"
"Last-Translator: Ivan Lukyanov <lid-gr@tut.by>\n"
"Language-Team: Belarusian <https://translations.scummvm.org/projects/scummvm/"
@@ -64,8 +64,7 @@ msgstr "Уверх"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Так"
@@ -137,7 +136,7 @@ msgstr "Так"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Не"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -894,8 +893,8 @@ msgstr "Рэжым растру:"
msgid "Special dithering modes supported by some games"
msgstr "Спецыяльныя рэжымы рэндэрынгу, падтрымоўваныя некаторымі гульнямі"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Поўнаэкранны рэжым"
@@ -1187,7 +1186,7 @@ msgstr "Мова GUI:"
msgid "Language of ScummVM GUI"
msgstr "Мова графічнага інтэрфейсу ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Правяраць абнаўленні:"
@@ -1622,27 +1621,25 @@ msgstr "Растарызатар са згладжваннем"
msgid "Antialiased"
msgstr "Са згладжваннем"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM стаў падтрымліваць аўтаматычную праверку\n"
"абнаўленняў, якая патрабуе доступу ў Інтэрнэт.\n"
"\n"
"Ці жадаеце вы ўключыць гэту опцыю?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Вы заўсёды можаце ўключыць яе ў наладах на закладцы \"Рознае\")"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Аўтаматычна правяраць абнаўленні"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Працягнуць"
@@ -1842,7 +1839,7 @@ msgstr "Г~а~лоўнае меню"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1863,7 +1860,7 @@ msgstr "Захаваць гульню:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1905,27 +1902,27 @@ msgstr "~А~дмена"
msgid "~K~eys"
msgstr "~К~лавішы"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Не магу ініцыялізаваць фармат колеру."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Не атрымалася пераключыць відэарэжым: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Не атрымалася выкарыстаць карэкцыю суадносін бакоў."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Не магу ўжыць поўнаэкранны рэжым."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Не магу ўжыць налады фільтрацыі."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1939,7 +1936,7 @@ msgstr ""
"на жорсткі дыск. Падрабязнасці можна знайсці ў\n"
"файле README."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1954,7 +1951,7 @@ msgstr ""
"з'явіцца музыка. Падрабязнасці можна знайсці ў\n"
"файле README."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1964,7 +1961,7 @@ msgstr ""
"за асноўнай інфармацыяй, а таксама інструкцыямі, як атрымаць далейшую "
"дапамогу."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1974,7 +1971,7 @@ msgstr ""
"ScummVM цалкам. Яна, хутчэй за ўсё, не будзе працаваць стабільна, і "
"захаванні гульняў могуць не працаваць у будучых версіях ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Усё адно запусціць"
@@ -2213,52 +2210,52 @@ msgstr "Рэжым аўтадрэгу зараз"
msgid "Swipe three fingers to the right to toggle."
msgstr "Правядзіце трыма пальцамі направа для пераключэння."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Аконны рэжым"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Адрозненне: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Карэкцыя суадносін бакоў уключана"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Карэкцыя суадносін бакоў выключана"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Фільтрацыя ўключана"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Фільтрацыя выключаная"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Без павелічэння"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Без павелічэння"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Актыўны графічны фільтр:"
@@ -2896,7 +2893,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2910,7 +2907,7 @@ msgstr "Узнавіць гульню:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3579,7 +3576,7 @@ msgstr "Уключыць плывучыя курсоры"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Аўтазахаванне)"
@@ -3592,23 +3589,23 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"Калі ласка, скарыстайцеся іншай праграмай для прагляду файла дапамогі "
"гульні: %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr "Фармат захаванай гульні састарэў, не магу прачытаць яго"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr "Версія файла захавання %d, але максімальна падтрымваецца %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4641,6 +4638,12 @@ msgstr ""
"Гэты файл захаванай гульні мае версію %u, але рухавічок падтрымвае версіі да "
"%d. Вам патрэбна новая версія ScummVM для карыстання гэтым файлам."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Вы заўсёды можаце ўключыць яе ў наладах на закладцы \"Рознае\")"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Аўтаматычна правяраць абнаўленні"
+
#~ msgid "8 kHz"
#~ msgstr "8 кГц"
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 5d9398a9c0..49f69664be 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-02-20 14:15+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Catalan <https://translations.scummvm.org/projects/scummvm/"
@@ -63,8 +63,7 @@ msgstr "Amunt"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Sэ"
@@ -137,7 +136,7 @@ msgstr "Sэ"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "No"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -899,8 +898,8 @@ msgstr "Mode de pintat:"
msgid "Special dithering modes supported by some games"
msgstr "Modes de tramat especials suportats per alguns jocs"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Mode pantalla completa"
@@ -1190,7 +1189,7 @@ msgstr "Idioma GUI:"
msgid "Language of ScummVM GUI"
msgstr "Idioma de la interfэcie d'usuari de ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1624,23 +1623,20 @@ msgstr "Pintat amb antialias (16bpp)"
msgid "Antialiased"
msgstr "Amb antialias (16bpp)"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Comprova les actualitzacions automрticament"
-
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1837,7 +1833,7 @@ msgstr "~R~etorna al Llanчador"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1858,7 +1854,7 @@ msgstr "Desa la partida:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1898,27 +1894,27 @@ msgstr "~C~ancelЗla"
msgid "~K~eys"
msgstr "~T~ecles"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "No s'ha pogut iniciar el format de color."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "No s'ha pogut canviar al mode de vэdeo: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "No s'ha pogut aplicar la configuraciѓ de la relaciѓ d'aspecte."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "No s'ha pogut aplicar l'ajust de pantalla completa."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "No s'ha pogut aplicar la configuraciѓ de filtratge."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1932,7 +1928,7 @@ msgstr ""
"els fitxers de dades al disc dur.\n"
"Consulteu el fitxer README per a mщs detalls."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1946,7 +1942,7 @@ msgstr ""
"tal de poder sentir la mњsica del joc.\n"
"Consulteu el fitxer README per a mщs detalls."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1955,7 +1951,7 @@ msgstr ""
"No s'ha pogut carregar la partida (%s)! Consulteu el fitxer README per a la "
"informaciѓ bрsica i les instruccions sobre com obtenir mщs assistшncia."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1965,7 +1961,7 @@ msgstr ""
"pel ScummVM. Com a tal, probablement serр inestable, i pot ser que les "
"partides que deseu no funcionin en versions futures de ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Inicia de totes maneres"
@@ -2200,52 +2196,52 @@ msgstr ""
msgid "Swipe three fingers to the right to toggle."
msgstr ""
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Mode de finestra"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "S'ha activat la correcciѓ de la relaciѓ d'aspecte"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "S'ha desactivat la correcciѓ de la relaciѓ d'aspecte"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filtratge activat"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filtratge desactivat"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (sense escalar)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (no escalat)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Filtre de grрfics actiu:"
@@ -2878,7 +2874,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2892,7 +2888,7 @@ msgstr "Recupera la partida:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3552,7 +3548,7 @@ msgstr "Activa els cursors flotants"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Desat automрtic:"
@@ -3566,21 +3562,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4609,6 +4605,9 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid "Check for updates automatically"
+#~ msgstr "Comprova les actualitzacions automрticament"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index c79d90ec10..c44c0c0565 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.7.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2016-12-04 15:43+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Czech <https://translations.scummvm.org/projects/scummvm/"
@@ -65,8 +65,7 @@ msgstr "Jэt nahoru"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -126,7 +125,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Ano"
@@ -139,7 +138,7 @@ msgstr "Ano"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Ne"
@@ -158,12 +157,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -897,8 +896,8 @@ msgstr "ReОim vykreslenэ:"
msgid "Special dithering modes supported by some games"
msgstr "Speciсlnэ reОimy chvьnэ podporovanщ nьkter§mi hrami"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "ReОim celщ obrazovky"
@@ -1188,7 +1187,7 @@ msgstr "Jazyk GUI:"
msgid "Language of ScummVM GUI"
msgstr "Jazyk GUI ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Kontrola aktualizacэ:"
@@ -1629,27 +1628,25 @@ msgstr "Vykreslovaш s vyhlazen§mi hranami"
msgid "Antialiased"
msgstr "S vyhlazen§mi hranami"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM nynэ podporuje automatickou kontrolu\n"
"aktualizacэ kterс vyОaduje pјipojenэ k internetu.\n"
"\n"
"Chtьli byste tuto funkci nynэ zapnout?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Toto nastavenэ vОdy mљОete zmьnit ve Volbсch v kartь Rљznщ)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Automaticky kontrolovat aktualizace"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Pokraшovat"
@@ -1847,7 +1844,7 @@ msgstr "~N~сvrat do SpouЙtьшe"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1868,7 +1865,7 @@ msgstr "UloОit hru:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1909,28 +1906,28 @@ msgstr "~Z~ruЙit"
msgid "~K~eys"
msgstr "~K~lсvesy"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Nelze zavщst barevn§ formсt."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Nelze pјepnout na reОim obrazu: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Nelze pouОэt nastavenэ pomьru stran."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Nelze pouОэt nastavenэ celщ obrazovky."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
#, fuzzy
msgid "Could not apply filtering setting."
msgstr "Nelze pouОэt nastavenэ celщ obrazovky."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1944,7 +1941,7 @@ msgstr ""
"datovщ soubory na VсЙ pevn§ disk.\n"
"Pro podrobnosti si pјeшtьte README."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1958,7 +1955,7 @@ msgstr ""
"abyste mohli poslouchat hudbu ve hјe.\n"
"Pro podrobnosti si pјeшtьte README."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1967,7 +1964,7 @@ msgstr ""
"Naшtenэ stavu hry selhalo (%s)! Prosэm pјeшtьte si dokumentaci pro zсkladnэ "
"informace a pokyny k zэskсnэ dalЙэ podpory."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1977,7 +1974,7 @@ msgstr ""
"ScummVM. Proto je moОnщ, Оe bude nestabilnэ a jakщkoli uloОenщ hry nemusэ "
"fungovat v budoucэch verzэch ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Pјesto spustit"
@@ -2216,54 +2213,54 @@ msgstr "ReОim automatickщho taОenэ je nynэ"
msgid "Swipe three fingers to the right to toggle."
msgstr "Pro zapnutэ pјejeяte tјemi prsty doprava."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "ReОim do okna"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Povolena korekce pomьru stran"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Zakсzсna korekce pomьru stran"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
#, fuzzy
msgid "Filtering enabled"
msgstr "Kliknutэ Povoleno"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
#, fuzzy
msgid "Filtering disabled"
msgstr "Kliknutэ Zakсzсno"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normсlnэ (bez zmьny velikosti)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normсlnэ (bez zmьny velikosti)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktivnэ grafick§ filtr:"
@@ -2900,7 +2897,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2914,7 +2911,7 @@ msgstr "Obnovit hru:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3572,7 +3569,7 @@ msgstr "Povolit plovoucэ kurzory"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Autouklсdсnэ:"
@@ -3586,21 +3583,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4615,6 +4612,12 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Toto nastavenэ vОdy mљОete zmьnit ve Volbсch v kartь Rљznщ)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Automaticky kontrolovat aktualizace"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/da_DK.po b/po/da_DK.po
index 2d81c98b16..0f8683c95c 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2016-12-29 07:29+0000\n"
"Last-Translator: poulsen93 <poulsen93@gmail.com>\n"
"Language-Team: Danish <https://translations.scummvm.org/projects/scummvm/"
@@ -63,8 +63,7 @@ msgstr "Gх op"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -123,7 +122,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Ja"
@@ -136,7 +135,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nej"
@@ -153,12 +152,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -891,8 +890,8 @@ msgstr "Rendere tilstand:"
msgid "Special dithering modes supported by some games"
msgstr "Speciel farvereduceringstilstand understјttet a nogle spil"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Fuldskцrms tilstand"
@@ -1180,7 +1179,7 @@ msgstr "Sprog:"
msgid "Language of ScummVM GUI"
msgstr "Sprog for brugerfladen i ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1623,24 +1622,20 @@ msgstr "Antialias renderer"
msgid "Antialiased"
msgstr "Antialias"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:92
-#, fuzzy
-msgid "Check for updates automatically"
-msgstr "Sјg efter opdateringer..."
-
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1839,7 +1834,7 @@ msgstr "~R~etur til oversigt"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1860,7 +1855,7 @@ msgstr "Gemmer:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1901,28 +1896,28 @@ msgstr "~F~ortryd"
msgid "~K~eys"
msgstr "~T~aster"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Kunne ikke initialisere farveformat."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Kunne ikke skifte til videotilstand: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Kunne ikke anvende billedformat korrektion indstilling."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Kunne ikke anvende fuldskцrm indstilling."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
#, fuzzy
msgid "Could not apply filtering setting."
msgstr "Kunne ikke anvende fuldskцrm indstilling."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1936,7 +1931,7 @@ msgstr ""
"datafiler til din harddisk i stedet.\n"
"Se README fil for detaljer."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1950,7 +1945,7 @@ msgstr ""
"for at lytte til spillets musik.\n"
"Se README fil for detaljer."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1960,7 +1955,7 @@ msgstr ""
"grundlцggende oplysninger, og for at fх instruktioner om, hvordan man fхr "
"yderligere hjцlp."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1970,7 +1965,7 @@ msgstr ""
"ScummVM. Sхledes, er det sandsynligt, at det er ustabilt, og alle gemmer du "
"foretager fungerer muligvis ikke i fremtidige versioner af ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Start alligevel"
@@ -2207,54 +2202,54 @@ msgstr "Auto-trцk tilstand er nu"
msgid "Swipe three fingers to the right to toggle."
msgstr "Fјr tre fingre til hјjre for at skifte."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Vindue tilstand"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Aktivщr billedformat korrektion"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Deaktivщr billedformat korrektion"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
#, fuzzy
msgid "Filtering enabled"
msgstr "Klik aktiveret"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
#, fuzzy
msgid "Filtering disabled"
msgstr "Klik deaktiveret"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktive grafik filtre:"
@@ -2891,7 +2886,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2905,7 +2900,7 @@ msgstr "Gendan spil:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3573,7 +3568,7 @@ msgstr "Aktivщr flydende markјr"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Auto gemme:"
@@ -3587,21 +3582,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4619,6 +4614,10 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#, fuzzy
+#~ msgid "Check for updates automatically"
+#~ msgstr "Sјg efter opdateringer..."
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/de_DE.po b/po/de_DE.po
index a5bf479dd4..2d1f40833d 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.10.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
-"PO-Revision-Date: 2017-09-11 18:50+0000\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
+"PO-Revision-Date: 2017-10-15 15:10+0000\n"
"Last-Translator: Lothar Serra Mari <rootfather@scummvm.org>\n"
"Language-Team: German <https://translations.scummvm.org/projects/scummvm/"
"scummvm/de/>\n"
@@ -64,8 +64,7 @@ msgstr "Pfad hoch"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -127,7 +126,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Ja"
@@ -140,7 +139,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nein"
@@ -159,12 +158,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -903,8 +902,8 @@ msgstr "Render-Modus:"
msgid "Special dithering modes supported by some games"
msgstr "Spezielle Farbmischungsmethoden werden von manchen Spielen unterstќtzt"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Vollbildmodus"
@@ -1197,7 +1196,7 @@ msgstr "Sprache:"
msgid "Language of ScummVM GUI"
msgstr "Sprache der ScummVM-Oberflфche"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Updates suchen:"
@@ -1644,29 +1643,25 @@ msgstr "Kantenglфttung"
msgid "Antialiased"
msgstr "Kantenglфttung"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM unterstќtzt die automatische Suche nach Aktualisierungen,\n"
"wozu ein Internetzugang erforderlich ist.\n"
-"\n"
"Mіchten Sie diese Funktion aktivieren?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-"(Sie kіnnen diese auch jederzeit im Options-Dialog unter dem Reiter "
-"\"Sonstiges\" aktivieren)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Automatisch nach Aktualisierungen suchen"
+"Sie kіnnen diese Einstellung spфter im Reiter \"Sonstiges\"\n"
+"im Optionsfenster фndern."
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Fortfahren"
@@ -1866,7 +1861,7 @@ msgstr "Zur Spiele~l~iste"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1887,7 +1882,7 @@ msgstr "Speichern:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1927,27 +1922,27 @@ msgstr "~A~bbrechen"
msgid "~K~eys"
msgstr "~T~asten"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Konnte Farbenformat nicht initialisieren."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Konnte nicht zu Grafikmodus wechseln: \""
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Konnte Einstellung fќr Seitenverhфltniskorrektur nicht anwenden."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Konnte Einstellung fќr Vollbildmodus nicht anwenden."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Konnte Filtereinstellungen nicht anwenden."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1963,7 +1958,7 @@ msgstr ""
"Lesen Sie die Liesmich-Datei fќr\n"
"weitere Informationen."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1978,7 +1973,7 @@ msgstr ""
"Spiel hіren zu kіnnen. Lesen Sie die\n"
"Liesmich-Datei fќr weitere Informationen."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1987,7 +1982,7 @@ msgstr ""
"Laden des Spielstands %s fehlgeschlagen! Bitte lesen Sie die LIESMICH-Datei "
"fќr grundlegende Informationen und Anweisungen zu weiterer Hilfe."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1998,7 +1993,7 @@ msgstr ""
"und jegliche Spielstфnde, die Sie erstellen, kіnnten in zukќnftigen "
"Versionen von ScummVM nicht mehr funktionieren."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Trotzdem starten"
@@ -2237,52 +2232,52 @@ msgstr "Automatisches Ziehen ist jetzt"
msgid "Swipe three fingers to the right to toggle."
msgstr "Zum Umschalten mit drei Fingern nach rechts wischen."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Fenstermodus"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Auflіsung: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Seitenverhфltniskorrektur an"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Seitenverhфltniskorrektur aus"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Bilineare Filterung aktiviert"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Bilineare Filterung deaktiviert"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (keine Skalierung)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal ohn.Skalieren"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktiver Grafikfilter:"
@@ -2923,7 +2918,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2937,7 +2932,7 @@ msgstr "Spiel laden:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3609,7 +3604,7 @@ msgstr "Zensur aktivieren"
msgid "Enable the game's built-in optional content censoring"
msgstr "Aktiviere die im Spiel eingebaute optionale Zensur des Inhalts"
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Automatisches Speichern)"
@@ -3628,23 +3623,23 @@ msgstr ""
"erstellt wurden: 'qfg1-' fќr Quest for Glory 1, 'qfg2-' fќr Quest for Glory "
"2. Beispiel: 'qfg2-thief.sav'."
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"Bitte verwenden Sie einen externen Betrachter, um die Hilfedatei des Spiels "
"zu іffnen: %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr "Das Format dieses Spielstands ist veraltet; laden nicht mіglich"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr "Spielstand-Version ist %d, hіchste unterstќtzte Version ist %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4705,6 +4700,14 @@ msgstr ""
"Spielstфnde bis zu Version %d. Sie benіtigen eine aktualisierte Version der "
"Engine, um diesen Spielstand zu verwenden."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr ""
+#~ "(Sie kіnnen diese auch jederzeit im Options-Dialog unter dem Reiter "
+#~ "\"Sonstiges\" aktivieren)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Automatisch nach Aktualisierungen suchen"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/el.po b/po/el.po
index 63b19c495f..4d16ca5f3b 100644
--- a/po/el.po
+++ b/po/el.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.10.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-04-28 11:12+0000\n"
"Last-Translator: Arius <alidop@pathfinder.gr>\n"
"Language-Team: Greek <https://translations.scummvm.org/projects/scummvm/"
@@ -62,8 +62,7 @@ msgstr "Ьхємтсѓч №мэљ"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -123,7 +122,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Эсщ"
@@ -136,7 +135,7 @@ msgstr "Эсщ"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Мїщ"
@@ -155,12 +154,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -911,8 +910,8 @@ msgstr ""
"Хщфщънђ ыхщєяѕёупхђ їёљьсєщъођ сэєщ№сёмшхѓчђ ящ я№япхђ ѕ№яѓєчёпцяэєсщ с№ќ "
"яёщѓьнэс №сщїэпфщс"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Ыхщєяѕёупс №ыоёяѕђ яшќэчђ"
@@ -1203,7 +1202,7 @@ msgstr "Уыўѓѓс GUI:"
msgid "Language of ScummVM GUI"
msgstr "Уыўѓѓс єяѕ ScummVM GUI"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Иыхуїяђ сэстсшьпѓхљэ:"
@@ -1647,29 +1646,25 @@ msgstr "Хюяьсыѕьнэч С№ќфяѓч"
msgid "Antialiased"
msgstr "Хюяьсыѕьнэч"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"дя ScummVM єўёс ѕ№яѓєчёпцхщ сѕєќьсєя ныхуїя ущс хэчьхёўѓхщђ\n"
"єя я№япя с№сщєхп №ёќѓтсѓч ѓєя Internet.\n"
"\n"
"Шныхєх эс хэхёуя№ящоѓхєх сѕєо єч фѕэсєќєчєс;"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-"(Ь№яёхпєх №мэєс эс єчэ хэхёуя№ящоѓхєх ѓєя №сёмшѕёя фщсыќуяѕ Х№щыяунђ ѓєчэ "
-"ъсёєныс Фщміяёс)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Сѕєќьсєяђ ныхуїяђ хэчьхёўѓхљэ"
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "аёяїўёс"
@@ -1873,7 +1868,7 @@ msgstr "Х№щѓ~є~ё. ѓєяэ Яфчучєо"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1894,7 +1889,7 @@ msgstr "С№яшоъхѕѓч №сщїэщфщя§:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1937,27 +1932,27 @@ msgstr "~С~ъ§ёљѓч"
msgid "~K~eys"
msgstr "а~ы~оъєёс"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Фхэ оєсэ фѕэсєо ч №ёяхєящьсѓпс ьяёіођ їёўьсєяђ."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Фхэ оєсэ фѕэсєо ч сыысуо ѓх ыхщєяѕёупс яшќэчђ: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Фхэ оєсэ фѕэсєо ч хісёьяуо ё§шьщѓчђ фщќёшљѓчђ сэсыяупсђ фщсѓємѓхљэ."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Фхэ оєсэ фѕэсєо ч хісёьяуо ё§шьщѓчђ №ыоёяѕђ яшќэчђ."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Фхэ оєсэ фѕэсєо ч хісёьяуо ё§шьщѓчђ іщыєёсёпѓьсєяђ."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1971,7 +1966,7 @@ msgstr ""
"єс сёїхпс фхфяьнэљэ ѓєя ѓъычёќ ѓсђ фпѓъя.\n"
"Фхпєх єя сёїхпя README ущс ых№єяьнёхщхђ."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1985,7 +1980,7 @@ msgstr ""
"эс съя§ѓхєх єч ьяѕѓщъо єяѕ №сщїэщфщя§.\n"
"Фхпєх єя сёїхпя README ущс ых№єяьнёхщхђ."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1995,7 +1990,7 @@ msgstr ""
"єя сёїхпя README ущс тсѓщънђ №ычёяіяёпхђ, ъсшўђ ъсщ ущс яфчупхђ ѓїхєщъм ьх "
"єя №ўђ эс ымтхєх №хёсщєнёљ тяошхщс."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -2006,7 +2001,7 @@ msgstr ""
"№сщїэпфщ №яѕ ъмэхєх ь№яёхп эс ьч ыхщєяѕёухп ѓх ьхыыяэєщънђ хъфќѓхщђ єяѕ "
"ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Хъъпэчѓч я§єљђ о мыыљђ"
@@ -2245,52 +2240,52 @@ msgstr "Ч ыхщєяѕёупс auto-drag хпэсщ єўёс"
msgid "Swipe three fingers to the right to toggle."
msgstr "ахёмѓєх єёпс фмїєѕыс №ёяђ єс фхющм ущс хэсыысуо."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Ыхщєяѕёупс №сёсш§ёяѕ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Сэмыѕѓч: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Хэхёуя№ящчьнэч фщќёшљѓч сэсыяупсђ фщсѓємѓхљэ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "С№хэхёуя№ящчьнэч фщќёшљѓч сэсыяупсђ фщсѓємѓхљэ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Хэхёуя№япчѓч іщыєёсёпѓьсєяђ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "С№хэхёуя№япчѓч іщыєёсёпѓьсєяђ"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Ъсэяэщъќ (їљёпђ ъыщьмъљѓч)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Ъсэяэщъќ (їљёпђ ъыщьмъљѓч)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Хэхёуќ іпыєёя уёсіщъўэ:"
@@ -2931,7 +2926,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2945,7 +2940,7 @@ msgstr "Х№сэсіяём №сщїэщфщя§:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3621,7 +3616,7 @@ msgstr "Хэхёуя№япчѓч фёяьнљэ ъсєх§шѕэѓчђ"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Сѕєќьсєч с№яшоъхѕѓч)"
@@ -3634,21 +3629,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4679,6 +4674,14 @@ msgstr ""
"ѕ№яѓєчёпцхщ ьќэя ьнїёщ єчэ нъфяѓч%d. Шс їёхщсѓєхпєх ьщс хэчьхёљьнэч нъфяѓч "
"єчђ ьчїсэођ ущс эс їёчѓщья№ящоѓхєх сѕєќ єя с№яшчъхѕьнэя №сщїэпфщ."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr ""
+#~ "(Ь№яёхпєх №мэєс эс єчэ хэхёуя№ящоѓхєх ѓєя №сёмшѕёя фщсыќуяѕ Х№щыяунђ ѓєчэ "
+#~ "ъсёєныс Фщміяёс)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Сѕєќьсєяђ ныхуїяђ хэчьхёўѓхљэ"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/es_ES.po b/po/es_ES.po
index 46043fa722..4bd58ef022 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-04-23 05:59+0000\n"
"Last-Translator: Santiago Sanchez <sanchez.santiago.j@gmail.com>\n"
"Language-Team: Spanish <https://translations.scummvm.org/projects/scummvm/"
@@ -63,8 +63,7 @@ msgstr "Arriba"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Sэ"
@@ -137,7 +136,7 @@ msgstr "Sэ"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "No"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -899,8 +898,8 @@ msgstr "Renderizado:"
msgid "Special dithering modes supported by some games"
msgstr "Modos especiales de difuminado compatibles con algunos juegos"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Pantalla completa"
@@ -1196,7 +1195,7 @@ msgstr "Idioma:"
msgid "Language of ScummVM GUI"
msgstr "Idioma de la interfaz de ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Buscar actualizaciones:"
@@ -1635,27 +1634,25 @@ msgstr "Suavizado"
msgid "Antialiased"
msgstr "Suavizado"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"Ahora ScummVM puede buscar actualizaciones automсticamente,\n"
"para lo cual se requiere una conexiѓn a Internet.\n"
"\n"
"Would you like to enable this feature?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Puedes activar esta funciѓn en la pestaёa Otras del menњ de opciones)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Buscar actualizaciones automсticamente"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Aplicar"
@@ -1855,7 +1852,7 @@ msgstr "~V~olver al lanzador"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1876,7 +1873,7 @@ msgstr "Guardar partida:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1917,27 +1914,27 @@ msgstr "~C~ancelar"
msgid "~K~eys"
msgstr "~T~eclas"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "No se ha podido iniciar el formato de color."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "No se ha podido cambiar al modo de video: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "No se ha podido aplicar el ajuste de correcciѓn de aspecto."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "No se ha podido aplicar el ajuste de pantalla completa."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "No se puede aplicar la configuraciѓn de filtrado."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1951,7 +1948,7 @@ msgstr ""
"copiar los archivos del juego al disco duro.\n"
"Consulta el archivo README para mсs detalles."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1965,7 +1962,7 @@ msgstr ""
"poder escuchar la mњsica del juego.\n"
"Consulta el archivo README para mсs detalles."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1974,7 +1971,7 @@ msgstr ""
"Hubo un fallo al cargar la partida (%s). Consulte el archivo README para "
"informaciѓn bсsica y cѓmo obtener mсs ayuda."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1984,7 +1981,7 @@ msgstr ""
"ScummVM. Por lo tanto, puede que sea inestable, y que las partidas que "
"guardes no funcionen en versiones futuras de ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Jugar aun asэ"
@@ -2223,52 +2220,52 @@ msgstr "El modo de arrastre automсtico estс"
msgid "Swipe three fingers to the right to toggle."
msgstr "Desliza tres dedos hacia la derecha para cambiar de modo."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Modo ventana"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Resoluciѓn: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Activar la correcciѓn de aspecto"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Desactivar la correcciѓn de aspecto"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filtrado activado"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filtrado desactivado"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (sin reescalado)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Filtro de grсficos activo:"
@@ -2905,7 +2902,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2919,7 +2916,7 @@ msgstr "Cargar partida:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3585,7 +3582,7 @@ msgstr "Activar cursores flotantes"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Autoguardado)"
@@ -3598,21 +3595,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4642,6 +4639,13 @@ msgstr ""
"versiѓn %d. Serс necesaria una versiѓn atualizada del motor para poder "
"usarla."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr ""
+#~ "(Puedes activar esta funciѓn en la pestaёa Otras del menњ de opciones)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Buscar actualizaciones automсticamente"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/eu.po b/po/eu.po
index 08f9a0952a..810c3839ab 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2016-12-04 13:27+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Basque <https://translations.scummvm.org/projects/scummvm/"
@@ -63,8 +63,7 @@ msgstr "Joan gora"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -123,7 +122,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Bai"
@@ -136,7 +135,7 @@ msgstr "Bai"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Ez"
@@ -153,12 +152,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -891,8 +890,8 @@ msgstr "Renderizazioa:"
msgid "Special dithering modes supported by some games"
msgstr "Joko batzuk onarturiko lausotze-modu bereziak"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Pantaila osoa"
@@ -1185,7 +1184,7 @@ msgstr "Hizkuntza:"
msgid "Language of ScummVM GUI"
msgstr "ScummVM interfazearen hizkuntza"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1627,24 +1626,20 @@ msgstr "Errendatzaile lausotua"
msgid "Antialiased"
msgstr "Lausotua"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:92
-#, fuzzy
-msgid "Check for updates automatically"
-msgstr "Eguneraketak bilatzen..."
-
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1843,7 +1838,7 @@ msgstr "It~z~uli abiarazlera"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1864,7 +1859,7 @@ msgstr "Gorde jokoa:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1904,28 +1899,28 @@ msgstr "~U~tzi"
msgid "~K~eys"
msgstr "~T~eklak"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Kolore formatua ezin izan da hasieratu."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Ezin izan da aldatu bideo modura : '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Ezin izan da formatu-ratio ezarpena aplikatu."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Ezin izan da pantaila-osoa ezarpena aplikatu."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
#, fuzzy
msgid "Could not apply filtering setting."
msgstr "Ezin izan da pantaila-osoa ezarpena aplikatu."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1939,7 +1934,7 @@ msgstr ""
"fitxategiak disko gogorrera kopiatzea.\n"
"Jo README fitxategira xehetasunetarako."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1953,7 +1948,7 @@ msgstr ""
"izateko. Jo README fitxategira\n"
"xehetasunetarako."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1962,7 +1957,7 @@ msgstr ""
"Jokoaren egoera kargatzeak huts egin du (%s)! Jo ezazu README-ra oinarrizko "
"informaziorako eta laguntza gehiago nola jaso jakiteko."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1972,7 +1967,7 @@ msgstr ""
"Hori dela eta, ezegonkorra izan daiteke eta gerta daiteke gordeta izan "
"ditzakezun partidan ez ibiltzea ScummVM-ren etorkizuneko bertsioetan."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Jolastu berdin-berdin"
@@ -2210,54 +2205,54 @@ msgstr "Auto-arrastatzea orain"
msgid "Swipe three fingers to the right to toggle."
msgstr "Pasatu hiru atzamar eskuinean gaitu/desgaitzeko."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Leiho modua"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Formatu-ratio zuzenketa gaituta"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Formatu-ratio zuzenketa desgaituta"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
#, fuzzy
msgid "Filtering enabled"
msgstr "Klikatzea gaituta"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
#, fuzzy
msgid "Filtering disabled"
msgstr "Klikatzea desgaituta"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normala (eskalatu gabe)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normala"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Filtro grafiko aktiboa:"
@@ -2895,7 +2890,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2909,7 +2904,7 @@ msgstr "Jokoa kargatu:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3578,7 +3573,7 @@ msgstr "Gaitu kurtsore flotatzaileak"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Autogordetzea:"
@@ -3592,21 +3587,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4625,6 +4620,10 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#, fuzzy
+#~ msgid "Check for updates automatically"
+#~ msgstr "Eguneraketak bilatzen..."
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 555ace71f5..f35e460c3a 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
-"PO-Revision-Date: 2017-09-09 13:38+0000\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
+"PO-Revision-Date: 2017-10-15 17:04+0000\n"
"Last-Translator: Timo Mikkolainen <tmikkola@gmail.com>\n"
"Language-Team: Finnish <https://translations.scummvm.org/projects/scummvm/"
"scummvm/fi/>\n"
@@ -63,8 +63,7 @@ msgstr "Siirry ylіs"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -123,7 +122,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Kyllф"
@@ -136,7 +135,7 @@ msgstr "Kyllф"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Ei"
@@ -155,12 +154,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -894,8 +893,8 @@ msgstr "Renderіintitila:"
msgid "Special dithering modes supported by some games"
msgstr "Erityiset dithering asetukset joita jotkut pelit tukevat"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Kokoruututila"
@@ -1186,7 +1185,7 @@ msgstr "ScummVM:n kieli:"
msgid "Language of ScummVM GUI"
msgstr "ScummVM kфyttіliittymфn kieli"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Pфivitystarkistus:"
@@ -1621,27 +1620,25 @@ msgstr "Antialiasoitu renderіijф"
msgid "Antialiased"
msgstr "Antialiasoitu"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-"ScummVM tukee nyt automaattista pфivitysten tarkistusta\n"
-"joka vaatii pффsyn internetiin\n"
-"\n"
-"Haluaisitko laittaa pффlle tфmфn ominaisuuden?"
-
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Voit aina laittaa sen pффlle asetusvalikon \"Muut\"-vфlilehdestф)"
+"ScummVM tukee nyt automaattista pфivitysten tarkistusta,\n"
+"joka vaatii pффsyn internetiin. Haluaisitko laittaa pффlle\n"
+"tфmфn ominaisuuden?"
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Tarkista pфivitykset automaattisesti"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
+"Voit muuttaa tфtф asetusta myіhemmin Muut-\n"
+"vфlilehden Asetukset-dialogista."
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Jatka"
@@ -1841,7 +1838,7 @@ msgstr "Palaa p~e~livalitsimeen"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1862,7 +1859,7 @@ msgstr "Tallenna peli:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1902,27 +1899,27 @@ msgstr "~P~eruuta"
msgid "~K~eys"
msgstr "~N~фppфimet"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Vфriformaattia ei voitu alustaa."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Videotilan vaihto ei onnistunut:'"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Kuvasuhdeasetusta ei voitu asettaa."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Kokoruututila-asetusta ei voi asettaa."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Suodatusasetusta ei voitu ottaa kфyttііn."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1935,7 +1932,7 @@ msgstr ""
"pelin tiedostot kovalevyllesi. Avaa LUEMINUT\n"
"tiedosto ohjeita varten."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1948,7 +1945,7 @@ msgstr ""
"ohjelmistoa kфyttфen, jotta musiikit\n"
"kuuluvat. Lue ohjeet README-tiedostosta."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1957,7 +1954,7 @@ msgstr ""
"Pelitallennuksen lataus epфonnistui (%s)! Konsultoi README-tiedostoa "
"saadaksesi lisфtietoa ja ohjeita avun hankkimiseen."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1967,7 +1964,7 @@ msgstr ""
"epфvakaa, eivфtkф pelitallennukset vфlttфmфttф toimi tulevissa ScummVM:n "
"versioissa."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Pelaa silti"
@@ -2206,52 +2203,52 @@ msgstr "Automaattiraahaustila on nyt"
msgid "Swipe three fingers to the right to toggle."
msgstr "Muuta tilaa pyyhkфisemфllф kolmella sormella oikealle."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Ikkunoitu tila"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Resoluutio: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Kuvasuhteen korjaus pффllф"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Kuvasuhteen korjaus pois pффltф"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Suodatus pффllф"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Suodatus pois pффltф"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normaali (ei skaalausta)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normaali (ei skaalausta)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Valittu grafiikkasuodatin:"
@@ -2890,7 +2887,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2904,7 +2901,7 @@ msgstr "Lataa pelitallenne:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3557,7 +3554,7 @@ msgstr "Sisфllіn sensurointi"
msgid "Enable the game's built-in optional content censoring"
msgstr "Pelin sisффnrakennettu valinnainen sisфllіn sensurointi"
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Autom. tallennus)"
@@ -3575,22 +3572,22 @@ msgstr ""
"'qfg1-' jos peli on Quest for Glory 1, 'qfg2-' jos peli on Quest for Glory "
"2. Esimerkki: 'qfg2-thief.sav'."
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr "Kфytф ulkoista ohjelmaa pelin ohjetiedoston avaamiseen: %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
"Tфmфn pelitallenteen formaatti on vanhentunut, sitф ei pystytф lataamaan"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr "Pelitallenteen versio on %d, suurin tuettu versio on %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4638,6 +4635,12 @@ msgstr ""
"vain versioon %d asti. Tarvitset pфivitetyn version tфstф pelimoottorista "
"kфyttффksesi tфtф pelitallennusta."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Voit aina laittaa sen pффlle asetusvalikon \"Muut\"-vфlilehdestф)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Tarkista pфivitykset automaattisesti"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 6c6c09b3ed..a7de860ffb 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-07-03 10:14+0000\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
"Language-Team: French <https://translations.scummvm.org/projects/scummvm/"
@@ -63,8 +63,7 @@ msgstr "Remonter"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Oui"
@@ -137,7 +136,7 @@ msgstr "Oui"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Non"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -901,8 +900,8 @@ msgstr "Mode de rendu :"
msgid "Special dithering modes supported by some games"
msgstr "Mode spщcial de tramage supportщ par certains jeux"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Plein щcran"
@@ -1198,7 +1197,7 @@ msgstr "Langue :"
msgid "Language of ScummVM GUI"
msgstr "Langue de l'interface graphique de ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Vщrif. mises р jour :"
@@ -1638,29 +1637,25 @@ msgstr "Rendu Anti-crщnelщ"
msgid "Antialiased"
msgstr "Anti-crщnelщ"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM peut maintenant rechercher les mises р jour\n"
"automatiquement, ce qui nщcessite un accшs internet.\n"
"\n"
"Voulez-vous activer cette options ?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-"(Vous pouvez aussi activer cette option dans le tab 'Divers'\n"
-"du dialogue d'options)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Vщrifier les mises р jour automatiquement"
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Appliquer"
@@ -1861,7 +1856,7 @@ msgstr "Retour au ~L~anceur"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1882,7 +1877,7 @@ msgstr "Sauvegarde :"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1923,27 +1918,27 @@ msgstr "~A~nnuler"
msgid "~K~eys"
msgstr "~T~ouches"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Impossible d'initialiser le format des couleurs."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Impossible de changer le mode vidщo р: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Impossible d'appliquer la correction du rapport d'aspect."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Impossible d'appliquer l'option plein щcran."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Impossible d'appliquer l'option de filtrage."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1957,7 +1952,7 @@ msgstr ""
"donnщes du jeu sur votre disque dur.\n"
"Lisez le fichier README pour plus de dщtails."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1971,7 +1966,7 @@ msgstr ""
"logiciel appropriщ.\n"
"Lisez le fichier README pour plus de dщtails."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1980,7 +1975,7 @@ msgstr ""
"Echec du chargement (%s) ! Lisez le fichier README pour les informations de "
"base et les instructions pour obtenir de l'aide supplщmentaire."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1990,7 +1985,7 @@ msgstr ""
"complшtement supportщ par ScummVM. Il est donc instable et les sauvegardes "
"peuvent ne pas marcher avec une future version de ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Je comprends"
@@ -2229,52 +2224,52 @@ msgstr "Le mode glisser-auto est maintenant"
msgid "Swipe three fingers to the right to toggle."
msgstr "Glissez trois doigts vers la droite pour changer de mode."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Mode Fenъtre"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Rщsolution : %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Activer la correction du rapport d'aspect"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Dщsactiver la correction du rapport d'aspect"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filtrage Activщ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filtrage Dщsactivщ"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (щchelle d'origine)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Mode graphique actif :"
@@ -2915,7 +2910,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2929,7 +2924,7 @@ msgstr "Charger le jeu :"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3594,7 +3589,7 @@ msgstr "Activer les curseurs flottants"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Sauvegarde automatique)"
@@ -3613,27 +3608,27 @@ msgstr ""
"Quest for Glory 1, 'qfg2' for Quest for Glory 2. Par exemple : 'qfg2-thief."
"sav'."
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"Veuillez utiliser une application externe pour ouvrir le fichier d'Aide du "
"jeu : %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
"Le format de ce fichier de sauvegarde est obsolшte. Le fichier ne peut ъtre "
"chargщ."
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
"La version du fichier de sauvegarde est %d, mais la version maximum "
"supportщe est %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4699,6 +4694,14 @@ msgstr ""
"les versions %d ou infщrieures. Vous devez utiliser une version plus rщcente "
"de ScummVM pour pouvoir charger cette sauvegarde."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr ""
+#~ "(Vous pouvez aussi activer cette option dans le tab 'Divers'\n"
+#~ "du dialogue d'options)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Vщrifier les mises р jour automatiquement"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/gl_ES.po b/po/gl_ES.po
index a4cae846d6..ffd595b5a8 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2016-11-28 15:51+0000\n"
"Last-Translator: Santiago G. Sanz <santiagogarciasanz@gmail.com>\n"
"Language-Team: Galician <https://translations.scummvm.org/projects/scummvm/"
@@ -63,8 +63,7 @@ msgstr "Arriba"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Si"
@@ -137,7 +136,7 @@ msgstr "Si"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Non"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -896,8 +895,8 @@ msgstr "Procesamento:"
msgid "Special dithering modes supported by some games"
msgstr "Modos de interpolaciѓn de cores compatibles con algњns xogos"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Pantalla completa"
@@ -1188,7 +1187,7 @@ msgstr "Idioma de interfaz:"
msgid "Language of ScummVM GUI"
msgstr "Idioma da interfaz de ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Comprobaciѓn de actualizaciѓns:"
@@ -1630,27 +1629,25 @@ msgstr "Procesamento antidistorsiѓn"
msgid "Antialiased"
msgstr "Antidistorsiѓn"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM agora ofrece a busca automсtica\n"
"de actualizaciѓns. Require acceso с Internet.\n"
"\n"
"Queres activar esta caracterэstica?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Podes actэvalo no diсlogo de opciѓn da pestana Misc.)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Buscar actualizaciѓns automaticamente"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Continuar"
@@ -1851,7 +1848,7 @@ msgstr "~V~olver ao Iniciador"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1872,7 +1869,7 @@ msgstr "Gardar partida:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1913,27 +1910,27 @@ msgstr "~C~ancelar"
msgid "~K~eys"
msgstr "~T~eclas"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Non se puido iniciar o formato de cor."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Non se puido cambiar ao modo de vэdeo: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Non se puido aplicar a configuraciѓn de proporciѓn."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Non se puido aplicar a configuraciѓn de pantalla completa."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Non se puido aplicar a configuraciѓn de filtrado."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1947,7 +1944,7 @@ msgstr ""
"os ficheiros de datos ao disco duro. Consulta\n"
"o ficheiro README para obter mсis informaciѓn."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1961,7 +1958,7 @@ msgstr ""
"do xogo. Consulta o ficheiro README\n"
"para obter mсis informaciѓn."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1970,7 +1967,7 @@ msgstr ""
"Erro ao cargar (%s)! Consulta o ficheiro README para obter informaciѓn "
"bсsica e mсis instruciѓns para acadar asistencia adicional."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1980,7 +1977,7 @@ msgstr ""
"Por iso, talvez sexa inestable e os ficheiros de gardado talvez non "
"funcionen en futuras versiѓns de ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Iniciar de todos os xeitos"
@@ -2219,52 +2216,52 @@ msgstr "O modo Autoarrastrar estс"
msgid "Swipe three fingers to the right to toggle."
msgstr "Arrastra tres dedos с dereita para cambiar o estado."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Modo en ventс"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Resoluciѓn: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Correcciѓn de proporciѓn activada"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Correcciѓn de proporciѓn desactivada"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filtrado activado"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filtrado desactivado"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (sen escala)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (sen escala)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Filtro de grсficos activo:"
@@ -2900,7 +2897,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2914,7 +2911,7 @@ msgstr "Restaurar xogo:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3589,7 +3586,7 @@ msgstr "Activa os cursores flotantes."
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Autogardado:"
@@ -3603,21 +3600,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4646,6 +4643,12 @@ msgstr ""
"compatэbel atщ a versiѓn %d. Cѓmpre descargar unha versiѓn actualizada do "
"motor para empregar estes datos gardados."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Podes actэvalo no diсlogo de opciѓn da pestana Misc.)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Buscar actualizaciѓns automaticamente"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 1f3668a283..fc964ebb6a 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
-"PO-Revision-Date: 2017-09-09 02:29+0000\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
+"PO-Revision-Date: 2017-10-15 14:17+0000\n"
"Last-Translator: George Kormendi <grubycza@hotmail.com>\n"
"Language-Team: Hungarian <https://translations.scummvm.org/projects/scummvm/"
"scummvm/hu/>\n"
@@ -63,8 +63,7 @@ msgstr "Feljebb"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Igen"
@@ -137,7 +136,7 @@ msgstr "Igen"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nem"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -891,8 +890,8 @@ msgstr "Kirajzolсs mѓd:"
msgid "Special dithering modes supported by some games"
msgstr "Nщhсny jсtщk tсmogatja a speciсlis сrnyalсsi mѓdokat"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Teljeskщpernyѕs mѓd"
@@ -1179,7 +1178,7 @@ msgstr "GUI nyelve:"
msgid "Language of ScummVM GUI"
msgstr "A ScummVM GUI nyelve"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Frissэtщs ellenѕrzщs:"
@@ -1615,27 +1614,25 @@ msgstr "Щlsimэtсsos lekщpezѕ"
msgid "Antialiased"
msgstr "Щlsimэtott"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM mсr tсmogatja az automatikus frissэtщseket\n"
-"amelyhez internet hozzсfщrщs szќksщges.\n"
-"\n"
-"Szeretnщ, engedщlyezni ezt a funkciѓt?"
-
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Bсrmikor engedщlyezheti a beсllэtсsok ablakban az Egyщb fќlnщl)"
+"amely internethozzсfщrщst igщnyel. Szeretnщ\n"
+"engedщlyezni ezt a funkciѓt?"
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Frissэtщsek automatikus keresщse"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
+"Ezt a beсllэtсst kщsѕbb mѓdosэthatod az Egyщb lapon\n"
+"az Opciѓk pсrbeszщdablakban."
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Folyamatban"
@@ -1835,7 +1832,7 @@ msgstr "Visszatщrщs az indэtѓba"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1856,7 +1853,7 @@ msgstr "Jсtщk mentщse:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1896,27 +1893,27 @@ msgstr "~M~щgse"
msgid "~K~eys"
msgstr "Billentyќk"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Szэn formсtum nincs alkalmazva."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Videѓmѓd nincs сtсllэtva: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Mщretarсny korrekciѓ nem vсltozott."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Teljeskщpernyѕs beсllэtсs nincs alkalmazva."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Nem sikerќlt alkalmazni a szћrщsi beсllэtсst."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1930,7 +1927,7 @@ msgstr ""
"adatfсjljait a merevlemezedre.\n"
"Nщzd meg a README fсjlt a rщszletekщrt."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1944,7 +1941,7 @@ msgstr ""
"hogy a jсtщk zenщje hallhatѓ legyen.\n"
"Nщzd meg a README fсjlt a rщszletekщrt."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1954,7 +1951,7 @@ msgstr ""
"alap informсciѓkrѓl щs az utasэtсsokat, hogy hogyan segэthetsz a "
"kщsѕbbiekben."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1964,7 +1961,7 @@ msgstr ""
"ScummVM. Szсmэts rс hogy nem stabilan fut, щs a mentщsek nem mћkіdnek a "
"jіvѕbeni ScummVM verziѓkkal."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Indэtсs эgy is"
@@ -2201,52 +2198,52 @@ msgstr "Auto-hњz mѓdban van"
msgid "Swipe three fingers to the right to toggle."
msgstr "мsd hсrom њjjal hogy biztosan vсltson."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Ablakos mѓd"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Felbontсs: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Mщretarсny korrekciѓ engedщlyezve"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Mщretarсny korrekciѓ letiltva"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Szћrщs engedщlyezve"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Szћrщs letiltva"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normсl (nincs сtmщretezщs)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normсl (nincs сtmщretezщs)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktэv grafikus szћrѕk:"
@@ -2880,7 +2877,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2894,7 +2891,7 @@ msgstr "Jсtщkmenet visszaсllэtсsa:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3549,7 +3546,7 @@ msgstr "Tartalmi cenzњra engedщlyezщse"
msgid "Enable the game's built-in optional content censoring"
msgstr "Engedщlyezze a jсtщk beщpэtett opcionсlis tartalmi cenzњrсzсsсt"
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Automentщs)"
@@ -3567,22 +3564,22 @@ msgstr ""
"'qfg1-' Quest for Glory 1 'qfg2-' Quest for Glory 2. Pщldсul: 'qfg2-thief."
"sav'."
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"A jсtщk sњgѓfсjljсnak megnyitсsсhoz kќlsѕ megjelenэtѕt kell hasznсlnia: %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr "A mentett jсtщk formсtuma elavult, nem lehet betіlteni"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr "A mentщs verziѓja %d, a maximсlisan tсmogatott %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4631,6 +4628,12 @@ msgstr ""
"tсmogat. Szќksщged van a motor frissэtett verziѓjсra, hogy hasznсld a "
"mentett jсtщkсllсst."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Bсrmikor engedщlyezheti a beсllэtсsok ablakban az Egyщb fќlnщl)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Frissэtщsek automatikus keresщse"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/it_IT.po b/po/it_IT.po
index c30c3f982b..91216c2692 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
-"PO-Revision-Date: 2017-09-09 07:41+0000\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
+"PO-Revision-Date: 2017-10-15 16:42+0000\n"
"Last-Translator: Paolo Bossi <pbossi86@gmail.com>\n"
"Language-Team: Italian <https://translations.scummvm.org/projects/scummvm/"
"scummvm/it/>\n"
@@ -63,8 +63,7 @@ msgstr "Su"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Sь"
@@ -137,7 +136,7 @@ msgstr "Sь"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "No"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -899,8 +898,8 @@ msgstr "Resa grafica:"
msgid "Special dithering modes supported by some games"
msgstr "Modalitр di resa grafica speciali supportate da alcuni giochi"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Modalitр a schermo intero"
@@ -1190,7 +1189,7 @@ msgstr "Lingua GUI:"
msgid "Language of ScummVM GUI"
msgstr "Lingua dell'interfaccia grafica di ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Controllo aggiornamenti:"
@@ -1629,29 +1628,26 @@ msgstr "Renderer con antialiasing"
msgid "Antialiased"
msgstr "Con antialiasing"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-"ScummVM supporta la verifica automatica degli aggiornamenti.\n"
+"ScummVM ora supporta la verifica automatica degli aggiornamenti.\n"
"E' richiesto l'accesso a Internet.\n"
"\n"
"Desideri abilitare questa funzionalitр?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-"(E' possibile attivarla in qualsiasi momento tramite la scheda \"Varie\" "
-"della finestra Opzioni)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Controlla aggiornamenti automaticamente"
+"E' possibile cambiare questa impostazione inseguito tramite la sezione \"Vari"
+"\" del menu Opzioni."
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Procedi"
@@ -1854,7 +1850,7 @@ msgstr "~V~ai a elenco giochi"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1875,7 +1871,7 @@ msgstr "Salva gioco:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1916,27 +1912,27 @@ msgstr "~A~nnulla"
msgid "~K~eys"
msgstr "~T~asti"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Impossibile inizializzare il formato colore."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Impossibile cambiare la modalitр video: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Impossibile applicare l'impostazione proporzioni."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Impossibile applicare l'impostazione schermo intero."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Impossibile applicare l'impostazione di filtraggio."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1950,7 +1946,7 @@ msgstr ""
"sull'hard disk.\n"
"Vedi il file README per i dettagli."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1964,7 +1960,7 @@ msgstr ""
"la musica del gioco.\n"
"Vedi il file README per i dettagli."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1974,7 +1970,7 @@ msgstr ""
"informazioni di base e per le istruzioni su come ottenere ulteriore "
"assistenza."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1984,7 +1980,7 @@ msgstr ""
"ScummVM. Ш quindi possibile che sia instabile, e i salvataggi potrebbero non "
"funzionare con future versioni di ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Avvia comunque"
@@ -2223,52 +2219,52 @@ msgstr "La modalitр di autotrascimento ш ora"
msgid "Swipe three fingers to the right to toggle."
msgstr "Fai scivolare tre dita verso destra per cambiare."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Modalitр finestra"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Risoluzione: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Correzione proporzioni attivata"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Correzione proporzioni disattivata"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filtro video attivato"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filtro disattivato"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normale (nessun ridimensionamento)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normale (no ridim.)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Filtro grafico attivo:"
@@ -2906,7 +2902,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2920,7 +2916,7 @@ msgstr "Ripristina partita:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3581,7 +3577,7 @@ msgstr "Attiva censura del contenuto"
msgid "Enable the game's built-in optional content censoring"
msgstr "Attiva la censura dei contenuti incorporata nel gioco"
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Autosalvataggio)"
@@ -3600,24 +3596,24 @@ msgstr ""
"Quest for Glory 1, \"qfg2-\" per Quest for Glory 2. Ad esempio: \"qfg2-ladro."
"sav\"."
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"Si prega di usare un programma di visualizzazione esterno per aprire il file "
"di aiuto:%s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr "Il formato di questo salvataggio ш obsoleto, impossibile caricarlo"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
"La versione del salvataggio ш %d, la versione piљ recente supportata ш %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4683,6 +4679,14 @@ msgstr ""
"versione %d o inferiori. Procurati una motore aggiornato per usare questo "
"salvataggio."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr ""
+#~ "(E' possibile attivarla in qualsiasi momento tramite la scheda \"Varie\" "
+#~ "della finestra Opzioni)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Controlla aggiornamenti automaticamente"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 76401e9c46..91ac2556f0 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2016-12-26 17:36+0000\n"
"Last-Translator: Einar Johan Trјan Sјmхen <einarjohants@gmail.com>\n"
"Language-Team: Norwegian Bokmхl <https://translations.scummvm.org/projects/"
@@ -64,8 +64,7 @@ msgstr "Oppover"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -125,7 +124,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Ja"
@@ -138,7 +137,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nei"
@@ -157,12 +156,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -899,8 +898,8 @@ msgstr "Tegnemodus:"
msgid "Special dithering modes supported by some games"
msgstr "Spesiel dithering-modus stјttet av enkelte spill"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
@@ -1187,7 +1186,7 @@ msgstr "GUI-sprхk:"
msgid "Language of ScummVM GUI"
msgstr "Sprхk i ScummVM-GUIet"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Oppdateringssjekk:"
@@ -1623,27 +1622,25 @@ msgstr "Kantutjevnet tegner"
msgid "Antialiased"
msgstr "Kantutjevnet"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM stјtter nх automatisk sjekking for oppdateringer\n"
"noe som krever internettilgang.\n"
"\n"
"Vil du aktivere denne funksjonaliteten?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Du kan alltids aktivere dette i valgdialogen i Diverse-fanen)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Sjekk for oppdateringer automatisk"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Fortsett"
@@ -1840,7 +1837,7 @@ msgstr "~T~ilbake til oppstarter"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1861,7 +1858,7 @@ msgstr "Lagret spill:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1902,27 +1899,27 @@ msgstr "~A~vbryt"
msgid "~K~eys"
msgstr "~T~aster"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Kunne ikke initalisere fargeformat."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Kunne ikke veksle til videomodus: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Kunne ikke aktivere aspektrate-innstilling."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Kunne ikke aktivere fullskjermsinnstilling."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Kunne ikke aktivere filterinnstilling."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1936,7 +1933,7 @@ msgstr ""
"datafilene til harddisken din istedet.\n"
"Se README-filen for detaljer."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1950,7 +1947,7 @@ msgstr ""
"kunne hјre pх spillets musikk.\n"
"Se README-filen for detaljer."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1959,7 +1956,7 @@ msgstr ""
"Klarte ikke laste spill (%s)! Vennligst se i README-fila for grunnleggende "
"informasjon og instruksjoner om hvordan du kan fх mer hjelp."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1969,7 +1966,7 @@ msgstr ""
"Derfor er det sannsynlig at det vil vцre ustabilt, og det er ikke sikkert at "
"lagrede spill vil fortsette х fungere i fremtidige versjoner av ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Start allikevel"
@@ -2208,52 +2205,52 @@ msgstr "Auto-dramodus er nх"
msgid "Swipe three fingers to the right to toggle."
msgstr "Sveip tre fingre til hјyre for х veksle."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Vindusmodus"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Opplјsning: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Aspekt-rate korrigering aktivert"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Aspekt-rate korrigering deaktivert"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filtrering aktivert"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filtrering deaktivert"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktivt grafikkfilter:"
@@ -2886,7 +2883,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2900,7 +2897,7 @@ msgstr "Gjennopprett spill:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3560,7 +3557,7 @@ msgstr "Aktiver flytende muspekere"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Autolagre:"
@@ -3574,21 +3571,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4604,6 +4601,12 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Du kan alltids aktivere dette i valgdialogen i Diverse-fanen)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Sjekk for oppdateringer automatisk"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/nl_NL.po b/po/nl_NL.po
index a9839e28c7..f3d4260448 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.9.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
-"PO-Revision-Date: 2017-09-11 06:41+0000\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
+"PO-Revision-Date: 2017-10-16 05:46+0000\n"
"Last-Translator: Ben Castricum <github@bencastricum.nl>\n"
"Language-Team: Dutch <https://translations.scummvm.org/projects/scummvm/"
"scummvm/nl/>\n"
@@ -64,8 +64,7 @@ msgstr "Ga omhoog"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -123,7 +122,7 @@ msgstr "Uw verbinding lijkt beperkt. Wilt u echt bestanden ermee downloaden?"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Ja"
@@ -136,7 +135,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nee"
@@ -155,12 +154,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -898,8 +897,8 @@ msgstr "Render modus:"
msgid "Special dithering modes supported by some games"
msgstr "Speciale ditheringmodi die door sommige games ondersteund worden"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Volledig-scherm modus"
@@ -1189,7 +1188,7 @@ msgstr "GUI Taal:"
msgid "Language of ScummVM GUI"
msgstr "Taal van de ScummVM GUI"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Update controle:"
@@ -1622,27 +1621,26 @@ msgstr "Antialiased Renderer"
msgid "Antialiased"
msgstr "Antialiased"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-"ScummVM ondersteunt nu automatische updates.\n"
+"ScummVM ondersteunt nu automatische controle op updates.\n"
"Hiervoor is wel internet toegang nodig.\n"
"\n"
"Wilt u deze functie inschakelen?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(U kunt dit altijd inschakelen in de opties dialoog van de Misc tab)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Automatisch controleren op updates"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
+"U kunt deze instelling later in het Misc-tabblad in het dialoogvenster "
+"Opties wijzigen."
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Ga verder"
@@ -1844,7 +1842,7 @@ msgstr "S~t~artmenu"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1865,7 +1863,7 @@ msgstr "Spel opslaan:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1907,28 +1905,28 @@ msgstr "~A~nnuleer"
msgid "~K~eys"
msgstr "~T~oetsen"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Kon kleurformaat niet initialiseren."
# can this be changed into "Could not switch to video mode '%s'"?
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Kon niet schakelen naar videomodus: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Pixelverhoudinginstelling kon niet toegepast worden."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Kon volledig-scherminstelling niet toepassen."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Filterinstelling kon niet toegepast worden."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1942,7 +1940,7 @@ msgstr ""
"bestanden naar uw harddisk te kopieren.\n"
"Voor details kijk in de README."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1955,7 +1953,7 @@ msgstr ""
"CD rip programma om te kunnen luisteren naar\n"
"het spelmuziek. Voor details kijk in de README."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1965,7 +1963,7 @@ msgstr ""
"voor basisinformatie, en voor instructies voor het verkrijgen van verdere "
"assistentie."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1976,7 +1974,7 @@ msgstr ""
"instabiel is, en opgeslagen spellen zullen mogelijk niet werken in "
"toekomstige versies van ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Evengoed starten"
@@ -2215,52 +2213,52 @@ msgstr "Auto-sleep modus is nu"
msgid "Swipe three fingers to the right to toggle."
msgstr "Swipe drie vingers naar rechts om te schakelen."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Venstermodus"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Resolutie: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Pixelverhoudingcorrectie ingeschakeld"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Pixelverhoudingcorrectie uitgeschakeld"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filteren aangezet"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filteren uitgeschakeld"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normaal (niet schalen)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normaal (niet schalen)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Actieve grafische filter:"
@@ -2901,7 +2899,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2915,7 +2913,7 @@ msgstr "Laad opgeslagen spel:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3580,7 +3578,7 @@ msgstr "Censureren content inschakelen"
msgid "Enable the game's built-in optional content censoring"
msgstr "Inschakelen van het in het spel gebouwde optionele inhoud censuur"
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Automatisch opslaan)"
@@ -3599,24 +3597,24 @@ msgstr ""
"'qfg1-' voor Quest for Glory 1, 'qfg2-' voor Quest for Glory 2. Voorbeeld: "
"'qfg2-thief.sav'."
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"Gebruik a.u.b. een externe viewer om het help-bestand van het spel te "
"openen: %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
"Het formaat van dit opgeslagen spel is verouderd, het laden is niet mogelijk"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr "Opgeslagen spel heeft versie %d, maximaal ondersteunde is %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4667,6 +4665,13 @@ msgstr ""
"tot versie %d. U heeft een nieuwere versie van deze engine nodig om dit "
"opgeslagen te gebruiken."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr ""
+#~ "(U kunt dit altijd inschakelen in de opties dialoog van de Misc tab)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Automatisch controleren op updates"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/nn_NO.po b/po/nn_NO.po
index bbd24fc303..28d76b4d79 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2016-12-18 18:23+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Norwegian Nynorsk <https://translations.scummvm.org/projects/"
@@ -64,8 +64,7 @@ msgstr "Oppover"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Ja"
@@ -137,7 +136,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nei"
@@ -154,12 +153,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -891,8 +890,8 @@ msgstr "Teiknemodus:"
msgid "Special dithering modes supported by some games"
msgstr "Spesielle dithering-modus som stјttast av nokre spel"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
@@ -1177,7 +1176,7 @@ msgstr "GUI-sprхk:"
msgid "Language of ScummVM GUI"
msgstr "Sprхk i ScummVM-GUIet"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1620,24 +1619,20 @@ msgstr "Kantutjevna teiknar"
msgid "Antialiased"
msgstr "Kantutjevna"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:92
-#, fuzzy
-msgid "Check for updates automatically"
-msgstr "SJх etter oppdateringar..."
-
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1836,7 +1831,7 @@ msgstr "Tilbake til Oppsta~r~tar"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1857,7 +1852,7 @@ msgstr "Lagra spel:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1899,28 +1894,28 @@ msgstr "~A~vbryt"
msgid "~K~eys"
msgstr "~T~astar"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Hјgkvalitetslyd (treigare) (omstart)."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Kunne ikkje veksle til videomodus: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Kunne ikkje slх pх aspekt-korrigering."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Kunne ikkje aktiver fullskjermsinnstilling."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
#, fuzzy
msgid "Could not apply filtering setting."
msgstr "Kunne ikkje aktiver fullskjermsinnstilling."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1934,7 +1929,7 @@ msgstr ""
"datafilane til harddisken din istaden. \n"
"Sjх README-fila for detaljar."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1943,7 +1938,7 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1953,7 +1948,7 @@ msgstr ""
"grunnlegjande informasjon, og for instruskjonar om korleis du kan fх "
"ytterlegare hjelp."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1963,7 +1958,7 @@ msgstr ""
"ennх. Derfor er det sannsynleg at det er ustabilt, og det er mogleg at lagra "
"spel ikkje vil fungere med fremtidige versjonar av ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Start allikevel"
@@ -2201,54 +2196,54 @@ msgstr ""
msgid "Swipe three fingers to the right to toggle."
msgstr "Sveip tre fingre til hјgre for х veksle."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Vindusmodus"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Aspekt-korrigering aktivert"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Aspekt-korrigering ikkje aktivert"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
#, fuzzy
msgid "Filtering enabled"
msgstr "Klikking aktivert"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
#, fuzzy
msgid "Filtering disabled"
msgstr "Klikking Deaktivert"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (ikkje skaler)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (ikkje skaler)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktivt grafikkfilter:"
@@ -2881,7 +2876,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2895,7 +2890,7 @@ msgstr "Gjenopprett spel:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3525,7 +3520,7 @@ msgstr "Slх pх flytande peikarar"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Autolagre:"
@@ -3539,21 +3534,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4568,6 +4563,10 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#, fuzzy
+#~ msgid "Check for updates automatically"
+#~ msgstr "SJх etter oppdateringar..."
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/pl_PL.po b/po/pl_PL.po
index e14d19d16e..b40e725ffa 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-01-25 12:49+0000\n"
"Last-Translator: RafaГ Rzepecki <divided.mind@gmail.com>\n"
"Language-Team: Polish <https://translations.scummvm.org/projects/scummvm/"
@@ -68,8 +68,7 @@ msgstr "W gѓrъ"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -129,7 +128,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Tak"
@@ -142,7 +141,7 @@ msgstr "Tak"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nie"
@@ -161,12 +160,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -897,8 +896,8 @@ msgstr "Renderer:"
msgid "Special dithering modes supported by some games"
msgstr "Specjalne tryby ditheringu wspierane przez niektѓre gry"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "PeГny ekran"
@@ -1188,7 +1187,7 @@ msgstr "Jъzyk interfejsu:"
msgid "Language of ScummVM GUI"
msgstr "Jъzyk interfejsu ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "SprawdМ aktualizacje:"
@@ -1625,27 +1624,25 @@ msgstr "WygГadzany renderer"
msgid "Antialiased"
msgstr "WygГadzany"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM umoПliwia teraz automatyczne sprawdzanie aktualizacji;\n"
"wymaga to dostъpu do Internetu.\n"
"\n"
"Czy wГБczyц tъ funkcjъ?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(MoПna jБ wГБczyц pѓМniej w opcjach, w zakГadce \"RѓПne\".)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Automatycznie sprawdzaj aktualizacje"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Kontynuuj"
@@ -1846,7 +1843,7 @@ msgstr "~P~owrѓt do launchera"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1867,7 +1864,7 @@ msgstr "Zapis:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1908,27 +1905,27 @@ msgstr "~A~nuluj"
msgid "~K~eys"
msgstr "~K~lawisze"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Nie udaГo siъ zainicjalizowaц formatu kolorѓw."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Nie udaГo siъ przeГБczyц w tryb wideo: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Nie udaГo siъ zastosowaц ustawienia formatu obrazu."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Nie udaГo siъ zastosowaц ustawienia peГnego ekranu."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Nie udaГo siъ zastosowaц ustawienia filtrowania."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1940,7 +1937,7 @@ msgstr ""
"znane problemѓw. StБd zalecane jest skopiowanie plikѓw gry na twardy dysk.\n"
"Dalsze informacje sБ dostъpne w pliku README."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1952,7 +1949,7 @@ msgstr ""
"skopiowaц na dysk za pomocБ odpowiedniego rippera CD audio.\n"
"Dalsze informacje sБ dostъpne w pliku README."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1961,7 +1958,7 @@ msgstr ""
"Odczyt stanu gry nie powiѓdГ siъ (%s)! Aby uzyskaц podstawowe informacje "
"oraz dowiedzieц jak szukaц dalszej pomocy, sprawdМ plik README."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1971,7 +1968,7 @@ msgstr ""
"ScummVM. W zwiБzku z tym moПe byц ona niestabilna, a wszelkie zapisy, "
"ktѓrych dokonasz, mogБ byц nieobsГugiwane w przyszГych wersjach ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "WГБcz mimo tego"
@@ -2210,54 +2207,54 @@ msgstr "Tryb automatycznego przeciБgania jest"
msgid "Swipe three fingers to the right to toggle."
msgstr "Przesuё trzema palcami, Пeby zmieniц."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Okno"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "WГБczono korekcjъ formatu obrazu"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "WyГБczono korekcjъ formatu obrazu"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
#, fuzzy
msgid "Filtering enabled"
msgstr "Klikanie wГБczone"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
#, fuzzy
msgid "Filtering disabled"
msgstr "Klikanie wyГБczone"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "ZwykГy (bez skalowania)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "ZwykГy (bez skalowania)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktywny filtr graficzny:"
@@ -2891,7 +2888,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2905,7 +2902,7 @@ msgstr "Wznѓw grъ:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3568,7 +3565,7 @@ msgstr "WГБcz pГywajБce kursory"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Autozapis:"
@@ -3582,21 +3579,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4617,6 +4614,12 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(MoПna jБ wГБczyц pѓМniej w opcjach, w zakГadce \"RѓПne\".)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Automatycznie sprawdzaj aktualizacje"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 0f1d229aa5..9fbc28aa69 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-03-03 22:26+0000\n"
"Last-Translator: rafaelmessias <rmmartins@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://translations.scummvm.org/"
@@ -66,8 +66,7 @@ msgstr "Acima"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -126,7 +125,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Sim"
@@ -139,7 +138,7 @@ msgstr "Sim"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nуo"
@@ -158,12 +157,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -909,8 +908,8 @@ msgstr "Renderizaчуo:"
msgid "Special dithering modes supported by some games"
msgstr "Modos especiais de dithering suportados por alguns jogos"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Modo Tela Cheia"
@@ -1201,7 +1200,7 @@ msgstr "Idioma do GUI:"
msgid "Language of ScummVM GUI"
msgstr "Linguagem do ScummVM GUI"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1655,24 +1654,20 @@ msgstr "Renderizador Anti-Serrilhamento (16bpp)"
msgid "Antialiased"
msgstr "Anti-Serrilhamento (16bpp)"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:92
-#, fuzzy
-msgid "Check for updates automatically"
-msgstr "Procurar por Atualizaчѕes..."
-
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1873,7 +1868,7 @@ msgstr "~V~oltar ao menu"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1894,7 +1889,7 @@ msgstr "Salvar jogo:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1936,28 +1931,28 @@ msgstr "~C~ancelar"
msgid "~K~eys"
msgstr "~T~eclas"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Nуo foi possэvel inicializar o formato de cor."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Nуo foi possэvel alternar o modo de vэdeo atual: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Nуo foi possэvel aplicar a correчуo de proporчуo."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Nуo foi possэvel aplicar a configuraчуo de tela cheia."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
#, fuzzy
msgid "Could not apply filtering setting."
msgstr "Nуo foi possэvel aplicar a configuraчуo de tela cheia."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1971,7 +1966,7 @@ msgstr ""
"os arquivos de dados para o disco rэgido.\n"
"Consulte o arquivo README para mais detalhes."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1985,7 +1980,7 @@ msgstr ""
"para ouvir a mњsica do jogo.\n"
"Consulte o arquivo README para mais detalhes."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1995,7 +1990,7 @@ msgstr ""
"Por favor, consulte o README para obter informaчѕes bсsicas, e para obter "
"instruчѕes sobre como obter assistъncia adicional."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -2005,7 +2000,7 @@ msgstr ""
"suportado pelo ScummVM. Como tal, щ provсvel que seja instсvel, e qualquer "
"jogo salvo que vocъ fizer pode nуo funcionar em futuras versѕes do ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Iniciar de qualquer maneira"
@@ -2247,55 +2242,55 @@ msgstr ""
msgid "Swipe three fingers to the right to toggle."
msgstr ""
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
#, fuzzy
msgid "OpenGL"
msgstr "Abrir"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Modo janela"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Correчуo de proporчуo habilitada"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Correчуo de proporчуo desabilitada"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
#, fuzzy
msgid "Filtering enabled"
msgstr "Clicando Habilitado"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
#, fuzzy
msgid "Filtering disabled"
msgstr "Clicando Desabilitado"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normal (sem escala)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (sem escala)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Ativa os filtros grсficos:"
@@ -2928,7 +2923,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2942,7 +2937,7 @@ msgstr "Restaurar jogo:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3608,7 +3603,7 @@ msgstr ""
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Auto-Salvar:"
@@ -3622,21 +3617,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4658,6 +4653,10 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#, fuzzy
+#~ msgid "Check for updates automatically"
+#~ msgstr "Procurar por Atualizaчѕes..."
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/pt_PT.po b/po/pt_PT.po
index d3501a12c2..dc7b999457 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.10.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-01-30 14:50+0000\n"
"Last-Translator: Vitor Santos <vitorhgsantos90@gmail.com>\n"
"Language-Team: Portuguese (Portugal) <https://translations.scummvm.org/"
@@ -63,8 +63,7 @@ msgstr "Acima"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -124,7 +123,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Sim"
@@ -137,7 +136,7 @@ msgstr "Sim"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nуo"
@@ -156,12 +155,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -908,8 +907,8 @@ msgstr "Renderizaчуo:"
msgid "Special dithering modes supported by some games"
msgstr "Modos especiais de pontilhado suportados por alguns jogos"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Modo de ecrу inteiro"
@@ -1191,7 +1190,7 @@ msgstr ""
msgid "Language of ScummVM GUI"
msgstr ""
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1619,23 +1618,20 @@ msgstr ""
msgid "Antialiased"
msgstr ""
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
-msgstr ""
-
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1832,7 +1828,7 @@ msgstr ""
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1853,7 +1849,7 @@ msgstr ""
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1889,27 +1885,27 @@ msgstr ""
msgid "~K~eys"
msgstr ""
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr ""
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr ""
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr ""
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr ""
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr ""
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1918,7 +1914,7 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1927,21 +1923,21 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
"might not work in future versions of ScummVM."
msgstr ""
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr ""
@@ -2168,52 +2164,52 @@ msgstr ""
msgid "Swipe three fingers to the right to toggle."
msgstr ""
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr ""
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr ""
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr ""
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr ""
@@ -2837,7 +2833,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2851,7 +2847,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3445,7 +3441,7 @@ msgstr ""
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr ""
@@ -3458,21 +3454,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 7e1f4cb20f..deb5636efc 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-06-20 15:35+0000\n"
"Last-Translator: Ivan Lukyanov <lid-gr@tut.by>\n"
"Language-Team: Russian <https://translations.scummvm.org/projects/scummvm/"
@@ -64,8 +64,7 @@ msgstr "Вверх"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -125,7 +124,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Да"
@@ -138,7 +137,7 @@ msgstr "Да"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Нет"
@@ -157,12 +156,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -896,8 +895,8 @@ msgstr "Режим растра:"
msgid "Special dithering modes supported by some games"
msgstr "Специальные режимы рендеринга, поддерживаемые некоторыми играми"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Полноэкранный режим"
@@ -1190,7 +1189,7 @@ msgstr "Язык GUI:"
msgid "Language of ScummVM GUI"
msgstr "Язык графического интерфейса ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Проверять обновления:"
@@ -1625,27 +1624,25 @@ msgstr "Растеризатор со сглаживанием"
msgid "Antialiased"
msgstr "Со сглаживанием"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM стал поддерживать автоматическую проверку\n"
"обновлений, которая требует доступа в Интернет.\n"
"\n"
"Вы хотите включить эту опцию?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Вы всегда можете включить её в настройках на закладке \"Разное\")"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Автоматически проверять обновления"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Продолжить"
@@ -1845,7 +1842,7 @@ msgstr "~В~ главное меню"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1866,7 +1863,7 @@ msgstr "Сохранить игру:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1908,27 +1905,27 @@ msgstr "О~т~мена"
msgid "~K~eys"
msgstr "~К~лавиши"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Не могу инициализировать формат цвета."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Не удалось переключить видеорежим: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Не удалось использовать коррекцию соотношения сторон."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Не могу применить полноэкранный режим."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Не могу применить настройки фильтрации."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1942,7 +1939,7 @@ msgstr ""
"на жёсткий диск. Подробности можно найти в\n"
"файле README."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1957,7 +1954,7 @@ msgstr ""
"появится музыка. Подробности можно найти в\n"
"файле README."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1967,7 +1964,7 @@ msgstr ""
"README за базовой информацией, а также инструкциями о том, как получить "
"дальнейшую помощь."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1977,7 +1974,7 @@ msgstr ""
"поддерживается ScummVM полностью. Она, скорее всего, не будет работать "
"стабильно, и сохранения игр могут не работать в будущих версиях ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Всё равно запустить"
@@ -2216,52 +2213,52 @@ msgstr "Режим автодрэга сейчас"
msgid "Swipe three fingers to the right to toggle."
msgstr "Проведите тремя пальцами направо для переключения."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Оконный режим"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Разрешение: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Коррекция соотношения сторон включена"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Коррекция соотношения сторон выключена"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Фильтрация включена"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Фильрация выключена"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Без увеличения"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Без увеличения"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Активный графический фильтр:"
@@ -2896,7 +2893,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2910,7 +2907,7 @@ msgstr "Восстановить игру:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3580,7 +3577,7 @@ msgstr "Включить плавающие курсоры"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Автосохранение)"
@@ -3593,24 +3590,24 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"Пожалуйста, воспользуйтесь другой программой для просмотра файла помощи "
"игры: %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
#, fuzzy
msgid "The format of this saved game is obsolete, unable to load it"
msgstr "Формат файла сохранённой игры устарел, не могу загрузить его"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, fuzzy, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr "Версия файла сохранения: %d, но максимальная поддерживаемая: %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
#, fuzzy
msgid ""
"This saved game was created with a different version of the game, unable to "
@@ -4650,6 +4647,12 @@ msgstr ""
"версии не выше %d. Для использования этого файла необходима свежая версия "
"движка."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Вы всегда можете включить её в настройках на закладке \"Разное\")"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Автоматически проверять обновления"
+
#~ msgid "8 kHz"
#~ msgstr "8 кГц"
diff --git a/po/scummvm.pot b/po/scummvm.pot
index ef3a705290..223d6a777d 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.10.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -60,8 +60,7 @@ msgstr ""
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -119,7 +118,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr ""
@@ -132,7 +131,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr ""
@@ -149,12 +148,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -874,8 +873,8 @@ msgstr ""
msgid "Special dithering modes supported by some games"
msgstr ""
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr ""
@@ -1157,7 +1156,7 @@ msgstr ""
msgid "Language of ScummVM GUI"
msgstr ""
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1584,23 +1583,20 @@ msgstr ""
msgid "Antialiased"
msgstr ""
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
-msgstr ""
-
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1797,7 +1793,7 @@ msgstr ""
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1818,7 +1814,7 @@ msgstr ""
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1854,27 +1850,27 @@ msgstr ""
msgid "~K~eys"
msgstr ""
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr ""
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr ""
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr ""
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr ""
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr ""
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1883,7 +1879,7 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1892,21 +1888,21 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
"might not work in future versions of ScummVM."
msgstr ""
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr ""
@@ -2133,52 +2129,52 @@ msgstr ""
msgid "Swipe three fingers to the right to toggle."
msgstr ""
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr ""
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr ""
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr ""
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr ""
@@ -2802,7 +2798,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2816,7 +2812,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3409,7 +3405,7 @@ msgstr ""
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr ""
@@ -3422,21 +3418,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
diff --git a/po/sv_SE.po b/po/sv_SE.po
index 4e4c48bb3e..e4f3ac942d 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-01-06 09:18+0000\n"
"Last-Translator: Petter Sjіlund <ignalina@mac.com>\n"
"Language-Team: Swedish <https://translations.scummvm.org/projects/scummvm/"
@@ -64,8 +64,7 @@ msgstr "Uppхt"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -125,7 +124,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Ja"
@@ -138,7 +137,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Nej"
@@ -157,12 +156,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -900,8 +899,8 @@ msgstr "Renderingslфge:"
msgid "Special dithering modes supported by some games"
msgstr "Speciella gitterlфgen stіdda av vissa spel"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Fullskфrmslфge"
@@ -1190,7 +1189,7 @@ msgstr "GUI-sprхk:"
msgid "Language of ScummVM GUI"
msgstr "Sprхk fіr ScummVM:s anvфndargrфnssnitt"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Uppdateringskoll:"
@@ -1627,28 +1626,25 @@ msgstr "Antialiserad rendering"
msgid "Antialiased"
msgstr "Antialiserad"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM stіder nu automatisk uppdateringskontroll,\n"
"vilket krфver en internetanslutning.\n"
"\n"
"Vill du aktivera den hфr funktionen?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-"(Du kan alltid aktivera den under \"Diverse\"-fliken i instфllningarna)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Kolla efter uppdateringar automatiskt"
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Fortsфtt"
@@ -1849,7 +1845,7 @@ msgstr "Хte~r~vфnd till launcher"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1870,7 +1866,7 @@ msgstr "Spara spelet:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1911,27 +1907,27 @@ msgstr "A~v~bryt"
msgid "~K~eys"
msgstr "~T~angenter"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Kunde inte initialisera fфrgformat."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Kunde inte byta till videolфget: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Kunde inte фndra instфllningen fіr bildfіrhхllanden."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Kunde inte applicera fullskфrmsinstфllning."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Filterinstфllningen stіds inte."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1945,7 +1941,7 @@ msgstr ""
"datafilerna till din hхrddisk istфllet.\n"
"Se README-filen fіr detaljer."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1959,7 +1955,7 @@ msgstr ""
"fіr att kunna lyssna pх spelets musik.\n"
"Se README-filen fіr detaljer."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1968,7 +1964,7 @@ msgstr ""
"Kunde inte ladda spardata (%s)! Hфnvisa till README-filen fіr mer "
"information och instruktioner fіr hur du fхr mer hjфlp."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1978,7 +1974,7 @@ msgstr ""
"ScummVM. Dфrfіr фr det troligtvis instabilt och om du skapar spardata kan de "
"mіjligtvis vara inkompatibla med framtida versioner av ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Starta фndх"
@@ -2215,52 +2211,52 @@ msgstr "Automatiskt draglфge"
msgid "Swipe three fingers to the right to toggle."
msgstr "Svep хt hіger med tre fingrar fіr att byta lфge."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Fіnsterlфge"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Upplіsning: %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Korrektion av bildfіrhхllande pх"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Korrektion av bildfіrhхllande av"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Filtrering aktiverat"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Filtrering фr inaktiverat"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Normalt (ingen skalning)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normalt (ingen skalning)"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Aktivt grafikfilter:"
@@ -2898,7 +2894,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2912,7 +2908,7 @@ msgstr "Ladda sparfil:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3578,7 +3574,7 @@ msgstr "Aktivera flytande pekare"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Autospara:"
@@ -3592,21 +3588,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4627,6 +4623,13 @@ msgstr ""
"till version %d. Det krфvs en uppdaterad version av spelmotorn fіr att "
"anvфnda den hфr sparfilen."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr ""
+#~ "(Du kan alltid aktivera den under \"Diverse\"-fliken i instфllningarna)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Kolla efter uppdateringar automatiskt"
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index 993c7f30b6..e38b8351ce 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.9.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2017-06-14 14:55+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Ukrainian <https://translations.scummvm.org/projects/scummvm/"
@@ -65,8 +65,7 @@ msgstr "Вгору"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -126,7 +125,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Так"
@@ -139,7 +138,7 @@ msgstr "Так"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Ні"
@@ -158,12 +157,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -896,8 +895,8 @@ msgstr "Режим раструв.:"
msgid "Special dithering modes supported by some games"
msgstr "Спеціальні режими растрування, які підтримують деякі ігри"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Повноекранний режим"
@@ -1188,7 +1187,7 @@ msgstr "Мова інтерф.:"
msgid "Language of ScummVM GUI"
msgstr "Мова графічного інтерфейсу ScummVM"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr "Перевіряти оновлення:"
@@ -1626,27 +1625,25 @@ msgstr "Растеризатор зі згладжуванням"
msgid "Antialiased"
msgstr "Зі згладжуванням"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
+#, fuzzy
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
"ScummVM став підтримувати автоматичну перевірку\n"
"оновлень, що потребує досупу до Інтернету.\n"
"\n"
"Чи хотіли б ви включити таку перевірку?"
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr "(Ви завжди можете включити її у Налаштуваннях на закладці Інше)"
-
-#: gui/updates-dialog.cpp:92
-msgid "Check for updates automatically"
-msgstr "Автоматично перевіряти оновлення"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
+msgstr ""
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr "Продовжити"
@@ -1846,7 +1843,7 @@ msgstr "~П~овер.в головне меню"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1867,7 +1864,7 @@ msgstr "Зберегти гру:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1908,27 +1905,27 @@ msgstr "Ві~д~міна"
msgid "~K~eys"
msgstr "~К~лавіші"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Не можу налаштувати формат кольору."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Не вдалося переключити відеорежим: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Не вдалося застосувати корекцію співвідношення сторін."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Не вдалося застосувати повноекранний режим."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
msgid "Could not apply filtering setting."
msgstr "Не вдалося застосувати режим фільтрування."
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1942,7 +1939,7 @@ msgstr ""
"гри на жорсткий диск.\n"
"Дивіться файл README для подальших інструкцій."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1956,7 +1953,7 @@ msgstr ""
"того, щоб можна було слухати музику у грі.\n"
"Дивіться файл README для подальших інструкцій."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1965,7 +1962,7 @@ msgstr ""
"Не вдалося завантажити гру (%s)! . Будь-ласка, дивіться файл README для "
"основної інформації, а також інструкцій, як отримати подальшу допомогу."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1975,7 +1972,7 @@ msgstr ""
"ScummVM. Скорше за все вона не буде працювати стабільно, і збережені ігри, "
"які ви зробите, можуть не працювати у подальших версіях ScummVM."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Все одно запустити"
@@ -2214,52 +2211,52 @@ msgstr "Режим самотягнення включено"
msgid "Swipe three fingers to the right to toggle."
msgstr "Проведіть трьома пальцямі направо для переключення."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Віконний режим"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr "Розгалуження %dx%d"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Корекцію співвідношення сторін увімкнено"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Корекцію співвідношення сторін вимкнено"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
msgid "Filtering enabled"
msgstr "Фільтрування увімкнено"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
msgid "Filtering disabled"
msgstr "Фільтрування вимкнено"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Без збільшення"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Без збільшення"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Поточний графічний фільтр:"
@@ -2897,7 +2894,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2911,7 +2908,7 @@ msgstr "Відновити гру:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3571,7 +3568,7 @@ msgstr "Увімкнути плаваючі курсори"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
msgid "(Autosave)"
msgstr "(Автозбереження)"
@@ -3589,23 +3586,23 @@ msgstr ""
"збережено: 'qfg1-' для Quest for Glory1, 'qfg2-' для Quest for Glory 2. "
"Наприклад: 'qfg2-thief.sav'."
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
"Будь-ласка, використовуйте іншу програму для переглядання файлу допомоги "
"ігри: %s"
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr "Формат цього файлу збереженої гри застарілий, не можу його прочитати"
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr "Версія файлу збереження %d, але максимально підртимується %0d"
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4630,6 +4627,12 @@ msgstr ""
"версію до %d. Вам потрібна поновлена версія ScummVM для завантаження цього "
"файлу."
+#~ msgid "(You can always enable it in the options dialog on the Misc tab)"
+#~ msgstr "(Ви завжди можете включити її у Налаштуваннях на закладці Інше)"
+
+#~ msgid "Check for updates automatically"
+#~ msgstr "Автоматично перевіряти оновлення"
+
#~ msgid "8 kHz"
#~ msgstr "8 кГц"
diff --git a/po/zh-Latn_CN.po b/po/zh-Latn_CN.po
index 6363e35738..7b3bc74b6f 100644
--- a/po/zh-Latn_CN.po
+++ b/po/zh-Latn_CN.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.9.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2017-09-30 02:56+0200\n"
+"POT-Creation-Date: 2017-10-18 01:42+0200\n"
"PO-Revision-Date: 2016-12-26 19:38+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Chinese <https://translations.scummvm.org/projects/scummvm/"
@@ -63,8 +63,7 @@ msgstr "ShangYiJi"
#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
#: gui/saveload-dialog.cpp:719 gui/saveload-dialog.cpp:1113
#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
-#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
-#: backends/events/default/default-events.cpp:196
+#: engines/engine.cpp:524 backends/events/default/default-events.cpp:196
#: backends/events/default/default-events.cpp:218
#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
@@ -123,7 +122,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "Yes"
msgstr "Shi"
@@ -136,7 +135,7 @@ msgstr "Shi"
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
-#: engines/sci/graphics/controls32.cpp:826
+#: engines/sci/graphics/controls32.cpp:820
msgid "No"
msgstr "Fou"
@@ -153,12 +152,12 @@ msgstr ""
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:525
#: gui/launcher.cpp:529 gui/massadd.cpp:92 gui/options.cpp:1682
-#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:477 engines/engine.cpp:488
+#: gui/saveload-dialog.cpp:1114 engines/engine.cpp:443 engines/engine.cpp:454
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
-#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:823
+#: engines/sci/engine/kgraphics.cpp:74 engines/sci/graphics/controls32.cpp:817
#: engines/scumm/dialogs.cpp:189 engines/scumm/scumm.cpp:1882
#: engines/scumm/players/player_v3m.cpp:130
#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
@@ -887,8 +886,8 @@ msgstr "Xuanran Moshi:"
msgid "Special dithering modes supported by some games"
msgstr "Youxi Zhichi Teshu de Doudong Moshi"
-#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:624
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2624
+#: gui/options.cpp:1020 backends/graphics/openglsdl/openglsdl-graphics.cpp:587
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2565
msgid "Fullscreen mode"
msgstr "Quanping Moshi"
@@ -1178,7 +1177,7 @@ msgstr "Jiemian Yuyan:"
msgid "Language of ScummVM GUI"
msgstr "ScummVM Jiemian Yuyan"
-#: gui/options.cpp:1600
+#: gui/options.cpp:1600 gui/updates-dialog.cpp:86
msgid "Update check:"
msgstr ""
@@ -1620,24 +1619,20 @@ msgstr "Fanjuchi Xuanranqi"
msgid "Antialiased"
msgstr "Fanjuchi"
-#: gui/updates-dialog.cpp:51
+#: gui/updates-dialog.cpp:49
msgid ""
"ScummVM now supports automatic check for updates\n"
-"which requires access to the Internet.\n"
-"\n"
-"Would you like to enable this feature?"
+"which requires access to the Internet. Would you\n"
+"like to enable this feature?"
msgstr ""
-#: gui/updates-dialog.cpp:55
-msgid "(You can always enable it in the options dialog on the Misc tab)"
+#: gui/updates-dialog.cpp:52
+msgid ""
+"You can change this setting later in the Misc tab\n"
+"in the Options dialog."
msgstr ""
-#: gui/updates-dialog.cpp:92
-#, fuzzy
-msgid "Check for updates automatically"
-msgstr "Jiancha Gengxin..."
-
-#: gui/updates-dialog.cpp:111
+#: gui/updates-dialog.cpp:116
msgid "Proceed"
msgstr ""
@@ -1836,7 +1831,7 @@ msgstr "~R~Fanhui Qidongqi"
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:106
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:658
-#: engines/sci/engine/kfile.cpp:1051 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sci/engine/kfile.cpp:1054 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
@@ -1857,7 +1852,7 @@ msgstr "Baocun Youxi:"
#: engines/mohawk/dialogs.cpp:106 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:379
#: engines/sci/engine/guest_additions.cpp:659
-#: engines/sci/engine/kfile.cpp:1051 engines/scumm/dialogs.cpp:184
+#: engines/sci/engine/kfile.cpp:1054 engines/scumm/dialogs.cpp:184
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1897,28 +1892,28 @@ msgstr "~C~Quxiao"
msgid "~K~eys"
msgstr "~K~Guanjianzi"
-#: engines/engine.cpp:346
+#: engines/engine.cpp:315
msgid "Could not initialize color format."
msgstr "Wufa Chushihua Secai Geshi."
-#: engines/engine.cpp:354
+#: engines/engine.cpp:323
msgid "Could not switch to video mode: '"
msgstr "Wufa Qiehuandao Shipin Moshi: '"
-#: engines/engine.cpp:363
+#: engines/engine.cpp:332
msgid "Could not apply aspect ratio setting."
msgstr "Wufa Shezhi Bili Xuanxiang."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:337
msgid "Could not apply fullscreen setting."
msgstr "Wufa Shezhi Quanping Xuanxiang."
-#: engines/engine.cpp:373
+#: engines/engine.cpp:342
#, fuzzy
msgid "Could not apply filtering setting."
msgstr "Wufa Shezhi Quanping Xuanxiang"
-#: engines/engine.cpp:473
+#: engines/engine.cpp:439
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1932,7 +1927,7 @@ msgstr ""
"Kaobei Dao Yingpan Zhong Lai Yunxing.\n"
"Chakan README Huode Gengduo Xinxi."
-#: engines/engine.cpp:484
+#: engines/engine.cpp:450
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1946,7 +1941,7 @@ msgstr ""
"Bofang.\n"
"Juti Xinxi Qing Chakan README."
-#: engines/engine.cpp:542
+#: engines/engine.cpp:508
#, fuzzy, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
@@ -1955,7 +1950,7 @@ msgstr ""
"Cundang Zairu Shibai (%s)! Qing Chayue README Huode Bangzhu XInxi Yiji "
"Gengduo Bangzhu."
-#: engines/engine.cpp:555
+#: engines/engine.cpp:521
msgid ""
"WARNING: The game you are about to start is not yet fully supported by "
"ScummVM. As such, it is likely to be unstable, and any saved game you make "
@@ -1965,7 +1960,7 @@ msgstr ""
"Yunxing Youkeneng Buwending, Renhe Cundang Youkeneng zai Yihou de ScummVM "
"Banben Bu Keyong."
-#: engines/engine.cpp:558
+#: engines/engine.cpp:524
msgid "Start anyway"
msgstr "Qiangzhi Qidong"
@@ -2203,54 +2198,54 @@ msgstr "Muqian Wei Zidong Tuozhuai Moshi"
msgid "Swipe three fingers to the right to toggle."
msgstr "Xiangyou Huadong San Gen Shouzhi Qiehuan."
-#: backends/graphics/opengl/opengl-graphics.cpp:151
+#: backends/graphics/opengl/opengl-graphics.cpp:149
msgid "OpenGL"
msgstr "OpenGL"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:626
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2626
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:589
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2567
msgid "Windowed mode"
msgstr "Chuangkou Moshi"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:740
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:703
#, c-format
msgid "Resolution: %dx%d"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:761
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2503
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:724
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2428
msgid "Enabled aspect ratio correction"
msgstr "Qiyong Bili Jiaozheng"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:763
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2509
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2434
msgid "Disabled aspect ratio correction"
msgstr "Jinyong Bili Jiaozheng"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:783
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2527
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:746
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2452
#, fuzzy
msgid "Filtering enabled"
msgstr "Qidong Dianji"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:785
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2529
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:748
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2454
#, fuzzy
msgid "Filtering disabled"
msgstr "Jinyong Dianji"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:56
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:55
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
msgid "Normal (no scaling)"
msgstr "Putong"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:75
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:74
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Putong"
-#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2582
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2514
msgid "Active graphics filter:"
msgstr "Huodong de Tuxing Guolvqi:"
@@ -2882,7 +2877,7 @@ msgstr ""
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:661
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2896,7 +2891,7 @@ msgstr "Huifu Youxi:"
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
#: engines/neverhood/menumodule.cpp:893
#: engines/sci/engine/guest_additions.cpp:662
-#: engines/sci/engine/kfile.cpp:1170 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sci/engine/kfile.cpp:1173 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3555,7 +3550,7 @@ msgstr "Qiyong Xuanfu Guangbiao"
msgid "Enable the game's built-in optional content censoring"
msgstr ""
-#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:478
+#: engines/sci/detection.cpp:837 engines/sci/engine/kfile.cpp:481
#, fuzzy
msgid "(Autosave)"
msgstr "Zidong Baocun:"
@@ -3569,21 +3564,21 @@ msgid ""
"Example: 'qfg2-thief.sav'."
msgstr ""
-#: engines/sci/engine/kgraphics32.cpp:347
+#: engines/sci/engine/kgraphics32.cpp:348
#, c-format
msgid "Please use an external viewer to open the game's help file: %s"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1292
+#: engines/sci/engine/savegame.cpp:1290
msgid "The format of this saved game is obsolete, unable to load it"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1294
+#: engines/sci/engine/savegame.cpp:1292
#, c-format
msgid "Savegame version is %d, maximum supported is %0d"
msgstr ""
-#: engines/sci/engine/savegame.cpp:1305
+#: engines/sci/engine/savegame.cpp:1303
msgid ""
"This saved game was created with a different version of the game, unable to "
"load it"
@@ -4593,6 +4588,10 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#, fuzzy
+#~ msgid "Check for updates automatically"
+#~ msgstr "Jiancha Gengxin..."
+
#~ msgid "8 kHz"
#~ msgstr "8 kHz"
diff --git a/ports.mk b/ports.mk
index 3511002b28..3fbc2d9a1a 100644
--- a/ports.mk
+++ b/ports.mk
@@ -305,8 +305,7 @@ endif
ifdef USE_VORBIS
OSX_STATIC_LIBS += \
$(STATICLIBPATH)/lib/libvorbisfile.a \
- $(STATICLIBPATH)/lib/libvorbis.a \
- $(STATICLIBPATH)/lib/libogg.a
+ $(STATICLIBPATH)/lib/libvorbis.a
endif
ifdef USE_TREMOR
@@ -317,6 +316,10 @@ ifdef USE_FLAC
OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libFLAC.a
endif
+ifdef USE_OGG
+OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libogg.a
+endif
+
ifdef USE_FLUIDSYNTH
OSX_STATIC_LIBS += \
-liconv -framework CoreMIDI -framework CoreAudio\
diff --git a/test/common/array.h b/test/common/array.h
index 515dae3926..e0a6438d52 100644
--- a/test/common/array.h
+++ b/test/common/array.h
@@ -1,6 +1,7 @@
#include <cxxtest/TestSuite.h>
#include "common/array.h"
+#include "common/noncopyable.h"
#include "common/str.h"
class ArrayTestSuite : public CxxTest::TestSuite
@@ -298,6 +299,53 @@ class ArrayTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(array2.size(), (unsigned int)3);
}
+ class Copyable {
+ bool _copied;
+ int _value;
+ Copyable &operator=(Copyable &);
+ public:
+ Copyable() : _copied(false), _value(1) {}
+ explicit Copyable(const int v) : _copied(false), _value(v) {}
+ Copyable(const Copyable &other) : _copied(true), _value(other._value) {}
+ bool copied() const { return _copied; }
+ int value() const { return _value; }
+ };
+
+ void test_array_constructor_count() {
+ Common::Array<int> array(10);
+ TS_ASSERT_EQUALS(array.size(), 10U);
+ TS_ASSERT_EQUALS(array[0], 0);
+ TS_ASSERT_EQUALS(array[9], 0);
+
+ // This will fail at compile time if it is not possible to construct an
+ // array without copy-construction
+ Common::Array<Common::NonCopyable> nonCopyable(1);
+ }
+
+ void test_array_constructor_count_copy_value() {
+ Common::Array<int> trivial(5, 1);
+ TS_ASSERT_EQUALS(trivial.size(), 5U);
+ TS_ASSERT_EQUALS(trivial[0], 1);
+ TS_ASSERT_EQUALS(trivial[4], 1);
+
+ Copyable c(123);
+ typedef Common::Array<Copyable> NonTrivialArray;
+
+ NonTrivialArray nonTrivialCopy(3, c);
+ TS_ASSERT_EQUALS(nonTrivialCopy.size(), 3U);
+ for (NonTrivialArray::size_type i = 0; i < nonTrivialCopy.size(); ++i) {
+ TS_ASSERT_EQUALS(nonTrivialCopy[0].value(), 123);
+ TS_ASSERT(nonTrivialCopy[0].copied());
+ }
+
+ NonTrivialArray nonTrivialDefault(3);
+ TS_ASSERT_EQUALS(nonTrivialDefault.size(), 3U);
+ for (NonTrivialArray::size_type i = 0; i < nonTrivialDefault.size(); ++i) {
+ TS_ASSERT_EQUALS(nonTrivialDefault[0].value(), 1);
+ TS_ASSERT(!nonTrivialDefault[0].copied());
+ }
+ }
+
void test_array_constructor_str() {
const char *array1[] = { "a", "b", "c" };
@@ -310,6 +358,15 @@ class ArrayTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(array2.size(), (unsigned int)3);
}
+ void test_data() {
+ Common::Array<int> array;
+ TS_ASSERT(array.data() == nullptr);
+ array.resize(2);
+ TS_ASSERT(array.data() != nullptr);
+ TS_ASSERT_EQUALS(array.data(), &array.front());
+ TS_ASSERT_EQUALS(array.data() + array.size() - 1, &array.back());
+ }
+
void test_front_back_push_pop() {
Common::Array<int> container;
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index 7f2bedfbf4..fbf75b48ee 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -286,28 +286,31 @@ BinkDecoder::BinkVideoTrack::BinkVideoTrack(uint32 width, uint32 height, const G
_surface.h = height;
_surface.w = width;
- // Give the planes a bit extra space
- width = _surface.w + 32;
- height = _surface.h + 32;
-
- _curPlanes[0] = new byte[ width * height ]; // Y
- _curPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution
- _curPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution
- _curPlanes[3] = new byte[ width * height ]; // A
- _oldPlanes[0] = new byte[ width * height ]; // Y
- _oldPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution
- _oldPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution
- _oldPlanes[3] = new byte[ width * height ]; // A
+ // Compute the video dimensions in blocks
+ _yBlockWidth = (width + 7) >> 3;
+ _yBlockHeight = (height + 7) >> 3;
+ _uvBlockWidth = (width + 15) >> 4;
+ _uvBlockHeight = (height + 15) >> 4;
+
+ // The planes are sized according to the number of blocks
+ _curPlanes[0] = new byte[_yBlockWidth * 8 * _yBlockHeight * 8]; // Y
+ _curPlanes[1] = new byte[_uvBlockWidth * 8 * _uvBlockHeight * 8]; // U, 1/4 resolution
+ _curPlanes[2] = new byte[_uvBlockWidth * 8 * _uvBlockHeight * 8]; // V, 1/4 resolution
+ _curPlanes[3] = new byte[_yBlockWidth * 8 * _yBlockHeight * 8]; // A
+ _oldPlanes[0] = new byte[_yBlockWidth * 8 * _yBlockHeight * 8]; // Y
+ _oldPlanes[1] = new byte[_uvBlockWidth * 8 * _uvBlockHeight * 8]; // U, 1/4 resolution
+ _oldPlanes[2] = new byte[_uvBlockWidth * 8 * _uvBlockHeight * 8]; // V, 1/4 resolution
+ _oldPlanes[3] = new byte[_yBlockWidth * 8 * _yBlockHeight * 8]; // A
// Initialize the video with solid black
- memset(_curPlanes[0], 0, width * height );
- memset(_curPlanes[1], 0, (width >> 1) * (height >> 1));
- memset(_curPlanes[2], 0, (width >> 1) * (height >> 1));
- memset(_curPlanes[3], 255, width * height );
- memset(_oldPlanes[0], 0, width * height );
- memset(_oldPlanes[1], 0, (width >> 1) * (height >> 1));
- memset(_oldPlanes[2], 0, (width >> 1) * (height >> 1));
- memset(_oldPlanes[3], 255, width * height );
+ memset(_curPlanes[0], 0, _yBlockWidth * 8 * _yBlockHeight * 8);
+ memset(_curPlanes[1], 0, _uvBlockWidth * 8 * _uvBlockHeight * 8);
+ memset(_curPlanes[2], 0, _uvBlockWidth * 8 * _uvBlockHeight * 8);
+ memset(_curPlanes[3], 255, _yBlockWidth * 8 * _yBlockHeight * 8);
+ memset(_oldPlanes[0], 0, _yBlockWidth * 8 * _yBlockHeight * 8);
+ memset(_oldPlanes[1], 0, _uvBlockWidth * 8 * _uvBlockHeight * 8);
+ memset(_oldPlanes[2], 0, _uvBlockWidth * 8 * _uvBlockHeight * 8);
+ memset(_oldPlanes[3], 255, _yBlockWidth * 8 * _yBlockHeight * 8);
initBundles();
initHuffman();
@@ -357,7 +360,7 @@ void BinkDecoder::BinkVideoTrack::decodePacket(VideoFrame &frame) {
// to allow for odd-sized videos.
assert(_curPlanes[0] && _curPlanes[1] && _curPlanes[2]);
YUVToRGBMan.convert420(&_surface, Graphics::YUVToRGBManager::kScaleITU, _curPlanes[0], _curPlanes[1], _curPlanes[2],
- _surfaceWidth, _surfaceHeight, _surfaceWidth, _surfaceWidth >> 1);
+ _surfaceWidth, _surfaceHeight, _yBlockWidth * 8, _uvBlockWidth * 8);
// And swap the planes with the reference planes
for (int i = 0; i < 4; i++)
@@ -367,10 +370,10 @@ void BinkDecoder::BinkVideoTrack::decodePacket(VideoFrame &frame) {
}
void BinkDecoder::BinkVideoTrack::decodePlane(VideoFrame &video, int planeIdx, bool isChroma) {
- uint32 blockWidth = isChroma ? ((_surface.w + 15) >> 4) : ((_surface.w + 7) >> 3);
- uint32 blockHeight = isChroma ? ((_surface.h + 15) >> 4) : ((_surface.h + 7) >> 3);
- uint32 width = isChroma ? (_surface.w >> 1) : _surface.w;
- uint32 height = isChroma ? (_surface.h >> 1) : _surface.h;
+ uint32 blockWidth = isChroma ? _uvBlockWidth : _yBlockWidth;
+ uint32 blockHeight = isChroma ? _uvBlockHeight : _yBlockHeight;
+ uint32 width = blockWidth * 8;
+ uint32 height = blockHeight * 8;
DecodeContext ctx;
diff --git a/video/bink_decoder.h b/video/bink_decoder.h
index 8a67913a03..68dd994115 100644
--- a/video/bink_decoder.h
+++ b/video/bink_decoder.h
@@ -254,6 +254,11 @@ private:
/** Value of the last decoded high nibble in color data types. */
int _colLastVal;
+ uint32 _yBlockWidth; ///< Width of the Y plane in blocks
+ uint32 _yBlockHeight; ///< Height of the Y plane in blocks
+ uint32 _uvBlockWidth; ///< Width of the U and V planes in blocks
+ uint32 _uvBlockHeight; ///< Height of the U and V planes in blocks
+
byte *_curPlanes[4]; ///< The 4 color planes, YUVA, current frame.
byte *_oldPlanes[4]; ///< The 4 color planes, YUVA, last frame.