aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS6
-rw-r--r--NEWS13
-rw-r--r--README44
-rw-r--r--audio/decoders/adpcm.cpp55
-rw-r--r--audio/decoders/adpcm_intern.h7
-rw-r--r--audio/decoders/aiff.h2
-rw-r--r--audio/decoders/quicktime.cpp2
-rw-r--r--audio/decoders/quicktime_intern.h2
-rw-r--r--audio/fmopl.h4
-rw-r--r--audio/mididrv.h4
-rw-r--r--audio/midiparser.h1
-rw-r--r--audio/midiparser_qt.cpp496
-rw-r--r--audio/midiparser_qt.h134
-rw-r--r--audio/module.mk1
-rw-r--r--audio/softsynth/adlib.cpp1901
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_midi.cpp12
-rw-r--r--audio/softsynth/mt32/AReverbModel.cpp4
-rw-r--r--audio/softsynth/mt32/DelayReverb.cpp9
-rw-r--r--audio/softsynth/mt32/FreeverbModel.cpp4
-rw-r--r--audio/softsynth/mt32/LA32Ramp.cpp5
-rw-r--r--audio/softsynth/mt32/Part.cpp9
-rw-r--r--audio/softsynth/mt32/Partial.cpp89
-rw-r--r--audio/softsynth/mt32/PartialManager.cpp4
-rw-r--r--audio/softsynth/mt32/Poly.cpp3
-rw-r--r--audio/softsynth/mt32/Synth.cpp8
-rw-r--r--audio/softsynth/mt32/Synth.h1
-rw-r--r--audio/softsynth/mt32/TVA.cpp6
-rw-r--r--audio/softsynth/mt32/TVF.cpp4
-rw-r--r--audio/softsynth/mt32/TVP.cpp5
-rw-r--r--audio/softsynth/mt32/Tables.cpp32
-rw-r--r--audio/softsynth/mt32/Tables.h16
-rw-r--r--audio/softsynth/mt32/mmath.h4
-rw-r--r--audio/softsynth/mt32/mt32emu.h13
-rw-r--r--audio/softsynth/opl/dosbox.cpp27
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp4
-rw-r--r--backends/midi/seq.cpp6
-rw-r--r--backends/platform/n64/osys_n64.h4
-rw-r--r--backends/platform/n64/osys_n64_base.cpp19
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp51
-rw-r--r--backends/platform/ps2/Gs2dScreen.h27
-rw-r--r--backends/platform/ps2/ps2pad.cpp3
-rw-r--r--backends/platform/sdl/macosx/appmenu_osx.mm11
-rw-r--r--backends/platform/sdl/macosx/macosx.cpp11
-rw-r--r--backends/platform/wii/osystem_gfx.cpp2
-rw-r--r--backends/updates/macosx/macosx-updates.mm8
-rw-r--r--common/forbidden.h25
-rw-r--r--common/macresman.cpp4
-rw-r--r--common/quicktime.cpp6
-rw-r--r--common/quicktime.h5
-rw-r--r--common/str.cpp2
-rw-r--r--common/util.cpp5
-rw-r--r--common/util.h13
-rwxr-xr-xconfigure10
-rwxr-xr-xdevtools/credits.pl6
-rw-r--r--engines/agi/console.cpp22
-rw-r--r--engines/agi/console.h4
-rw-r--r--engines/agi/opcodes.cpp12
-rw-r--r--engines/composer/detection.cpp2
-rw-r--r--engines/configure.engines2
-rw-r--r--engines/cruise/staticres.cpp4
-rw-r--r--engines/drascula/detection.cpp2
-rw-r--r--engines/dreamweb/backdrop.cpp40
-rw-r--r--engines/dreamweb/dreamweb.cpp50
-rw-r--r--engines/dreamweb/dreamweb.h19
-rw-r--r--engines/dreamweb/keypad.cpp17
-rw-r--r--engines/dreamweb/monitor.cpp9
-rw-r--r--engines/dreamweb/object.cpp168
-rw-r--r--engines/dreamweb/pathfind.cpp2
-rw-r--r--engines/dreamweb/people.cpp2
-rw-r--r--engines/dreamweb/print.cpp16
-rw-r--r--engines/dreamweb/rain.cpp4
-rw-r--r--engines/dreamweb/saveload.cpp63
-rw-r--r--engines/dreamweb/sprite.cpp2
-rw-r--r--engines/dreamweb/stubs.cpp162
-rw-r--r--engines/dreamweb/titles.cpp116
-rw-r--r--engines/dreamweb/use.cpp2
-rw-r--r--engines/dreamweb/vgafades.cpp10
-rw-r--r--engines/dreamweb/vgagrafx.cpp80
-rw-r--r--engines/groovie/detection.cpp99
-rw-r--r--engines/groovie/groovie.cpp19
-rw-r--r--engines/groovie/groovie.h7
-rw-r--r--engines/groovie/module.mk1
-rw-r--r--engines/groovie/music.cpp54
-rw-r--r--engines/groovie/music.h12
-rw-r--r--engines/groovie/stuffit.cpp537
-rw-r--r--engines/groovie/stuffit.h43
-rw-r--r--engines/hugo/parser.cpp2
-rw-r--r--engines/kyra/chargen.cpp12
-rw-r--r--engines/kyra/darkmoon.cpp9
-rw-r--r--engines/kyra/darkmoon.h18
-rw-r--r--engines/kyra/detection.cpp2
-rw-r--r--engines/kyra/detection_tables.h2
-rw-r--r--engines/kyra/eob.h5
-rw-r--r--engines/kyra/eobcommon.cpp14
-rw-r--r--engines/kyra/eobcommon.h8
-rw-r--r--engines/kyra/gui_eob.cpp31
-rw-r--r--engines/kyra/gui_eob.h2
-rw-r--r--engines/kyra/gui_mr.cpp2
-rw-r--r--engines/kyra/kyra_hof.cpp86
-rw-r--r--engines/kyra/kyra_hof.h284
-rw-r--r--engines/kyra/kyra_lok.cpp8
-rw-r--r--engines/kyra/kyra_lok.h78
-rw-r--r--engines/kyra/kyra_mr.cpp6
-rw-r--r--engines/kyra/kyra_mr.h6
-rw-r--r--engines/kyra/kyra_rpg.cpp10
-rw-r--r--engines/kyra/kyra_rpg.h7
-rw-r--r--engines/kyra/kyra_v1.cpp13
-rw-r--r--engines/kyra/kyra_v1.h15
-rw-r--r--engines/kyra/lol.cpp17
-rw-r--r--engines/kyra/lol.h16
-rw-r--r--engines/kyra/magic_eob.cpp2
-rw-r--r--engines/kyra/resource.h22
-rw-r--r--engines/kyra/resource_intern.h2
-rw-r--r--engines/kyra/saveload.cpp4
-rw-r--r--engines/kyra/saveload_eob.cpp4
-rw-r--r--engines/kyra/saveload_lok.cpp2
-rw-r--r--engines/kyra/scene_eob.cpp74
-rw-r--r--engines/kyra/scene_lol.cpp4
-rw-r--r--engines/kyra/scene_mr.cpp2
-rw-r--r--engines/kyra/scene_rpg.cpp76
-rw-r--r--engines/kyra/screen.cpp109
-rw-r--r--engines/kyra/screen.h20
-rw-r--r--engines/kyra/screen_eob.cpp308
-rw-r--r--engines/kyra/screen_eob.h17
-rw-r--r--engines/kyra/screen_hof.cpp42
-rw-r--r--engines/kyra/screen_hof.h3
-rw-r--r--engines/kyra/screen_lol.cpp30
-rw-r--r--engines/kyra/screen_lol.h1
-rw-r--r--engines/kyra/screen_v2.cpp70
-rw-r--r--engines/kyra/screen_v2.h6
-rw-r--r--engines/kyra/script_eob.h2
-rw-r--r--engines/kyra/script_tim.cpp4
-rw-r--r--engines/kyra/sequences_eob.cpp2
-rw-r--r--engines/kyra/sequences_hof.cpp4132
-rw-r--r--engines/kyra/sequences_hof.h74
-rw-r--r--engines/kyra/sequences_lol.cpp22
-rw-r--r--engines/kyra/sound.cpp50
-rw-r--r--engines/kyra/sound.h152
-rw-r--r--engines/kyra/sound_adlib.cpp27
-rw-r--r--engines/kyra/sound_adlib.h7
-rw-r--r--engines/kyra/sound_amiga.cpp18
-rw-r--r--engines/kyra/sound_digital.cpp2
-rw-r--r--engines/kyra/sound_digital.h119
-rw-r--r--engines/kyra/sound_intern.h41
-rw-r--r--engines/kyra/sound_lol.cpp16
-rw-r--r--engines/kyra/sound_midi.cpp28
-rw-r--r--engines/kyra/sound_towns.cpp132
-rw-r--r--engines/kyra/staticres.cpp275
-rw-r--r--engines/kyra/staticres_eob.cpp24
-rw-r--r--engines/kyra/staticres_lol.cpp45
-rw-r--r--engines/mohawk/detection.cpp1
-rw-r--r--engines/mohawk/detection_tables.h36
-rw-r--r--engines/parallaction/parser_br.cpp1
-rw-r--r--engines/pegasus/movie.cpp7
-rw-r--r--engines/pegasus/neighborhood/neighborhood.cpp8
-rw-r--r--engines/pegasus/neighborhood/tsa/fulltsa.cpp7
-rw-r--r--engines/pegasus/pegasus.cpp50
-rw-r--r--engines/pegasus/pegasus.h1
-rw-r--r--engines/queen/journal.cpp4
-rw-r--r--engines/queen/talk.cpp7
-rw-r--r--engines/saga/detection.cpp8
-rw-r--r--engines/saga/events.cpp19
-rw-r--r--engines/saga/music.cpp59
-rw-r--r--engines/saga/music.h1
-rw-r--r--engines/saga/saga.cpp2
-rw-r--r--engines/saga/saga.h4
-rw-r--r--engines/saga/saveload.cpp11
-rw-r--r--engines/saga/sfuncs_ihnm.cpp18
-rw-r--r--engines/sci/detection_tables.h24
-rw-r--r--engines/sci/engine/savegame.cpp3
-rw-r--r--engines/sci/graphics/palette.cpp6
-rw-r--r--engines/sci/sci.cpp3
-rw-r--r--engines/scumm/debugger.cpp40
-rw-r--r--engines/scumm/imuse/imuse_part.cpp15
-rw-r--r--engines/scumm/object.cpp12
-rw-r--r--engines/scumm/scumm.cpp2
-rw-r--r--engines/sword1/detection.cpp19
-rw-r--r--engines/sword2/sword2.cpp54
-rw-r--r--engines/sword25/util/lua/llex.cpp2
-rw-r--r--engines/tinsel/actors.cpp22
-rw-r--r--engines/tinsel/anim.cpp32
-rw-r--r--engines/tinsel/bg.cpp24
-rw-r--r--engines/tinsel/bmv.cpp18
-rw-r--r--engines/tinsel/cursor.cpp30
-rw-r--r--engines/tinsel/dialogs.cpp202
-rw-r--r--engines/tinsel/events.cpp3
-rw-r--r--engines/tinsel/events.h2
-rw-r--r--engines/tinsel/faders.cpp6
-rw-r--r--engines/tinsel/font.cpp8
-rw-r--r--engines/tinsel/graphics.cpp165
-rw-r--r--engines/tinsel/handle.cpp5
-rw-r--r--engines/tinsel/multiobj.cpp24
-rw-r--r--engines/tinsel/music.cpp27
-rw-r--r--engines/tinsel/object.cpp26
-rw-r--r--engines/tinsel/palette.cpp30
-rw-r--r--engines/tinsel/palette.h8
-rw-r--r--engines/tinsel/pcode.cpp2
-rw-r--r--engines/tinsel/play.cpp104
-rw-r--r--engines/tinsel/polygons.cpp108
-rw-r--r--engines/tinsel/rince.cpp16
-rw-r--r--engines/tinsel/scene.cpp53
-rw-r--r--engines/tinsel/sched.cpp12
-rw-r--r--engines/tinsel/sound.cpp146
-rw-r--r--engines/tinsel/sound.h10
-rw-r--r--engines/tinsel/strres.cpp6
-rw-r--r--engines/tinsel/text.cpp46
-rw-r--r--engines/tinsel/tinlib.cpp2
-rw-r--r--engines/tinsel/tinsel.cpp23
-rw-r--r--engines/tinsel/tinsel.h5
-rw-r--r--engines/toltecs/microtiles.cpp4
-rw-r--r--engines/tony/custom.cpp29
-rw-r--r--engines/tony/debugger.cpp1
-rw-r--r--engines/tony/detection.cpp3
-rw-r--r--engines/tony/detection_tables.h8
-rw-r--r--engines/tony/font.cpp12
-rw-r--r--engines/tony/font.h19
-rw-r--r--engines/tony/game.cpp12
-rw-r--r--engines/tony/game.h1
-rw-r--r--engines/tony/gfxcore.cpp56
-rw-r--r--engines/tony/gfxcore.h18
-rw-r--r--engines/tony/gfxengine.cpp2
-rw-r--r--engines/tony/globals.h32
-rw-r--r--engines/tony/input.cpp56
-rw-r--r--engines/tony/input.h18
-rw-r--r--engines/tony/inventory.cpp32
-rw-r--r--engines/tony/inventory.h1
-rw-r--r--engines/tony/loc.cpp67
-rw-r--r--engines/tony/loc.h38
-rw-r--r--engines/tony/mpal/expr.cpp4
-rw-r--r--engines/tony/mpal/expr.h12
-rw-r--r--engines/tony/mpal/loadmpc.cpp11
-rw-r--r--engines/tony/mpal/lzo.cpp622
-rw-r--r--engines/tony/mpal/memory.cpp1
-rw-r--r--engines/tony/mpal/mpal.cpp51
-rw-r--r--engines/tony/mpal/mpal.h101
-rw-r--r--engines/tony/mpal/mpaldll.h63
-rw-r--r--engines/tony/mpal/mpalutils.h12
-rw-r--r--engines/tony/resid.h11
-rw-r--r--engines/tony/sound.cpp24
-rw-r--r--engines/tony/tony.cpp1
-rw-r--r--engines/tony/tony.h2
-rw-r--r--engines/tony/tonychar.cpp10
-rw-r--r--engines/tony/window.cpp3
-rw-r--r--engines/tony/window.h1
-rw-r--r--engines/touche/menu.cpp2
-rw-r--r--engines/tsage/events.h2
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp8
-rw-r--r--engines/wintermute/ad/ad_actor.cpp6
-rw-r--r--engines/wintermute/ad/ad_entity.cpp15
-rw-r--r--engines/wintermute/ad/ad_entity.h17
-rw-r--r--engines/wintermute/ad/ad_game.cpp26
-rw-r--r--engines/wintermute/ad/ad_object.cpp3
-rw-r--r--engines/wintermute/ad/ad_object.h66
-rw-r--r--engines/wintermute/ad/ad_region.cpp15
-rw-r--r--engines/wintermute/ad/ad_region.h14
-rw-r--r--engines/wintermute/ad/ad_response.h2
-rw-r--r--engines/wintermute/ad/ad_response_box.cpp27
-rw-r--r--engines/wintermute/ad/ad_response_box.h38
-rw-r--r--engines/wintermute/ad/ad_scale_level.cpp3
-rw-r--r--engines/wintermute/ad/ad_scale_level.h4
-rw-r--r--engines/wintermute/ad/ad_scene.cpp61
-rw-r--r--engines/wintermute/ad/ad_scene.h2
-rw-r--r--engines/wintermute/ad/ad_scene_state.cpp3
-rw-r--r--engines/wintermute/ad/ad_scene_state.h2
-rw-r--r--engines/wintermute/ad/ad_waypoint_group.h13
-rw-r--r--engines/wintermute/base/base_dynamic_buffer.cpp2
-rw-r--r--engines/wintermute/base/base_dynamic_buffer.h2
-rw-r--r--engines/wintermute/base/base_fader.cpp2
-rw-r--r--engines/wintermute/base/base_fader.h2
-rw-r--r--engines/wintermute/base/base_game.cpp483
-rw-r--r--engines/wintermute/base/base_game.h26
-rw-r--r--engines/wintermute/base/base_game_music.cpp506
-rw-r--r--engines/wintermute/base/base_game_music.h73
-rw-r--r--engines/wintermute/base/base_keyboard_state.cpp12
-rw-r--r--engines/wintermute/base/base_keyboard_state.h17
-rw-r--r--engines/wintermute/base/base_object.h4
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp10
-rw-r--r--engines/wintermute/base/base_script_holder.cpp4
-rw-r--r--engines/wintermute/base/base_script_holder.h4
-rw-r--r--engines/wintermute/base/base_scriptable.cpp2
-rw-r--r--engines/wintermute/base/base_scriptable.h2
-rw-r--r--engines/wintermute/base/base_surface_storage.cpp19
-rw-r--r--engines/wintermute/base/base_surface_storage.h2
-rw-r--r--engines/wintermute/base/base_transition_manager.cpp2
-rw-r--r--engines/wintermute/base/base_transition_manager.h2
-rw-r--r--engines/wintermute/base/base_viewport.cpp4
-rw-r--r--engines/wintermute/base/base_viewport.h4
-rw-r--r--engines/wintermute/base/file/base_file.h4
-rw-r--r--engines/wintermute/base/font/base_font_truetype.cpp12
-rw-r--r--engines/wintermute/base/font/base_font_truetype.h3
-rw-r--r--engines/wintermute/base/gfx/base_renderer.h2
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp163
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.h34
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp103
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.h63
-rw-r--r--engines/wintermute/base/particles/part_emitter.cpp11
-rw-r--r--engines/wintermute/base/particles/part_emitter.h2
-rw-r--r--engines/wintermute/base/scriptables/script.cpp8
-rw-r--r--engines/wintermute/base/scriptables/script.h8
-rw-r--r--engines/wintermute/base/scriptables/script_engine.cpp1
-rw-r--r--engines/wintermute/detection_tables.h10
-rw-r--r--engines/wintermute/module.mk2
-rw-r--r--engines/wintermute/ui/ui_tiled_image.h1
-rw-r--r--gui/browser.h1
-rw-r--r--gui/browser_osx.mm41
-rw-r--r--gui/credits.h6
-rw-r--r--gui/themes/translations.datbin371963 -> 415352 bytes
-rw-r--r--gui/widgets/list.cpp2
-rw-r--r--po/be_BY.po3140
-rw-r--r--po/ca_ES.po151
-rw-r--r--po/cs_CZ.po177
-rw-r--r--po/da_DA.po177
-rw-r--r--po/de_DE.po177
-rw-r--r--po/es_ES.po177
-rw-r--r--po/eu.po177
-rw-r--r--po/fi_FI.po3096
-rw-r--r--po/fr_FR.po177
-rw-r--r--po/gl_ES.po177
-rw-r--r--po/hu_HU.po177
-rw-r--r--po/it_IT.po177
-rw-r--r--po/nb_NO.po177
-rw-r--r--po/nn_NO.po176
-rw-r--r--po/pl_PL.po177
-rw-r--r--po/pt_BR.po177
-rw-r--r--po/ru_RU.po177
-rw-r--r--po/scummvm.pot176
-rw-r--r--po/se_SE.po177
-rw-r--r--po/uk_UA.po185
-rw-r--r--ports.mk21
-rw-r--r--video/bink_decoder.h2
-rw-r--r--video/codecs/cdtoons.h6
-rw-r--r--video/codecs/cinepak.cpp46
-rw-r--r--video/codecs/cinepak.h13
-rw-r--r--video/codecs/codec.h32
-rw-r--r--video/codecs/indeo3.h7
-rw-r--r--video/codecs/mjpeg.h10
-rw-r--r--video/codecs/msrle.h6
-rw-r--r--video/codecs/msvideo1.h6
-rw-r--r--video/codecs/qtrle.h6
-rw-r--r--video/codecs/rpza.h6
-rw-r--r--video/codecs/smc.h6
-rw-r--r--video/codecs/svq1.cpp4
-rw-r--r--video/codecs/svq1.h6
-rw-r--r--video/codecs/truemotion1.h6
-rw-r--r--video/qt_decoder.cpp4
-rw-r--r--video/qt_decoder.h2
-rw-r--r--video/video_decoder.cpp196
-rw-r--r--video/video_decoder.h75
348 files changed, 17851 insertions, 8282 deletions
diff --git a/AUTHORS b/AUTHORS
index 2ae50159c3..e39400f22f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -411,6 +411,9 @@ Other contributions
Basque:
Mikel Iturbe Urretxa
+ Belarusian:
+ Ivan Lukyanov
+
Catalan:
Jordi Vilalta Prat
@@ -420,6 +423,9 @@ Other contributions
Danish:
Steffen Nyeland
+ Finnish:
+ Toni Saarela
+
French:
Thierry Crozat
diff --git a/NEWS b/NEWS
index 923844e32c..29cde45154 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ For a more comprehensive changelog of the latest experimental code, see:
https://github.com/scummvm/scummvm/commits/
1.6.0 (????-??-??)
+ New Games:
+ - Added support for Eye of the Beholder.
+ - Added support for Eye of the Beholder II: The Legend of Darkmoon.
+
General:
- Added a new save/load chooser based on a grid of thumbnails. This is only
supported for resolutions bigger than 640x400. The old chooser is still
@@ -9,12 +13,21 @@ For a more comprehensive changelog of the latest experimental code, see:
select the old one as default too.
- Rewrote VideoDecoder subsystem.
- Added Galician translation.
+ - Added Finnish translation.
Cine:
- Improved audio support for Amiga and AtariST versions of Future Wars.
Now music fades out slowly instead of stopping immediately. Sound
effects are now properly panned, when requested by the game.
+ Dreamweb:
+ - Now that the game is freeware, there is a small extra help text showing
+ the available commands in the in-game terminals when the player uses the
+ 'help' command. Previously, players needed to consult the manual for the
+ available commands. Since this reference to the manual is a form of copy
+ protection, this extra line can be toggled by the ScummVM copy protection
+ command line option.
+
SCUMM:
- Implemented Monkey Island 2 Macintosh's audio driver. Now we properly
support its sample based audio output. The same output is also used for
diff --git a/README b/README
index bbca0ec0cd..b7b8176923 100644
--- a/README
+++ b/README
@@ -384,21 +384,24 @@ entering any answer. Chances are that it will work.
ScummVM will skip copy protection in the following games:
- * Maniac Mansion
- * Zak McKracken and the Alien Mindbenders
- * Loom (EGA)
- * The Secret of Monkey Island (VGA)
- * Monkey Island 2: LeChuck's Revenge
* Beneath a Steel Sky
-- bypassed with kind permission from Revolution Software.
+ * Dreamweb
+ -- a list of available commands in the in-game terminals is now shown
+ when the player uses the 'help' command
* Inherit the Earth: Quest for the Orb (Floppy version)
-- bypassed with kind permission from Wyrmkeep Entertainment,
since it was bypassed in all CD releases of the game.
+ * Loom (EGA DOS)
+ * Maniac Mansion
+ * Monkey Island 2: LeChuck's Revenge
* Simon the Sorcerer 1 (Floppy version)
* Simon the Sorcerer 2 (Floppy version)
-- bypassed with kind permission from Adventure Soft,
since it was bypassed in all CD releases of the game.
+ * The Secret of Monkey Island (VGA)
* Waxworks
+ * Zak McKracken and the Alien Mindbenders
3.2) Commodore64 games notes:
@@ -2033,9 +2036,10 @@ The following keywords are recognized:
super2xsai, supereagle, advmame2x, advmame3x,
hq2x, hq3x, tv2x, dotmatrix)
- confirm_exit bool Ask for confirmation by the user before quitting
- (SDL backend only).
- console bool Enable the console window (default: enabled) (Windows only).
+ confirm_exit bool Ask for confirmation by the user before
+ quitting (SDL backend only).
+ console bool Enable the console window (default: enabled)
+ (Windows only).
cdrom number Number of CD-ROM unit to use for audio. If
negative, don't even try to access the CD-ROM.
joystick_num number Number of joystick device to use for input
@@ -2063,7 +2067,8 @@ The following keywords are recognized:
supported by some MIDI drivers.)
copy_protection bool Enable copy protection in certain games, in
- those cases where ScummVM disables it by default.
+ those cases where ScummVM disables it by
+ default.
demo_mode bool Start demo in Maniac Mansion
alt_intro bool Use alternative intro for CD versions of
Beneath a Steel Sky and Flight of the Amazon
@@ -2124,8 +2129,9 @@ Lands of Lore: The Throne of Chaos adds the following non-standard keywords:
Space Quest IV CD adds the following non-standard keyword:
- silver_cursors bool If true, an alternate set of silver mouse cursors
- is used instead of the original golden ones
+ silver_cursors bool If true, an alternate set of silver mouse
+ cursors is used instead of the original golden
+ ones
Simon the Sorcerer 1 and 2 add the following non-standard keywords:
@@ -2134,19 +2140,29 @@ Simon the Sorcerer 1 and 2 add the following non-standard keywords:
The Legend of Kyrandia adds the following non-standard keyword:
- walkspeed int The walk speed (0-4)
+ walkspeed number The walk speed (0-4)
+
+The Legend of Kyrandia: The Hand of Fate adds the following non-standard
+keyword:
+
+ walkspeed number The walk speed (3 or 5, resp. fast or
+ slow)
The Legend of Kyrandia: Malcolm's Revenge adds the following non-standard
keywords:
+ walkspeed number The walk speed (3 or 5, resp. fast or
+ slow)
studio_audience bool If true, applause and cheering sounds are heard
whenever Malcolm makes a joke
skip_support bool If true, the player can skip text and cutscenes
- helium_mode bool If true, people sound like they've inhaled Helium
+ helium_mode bool If true, people sound like they've inhaled
+ Helium
The 7th Guest adds the following non-standard keyword:
- t7g_speed string Video playback speed (normal, tweaked, im_an_ios)
+ t7g_speed string Video playback speed (normal, tweaked,
+ im_an_ios)
8.2) Custom game options that can be toggled via the GUI
diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp
index 2fe509e1f3..f069ee3417 100644
--- a/audio/decoders/adpcm.cpp
+++ b/audio/decoders/adpcm.cpp
@@ -268,7 +268,6 @@ static const int MSADPCMAdaptationTable[] = {
768, 614, 512, 409, 307, 230, 230, 230
};
-
int16 MS_ADPCMStream::decodeMS(ADPCMChannelStatus *c, byte code) {
int32 predictor;
@@ -290,40 +289,42 @@ int16 MS_ADPCMStream::decodeMS(ADPCMChannelStatus *c, byte code) {
int MS_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) {
int samples;
byte data;
- int i = 0;
-
- samples = 0;
+ int i;
- while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
- if (_blockPos[0] == _blockAlign) {
- // read block header
- for (i = 0; i < _channels; i++) {
- _status.ch[i].predictor = CLIP(_stream->readByte(), (byte)0, (byte)6);
- _status.ch[i].coeff1 = MSADPCMAdaptCoeff1[_status.ch[i].predictor];
- _status.ch[i].coeff2 = MSADPCMAdaptCoeff2[_status.ch[i].predictor];
- }
+ for (samples = 0; samples < numSamples && !endOfData(); samples++) {
+ if (_decodedSampleCount == 0) {
+ if (_blockPos[0] == _blockAlign) {
+ // read block header
+ for (i = 0; i < _channels; i++) {
+ _status.ch[i].predictor = CLIP(_stream->readByte(), (byte)0, (byte)6);
+ _status.ch[i].coeff1 = MSADPCMAdaptCoeff1[_status.ch[i].predictor];
+ _status.ch[i].coeff2 = MSADPCMAdaptCoeff2[_status.ch[i].predictor];
+ }
- for (i = 0; i < _channels; i++)
- _status.ch[i].delta = _stream->readSint16LE();
+ for (i = 0; i < _channels; i++)
+ _status.ch[i].delta = _stream->readSint16LE();
- for (i = 0; i < _channels; i++)
- _status.ch[i].sample1 = _stream->readSint16LE();
+ for (i = 0; i < _channels; i++)
+ _status.ch[i].sample1 = _stream->readSint16LE();
- for (i = 0; i < _channels; i++)
- buffer[samples++] = _status.ch[i].sample2 = _stream->readSint16LE();
+ for (i = 0; i < _channels; i++)
+ _decodedSamples[_decodedSampleCount++] = _status.ch[i].sample2 = _stream->readSint16LE();
- for (i = 0; i < _channels; i++)
- buffer[samples++] = _status.ch[i].sample1;
+ for (i = 0; i < _channels; i++)
+ _decodedSamples[_decodedSampleCount++] = _status.ch[i].sample1;
- _blockPos[0] = _channels * 7;
+ _blockPos[0] = _channels * 7;
+ } else {
+ data = _stream->readByte();
+ _blockPos[0]++;
+ _decodedSamples[_decodedSampleCount++] = decodeMS(&_status.ch[0], (data >> 4) & 0x0f);
+ _decodedSamples[_decodedSampleCount++] = decodeMS(&_status.ch[_channels - 1], data & 0x0f);
+ }
}
- for (; samples < numSamples && _blockPos[0] < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
- data = _stream->readByte();
- _blockPos[0]++;
- buffer[samples] = decodeMS(&_status.ch[0], (data >> 4) & 0x0f);
- buffer[samples + 1] = decodeMS(&_status.ch[_channels - 1], data & 0x0f);
- }
+ // (1 - (count - 1)) ensures that _decodedSamples acts as a FIFO of depth 2
+ buffer[samples] = _decodedSamples[1 - (_decodedSampleCount - 1)];
+ _decodedSampleCount--;
}
return samples;
diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h
index 3b8d8c74d0..66a1aa605f 100644
--- a/audio/decoders/adpcm_intern.h
+++ b/audio/decoders/adpcm_intern.h
@@ -206,12 +206,19 @@ public:
if (blockAlign == 0)
error("MS_ADPCMStream(): blockAlign isn't specified for MS ADPCM");
memset(&_status, 0, sizeof(_status));
+ _decodedSampleCount = 0;
}
+ virtual bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos) && (_decodedSampleCount == 0); }
+
virtual int readBuffer(int16 *buffer, const int numSamples);
protected:
int16 decodeMS(ADPCMChannelStatus *c, byte);
+
+private:
+ uint8 _decodedSampleCount;
+ int16 _decodedSamples[4];
};
// Duck DK3 IMA ADPCM Decoder
diff --git a/audio/decoders/aiff.h b/audio/decoders/aiff.h
index afcdb6ae6c..0d96e73c26 100644
--- a/audio/decoders/aiff.h
+++ b/audio/decoders/aiff.h
@@ -48,7 +48,7 @@ class SeekableAudioStream;
* successful. In that case, the stream's seek position will be set to the
* start of the audio data, and size, rate and flags contain information
* necessary for playback. Currently this function only supports uncompressed
- * raw PCM data as well as IMA ADPCM.
+ * raw PCM.
*/
extern bool loadAIFFFromStream(Common::SeekableReadStream &stream, int &size, int &rate, byte &flags);
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 0588650ec6..787b547495 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -134,7 +134,7 @@ void QuickTimeAudioDecoder::init() {
_audioTracks.push_back(new QuickTimeAudioTrack(this, _tracks[i]));
}
-Common::QuickTimeParser::SampleDesc *QuickTimeAudioDecoder::readSampleDesc(Track *track, uint32 format) {
+Common::QuickTimeParser::SampleDesc *QuickTimeAudioDecoder::readSampleDesc(Track *track, uint32 format, uint32 descSize) {
if (track->codecType == CODEC_TYPE_AUDIO) {
debug(0, "Audio Codec FourCC: \'%s\'", tag2str(format));
diff --git a/audio/decoders/quicktime_intern.h b/audio/decoders/quicktime_intern.h
index f1ab037d89..bb5ff0cf5c 100644
--- a/audio/decoders/quicktime_intern.h
+++ b/audio/decoders/quicktime_intern.h
@@ -131,7 +131,7 @@ protected:
};
// Common::QuickTimeParser API
- virtual Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format);
+ virtual Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize);
void init();
diff --git a/audio/fmopl.h b/audio/fmopl.h
index 323cc3d028..ad1794d873 100644
--- a/audio/fmopl.h
+++ b/audio/fmopl.h
@@ -129,7 +129,9 @@ public:
/**
* Function to directly write to a specific OPL register.
- * This writes to *both* chips for a Dual OPL2.
+ * This writes to *both* chips for a Dual OPL2. We allow
+ * writing to secondary OPL registers by using register
+ * values >= 0x100.
*
* @param r hardware register number to write to
* @param v value, which will be written
diff --git a/audio/mididrv.h b/audio/mididrv.h
index fb3e29bd60..56b4a265cb 100644
--- a/audio/mididrv.h
+++ b/audio/mididrv.h
@@ -194,7 +194,9 @@ public:
enum {
// PROP_TIMEDIV = 1,
PROP_OLD_ADLIB = 2,
- PROP_CHANNEL_MASK = 3
+ PROP_CHANNEL_MASK = 3,
+ // HACK: Not so nice, but our SCUMM AdLib code is in audio/
+ PROP_SCUMM_OPL3 = 4
};
/**
diff --git a/audio/midiparser.h b/audio/midiparser.h
index a4dbf174e1..bb9749b97f 100644
--- a/audio/midiparser.h
+++ b/audio/midiparser.h
@@ -394,6 +394,7 @@ public:
static MidiParser *createParser_SMF();
static MidiParser *createParser_XMIDI(XMidiCallbackProc proc = defaultXMidiCallback, void *refCon = 0);
+ static MidiParser *createParser_QT();
static void timerCallback(void *data) { ((MidiParser *) data)->onTimer(); }
};
diff --git a/audio/midiparser_qt.cpp b/audio/midiparser_qt.cpp
new file mode 100644
index 0000000000..6214d28f95
--- /dev/null
+++ b/audio/midiparser_qt.cpp
@@ -0,0 +1,496 @@
+/* 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.
+ *
+ */
+
+#include "audio/midiparser_qt.h"
+#include "common/debug.h"
+#include "common/memstream.h"
+
+bool MidiParser_QT::loadMusic(byte *data, uint32 size) {
+ if (size < 8)
+ return false;
+
+ Common::SeekableReadStream *stream = new Common::MemoryReadStream(data, size, DisposeAfterUse::NO);
+
+ // Attempt to detect what format we have
+ bool result;
+ if (READ_BE_UINT32(data + 4) == MKTAG('m', 'u', 's', 'i'))
+ result = loadFromTune(stream);
+ else
+ result = loadFromContainerStream(stream);
+
+ if (!result) {
+ delete stream;
+ return false;
+ }
+
+ return true;
+}
+
+void MidiParser_QT::unloadMusic() {
+ MidiParser::unloadMusic();
+ close();
+
+ // Unlike those lesser formats, we *do* hold track data
+ for (uint i = 0; i < _trackInfo.size(); i++)
+ free(_trackInfo[i].data);
+
+ _trackInfo.clear();
+}
+
+bool MidiParser_QT::loadFromTune(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) {
+ unloadMusic();
+
+ // a tune starts off with a sample description
+ stream->readUint32BE(); // header size
+
+ if (stream->readUint32BE() != MKTAG('m', 'u', 's', 'i'))
+ return false;
+
+ stream->readUint32BE(); // reserved
+ stream->readUint16BE(); // reserved
+ stream->readUint16BE(); // index
+
+ stream->readUint32BE(); // flags, ignore
+
+ MIDITrackInfo trackInfo;
+ trackInfo.size = stream->size() - stream->pos();
+ assert(trackInfo.size > 0);
+
+ trackInfo.data = (byte *)malloc(trackInfo.size);
+ stream->read(trackInfo.data, trackInfo.size);
+
+ trackInfo.timeScale = 600; // the default
+ _trackInfo.push_back(trackInfo);
+
+ initCommon();
+ return true;
+}
+
+bool MidiParser_QT::loadFromContainerStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) {
+ unloadMusic();
+
+ if (!parseStream(stream, disposeAfterUse))
+ return false;
+
+ initFromContainerTracks();
+ return true;
+}
+
+bool MidiParser_QT::loadFromContainerFile(const Common::String &fileName) {
+ unloadMusic();
+
+ if (!parseFile(fileName))
+ return false;
+
+ initFromContainerTracks();
+ return true;
+}
+
+void MidiParser_QT::parseNextEvent(EventInfo &info) {
+ uint32 delta = 0;
+
+ while (_queuedEvents.empty())
+ delta += readNextEvent();
+
+ info = _queuedEvents.pop();
+ info.delta = delta;
+}
+
+uint32 MidiParser_QT::readNextEvent() {
+ if (_position._playPos >= _trackInfo[_activeTrack].data + _trackInfo[_activeTrack].size) {
+ // Manually insert end of track when we reach the end
+ EventInfo info;
+ info.event = 0xFF;
+ info.ext.type = 0x2F;
+ _queuedEvents.push(info);
+ return 0;
+ }
+
+ uint32 control = readUint32();
+
+ switch (control >> 28) {
+ case 0x0:
+ case 0x1:
+ // Rest
+ // We handle this by recursively adding up all the rests into the
+ // next event's delta
+ return readNextEvent() + (control & 0xFFFFFF);
+ case 0x2:
+ case 0x3:
+ // Note event
+ handleNoteEvent((control >> 24) & 0x1F, ((control >> 18) & 0x3F) + 32, (control >> 11) & 0x7F, control & 0x7FF);
+ break;
+ case 0x4:
+ case 0x5:
+ // Controller
+ handleControllerEvent((control >> 16) & 0xFF, (control >> 24) & 0x1F, (control >> 8) & 0xFF, control & 0xFF);
+ break;
+ case 0x6:
+ case 0x7:
+ // Marker
+ // Used for editing only, so we don't need to care about this
+ break;
+ case 0x9: {
+ // Extended note event
+ uint32 extra = readUint32();
+ handleNoteEvent((control >> 16) & 0xFFF, (control >> 8) & 0xFF, (extra >> 22) & 0x7F, extra & 0x3FFFFF);
+ break;
+ }
+ case 0xA: {
+ // Extended controller
+ uint32 extra = readUint32();
+ handleControllerEvent((extra >> 16) & 0x3FFF, (control >> 16) & 0xFFF, (extra >> 8) & 0xFF, extra & 0xFF);
+ break;
+ }
+ case 0xB:
+ // Knob
+ error("Encountered knob event in QuickTime MIDI");
+ break;
+ case 0x8:
+ case 0xC:
+ case 0xD:
+ case 0xE:
+ // Reserved
+ readUint32();
+ break;
+ case 0xF:
+ // General
+ handleGeneralEvent(control);
+ break;
+ }
+
+ return 0;
+}
+
+void MidiParser_QT::handleNoteEvent(uint32 part, byte pitch, byte velocity, uint32 length) {
+ byte channel = getChannel(part);
+
+ EventInfo info;
+ info.event = 0x90 | channel;
+ info.basic.param1 = pitch;
+ info.basic.param2 = velocity;
+ info.length = (velocity == 0) ? 0 : length;
+ _queuedEvents.push(info);
+}
+
+void MidiParser_QT::handleControllerEvent(uint32 control, uint32 part, byte intPart, byte fracPart) {
+ byte channel = getChannel(part);
+ EventInfo info;
+
+ if (control == 0) {
+ // "Bank select"
+ // QuickTime docs don't list this, but IHNM Mac calls this anyway
+ // We have to ignore this.
+ return;
+ } else if (control == 32) {
+ // Pitch bend
+ info.event = 0xE0 | channel;
+
+ // Actually an 8.8 fixed point number
+ int16 value = (int16)((intPart << 8) | fracPart);
+
+ if (value < -0x200 || value > 0x1FF) {
+ warning("QuickTime MIDI pitch bend value (%d) out of range, clipping", value);
+ value = CLIP<int16>(value, -0x200, 0x1FF);
+ }
+
+ // Now convert the value to 'normal' MIDI values
+ value += 0x200;
+ value *= 16;
+
+ // param1 holds the low 7 bits, param2 holds the high 7 bits
+ info.basic.param1 = value & 0x7F;
+ info.basic.param2 = value >> 7;
+
+ _partMap[part].pitchBend = value;
+ } else {
+ // Regular controller
+ info.event = 0xB0 | channel;
+ info.basic.param1 = control;
+ info.basic.param2 = intPart;
+
+ // TODO: Parse more controls to hold their status
+ switch (control) {
+ case 7:
+ _partMap[part].volume = intPart;
+ break;
+ case 10:
+ _partMap[part].pan = intPart;
+ break;
+ }
+ }
+
+ _queuedEvents.push(info);
+}
+
+void MidiParser_QT::handleGeneralEvent(uint32 control) {
+ uint32 part = (control >> 16) & 0xFFF;
+ uint32 dataSize = ((control & 0xFFFF) - 2) * 4;
+ byte subType = READ_BE_UINT16(_position._playPos + dataSize) & 0x3FFF;
+
+ switch (subType) {
+ case 1:
+ // Note Request
+ // Currently we're only using the GM number from the request
+ assert(dataSize == 84);
+
+ // We have to remap channels because GM needs percussion to be on the
+ // percussion channel but QuickTime can have that anywhere.
+ definePart(part, READ_BE_UINT32(_position._playPos + 80));
+ break;
+ case 5: // Tune Difference
+ case 8: // MIDI Channel
+ case 10: // No-op
+ case 11: // Used Notes
+ // Should be safe to skip these
+ break;
+ default:
+ warning("Unhandled general event %d", subType);
+ }
+
+ _position._playPos += dataSize + 4;
+}
+
+void MidiParser_QT::definePart(uint32 part, uint32 instrument) {
+ if (_partMap.contains(part))
+ warning("QuickTime MIDI part %d being redefined", part);
+
+ PartStatus partStatus;
+ partStatus.instrument = instrument;
+ partStatus.volume = 127;
+ partStatus.pan = 64;
+ partStatus.pitchBend = 0x2000;
+ _partMap[part] = partStatus;
+}
+
+byte MidiParser_QT::getChannel(uint32 part) {
+ // If we already mapped it, just go with it
+ if (!_channelMap.contains(part)) {
+ byte newChannel = findFreeChannel(part);
+ _channelMap[part] = newChannel;
+ setupPart(part);
+ }
+
+ return _channelMap[part];
+}
+
+byte MidiParser_QT::findFreeChannel(uint32 part) {
+ if (_partMap[part].instrument != 0x4001) {
+ // Normal Instrument -> First Free Channel
+ if (allChannelsAllocated())
+ deallocateFreeChannel();
+
+ for (int i = 0; i < 16; i++)
+ if (i != 9 && !isChannelAllocated(i)) // 9 is reserved for Percussion
+ return i;
+
+ // Can't actually get here
+ }
+
+ // Drum Kit -> Percussion Channel
+ deallocateChannel(9);
+ return 9;
+}
+
+void MidiParser_QT::deallocateFreeChannel() {
+ for (int i = 0; i < 16; i++) {
+ if (i != 9 && !_activeNotes[i]) {
+ // TODO: Improve this by looking for the channel with the longest
+ // time since the last note.
+ deallocateChannel(i);
+ return;
+ }
+ }
+
+ error("Exceeded QuickTime MIDI channel polyphony");
+}
+
+void MidiParser_QT::deallocateChannel(byte channel) {
+ for (ChannelMap::iterator it = _channelMap.begin(); it != _channelMap.end(); it++) {
+ if (it->_value == channel) {
+ _channelMap.erase(it);
+ return;
+ }
+ }
+}
+
+bool MidiParser_QT::isChannelAllocated(byte channel) const {
+ for (ChannelMap::const_iterator it = _channelMap.begin(); it != _channelMap.end(); it++)
+ if (it->_value == channel)
+ return true;
+
+ return false;
+}
+
+bool MidiParser_QT::allChannelsAllocated() const {
+ // Less than 15? We definitely have room
+ if (_channelMap.size() < 15)
+ return false;
+
+ // 15? One of the allocated channels might be the percussion one
+ if (_channelMap.size() == 15)
+ for (ChannelMap::const_iterator it = _channelMap.begin(); it != _channelMap.end(); it++)
+ if (it->_value == 9)
+ return false;
+
+ // 16 -> definitely all allocated
+ return true;
+}
+
+void MidiParser_QT::setupPart(uint32 part) {
+ PartStatus &status = _partMap[part];
+ byte channel = _channelMap[part];
+ EventInfo info;
+
+ // First, the program change
+ if (channel != 9) {
+ // 9 is always percussion
+ info.event = 0xC0 | channel;
+ info.basic.param1 = status.instrument;
+ _queuedEvents.push(info);
+ }
+
+ // Volume
+ info.event = 0xB0 | channel;
+ info.basic.param1 = 7;
+ info.basic.param2 = status.volume;
+ _queuedEvents.push(info);
+
+ // Pan
+ info.event = 0xB0 | channel;
+ info.basic.param1 = 10;
+ info.basic.param2 = status.pan;
+ _queuedEvents.push(info);
+
+ // Pitch Bend
+ info.event = 0xE0 | channel;
+ info.basic.param1 = status.pitchBend & 0x7F;
+ info.basic.param2 = status.pitchBend >> 7;
+ _queuedEvents.push(info);
+}
+
+void MidiParser_QT::resetTracking() {
+ MidiParser::resetTracking();
+ _channelMap.clear();
+ _queuedEvents.clear();
+ _partMap.clear();
+}
+
+Common::QuickTimeParser::SampleDesc *MidiParser_QT::readSampleDesc(Track *track, uint32 format, uint32 descSize) {
+ if (track->codecType == CODEC_TYPE_MIDI) {
+ debug(0, "MIDI Codec FourCC '%s'", tag2str(format));
+
+ _fd->readUint32BE(); // flags, ignore
+ descSize -= 4;
+
+ MIDISampleDesc *entry = new MIDISampleDesc(track, format);
+ entry->_requestSize = descSize;
+ entry->_requestData = (byte *)malloc(descSize);
+ _fd->read(entry->_requestData, descSize);
+ return entry;
+ }
+
+ return 0;
+}
+
+MidiParser_QT::MIDISampleDesc::MIDISampleDesc(Common::QuickTimeParser::Track *parentTrack, uint32 codecTag) :
+ Common::QuickTimeParser::SampleDesc(parentTrack, codecTag) {
+}
+
+void MidiParser_QT::initFromContainerTracks() {
+ const Common::Array<Common::QuickTimeParser::Track *> &tracks = Common::QuickTimeParser::_tracks;
+
+ for (uint32 i = 0; i < tracks.size(); i++) {
+ if (tracks[i]->codecType == CODEC_TYPE_MIDI) {
+ assert(tracks[i]->sampleDescs.size() == 1);
+
+ if (tracks[i]->editCount != 1)
+ warning("Unhandled QuickTime MIDI edit lists, things may go awry");
+
+ MIDITrackInfo trackInfo;
+ trackInfo.data = readWholeTrack(tracks[i], trackInfo.size);
+ trackInfo.timeScale = tracks[i]->timeScale;
+ _trackInfo.push_back(trackInfo);
+ }
+ }
+
+ initCommon();
+}
+
+void MidiParser_QT::initCommon() {
+ // Now we have all our info needed in _trackInfo from whatever container
+ // form, we can fill in the MidiParser tracks.
+
+ _numTracks = _trackInfo.size();
+ assert(_numTracks > 0);
+
+ for (uint32 i = 0; i < _trackInfo.size(); i++)
+ MidiParser::_tracks[i] = _trackInfo[i].data;
+
+ _ppqn = _trackInfo[0].timeScale;
+ resetTracking();
+ setTempo(1000000);
+ setTrack(0);
+}
+
+byte *MidiParser_QT::readWholeTrack(Common::QuickTimeParser::Track *track, uint32 &trackSize) {
+ // This just goes through all chunks and appends them together
+
+ Common::MemoryWriteStreamDynamic output;
+ uint32 curSample = 0;
+
+ // Read in the note request data first
+ MIDISampleDesc *entry = (MIDISampleDesc *)track->sampleDescs[0];
+ output.write(entry->_requestData, entry->_requestSize);
+
+ for (uint i = 0; i < track->chunkCount; i++) {
+ _fd->seek(track->chunkOffsets[i]);
+
+ uint32 sampleCount = 0;
+
+ for (uint32 j = 0; j < track->sampleToChunkCount; j++)
+ if (i >= track->sampleToChunk[j].first)
+ sampleCount = track->sampleToChunk[j].count;
+
+ for (uint32 j = 0; j < sampleCount; j++, curSample++) {
+ uint32 size = (track->sampleSize != 0) ? track->sampleSize : track->sampleSizes[curSample];
+
+ byte *data = new byte[size];
+ _fd->read(data, size);
+ output.write(data, size);
+ delete[] data;
+ }
+ }
+
+ trackSize = output.size();
+ return output.getData();
+}
+
+uint32 MidiParser_QT::readUint32() {
+ uint32 value = READ_BE_UINT32(_position._playPos);
+ _position._playPos += 4;
+ return value;
+}
+
+MidiParser *MidiParser::createParser_QT() {
+ return new MidiParser_QT();
+}
diff --git a/audio/midiparser_qt.h b/audio/midiparser_qt.h
new file mode 100644
index 0000000000..d6d0f40a48
--- /dev/null
+++ b/audio/midiparser_qt.h
@@ -0,0 +1,134 @@
+/* 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 AUDIO_MIDIPARSER_QT_H
+#define AUDIO_MIDIPARSER_QT_H
+
+#include "audio/midiparser.h"
+#include "common/array.h"
+#include "common/hashmap.h"
+#include "common/queue.h"
+#include "common/quicktime.h"
+
+/**
+ * The QuickTime Music version of MidiParser.
+ *
+ * QuickTime Music is actually a superset of MIDI. It has its own custom
+ * instruments and supports more than 15 non-percussion channels. It also
+ * has custom control changes and a more advanced pitch bend (which we
+ * convert to GM pitch bend as best as possible). We then use the fallback
+ * GM instrument that each QuickTime instrument definition has to provide.
+ *
+ * Furthermore, Apple's documentation on this is terrible. You know
+ * documentation is bad when it contradicts itself three times on the same
+ * subject (like about setting the GM instrument field to percussion).
+ *
+ * This is as close to a proper QuickTime Music parser as we can currently
+ * implement using our MidiParser interface.
+ */
+class MidiParser_QT : public MidiParser, public Common::QuickTimeParser {
+public:
+ MidiParser_QT() {}
+ ~MidiParser_QT() {}
+
+ // MidiParser
+ bool loadMusic(byte *data, uint32 size);
+ void unloadMusic();
+
+ /**
+ * Load the MIDI from a 'Tune' resource
+ */
+ bool loadFromTune(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES);
+
+ /**
+ * Load the MIDI from a QuickTime stream
+ */
+ bool loadFromContainerStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES);
+
+ /**
+ * Load the MIDI from a QuickTime file
+ */
+ bool loadFromContainerFile(const Common::String &fileName);
+
+protected:
+ // MidiParser
+ void parseNextEvent(EventInfo &info);
+ void resetTracking();
+
+ // QuickTimeParser
+ SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize);
+
+private:
+ struct MIDITrackInfo {
+ byte *data;
+ uint32 size;
+ uint32 timeScale;
+ };
+
+ struct PartStatus {
+ uint32 instrument;
+ byte volume;
+ byte pan;
+ uint16 pitchBend;
+ };
+
+ class MIDISampleDesc : public SampleDesc {
+ public:
+ MIDISampleDesc(Common::QuickTimeParser::Track *parentTrack, uint32 codecTag);
+ ~MIDISampleDesc() {}
+
+ byte *_requestData;
+ uint32 _requestSize;
+ };
+
+ uint32 readNextEvent();
+ void handleGeneralEvent(uint32 control);
+ void handleControllerEvent(uint32 control, uint32 part, byte intPart, byte fracPart);
+ void handleNoteEvent(uint32 part, byte pitch, byte velocity, uint32 length);
+
+ void definePart(uint32 part, uint32 instrument);
+ void setupPart(uint32 part);
+
+ byte getChannel(uint32 part);
+ bool isChannelAllocated(byte channel) const;
+ byte findFreeChannel(uint32 part);
+ void deallocateFreeChannel();
+ void deallocateChannel(byte channel);
+ bool allChannelsAllocated() const;
+
+ byte *readWholeTrack(Common::QuickTimeParser::Track *track, uint32 &trackSize);
+
+ Common::Array<MIDITrackInfo> _trackInfo;
+ Common::Queue<EventInfo> _queuedEvents;
+
+ typedef Common::HashMap<uint, PartStatus> PartMap;
+ PartMap _partMap;
+
+ typedef Common::HashMap<uint, byte> ChannelMap;
+ ChannelMap _channelMap;
+
+ void initFromContainerTracks();
+ void initCommon();
+ uint32 readUint32();
+};
+
+#endif
diff --git a/audio/module.mk b/audio/module.mk
index e3aa0aaa81..4e1c031c83 100644
--- a/audio/module.mk
+++ b/audio/module.mk
@@ -4,6 +4,7 @@ MODULE_OBJS := \
audiostream.o \
fmopl.o \
mididrv.o \
+ midiparser_qt.o \
midiparser_smf.o \
midiparser_xmidi.o \
midiparser.o \
diff --git a/audio/softsynth/adlib.cpp b/audio/softsynth/adlib.cpp
index 32a5f4a910..0cadea7f22 100644
--- a/audio/softsynth/adlib.cpp
+++ b/audio/softsynth/adlib.cpp
@@ -32,7 +32,13 @@
#include "common/translation.h"
#ifdef DEBUG_ADLIB
-static int tick;
+static int g_tick;
+#endif
+
+// Only include OPL3 when we actually have an AdLib emulator builtin, which
+// supports OPL3.
+#ifndef DISABLE_DOSBOX_OPL
+#define ENABLE_OPL3
#endif
class MidiDriver_ADLIB;
@@ -52,21 +58,21 @@ struct InstrumentExtra {
} PACKED_STRUCT;
struct AdLibInstrument {
- byte mod_characteristic;
- byte mod_scalingOutputLevel;
- byte mod_attackDecay;
- byte mod_sustainRelease;
- byte mod_waveformSelect;
- byte car_characteristic;
- byte car_scalingOutputLevel;
- byte car_attackDecay;
- byte car_sustainRelease;
- byte car_waveformSelect;
+ byte modCharacteristic;
+ byte modScalingOutputLevel;
+ byte modAttackDecay;
+ byte modSustainRelease;
+ byte modWaveformSelect;
+ byte carCharacteristic;
+ byte carScalingOutputLevel;
+ byte carAttackDecay;
+ byte carSustainRelease;
+ byte carWaveformSelect;
byte feedback;
- byte flags_a;
- InstrumentExtra extra_a;
- byte flags_b;
- InstrumentExtra extra_b;
+ byte flagsA;
+ InstrumentExtra extraA;
+ byte flagsB;
+ InstrumentExtra extraB;
byte duration;
} PACKED_STRUCT;
#include "common/pack-end.h"
@@ -77,16 +83,20 @@ class AdLibPart : public MidiChannel {
protected:
// AdLibPart *_prev, *_next;
AdLibVoice *_voice;
- int16 _pitchbend;
- byte _pitchbend_factor;
- int8 _transpose_eff;
- byte _vol_eff;
- int8 _detune_eff;
- byte _modwheel;
+ int16 _pitchBend;
+ byte _pitchBendFactor;
+ //int8 _transposeEff;
+ byte _volEff;
+ int8 _detuneEff;
+ byte _modWheel;
bool _pedal;
byte _program;
- byte _pri_eff;
- AdLibInstrument _part_instr;
+ byte _priEff;
+ byte _pan;
+ AdLibInstrument _partInstr;
+#ifdef ENABLE_OPL3
+ AdLibInstrument _partInstrSecondary;
+#endif
protected:
MidiDriver_ADLIB *_owner;
@@ -99,21 +109,25 @@ protected:
public:
AdLibPart() {
_voice = 0;
- _pitchbend = 0;
- _pitchbend_factor = 2;
- _transpose_eff = 0;
- _vol_eff = 0;
- _detune_eff = 0;
- _modwheel = 0;
+ _pitchBend = 0;
+ _pitchBendFactor = 2;
+ //_transposeEff = 0;
+ _volEff = 0;
+ _detuneEff = 0;
+ _modWheel = 0;
_pedal = 0;
_program = 0;
- _pri_eff = 0;
+ _priEff = 0;
+ _pan = 64;
_owner = 0;
_allocated = false;
_channel = 0;
- memset(&_part_instr, 0, sizeof(_part_instr));
+ memset(&_partInstr, 0, sizeof(_partInstr));
+#ifdef ENABLE_OPL3
+ memset(&_partInstrSecondary, 0, sizeof(_partInstrSecondary));
+#endif
}
MidiDriver *device();
@@ -132,7 +146,7 @@ public:
void controlChange(byte control, byte value);
void modulationWheel(byte value);
void volume(byte value);
- void panPosition(byte value) { return; } // Not supported
+ void panPosition(byte value);
void pitchBendFactor(byte value);
void detune(byte value);
void priority(byte value);
@@ -162,7 +176,6 @@ public:
void noteOff(byte note);
void noteOn(byte note, byte velocity);
void programChange(byte program) { }
- void pitchBend(int16 bend) { }
// Control Change messages
void modulationWheel(byte value) { }
@@ -181,26 +194,26 @@ private:
struct Struct10 {
byte active;
- int16 cur_val;
+ int16 curVal;
int16 count;
- uint16 max_value;
- int16 start_value;
+ uint16 maxValue;
+ int16 startValue;
byte loop;
- byte table_a[4];
- byte table_b[4];
+ byte tableA[4];
+ byte tableB[4];
int8 unk3;
- int8 modwheel;
- int8 modwheel_last;
- uint16 speed_lo_max;
- uint16 num_steps;
- int16 speed_hi;
+ int8 modWheel;
+ int8 modWheelLast;
+ uint16 speedLoMax;
+ uint16 numSteps;
+ int16 speedHi;
int8 direction;
- uint16 speed_lo;
- uint16 speed_lo_counter;
+ uint16 speedLo;
+ uint16 speedLoCounter;
};
struct Struct11 {
- int16 modify_val;
+ int16 modifyVal;
byte param, flag0x40, flag0x10;
Struct10 *s10;
};
@@ -208,11 +221,11 @@ struct Struct11 {
struct AdLibVoice {
AdLibPart *_part;
AdLibVoice *_next, *_prev;
- byte _waitforpedal;
+ byte _waitForPedal;
byte _note;
byte _channel;
- byte _twochan;
- byte _vol_1, _vol_2;
+ byte _twoChan;
+ byte _vol1, _vol2;
int16 _duration;
Struct10 _s10a;
@@ -220,26 +233,34 @@ struct AdLibVoice {
Struct10 _s10b;
Struct11 _s11b;
+#ifdef ENABLE_OPL3
+ byte _secTwoChan;
+ byte _secVol1, _secVol2;
+#endif
+
AdLibVoice() { memset(this, 0, sizeof(AdLibVoice)); }
};
struct AdLibSetParams {
- byte a, b, c, d;
+ byte registerBase;
+ byte shift;
+ byte mask;
+ byte inversion;
};
-static const byte channel_mappings[9] = {
+static const byte g_operator1Offsets[9] = {
0, 1, 2, 8,
9, 10, 16, 17,
18
};
-static const byte channel_mappings_2[9] = {
+static const byte g_operator2Offsets[9] = {
3, 4, 5, 11,
12, 13, 19, 20,
21
};
-static const AdLibSetParams adlib_setparam_table[] = {
+static const AdLibSetParams g_setParamTable[] = {
{0x40, 0, 63, 63}, // level
{0xE0, 2, 0, 0}, // unused
{0x40, 6, 192, 0}, // level key scaling
@@ -257,21 +278,21 @@ static const AdLibSetParams adlib_setparam_table[] = {
{0xC0, 1, 14, 0} // feedback
};
-static const byte param_table_1[16] = {
+static const byte g_paramTable1[16] = {
29, 28, 27, 0,
3, 4, 7, 8,
13, 16, 17, 20,
21, 30, 31, 0
};
-static const uint16 maxval_table[16] = {
+static const uint16 g_maxValTable[16] = {
0x2FF, 0x1F, 0x7, 0x3F,
0x0F, 0x0F, 0x0F, 0x3,
0x3F, 0x0F, 0x0F, 0x0F,
0x3, 0x3E, 0x1F, 0
};
-static const uint16 num_steps_table[] = {
+static const uint16 g_numStepsTable[] = {
1, 2, 4, 5,
6, 7, 8, 9,
10, 12, 14, 16,
@@ -282,7 +303,7 @@ static const uint16 num_steps_table[] = {
600, 860, 1200, 1600
};
-static const byte note_to_f_num[] = {
+static const byte g_noteFrequencies[] = {
90, 91, 92, 92, 93, 94, 94, 95,
96, 96, 97, 98, 98, 99, 100, 101,
101, 102, 103, 104, 104, 105, 106, 107,
@@ -303,188 +324,530 @@ static const byte note_to_f_num[] = {
242, 243, 245, 247, 249, 251, 252, 254
};
-static const AdLibInstrument map_gm_to_fm[128] = {
+static const AdLibInstrument g_gmInstruments[128] = {
// 0x00
-{ 0xC2, 0xC5, 0x2B, 0x99, 0x58, 0xC2, 0x1F, 0x1E, 0xC8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x23 },
-{ 0x22, 0x53, 0x0E, 0x8A, 0x30, 0x14, 0x06, 0x1D, 0x7A, 0x5C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x06, 0x00, 0x1C, 0x79, 0x40, 0x02, 0x00, 0x4B, 0x79, 0x58, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x89, 0x2A, 0x89, 0x49, 0xC2, 0x16, 0x1C, 0xB8, 0x7C, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x23 },
-{ 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x20, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x84, 0x40, 0x3B, 0x5A, 0x6F, 0x81, 0x0E, 0x3B, 0x5A, 0x7F, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0x7F, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x8C, 0x80, 0x05, 0xEA, 0x59, 0x82, 0x0A, 0x3C, 0xAA, 0x64, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x85, 0x40, 0x0D, 0xEC, 0x71, 0x84, 0x58, 0x3E, 0xCB, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x8A, 0xC0, 0x0C, 0xDC, 0x50, 0x88, 0x58, 0x3D, 0xDA, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC9, 0x40, 0x2B, 0x78, 0x42, 0xC2, 0x04, 0x4C, 0x8A, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x1A },
-{ 0x2A, 0x0E, 0x17, 0x89, 0x28, 0x22, 0x0C, 0x1B, 0x09, 0x70, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE7, 0x9B, 0x08, 0x08, 0x26, 0xE2, 0x06, 0x0A, 0x08, 0x70, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC5, 0x05, 0x00, 0xFC, 0x40, 0x84, 0x00, 0x00, 0xDC, 0x50, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x86, 0x40, 0x5D, 0x5A, 0x41, 0x81, 0x00, 0x0B, 0x5A, 0x7F, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xC2, 0xC5, 0x2B, 0x99, 0x58, 0xC2, 0x1F, 0x1E, 0xC8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0x22, 0x53, 0x0E, 0x8A, 0x30, 0x14, 0x06, 0x1D, 0x7A, 0x5C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x00, 0x1C, 0x79, 0x40, 0x02, 0x00, 0x4B, 0x79, 0x58, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x89, 0x2A, 0x89, 0x49, 0xC2, 0x16, 0x1C, 0xB8, 0x7C, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x20, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x3B, 0x5A, 0x6F, 0x81, 0x0E, 0x3B, 0x5A, 0x7F, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0x7F, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8C, 0x80, 0x05, 0xEA, 0x59, 0x82, 0x0A, 0x3C, 0xAA, 0x64, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x85, 0x40, 0x0D, 0xEC, 0x71, 0x84, 0x58, 0x3E, 0xCB, 0x7C, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8A, 0xC0, 0x0C, 0xDC, 0x50, 0x88, 0x58, 0x3D, 0xDA, 0x7C, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC9, 0x40, 0x2B, 0x78, 0x42, 0xC2, 0x04, 0x4C, 0x8A, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1A },
+ { 0x2A, 0x0E, 0x17, 0x89, 0x28, 0x22, 0x0C, 0x1B, 0x09, 0x70, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x9B, 0x08, 0x08, 0x26, 0xE2, 0x06, 0x0A, 0x08, 0x70, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC5, 0x05, 0x00, 0xFC, 0x40, 0x84, 0x00, 0x00, 0xDC, 0x50, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x86, 0x40, 0x5D, 0x5A, 0x41, 0x81, 0x00, 0x0B, 0x5A, 0x7F, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x10
-{ 0xED, 0x00, 0x7B, 0xC8, 0x40, 0xE1, 0x99, 0x4A, 0xE9, 0x7E, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE8, 0x4F, 0x3A, 0xD7, 0x7C, 0xE2, 0x97, 0x49, 0xF9, 0x7D, 0x05, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x10, 0x2F, 0xF7, 0x7D, 0xF3, 0x45, 0x8F, 0xC7, 0x62, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x01, 0x8C, 0x9F, 0xDA, 0x70, 0xE4, 0x50, 0x9F, 0xDA, 0x6A, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x08, 0xD5, 0x9D, 0xA5, 0x45, 0xE2, 0x3F, 0x9F, 0xD6, 0x49, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE5, 0x0F, 0x7D, 0xB8, 0x2E, 0xA2, 0x0F, 0x7C, 0xC7, 0x61, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0x62, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x88, 0x9C, 0x50, 0x64, 0xE2, 0x18, 0x70, 0xC4, 0x7C, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x18 },
-{ 0x42, 0x55, 0x3E, 0xEB, 0x24, 0xD4, 0x08, 0x0D, 0xA9, 0x71, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x18 },
-{ 0xC2, 0x00, 0x2B, 0x17, 0x51, 0xC2, 0x1E, 0x4D, 0x97, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x19 },
-{ 0xC6, 0x01, 0x2D, 0xA7, 0x44, 0xC2, 0x06, 0x0E, 0xA7, 0x79, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x0C, 0x06, 0x06, 0x55, 0xC2, 0x3F, 0x09, 0x86, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0A },
-{ 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0x59, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0x7F, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0x7D, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0B },
+ { 0xED, 0x00, 0x7B, 0xC8, 0x40, 0xE1, 0x99, 0x4A, 0xE9, 0x7E, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x4F, 0x3A, 0xD7, 0x7C, 0xE2, 0x97, 0x49, 0xF9, 0x7D, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x10, 0x2F, 0xF7, 0x7D, 0xF3, 0x45, 0x8F, 0xC7, 0x62, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x01, 0x8C, 0x9F, 0xDA, 0x70, 0xE4, 0x50, 0x9F, 0xDA, 0x6A, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x08, 0xD5, 0x9D, 0xA5, 0x45, 0xE2, 0x3F, 0x9F, 0xD6, 0x49, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE5, 0x0F, 0x7D, 0xB8, 0x2E, 0xA2, 0x0F, 0x7C, 0xC7, 0x61, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0x62, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x88, 0x9C, 0x50, 0x64, 0xE2, 0x18, 0x70, 0xC4, 0x7C, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0x42, 0x55, 0x3E, 0xEB, 0x24, 0xD4, 0x08, 0x0D, 0xA9, 0x71, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0xC2, 0x00, 0x2B, 0x17, 0x51, 0xC2, 0x1E, 0x4D, 0x97, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x19 },
+ { 0xC6, 0x01, 0x2D, 0xA7, 0x44, 0xC2, 0x06, 0x0E, 0xA7, 0x79, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x0C, 0x06, 0x06, 0x55, 0xC2, 0x3F, 0x09, 0x86, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0A },
+ { 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0x59, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0x7F, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0x7D, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0B },
// 0x20
-{ 0xC2, 0x40, 0x3C, 0x96, 0x58, 0xC4, 0xDE, 0x0E, 0xC7, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x20 },
-{ 0x31, 0x13, 0x2D, 0xD7, 0x3C, 0xE2, 0x18, 0x2E, 0xB8, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x22, 0x86, 0x0D, 0xD7, 0x50, 0xE4, 0x18, 0x5E, 0xB8, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x28 },
-{ 0xF2, 0x0A, 0x0D, 0xD7, 0x40, 0xE4, 0x1F, 0x5E, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x09, 0x4B, 0xD6, 0x48, 0xE4, 0x1F, 0x1C, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x28 },
-{ 0x62, 0x11, 0x0C, 0xE6, 0x3C, 0xE4, 0x1F, 0x0C, 0xC8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x12, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x7D, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x13, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x5D, 0xB8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xA2, 0x40, 0x5D, 0xBA, 0x3F, 0xE2, 0x00, 0x8F, 0xD8, 0x79, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x40, 0x3D, 0xDA, 0x3B, 0xE1, 0x00, 0x7E, 0xD8, 0x7A, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x00, 0x6D, 0xFA, 0x5D, 0xE2, 0x00, 0x8F, 0xC8, 0x79, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x4E, 0xDB, 0x4A, 0xE3, 0x18, 0x6F, 0xE9, 0x7E, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x4E, 0xDB, 0x66, 0xE2, 0x00, 0x7F, 0xE9, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x02, 0x0F, 0x66, 0xAA, 0x51, 0x02, 0x64, 0x29, 0xF9, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x16, 0x4A, 0x04, 0xBA, 0x39, 0xC2, 0x58, 0x2D, 0xCA, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x02, 0x00, 0x01, 0x7A, 0x79, 0x02, 0x3F, 0x28, 0xEA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+ { 0xC2, 0x40, 0x3C, 0x96, 0x58, 0xC4, 0xDE, 0x0E, 0xC7, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x20 },
+ { 0x31, 0x13, 0x2D, 0xD7, 0x3C, 0xE2, 0x18, 0x2E, 0xB8, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x22, 0x86, 0x0D, 0xD7, 0x50, 0xE4, 0x18, 0x5E, 0xB8, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0xF2, 0x0A, 0x0D, 0xD7, 0x40, 0xE4, 0x1F, 0x5E, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x09, 0x4B, 0xD6, 0x48, 0xE4, 0x1F, 0x1C, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0x62, 0x11, 0x0C, 0xE6, 0x3C, 0xE4, 0x1F, 0x0C, 0xC8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x12, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x7D, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x13, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x5D, 0xB8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xA2, 0x40, 0x5D, 0xBA, 0x3F, 0xE2, 0x00, 0x8F, 0xD8, 0x79, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x3D, 0xDA, 0x3B, 0xE1, 0x00, 0x7E, 0xD8, 0x7A, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x6D, 0xFA, 0x5D, 0xE2, 0x00, 0x8F, 0xC8, 0x79, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0x4A, 0xE3, 0x18, 0x6F, 0xE9, 0x7E, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0x66, 0xE2, 0x00, 0x7F, 0xE9, 0x7E, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x0F, 0x66, 0xAA, 0x51, 0x02, 0x64, 0x29, 0xF9, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x16, 0x4A, 0x04, 0xBA, 0x39, 0xC2, 0x58, 0x2D, 0xCA, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x02, 0x00, 0x01, 0x7A, 0x79, 0x02, 0x3F, 0x28, 0xEA, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
// 0x30
-{ 0x62, 0x53, 0x9C, 0xBA, 0x31, 0x62, 0x5B, 0xAD, 0xC9, 0x55, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x40, 0x6E, 0xDA, 0x49, 0xE2, 0x13, 0x8F, 0xF9, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x40, 0x8F, 0xFA, 0x50, 0xF2, 0x04, 0x7F, 0xFA, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x3D, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE6, 0x80, 0x9C, 0x99, 0x42, 0xE2, 0x04, 0x7D, 0x78, 0x60, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC3, 0x3F, 0x4B, 0xE9, 0x7E, 0xC1, 0x3F, 0x9B, 0xF9, 0x7F, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0x68, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x00, 0x8F, 0xFB, 0x50, 0xF6, 0x47, 0x8F, 0xE9, 0x68, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x00, 0xAF, 0x88, 0x58, 0xF2, 0x54, 0x6E, 0xC9, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x84, 0x4E, 0x78, 0x6C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x02, 0x9F, 0xB8, 0x48, 0x22, 0x89, 0x9F, 0xE8, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0x7D, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0x62, 0x53, 0x9C, 0xBA, 0x31, 0x62, 0x5B, 0xAD, 0xC9, 0x55, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0x6E, 0xDA, 0x49, 0xE2, 0x13, 0x8F, 0xF9, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x8F, 0xFA, 0x50, 0xF2, 0x04, 0x7F, 0xFA, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x3D, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x80, 0x9C, 0x99, 0x42, 0xE2, 0x04, 0x7D, 0x78, 0x60, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC3, 0x3F, 0x4B, 0xE9, 0x7E, 0xC1, 0x3F, 0x9B, 0xF9, 0x7F, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0x68, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x00, 0x8F, 0xFB, 0x50, 0xF6, 0x47, 0x8F, 0xE9, 0x68, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x00, 0xAF, 0x88, 0x58, 0xF2, 0x54, 0x6E, 0xC9, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x84, 0x4E, 0x78, 0x6C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x02, 0x9F, 0xB8, 0x48, 0x22, 0x89, 0x9F, 0xE8, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0x7D, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x40
-{ 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0x7D, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x0F, 0x90, 0xF8, 0x78, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x00, 0x8E, 0xC9, 0x3D, 0xE6, 0x00, 0x7E, 0xD8, 0x68, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x00, 0x5F, 0xF9, 0x48, 0xE6, 0x98, 0x8F, 0xF8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x0C, 0x6E, 0xD8, 0x3D, 0x2A, 0x06, 0x7D, 0xD8, 0x58, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x7E, 0x89, 0x38, 0xE6, 0x84, 0x80, 0xF8, 0x68, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x80, 0x6C, 0xD9, 0x30, 0xE2, 0x00, 0x8D, 0xC8, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x80, 0x88, 0x48, 0x40, 0xE2, 0x0A, 0x7D, 0xA8, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x77, 0xC5, 0x54, 0xE2, 0x00, 0x9E, 0xD7, 0x70, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x80, 0x86, 0xB9, 0x64, 0xE2, 0x05, 0x9F, 0xD7, 0x78, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x00, 0x68, 0x68, 0x56, 0xE2, 0x08, 0x9B, 0xB3, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0xA6, 0x87, 0x41, 0xE2, 0x0A, 0x7E, 0xC9, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x80, 0x9A, 0xB8, 0x48, 0xE2, 0x00, 0x9E, 0xF9, 0x60, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x80, 0x8E, 0x64, 0x68, 0xE2, 0x28, 0x6F, 0x73, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0x7D, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x0F, 0x90, 0xF8, 0x78, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x8E, 0xC9, 0x3D, 0xE6, 0x00, 0x7E, 0xD8, 0x68, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x5F, 0xF9, 0x48, 0xE6, 0x98, 0x8F, 0xF8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x0C, 0x6E, 0xD8, 0x3D, 0x2A, 0x06, 0x7D, 0xD8, 0x58, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x7E, 0x89, 0x38, 0xE6, 0x84, 0x80, 0xF8, 0x68, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x6C, 0xD9, 0x30, 0xE2, 0x00, 0x8D, 0xC8, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x88, 0x48, 0x40, 0xE2, 0x0A, 0x7D, 0xA8, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x77, 0xC5, 0x54, 0xE2, 0x00, 0x9E, 0xD7, 0x70, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x86, 0xB9, 0x64, 0xE2, 0x05, 0x9F, 0xD7, 0x78, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x68, 0x68, 0x56, 0xE2, 0x08, 0x9B, 0xB3, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0xA6, 0x87, 0x41, 0xE2, 0x0A, 0x7E, 0xC9, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x9A, 0xB8, 0x48, 0xE2, 0x00, 0x9E, 0xF9, 0x60, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x8E, 0x64, 0x68, 0xE2, 0x28, 0x6F, 0x73, 0x7C, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x50
-{ 0xE8, 0x00, 0x7D, 0x99, 0x54, 0xE6, 0x80, 0x80, 0xF8, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE6, 0x00, 0x9F, 0xB9, 0x6D, 0xE1, 0x00, 0x8F, 0xC8, 0x7D, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x09, 0x68, 0x4A, 0xE2, 0x2B, 0x9E, 0xF3, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC4, 0x00, 0x99, 0xE8, 0x3B, 0xE2, 0x25, 0x6F, 0x93, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE6, 0x00, 0x6F, 0xDA, 0x69, 0xE2, 0x05, 0x2F, 0xD8, 0x6A, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE3, 0x00, 0x0F, 0xF7, 0x7D, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x3C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE8, 0x40, 0x0D, 0x89, 0x7D, 0xE2, 0x17, 0x7E, 0xD9, 0x7C, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0xDF, 0x8A, 0x56, 0xE2, 0x5E, 0xCF, 0xBA, 0x7E, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x00, 0x0B, 0x68, 0x60, 0xE2, 0x01, 0x9E, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEA, 0x00, 0xAE, 0xAB, 0x49, 0xE2, 0x00, 0xAE, 0xBA, 0x6C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEB, 0x80, 0x8C, 0xCB, 0x3A, 0xE2, 0x86, 0xAF, 0xCA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE5, 0x40, 0xDB, 0x3B, 0x3C, 0xE2, 0x80, 0xBE, 0xCA, 0x71, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x9E, 0xAA, 0x3D, 0xE1, 0x43, 0x0F, 0xBA, 0x7E, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE7, 0x40, 0xEC, 0xCA, 0x44, 0xE2, 0x03, 0xBF, 0xBA, 0x66, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xE8, 0x00, 0x7D, 0x99, 0x54, 0xE6, 0x80, 0x80, 0xF8, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x9F, 0xB9, 0x6D, 0xE1, 0x00, 0x8F, 0xC8, 0x7D, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x09, 0x68, 0x4A, 0xE2, 0x2B, 0x9E, 0xF3, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x99, 0xE8, 0x3B, 0xE2, 0x25, 0x6F, 0x93, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x6F, 0xDA, 0x69, 0xE2, 0x05, 0x2F, 0xD8, 0x6A, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x00, 0x0F, 0xF7, 0x7D, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x3C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x40, 0x0D, 0x89, 0x7D, 0xE2, 0x17, 0x7E, 0xD9, 0x7C, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0xDF, 0x8A, 0x56, 0xE2, 0x5E, 0xCF, 0xBA, 0x7E, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x0B, 0x68, 0x60, 0xE2, 0x01, 0x9E, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0x00, 0xAE, 0xAB, 0x49, 0xE2, 0x00, 0xAE, 0xBA, 0x6C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEB, 0x80, 0x8C, 0xCB, 0x3A, 0xE2, 0x86, 0xAF, 0xCA, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE5, 0x40, 0xDB, 0x3B, 0x3C, 0xE2, 0x80, 0xBE, 0xCA, 0x71, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x9E, 0xAA, 0x3D, 0xE1, 0x43, 0x0F, 0xBA, 0x7E, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x40, 0xEC, 0xCA, 0x44, 0xE2, 0x03, 0xBF, 0xBA, 0x66, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x60
-{ 0xEA, 0x00, 0x68, 0xB8, 0x48, 0xE2, 0x0A, 0x8E, 0xB8, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x61, 0x00, 0xBE, 0x99, 0x7E, 0xE3, 0x40, 0xCF, 0xCA, 0x7D, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xCD, 0x00, 0x0B, 0x00, 0x48, 0xC2, 0x58, 0x0C, 0x00, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x1C },
-{ 0xE2, 0x00, 0x0E, 0x00, 0x52, 0xE2, 0x58, 0x5F, 0xD0, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xCC, 0x00, 0x7D, 0xDA, 0x40, 0xC2, 0x00, 0x5E, 0x9B, 0x58, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE9, 0xC0, 0xEE, 0xD8, 0x43, 0xE2, 0x05, 0xDD, 0xAA, 0x70, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xDA, 0x00, 0x8F, 0xAC, 0x4A, 0x22, 0x05, 0x8D, 0x8A, 0x75, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x8A, 0xCB, 0x7A, 0x74, 0xE6, 0x56, 0xAF, 0xDB, 0x70, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x41, 0xAC, 0x5B, 0x5B, 0xC2, 0x80, 0x0D, 0xCB, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x12 },
-{ 0x75, 0x00, 0x0E, 0xCB, 0x5A, 0xE2, 0x1E, 0x0A, 0xC9, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
-{ 0x41, 0x00, 0x0E, 0xEA, 0x53, 0xC2, 0x00, 0x08, 0xCA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0xC1, 0x40, 0x0C, 0x59, 0x6A, 0xC2, 0x80, 0x3C, 0xAB, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0D },
-{ 0x4B, 0x00, 0x0A, 0xF5, 0x61, 0xC2, 0x19, 0x0C, 0xE9, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0x62, 0x00, 0x7F, 0xD8, 0x54, 0xEA, 0x00, 0x8F, 0xD8, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xEA, 0x00, 0x68, 0xB8, 0x48, 0xE2, 0x0A, 0x8E, 0xB8, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x61, 0x00, 0xBE, 0x99, 0x7E, 0xE3, 0x40, 0xCF, 0xCA, 0x7D, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xCD, 0x00, 0x0B, 0x00, 0x48, 0xC2, 0x58, 0x0C, 0x00, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1C },
+ { 0xE2, 0x00, 0x0E, 0x00, 0x52, 0xE2, 0x58, 0x5F, 0xD0, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xCC, 0x00, 0x7D, 0xDA, 0x40, 0xC2, 0x00, 0x5E, 0x9B, 0x58, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE9, 0xC0, 0xEE, 0xD8, 0x43, 0xE2, 0x05, 0xDD, 0xAA, 0x70, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xDA, 0x00, 0x8F, 0xAC, 0x4A, 0x22, 0x05, 0x8D, 0x8A, 0x75, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x8A, 0xCB, 0x7A, 0x74, 0xE6, 0x56, 0xAF, 0xDB, 0x70, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x41, 0xAC, 0x5B, 0x5B, 0xC2, 0x80, 0x0D, 0xCB, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x12 },
+ { 0x75, 0x00, 0x0E, 0xCB, 0x5A, 0xE2, 0x1E, 0x0A, 0xC9, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x41, 0x00, 0x0E, 0xEA, 0x53, 0xC2, 0x00, 0x08, 0xCA, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0xC1, 0x40, 0x0C, 0x59, 0x6A, 0xC2, 0x80, 0x3C, 0xAB, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0x4B, 0x00, 0x0A, 0xF5, 0x61, 0xC2, 0x19, 0x0C, 0xE9, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x62, 0x00, 0x7F, 0xD8, 0x54, 0xEA, 0x00, 0x8F, 0xD8, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x70
-{ 0xCF, 0x40, 0x09, 0xEA, 0x54, 0xC4, 0x00, 0x0C, 0xDB, 0x64, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x40, 0x0C, 0xAA, 0x54, 0xC4, 0x00, 0x18, 0xF9, 0x64, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xC9, 0x0E, 0x88, 0xD9, 0x3E, 0xC2, 0x08, 0x1A, 0xEA, 0x6C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x03, 0x00, 0x15, 0x00, 0x64, 0x02, 0x00, 0x08, 0x00, 0x7C, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x01, 0x00, 0x47, 0xD7, 0x6C, 0x01, 0x3F, 0x0C, 0xFB, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x00, 0x00, 0x36, 0x67, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x02, 0x00, 0x36, 0x68, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0xCB, 0x00, 0xAF, 0x00, 0x7E, 0xC0, 0x00, 0xC0, 0x06, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0F },
-{ 0x05, 0x0D, 0x80, 0xA6, 0x7F, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x0F, 0x00, 0x90, 0xFA, 0x68, 0x06, 0x00, 0xA7, 0x39, 0x54, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0xC9, 0x15, 0xDD, 0xFF, 0x7C, 0x00, 0x00, 0xE7, 0xFC, 0x6C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x38 },
-{ 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x07, 0x80, 0x0B, 0xC8, 0x65, 0x02, 0x3F, 0x0C, 0xEA, 0x7C, 0x0F, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x08, 0x00, 0x0B, 0x3C, 0x7C, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 }
+ { 0xCF, 0x40, 0x09, 0xEA, 0x54, 0xC4, 0x00, 0x0C, 0xDB, 0x64, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x40, 0x0C, 0xAA, 0x54, 0xC4, 0x00, 0x18, 0xF9, 0x64, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xC9, 0x0E, 0x88, 0xD9, 0x3E, 0xC2, 0x08, 0x1A, 0xEA, 0x6C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x03, 0x00, 0x15, 0x00, 0x64, 0x02, 0x00, 0x08, 0x00, 0x7C, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x01, 0x00, 0x47, 0xD7, 0x6C, 0x01, 0x3F, 0x0C, 0xFB, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x00, 0x00, 0x36, 0x67, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x02, 0x00, 0x36, 0x68, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0xCB, 0x00, 0xAF, 0x00, 0x7E, 0xC0, 0x00, 0xC0, 0x06, 0x7F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0F },
+ { 0x05, 0x0D, 0x80, 0xA6, 0x7F, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x0F, 0x00, 0x90, 0xFA, 0x68, 0x06, 0x00, 0xA7, 0x39, 0x54, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xC9, 0x15, 0xDD, 0xFF, 0x7C, 0x00, 0x00, 0xE7, 0xFC, 0x6C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x38 },
+ { 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x07, 0x80, 0x0B, 0xC8, 0x65, 0x02, 0x3F, 0x0C, 0xEA, 0x7C, 0x0F, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x08, 0x00, 0x0B, 0x3C, 0x7C, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 }
};
-static AdLibInstrument gm_percussion_to_fm[39] = {
-{ 0x1A, 0x3F, 0x15, 0x05, 0x7C, 0x02, 0x21, 0x2B, 0xE4, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0x11, 0x12, 0x04, 0x07, 0x7C, 0x02, 0x23, 0x0B, 0xE5, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x0A, 0x3F, 0x0B, 0x01, 0x7C, 0x1F, 0x1C, 0x46, 0xD0, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x01 },
-{ 0x00, 0x3F, 0x0F, 0x00, 0x7C, 0x10, 0x12, 0x07, 0x00, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x0F, 0x3F, 0x0B, 0x00, 0x7C, 0x1F, 0x0F, 0x19, 0xD0, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x00, 0x3F, 0x1F, 0x00, 0x7E, 0x1F, 0x16, 0x07, 0x00, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x1F, 0x4A, 0xD9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xFF, 0x7E, 0x00, 0xC7, 0x2D, 0xF7, 0x73, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x43, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xCF, 0x7E, 0x00, 0x45, 0x2A, 0xF8, 0x4B, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0C },
-{ 0x12, 0x3F, 0x06, 0x17, 0x7C, 0x03, 0x27, 0x0B, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xCD, 0x7E, 0x00, 0x40, 0x1A, 0x69, 0x63, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0C },
-{ 0x13, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x17, 0x0A, 0xD9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x15, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x3F, 0x2B, 0xFB, 0x7E, 0xC0, 0x1E, 0x1A, 0xCA, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
-{ 0x17, 0x3F, 0x04, 0x09, 0x7C, 0x03, 0x22, 0x0D, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x3F, 0x0F, 0x5E, 0x7C, 0xC6, 0x13, 0x00, 0xCA, 0x7F, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x3F, 0x7E, 0x9D, 0x7C, 0xC8, 0xC0, 0x0A, 0xBA, 0x74, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0xCF, 0x3F, 0x4D, 0x9F, 0x7C, 0xC6, 0x00, 0x08, 0xDA, 0x5B, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0xCF, 0x3F, 0x5D, 0xAA, 0x7A, 0xC0, 0xA4, 0x67, 0x99, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x3F, 0x4A, 0xFD, 0x7C, 0xCF, 0x00, 0x59, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x0F, 0x18, 0x0A, 0xFA, 0x57, 0x06, 0x07, 0x06, 0x39, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x3F, 0x2B, 0xFC, 0x7C, 0xCC, 0xC6, 0x0B, 0xEA, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
-{ 0x05, 0x1A, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x0C, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0x04, 0x19, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x2C, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x04, 0x0A, 0x04, 0x00, 0x6C, 0x01, 0x07, 0x0D, 0xFA, 0x74, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0x15, 0x14, 0x05, 0x00, 0x7D, 0x01, 0x07, 0x5C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x10, 0x10, 0x05, 0x08, 0x7C, 0x01, 0x08, 0x0D, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x11, 0x00, 0x06, 0x87, 0x7F, 0x02, 0x40, 0x09, 0x59, 0x68, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x08 },
-{ 0x13, 0x26, 0x04, 0x6A, 0x7F, 0x01, 0x00, 0x08, 0x5A, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x08 },
-{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC4, 0x00, 0x18, 0xF9, 0x54, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC3, 0x00, 0x18, 0xF8, 0x54, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCB, 0x3F, 0x8F, 0x00, 0x7E, 0xC5, 0x00, 0x98, 0xD6, 0x5F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0D },
-{ 0x0C, 0x18, 0x87, 0xB3, 0x7F, 0x19, 0x10, 0x55, 0x75, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x05, 0x11, 0x15, 0x00, 0x64, 0x02, 0x08, 0x08, 0x00, 0x5C, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x04, 0x08, 0x15, 0x00, 0x48, 0x01, 0x08, 0x08, 0x00, 0x60, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xDA, 0x00, 0x53, 0x30, 0x68, 0x07, 0x1E, 0x49, 0xC4, 0x7E, 0x03, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x1C, 0x00, 0x07, 0xBC, 0x6C, 0x0C, 0x14, 0x0B, 0x6A, 0x7E, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x0A, 0x0E, 0x7F, 0x00, 0x7D, 0x13, 0x20, 0x28, 0x03, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 }
+static AdLibInstrument g_gmPercussionInstruments[39] = {
+ { 0x1A, 0x3F, 0x15, 0x05, 0x7C, 0x02, 0x21, 0x2B, 0xE4, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0x11, 0x12, 0x04, 0x07, 0x7C, 0x02, 0x23, 0x0B, 0xE5, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x0A, 0x3F, 0x0B, 0x01, 0x7C, 0x1F, 0x1C, 0x46, 0xD0, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x01 },
+ { 0x00, 0x3F, 0x0F, 0x00, 0x7C, 0x10, 0x12, 0x07, 0x00, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0F, 0x3F, 0x0B, 0x00, 0x7C, 0x1F, 0x0F, 0x19, 0xD0, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x00, 0x3F, 0x1F, 0x00, 0x7E, 0x1F, 0x16, 0x07, 0x00, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x1F, 0x4A, 0xD9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x7F, 0x08, 0xFF, 0x7E, 0x00, 0xC7, 0x2D, 0xF7, 0x73, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x43, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x7F, 0x08, 0xCF, 0x7E, 0x00, 0x45, 0x2A, 0xF8, 0x4B, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0x12, 0x3F, 0x06, 0x17, 0x7C, 0x03, 0x27, 0x0B, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x7F, 0x08, 0xCD, 0x7E, 0x00, 0x40, 0x1A, 0x69, 0x63, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0x13, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x17, 0x0A, 0xD9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x15, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x2B, 0xFB, 0x7E, 0xC0, 0x1E, 0x1A, 0xCA, 0x7F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x17, 0x3F, 0x04, 0x09, 0x7C, 0x03, 0x22, 0x0D, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x0F, 0x5E, 0x7C, 0xC6, 0x13, 0x00, 0xCA, 0x7F, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x7E, 0x9D, 0x7C, 0xC8, 0xC0, 0x0A, 0xBA, 0x74, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xCF, 0x3F, 0x4D, 0x9F, 0x7C, 0xC6, 0x00, 0x08, 0xDA, 0x5B, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0xCF, 0x3F, 0x5D, 0xAA, 0x7A, 0xC0, 0xA4, 0x67, 0x99, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x4A, 0xFD, 0x7C, 0xCF, 0x00, 0x59, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0F, 0x18, 0x0A, 0xFA, 0x57, 0x06, 0x07, 0x06, 0x39, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x2B, 0xFC, 0x7C, 0xCC, 0xC6, 0x0B, 0xEA, 0x7F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x05, 0x1A, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x0C, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x04, 0x19, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x2C, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x04, 0x0A, 0x04, 0x00, 0x6C, 0x01, 0x07, 0x0D, 0xFA, 0x74, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x15, 0x14, 0x05, 0x00, 0x7D, 0x01, 0x07, 0x5C, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x10, 0x10, 0x05, 0x08, 0x7C, 0x01, 0x08, 0x0D, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x11, 0x00, 0x06, 0x87, 0x7F, 0x02, 0x40, 0x09, 0x59, 0x68, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0x13, 0x26, 0x04, 0x6A, 0x7F, 0x01, 0x00, 0x08, 0x5A, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC4, 0x00, 0x18, 0xF9, 0x54, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC3, 0x00, 0x18, 0xF8, 0x54, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCB, 0x3F, 0x8F, 0x00, 0x7E, 0xC5, 0x00, 0x98, 0xD6, 0x5F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0x0C, 0x18, 0x87, 0xB3, 0x7F, 0x19, 0x10, 0x55, 0x75, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x05, 0x11, 0x15, 0x00, 0x64, 0x02, 0x08, 0x08, 0x00, 0x5C, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x04, 0x08, 0x15, 0x00, 0x48, 0x01, 0x08, 0x08, 0x00, 0x60, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xDA, 0x00, 0x53, 0x30, 0x68, 0x07, 0x1E, 0x49, 0xC4, 0x7E, 0x03, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x1C, 0x00, 0x07, 0xBC, 0x6C, 0x0C, 0x14, 0x0B, 0x6A, 0x7E, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x0A, 0x0E, 0x7F, 0x00, 0x7D, 0x13, 0x20, 0x28, 0x03, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 }
};
-static const byte gm_percussion_lookup[128] = {
+#ifdef ENABLE_OPL3
+static const AdLibInstrument g_gmInstrumentsOPL3[128][2] = {
+ { { 0xC2, 0xC2, 0x0A, 0x6B, 0xA0, 0xC2, 0x08, 0x0D, 0x88, 0xC8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0x02, 0x00, 0x0C, 0x78, 0x61, 0x04, 0x4C, 0x0B, 0x9A, 0xC8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 } },
+ { { 0x22, 0x53, 0x0E, 0x8A, 0x60, 0x14, 0x06, 0x1D, 0x7A, 0xB8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x22, 0x5A, 0x0E, 0x8A, 0x40, 0x14, 0x2F, 0x0E, 0x7A, 0x88, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x06, 0x00, 0x1C, 0x79, 0x70, 0x02, 0x00, 0x4B, 0x79, 0xA8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x00, 0x1A, 0x79, 0x60, 0x02, 0x00, 0x4C, 0xA9, 0xC8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x80, 0x0B, 0x89, 0x90, 0xC2, 0x06, 0x1B, 0xA8, 0xB0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0x04, 0x28, 0x5D, 0xB8, 0x01, 0x02, 0x00, 0x3C, 0x70, 0x88, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x40, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x40, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0xD3, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x87, 0x40, 0x3A, 0x5A, 0x94, 0x82, 0x04, 0x3D, 0x59, 0xAC, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x84, 0x40, 0x3B, 0x5A, 0xC3, 0x81, 0x00, 0x3B, 0x5A, 0xFB, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x3B, 0x5A, 0xC3, 0x81, 0x00, 0x3B, 0x5A, 0xFB, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x8C, 0x80, 0x05, 0xEA, 0xA9, 0x82, 0x04, 0x3D, 0xAA, 0xB0, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8C, 0x80, 0x06, 0x98, 0xA9, 0x86, 0x10, 0x36, 0x7A, 0xFD, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x85, 0x40, 0x0D, 0xEC, 0xE1, 0x84, 0x58, 0x3E, 0xCB, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x0D, 0xEB, 0xE0, 0x84, 0x48, 0x3E, 0xCA, 0xC0, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x8A, 0xC0, 0x0C, 0xDC, 0xA0, 0x88, 0x58, 0x3D, 0xDA, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8A, 0xC0, 0x0C, 0xDC, 0xA0, 0x88, 0x58, 0x3D, 0xDA, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC9, 0x40, 0x2B, 0x78, 0x8A, 0xC2, 0x0A, 0x4C, 0x8A, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1A },
+ { 0xCA, 0x40, 0x47, 0xCA, 0xB4, 0xC2, 0x00, 0x57, 0x8A, 0xB8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1A } },
+ { { 0x2A, 0x0E, 0x17, 0x89, 0x50, 0x22, 0x0C, 0x1B, 0x09, 0xE0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x2A, 0x1A, 0x19, 0x8A, 0x00, 0x22, 0x38, 0x0B, 0x0A, 0x00, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE7, 0x9B, 0x08, 0x08, 0x4A, 0xE2, 0x06, 0x0A, 0x08, 0xE0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x9B, 0x08, 0x08, 0x4A, 0xE2, 0x2F, 0x0A, 0x08, 0x68, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC5, 0x0A, 0x05, 0xDC, 0xB8, 0x84, 0x06, 0x00, 0xEC, 0xC0, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x09, 0x10, 0x04, 0x5B, 0xA5, 0x02, 0x08, 0x00, 0xEC, 0x70, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x86, 0x40, 0x5D, 0x5A, 0x81, 0x81, 0x00, 0x0B, 0x5A, 0xFB, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x86, 0x40, 0x5D, 0x5A, 0x81, 0x81, 0x00, 0x0B, 0x5A, 0xFB, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xED, 0x0F, 0x5B, 0xC8, 0xC8, 0xE2, 0x9F, 0x4A, 0xE9, 0xF9, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x40, 0x0A, 0xA7, 0x64, 0xE2, 0x8B, 0x6A, 0x79, 0xB1, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0x4F, 0x3A, 0xD7, 0xF8, 0xE2, 0x97, 0x49, 0xF9, 0xF9, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC9, 0x02, 0x16, 0x9A, 0xAB, 0xC4, 0x15, 0x46, 0xBA, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x08, 0x2F, 0xF7, 0xE1, 0xF3, 0x42, 0x8F, 0xC7, 0xC2, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x00, 0x2D, 0xF7, 0xC1, 0xE4, 0x40, 0x7F, 0xC7, 0xD2, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x01, 0x8C, 0x9F, 0xDA, 0xE8, 0xE4, 0x50, 0x9F, 0xDA, 0xF2, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x80, 0x9F, 0xDA, 0x00, 0xE3, 0x50, 0x9F, 0xD9, 0xFA, 0x03, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x08, 0xD5, 0x9D, 0xA5, 0x89, 0xE2, 0x3F, 0x9F, 0xD6, 0x91, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x08, 0xD5, 0x9D, 0xA5, 0x89, 0xE2, 0x3F, 0x9F, 0xD6, 0x91, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE5, 0x0F, 0x7D, 0xB8, 0x5A, 0xA2, 0x0C, 0x7C, 0xC7, 0xC1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x4C, 0xAC, 0x56, 0x31, 0x02, 0x08, 0x8D, 0x46, 0xDC, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0xC2, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x00, 0x9F, 0xDB, 0xA9, 0xE1, 0x00, 0x8F, 0xD7, 0xBA, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x88, 0x9C, 0x50, 0xC8, 0xE2, 0x18, 0x70, 0xC4, 0xF8, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x9C, 0x50, 0xB0, 0xE4, 0x00, 0x70, 0xC4, 0xA0, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 } },
+ { { 0x42, 0x53, 0x3E, 0xEB, 0x48, 0xD4, 0x05, 0x1D, 0xA9, 0xC9, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0x42, 0x54, 0x6F, 0xEB, 0x61, 0xD4, 0x02, 0x2E, 0xA9, 0xC8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 } },
+ { { 0xC2, 0x00, 0x59, 0x17, 0xB1, 0xC2, 0x1E, 0x6D, 0x98, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x19 },
+ { 0xC2, 0x00, 0x08, 0xB3, 0x99, 0xC2, 0x06, 0x2B, 0x58, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x19 } },
+ { { 0xC6, 0x01, 0x2D, 0xA7, 0x88, 0xC2, 0x08, 0x0E, 0xA7, 0xC1, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x2D, 0xA7, 0x91, 0xC2, 0x02, 0x0E, 0xA7, 0xD1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x0C, 0x06, 0x06, 0xA9, 0xC2, 0x3F, 0x08, 0xB8, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0A },
+ { 0xC1, 0x00, 0x68, 0x50, 0xB8, 0xC2, 0x00, 0x48, 0x84, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0A } },
+ { { 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0xB1, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x2F, 0x6F, 0x79, 0x00, 0xC8, 0x0F, 0x5E, 0x98, 0xB9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0xFB, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0xFB, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0B },
+ { 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0B } },
+ { { 0xC2, 0x41, 0x3D, 0x96, 0x88, 0xC4, 0xCA, 0x0E, 0xC7, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x20 },
+ { 0xC2, 0x04, 0x58, 0xC9, 0x90, 0xC2, 0x94, 0x2C, 0xB9, 0xF0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x20 } },
+ { { 0x31, 0x13, 0x2D, 0xD7, 0x78, 0xE2, 0x18, 0x2E, 0xB8, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x31, 0x13, 0x2D, 0xD7, 0x78, 0xE2, 0x18, 0x2E, 0xB8, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x22, 0x86, 0x0D, 0xD7, 0xA0, 0xE4, 0x18, 0x5E, 0xB8, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0x22, 0x86, 0x0D, 0xD7, 0xA0, 0xE4, 0x18, 0x5E, 0xB8, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 } },
+ { { 0xF2, 0x0A, 0x0D, 0xD7, 0x80, 0xE4, 0x1F, 0x5E, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x06, 0x9A, 0xD7, 0xA0, 0xC2, 0x1F, 0x59, 0xB8, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x09, 0x4B, 0xD6, 0x90, 0xE4, 0x1F, 0x1C, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0xF2, 0x09, 0x4B, 0xD6, 0x90, 0xE4, 0x1F, 0x1C, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 } },
+ { { 0x62, 0x11, 0x0C, 0xE6, 0x78, 0xE4, 0x1F, 0x0C, 0xC8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x11, 0x0C, 0xE6, 0x78, 0xE4, 0x1F, 0x0C, 0xC8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x12, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x7D, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x12, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x7D, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x13, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x5D, 0xB8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x13, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x5D, 0xB8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xA2, 0x40, 0x5D, 0xBA, 0x7B, 0xE2, 0x00, 0x8F, 0xD8, 0xF1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xA2, 0x40, 0x5D, 0xBA, 0x7B, 0xE2, 0x00, 0x8F, 0xD8, 0xF1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x40, 0x3D, 0xDA, 0x73, 0xE1, 0x00, 0x7E, 0xD8, 0xF2, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x3D, 0xDA, 0x73, 0xE1, 0x00, 0x7E, 0xD8, 0xF2, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x00, 0x6D, 0xFA, 0xB9, 0xE2, 0x00, 0x8F, 0xC8, 0xF1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x6D, 0xFA, 0xB9, 0xE2, 0x00, 0x8F, 0xC8, 0xF1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x4E, 0xDB, 0x92, 0xE3, 0x18, 0x6F, 0xE9, 0xFA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0xCA, 0xE2, 0x00, 0x6F, 0xE9, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x4E, 0xDB, 0xCA, 0xE2, 0x00, 0x7F, 0xE9, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0xCA, 0xE2, 0x00, 0x7F, 0xE9, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x02, 0x0F, 0x66, 0xAA, 0xA1, 0x02, 0x64, 0x29, 0xF9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x02, 0x00, 0x65, 0xAA, 0xF1, 0x02, 0x4A, 0x28, 0xF9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x16, 0x4A, 0x04, 0xBA, 0x71, 0xC2, 0x48, 0x2E, 0xCA, 0xF0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x14, 0xC0, 0x66, 0x08, 0x90, 0xC2, 0x48, 0x2C, 0x0A, 0xA0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x02, 0x0A, 0x01, 0x7A, 0xB1, 0x02, 0x12, 0x2A, 0xEA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x06, 0x75, 0x05, 0xB1, 0x01, 0x3F, 0x28, 0xEA, 0xF9, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x16 } },
+ { { 0x62, 0x53, 0x9C, 0xBA, 0x61, 0x62, 0x5A, 0xAD, 0xCA, 0xC1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0x9F, 0x8A, 0x98, 0xE2, 0x11, 0x7F, 0xB8, 0xFA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x40, 0x6E, 0xDA, 0x91, 0xE2, 0x13, 0x8F, 0xF9, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0x6E, 0xDA, 0x91, 0xE2, 0x13, 0x8F, 0xF9, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x40, 0x8F, 0xFA, 0xA0, 0xF2, 0x04, 0x7F, 0xFA, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x8F, 0xFA, 0xA0, 0xF2, 0x04, 0x7F, 0xFA, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x79, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x79, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE6, 0x80, 0x9C, 0x99, 0x82, 0xE2, 0x04, 0x8D, 0x78, 0xC0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE0, 0x44, 0x8A, 0xA9, 0x5B, 0xE1, 0x06, 0x8D, 0x79, 0xBA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x06, 0x7C, 0x7A, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC3, 0x3F, 0x4B, 0xE9, 0xFA, 0xC1, 0x3F, 0x9B, 0xF9, 0xFB, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xC3, 0x3F, 0x4B, 0xE9, 0xFA, 0xC1, 0x3F, 0x9B, 0xF9, 0xFB, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0xD0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB2, 0x25, 0xAD, 0xE9, 0x00, 0x62, 0x00, 0x8F, 0xC8, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x02, 0xAF, 0xFB, 0x90, 0xF6, 0x54, 0x8F, 0xE9, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x9F, 0xFA, 0xB0, 0xF2, 0x58, 0x7F, 0xEA, 0xF8, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x00, 0xAF, 0x88, 0xA8, 0xF2, 0x46, 0x6E, 0xC9, 0xE0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x00, 0x7B, 0x88, 0xA8, 0xD2, 0x4C, 0x69, 0xE9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x8F, 0x4E, 0x78, 0xC0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x02, 0x85, 0x89, 0xC8, 0xD2, 0x94, 0x77, 0x49, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x02, 0x9F, 0xB8, 0x90, 0x22, 0x8A, 0x9F, 0xE8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x00, 0x86, 0xB8, 0x98, 0x02, 0x8F, 0x89, 0xE8, 0xF9, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0xF9, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0xF9, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x1A, 0x90, 0xF8, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x10, 0x69, 0x18, 0xCF, 0xD4, 0x14, 0x5B, 0x04, 0xFD, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x00, 0x8E, 0xC9, 0x79, 0xE6, 0x00, 0x7E, 0xD8, 0xD0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x8E, 0xC9, 0x79, 0xE6, 0x00, 0x7E, 0xD8, 0xD0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x00, 0x5F, 0xF9, 0x88, 0xE4, 0x9E, 0x8F, 0xF8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x00, 0x97, 0xF9, 0x90, 0xC9, 0x80, 0x69, 0x98, 0xA0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x0C, 0x6E, 0xD8, 0x79, 0x2A, 0x09, 0x7D, 0xD8, 0xC0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x04, 0x8A, 0xD8, 0x80, 0x0C, 0x12, 0x85, 0xD8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x7E, 0x89, 0x70, 0xE6, 0x8F, 0x80, 0xF8, 0xF0, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x67, 0x59, 0x70, 0xC6, 0x8A, 0x77, 0xA8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x80, 0x6C, 0xD9, 0x60, 0xE2, 0x00, 0x8D, 0xC8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x6C, 0xD9, 0x60, 0xE2, 0x00, 0x8D, 0xC8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x80, 0x88, 0x48, 0x98, 0xE2, 0x1E, 0x8E, 0xC9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0xA8, 0xB9, 0x80, 0xE2, 0x0C, 0x89, 0x09, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x77, 0xC5, 0xA8, 0xE2, 0x00, 0x9E, 0xD7, 0xE0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x77, 0xC5, 0xA8, 0xE2, 0x00, 0x9E, 0xD7, 0xE0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x80, 0x86, 0xB9, 0xA8, 0xE2, 0x14, 0x9F, 0xD7, 0xB0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x80, 0x94, 0x09, 0x78, 0xC2, 0x00, 0x97, 0x97, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x00, 0x68, 0x68, 0xAA, 0xE2, 0x0A, 0x9B, 0xB3, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x00, 0x86, 0x68, 0xA0, 0xC2, 0x00, 0x77, 0x47, 0xE0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0xA6, 0x87, 0x81, 0xE2, 0x0A, 0x7E, 0xC9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x89, 0x40, 0x79, 0xE2, 0x00, 0x7E, 0xC9, 0x90, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x80, 0xAA, 0xB8, 0x90, 0xE2, 0x00, 0x9E, 0xF9, 0xC0, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x80, 0x9D, 0xB8, 0x51, 0xE2, 0x00, 0x9E, 0xF9, 0xA0, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x80, 0x8E, 0x64, 0xD0, 0xE2, 0x28, 0x6F, 0x73, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x8E, 0x64, 0xD0, 0xE2, 0x28, 0x6F, 0x73, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0x00, 0x7D, 0x99, 0xA8, 0xE6, 0x80, 0x80, 0xF8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x00, 0x7D, 0x99, 0xA8, 0xE6, 0x80, 0x80, 0xF8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE6, 0x00, 0x9F, 0xB9, 0xD9, 0xE1, 0x00, 0x8F, 0xC8, 0xF9, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x9F, 0xB9, 0xD9, 0xE1, 0x00, 0x8F, 0xC8, 0xF9, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x09, 0x68, 0x92, 0xE2, 0x2B, 0x9E, 0xF3, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x09, 0x68, 0x92, 0xE2, 0x2B, 0x9E, 0xF3, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC4, 0x00, 0x99, 0xE8, 0x73, 0xE2, 0x25, 0x6F, 0x93, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x99, 0xE8, 0x73, 0xE2, 0x25, 0x6F, 0x93, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE6, 0x00, 0x6F, 0xDA, 0xC9, 0xE2, 0x05, 0x2F, 0xD8, 0xAA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x4F, 0xDA, 0xC8, 0xE2, 0x00, 0x0F, 0xD8, 0xD0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE3, 0x00, 0x0F, 0xF7, 0xF9, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x00, 0x0F, 0xF7, 0xF9, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x78, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x78, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0x40, 0x0D, 0x89, 0xF9, 0xE2, 0x17, 0x7E, 0xD9, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x40, 0x0D, 0x89, 0xF9, 0xE2, 0x17, 0x7E, 0xD9, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0xDF, 0x8A, 0xAA, 0xE2, 0x5E, 0xCF, 0xBA, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0xDF, 0x8A, 0xAA, 0xE2, 0x5E, 0xCF, 0xBA, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x00, 0x0B, 0x68, 0xC0, 0xE2, 0x01, 0x9E, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x0B, 0x68, 0xC0, 0xE2, 0x01, 0x9E, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEA, 0x00, 0xAE, 0xAB, 0x91, 0xE2, 0x00, 0xAE, 0xBA, 0xD8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0x00, 0xAE, 0xAB, 0x91, 0xE2, 0x00, 0xAE, 0xBA, 0xD8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEB, 0x80, 0x8C, 0xCB, 0x72, 0xE2, 0x86, 0xAF, 0xCA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEB, 0xC3, 0x9C, 0xCB, 0xA2, 0xE2, 0x4C, 0xAE, 0xCA, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE5, 0x40, 0xDB, 0x3B, 0x78, 0xE2, 0x80, 0xBE, 0xCA, 0xE1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x8E, 0xCB, 0xC0, 0xE2, 0x90, 0xAE, 0xCA, 0xFB, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x9E, 0xAA, 0x79, 0xE1, 0x43, 0x0F, 0xBA, 0xFA, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x9E, 0xAA, 0x79, 0xE1, 0x43, 0x0F, 0xBA, 0xFA, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE7, 0x40, 0xEB, 0xCA, 0x80, 0xE2, 0x03, 0xBF, 0xBA, 0xC2, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x80, 0xDB, 0xCA, 0x40, 0xE2, 0x08, 0xDF, 0xBA, 0xC1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEA, 0x00, 0x68, 0xB8, 0x90, 0xE2, 0x0A, 0x8E, 0xB8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0x00, 0x68, 0xB8, 0x90, 0xE2, 0x0A, 0x8E, 0xB8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x61, 0x00, 0xBE, 0x99, 0xFA, 0xE3, 0x40, 0xCF, 0xCA, 0xF9, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0xCE, 0x9A, 0xA8, 0xE2, 0x45, 0xCF, 0xCA, 0xA0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xCD, 0x00, 0x0B, 0x00, 0x90, 0xC2, 0x58, 0x0C, 0x00, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1C },
+ { 0xCD, 0x00, 0x0B, 0x00, 0x90, 0xC2, 0x58, 0x0C, 0x00, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1C } },
+ { { 0xE2, 0x00, 0x0E, 0x00, 0xA2, 0xE2, 0x58, 0x5F, 0xD0, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x0E, 0x00, 0xA2, 0xE2, 0x58, 0x5F, 0xD0, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEC, 0x00, 0x7D, 0xDA, 0x80, 0xE2, 0x00, 0x5E, 0x9B, 0xA8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x0A, 0x4C, 0xC9, 0x60, 0xE2, 0x07, 0x0C, 0x7A, 0xB8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE9, 0xC0, 0xEE, 0xD8, 0x83, 0xE2, 0x05, 0xDD, 0xAA, 0xE0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xED, 0x48, 0xDE, 0xD8, 0xB4, 0xE1, 0x00, 0xDD, 0xAA, 0xA9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xDA, 0x00, 0x8F, 0xAC, 0x92, 0x22, 0x05, 0x8D, 0x8A, 0xE9, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEF, 0x00, 0x8C, 0xAA, 0x67, 0x25, 0x00, 0x9D, 0xAB, 0xC1, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x82, 0xCB, 0x7A, 0xD8, 0xE6, 0x56, 0xAF, 0xDB, 0xE0, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x84, 0xBB, 0xAA, 0xCA, 0xCF, 0x41, 0xAC, 0xDA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x41, 0xAC, 0xBB, 0xBB, 0xC2, 0x85, 0x0E, 0xCB, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x12 },
+ { 0xC2, 0x03, 0x6A, 0x5B, 0xA4, 0xC2, 0x0D, 0x2A, 0xBB, 0xFC, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x12 } },
+ { { 0x75, 0x00, 0x0E, 0xBB, 0xB2, 0xE2, 0x1E, 0x0A, 0xA9, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x62, 0x00, 0x04, 0x9A, 0xE8, 0xE2, 0x00, 0x0A, 0x48, 0xFD, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 } },
+ { { 0x41, 0x00, 0x0E, 0xEA, 0xA3, 0xC2, 0x00, 0x08, 0xCA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x41, 0x00, 0x0E, 0xEA, 0xA3, 0xC2, 0x00, 0x08, 0xCA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0xC1, 0x40, 0x0C, 0x59, 0xD2, 0xC2, 0x80, 0x3C, 0xAB, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0xC1, 0x40, 0x0C, 0x59, 0xD2, 0xC2, 0x80, 0x3C, 0xAB, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D } },
+ { { 0x4B, 0x00, 0x0A, 0xF5, 0xC1, 0xC2, 0x19, 0x0C, 0xE9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x4B, 0x00, 0x0A, 0xF5, 0xC1, 0xC2, 0x19, 0x0C, 0xE9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0x62, 0x00, 0x7F, 0xD8, 0xA8, 0xEA, 0x00, 0x8F, 0xD8, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x7F, 0xD8, 0xA8, 0xEA, 0x00, 0x8F, 0xD8, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xCF, 0x40, 0x09, 0xEA, 0xA8, 0xC4, 0x00, 0x0C, 0xDB, 0xC8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x40, 0x09, 0xEA, 0xA8, 0xC4, 0x00, 0x0C, 0xDB, 0xC8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x40, 0x0C, 0xAA, 0xA8, 0xC4, 0x00, 0x18, 0xF9, 0xC8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x40, 0x0C, 0xAA, 0xA8, 0xC4, 0x00, 0x18, 0xF9, 0xC8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xC9, 0x0C, 0x88, 0xD9, 0x6A, 0xC2, 0x14, 0x3A, 0xEA, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0xC5, 0x00, 0x98, 0xD9, 0x92, 0xC1, 0x16, 0x6E, 0xF9, 0xE8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x03, 0x00, 0x15, 0x00, 0xC8, 0x02, 0x00, 0x08, 0x00, 0xF8, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x03, 0x00, 0x15, 0x00, 0xC8, 0x02, 0x00, 0x08, 0x00, 0xF8, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x01, 0x0C, 0x44, 0xE6, 0xE8, 0x01, 0x3F, 0x0C, 0xEA, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x02, 0x3F, 0x05, 0x08, 0xF8, 0x03, 0x3F, 0x3C, 0xF9, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0x00, 0x00, 0x36, 0x67, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x00, 0x00, 0x36, 0x67, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x02, 0x00, 0x36, 0x68, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x02, 0x00, 0x36, 0x68, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0xCB, 0x00, 0xAF, 0x00, 0xFA, 0xC0, 0x00, 0xC0, 0x06, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0F },
+ { 0xCB, 0x00, 0xAF, 0x00, 0xFA, 0xC0, 0x00, 0xC0, 0x06, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0F } },
+ { { 0x05, 0x0D, 0x80, 0xA6, 0xFB, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x05, 0x0D, 0x80, 0xA6, 0xFB, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x0F, 0x00, 0x90, 0xFA, 0xD0, 0x06, 0x00, 0xA7, 0x39, 0xA8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0x0F, 0x00, 0x90, 0xFA, 0xD0, 0x06, 0x00, 0xA7, 0x39, 0xA8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0xC9, 0x15, 0xDD, 0xFF, 0xF8, 0x00, 0x00, 0xE7, 0xFC, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x38 },
+ { 0xC9, 0x15, 0xDD, 0xFF, 0xF8, 0x00, 0x00, 0xE7, 0xFC, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x38 } },
+ { { 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x07, 0x80, 0x0B, 0xC8, 0xC9, 0x02, 0x3F, 0x0C, 0xEA, 0xF8, 0x0F, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x07, 0x80, 0x0B, 0xC8, 0xC9, 0x02, 0x3F, 0x0C, 0xEA, 0xF8, 0x0F, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x08, 0x00, 0x0B, 0x3C, 0xF8, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x08, 0x00, 0x0B, 0x3C, 0xF8, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } }
+};
+
+static const AdLibInstrument g_gmPercussionInstrumentsOPL3[39][2] = {
+ { { 0x1A, 0x3F, 0x15, 0x05, 0xF8, 0x02, 0x21, 0x2B, 0xE4, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0x11, 0x18, 0x15, 0x00, 0xF8, 0x12, 0x00, 0x2B, 0x03, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0x11, 0x12, 0x04, 0x07, 0xF8, 0x02, 0x18, 0x0B, 0xE5, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x11, 0x28, 0x06, 0x04, 0xF8, 0x02, 0x1E, 0x1B, 0x02, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x0A, 0x3F, 0x0B, 0x01, 0xF8, 0x1F, 0x13, 0x46, 0xD0, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x01 },
+ { 0x04, 0x18, 0x06, 0x01, 0xB0, 0x10, 0x00, 0x07, 0x00, 0x90, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x01 } },
+ { { 0x00, 0x3F, 0x0F, 0x00, 0xF8, 0x10, 0x0A, 0x07, 0x00, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x02, 0x14, 0x04, 0x00, 0xC0, 0x11, 0x08, 0x07, 0x00, 0xC6, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x0F, 0x3F, 0x0B, 0x00, 0xF8, 0x1F, 0x07, 0x19, 0xD0, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0E, 0x32, 0x76, 0x03, 0xF8, 0x1F, 0x0F, 0x77, 0xD4, 0xFC, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x00, 0x3F, 0x1F, 0x00, 0xFA, 0x1F, 0x0C, 0x07, 0x00, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x07, 0x11, 0x13, 0x00, 0xA0, 0x13, 0x00, 0x07, 0x00, 0xC8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x12, 0x3F, 0x05, 0x06, 0xF8, 0x03, 0x16, 0x4A, 0xD9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x02, 0x22, 0x05, 0xB6, 0xF8, 0x04, 0x0A, 0x59, 0x03, 0xF8, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x7F, 0x08, 0xFF, 0xFA, 0x00, 0xC0, 0x2D, 0xF7, 0xE3, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xD2, 0x7F, 0x04, 0x0F, 0xFA, 0x10, 0xCD, 0x24, 0x07, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x12, 0x3F, 0x05, 0x06, 0xF8, 0x43, 0x17, 0x0C, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x13, 0x09, 0x96, 0xF8, 0x44, 0x0A, 0x07, 0x03, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x7F, 0x08, 0xCF, 0xFA, 0x00, 0x40, 0x2A, 0xF8, 0x8B, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0xCF, 0x7F, 0x05, 0x07, 0xFA, 0x00, 0x40, 0x25, 0x08, 0xC3, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C } },
+ { { 0x12, 0x3F, 0x06, 0x17, 0xF8, 0x03, 0x1D, 0x0B, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x1A, 0x08, 0x96, 0xF8, 0x44, 0x00, 0x08, 0x03, 0xF8, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x7F, 0x08, 0xCD, 0xFA, 0x00, 0x40, 0x1A, 0x69, 0xB3, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0xCD, 0x3F, 0x36, 0x05, 0xFC, 0x0F, 0x47, 0x46, 0x06, 0xDF, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C } },
+ { { 0x13, 0x3F, 0x05, 0x06, 0xF8, 0x03, 0x0D, 0x0A, 0xD9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x14, 0x09, 0x96, 0xF8, 0x44, 0x02, 0x07, 0x03, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x15, 0x3F, 0x05, 0x06, 0xF8, 0x03, 0x16, 0x0C, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x00, 0x07, 0x96, 0xE8, 0x44, 0x02, 0x08, 0x03, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x3F, 0x2B, 0xFB, 0xFA, 0xC0, 0x16, 0x1A, 0xCA, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0xCF, 0x3F, 0x2B, 0xFB, 0xFA, 0xC0, 0x1E, 0x1A, 0xCA, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 } },
+ { { 0x17, 0x3F, 0x04, 0x09, 0xF8, 0x03, 0x18, 0x0D, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x00, 0x07, 0x96, 0xF8, 0x44, 0x02, 0x08, 0xF9, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x3F, 0x0F, 0x5E, 0xF8, 0xC6, 0x0C, 0x00, 0xCA, 0xFB, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x04, 0x57, 0xF8, 0xC5, 0x13, 0x06, 0x05, 0xFF, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x3F, 0x7E, 0x9D, 0xF8, 0xC8, 0xC0, 0x0A, 0xBA, 0xD0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xCF, 0x3F, 0x77, 0x09, 0xF8, 0xC2, 0xC0, 0x08, 0xB5, 0xEA, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0xCF, 0x3F, 0x4D, 0x9F, 0xF8, 0xC6, 0x00, 0x08, 0xDA, 0xAB, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0xCF, 0x3F, 0x47, 0x06, 0xF8, 0xCD, 0x00, 0x07, 0x05, 0xB3, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0xCF, 0x3F, 0x5D, 0xAA, 0xF2, 0xC0, 0x8A, 0x67, 0x99, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x9A, 0x69, 0xF8, 0xCF, 0x88, 0x88, 0x48, 0xFA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x3F, 0x4A, 0xFD, 0xF8, 0xCF, 0x00, 0x59, 0xEA, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x48, 0x06, 0xF8, 0xCF, 0x00, 0x54, 0x04, 0xF9, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x0F, 0x18, 0x0A, 0xFA, 0xAB, 0x06, 0x06, 0x06, 0x39, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x03, 0x18, 0x04, 0x09, 0xAC, 0x05, 0x07, 0x08, 0x07, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x3F, 0x2B, 0xFC, 0xF8, 0xCC, 0xC4, 0x0B, 0xEA, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0xCF, 0x3F, 0x25, 0x06, 0xF8, 0xCC, 0xD7, 0x05, 0x02, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 } },
+ { { 0x05, 0x1A, 0x04, 0x00, 0xF8, 0x12, 0x08, 0x0C, 0xEA, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x01, 0x00, 0x09, 0x08, 0x40, 0x13, 0x00, 0x2A, 0x0A, 0xD8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0x04, 0x19, 0x04, 0x00, 0xF8, 0x12, 0x08, 0x2C, 0xEA, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x04, 0x00, 0x07, 0x08, 0x40, 0x12, 0x00, 0x29, 0x08, 0xE0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x04, 0x0A, 0x04, 0x00, 0xD8, 0x01, 0x02, 0x0D, 0xFA, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x04, 0x00, 0x03, 0x09, 0x93, 0x02, 0x00, 0x28, 0x09, 0xE8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0x15, 0x14, 0x05, 0x00, 0xF9, 0x01, 0x03, 0x5C, 0xE9, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x05, 0x00, 0x03, 0x03, 0x49, 0x02, 0x00, 0x58, 0x08, 0xE0, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x10, 0x10, 0x05, 0x08, 0xF8, 0x01, 0x03, 0x0D, 0xEA, 0xE8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x10, 0x00, 0x0C, 0x0C, 0x48, 0x02, 0x00, 0x08, 0xB9, 0xE0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x11, 0x00, 0x06, 0x87, 0xFB, 0x02, 0x40, 0x09, 0x59, 0xC0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0x15, 0x00, 0x04, 0x87, 0xFB, 0x02, 0x40, 0x09, 0x59, 0xD0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 } },
+ { { 0x13, 0x26, 0x04, 0x6A, 0xFB, 0x01, 0x00, 0x08, 0x5A, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0x12, 0x26, 0x03, 0x6A, 0xFB, 0x02, 0x00, 0x06, 0x5A, 0xC0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 } },
+ { { 0xCF, 0x4D, 0x0C, 0xAA, 0xA0, 0xC4, 0x00, 0x18, 0xF9, 0x90, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x4E, 0x05, 0xA6, 0xA0, 0xC6, 0x00, 0x16, 0xF8, 0x60, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x4D, 0x0C, 0xAA, 0xA0, 0xC3, 0x00, 0x18, 0xF8, 0x98, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x4E, 0x06, 0xAA, 0xA0, 0xC5, 0x00, 0x19, 0xF9, 0x90, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCB, 0x3F, 0x8F, 0x00, 0xFA, 0xC5, 0x06, 0x98, 0xD6, 0xBB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0xC0, 0x00, 0xF0, 0x00, 0x00, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D } },
+ { { 0x0C, 0x18, 0x87, 0xB3, 0xFB, 0x19, 0x0B, 0x55, 0x75, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0C, 0x18, 0x87, 0xB3, 0xFB, 0x1B, 0x10, 0x57, 0x75, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x05, 0x11, 0x15, 0x00, 0xC8, 0x02, 0x00, 0x08, 0x00, 0xA8, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x02, 0x11, 0x13, 0x00, 0xC8, 0x02, 0x00, 0x05, 0x00, 0x80, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x04, 0x08, 0x15, 0x00, 0x90, 0x01, 0x00, 0x08, 0x00, 0xC0, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x03, 0x08, 0x14, 0x00, 0x90, 0x02, 0x00, 0x07, 0x00, 0xA8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xDA, 0x00, 0x53, 0x30, 0xC0, 0x07, 0x10, 0x49, 0xC4, 0xDA, 0x03, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x00, 0x56, 0x30, 0x90, 0x06, 0x00, 0x46, 0x56, 0x62, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x1C, 0x00, 0x07, 0xBC, 0xC8, 0x0C, 0x0A, 0x0B, 0x6A, 0xF2, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x18, 0x00, 0x07, 0xBC, 0x88, 0x09, 0x00, 0x0B, 0x6A, 0xBA, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x0A, 0x0E, 0x7F, 0x00, 0xF9, 0x13, 0x16, 0x28, 0x03, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x01, 0x0E, 0x54, 0x00, 0xF9, 0x15, 0x03, 0x27, 0x03, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } }
+};
+#endif
+
+static const byte g_gmPercussionInstrumentMap[128] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
@@ -495,9 +858,9 @@ static const byte gm_percussion_lookup[128] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
-static byte lookup_table[64][32];
+static byte g_volumeLookupTable[64][32];
-static const byte volume_table[] = {
+static const byte g_volumeTable[] = {
0, 4, 7, 11,
13, 16, 18, 20,
22, 24, 26, 27,
@@ -516,7 +879,7 @@ static const byte volume_table[] = {
62, 63, 63, 63
};
-static int lookup_volume(int a, int b) {
+static int lookupVolume(int a, int b) {
if (b == 0)
return 0;
@@ -529,32 +892,32 @@ static int lookup_volume(int a, int b) {
if (b < 0) {
if (a < 0) {
- return lookup_table[-a][-b];
+ return g_volumeLookupTable[-a][-b];
} else {
- return -lookup_table[a][-b];
+ return -g_volumeLookupTable[a][-b];
}
} else {
if (a < 0) {
- return -lookup_table[-a][b];
+ return -g_volumeLookupTable[-a][b];
} else {
- return lookup_table[a][b];
+ return g_volumeLookupTable[a][b];
}
}
}
-static void create_lookup_table() {
+static void createLookupTable() {
int i, j;
int sum;
for (i = 0; i < 64; i++) {
sum = i;
for (j = 0; j < 32; j++) {
- lookup_table[i][j] = sum >> 5;
+ g_volumeLookupTable[i][j] = sum >> 5;
sum += i;
}
}
for (i = 0; i < 64; i++)
- lookup_table[i][0] = 0;
+ g_volumeLookupTable[i][0] = 0;
}
////////////////////////////////////////
@@ -584,58 +947,75 @@ public:
// AudioStream API
- bool isStereo() const { return false; }
+ bool isStereo() const { return _opl->isStereo(); }
int getRate() const { return _mixer->getOutputRate(); }
private:
- bool _scummSmallHeader; // FIXME: This flag controls a special mode for SCUMM V3 games
+ bool _scummSmallHeader; // FIXME: This flag controls a special mode for SCUMM V3 games
+#ifdef ENABLE_OPL3
+ bool _opl3Mode;
+#endif
- FM_OPL *_opl;
- byte *_adlib_reg_cache;
+ OPL::OPL *_opl;
+ byte *_regCache;
+#ifdef ENABLE_OPL3
+ byte *_regCacheSecondary;
+#endif
- int _adlib_timer_counter;
+ int _timerCounter;
- uint16 channel_table_2[9];
- int _voice_index;
- int _timer_p;
- int _timer_q;
- uint16 curnote_table[9];
+ uint16 _channelTable2[9];
+ int _voiceIndex;
+ int _timerIncrease;
+ int _timerThreshold;
+ uint16 _curNotTable[9];
AdLibVoice _voices[9];
AdLibPart _parts[32];
AdLibPercussionChannel _percussion;
void generateSamples(int16 *buf, int len);
void onTimer();
- void part_key_on(AdLibPart *part, AdLibInstrument *instr, byte note, byte velocity);
- void part_key_off(AdLibPart *part, byte note);
-
- void adlib_key_off(int chan);
- void adlib_note_on(int chan, byte note, int mod);
- void adlib_note_on_ex(int chan, byte note, int mod);
- int adlib_get_reg_value_param(int chan, byte data);
- void adlib_setup_channel(int chan, AdLibInstrument *instr, byte vol_1, byte vol_2);
- byte adlib_get_reg_value(byte reg) {
- return _adlib_reg_cache[reg];
- }
- void adlib_set_param(int channel, byte param, int value);
- void adlib_key_onoff(int channel);
- void adlib_write(byte reg, byte value);
- void adlib_playnote(int channel, int note);
-
- AdLibVoice *allocate_voice(byte pri);
-
- void mc_off(AdLibVoice *voice);
-
- static void link_mc(AdLibPart *part, AdLibVoice *voice);
- void mc_inc_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11);
- void mc_init_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11, byte flags,
- InstrumentExtra *ie);
-
- void struct10_init(Struct10 *s10, InstrumentExtra *ie);
- static byte struct10_ontimer(Struct10 *s10, Struct11 *s11);
- static void struct10_setup(Struct10 *s10);
- static int random_nr(int a);
- void mc_key_on(AdLibVoice *voice, AdLibInstrument *instr, byte note, byte velocity);
+ void partKeyOn(AdLibPart *part, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan);
+ void partKeyOff(AdLibPart *part, byte note);
+
+ void adlibKeyOff(int chan);
+ void adlibNoteOn(int chan, byte note, int mod);
+ void adlibNoteOnEx(int chan, byte note, int mod);
+ int adlibGetRegValueParam(int chan, byte data);
+ void adlibSetupChannel(int chan, const AdLibInstrument *instr, byte vol1, byte vol2);
+#ifdef ENABLE_OPL3
+ void adlibSetupChannelSecondary(int chan, const AdLibInstrument *instr, byte vol1, byte vol2, byte pan);
+#endif
+ byte adlibGetRegValue(byte reg) {
+ return _regCache[reg];
+ }
+#ifdef ENABLE_OPL3
+ byte adlibGetRegValueSecondary(byte reg) {
+ return _regCacheSecondary[reg];
+ }
+#endif
+ void adlibSetParam(int channel, byte param, int value, bool primary = true);
+ void adlibKeyOnOff(int channel);
+ void adlibWrite(byte reg, byte value);
+#ifdef ENABLE_OPL3
+ void adlibWriteSecondary(byte reg, byte value);
+#endif
+ void adlibPlayNote(int channel, int note);
+
+ AdLibVoice *allocateVoice(byte pri);
+
+ void mcOff(AdLibVoice *voice);
+
+ static void linkMc(AdLibPart *part, AdLibVoice *voice);
+ void mcIncStuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11);
+ void mcInitStuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11, byte flags,
+ const InstrumentExtra *ie);
+
+ void struct10Init(Struct10 *s10, const InstrumentExtra *ie);
+ static byte struct10OnTimer(Struct10 *s10, Struct11 *s11);
+ static void struct10Setup(Struct10 *s10);
+ static int randomNr(int a);
+ void mcKeyOn(AdLibVoice *voice, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan);
};
// MidiChannel method implementations
@@ -643,7 +1023,7 @@ private:
void AdLibPart::init(MidiDriver_ADLIB *owner, byte channel) {
_owner = owner;
_channel = channel;
- _pri_eff = 127;
+ _priEff = 127;
programChange(0);
}
@@ -657,41 +1037,64 @@ void AdLibPart::send(uint32 b) {
void AdLibPart::noteOff(byte note) {
#ifdef DEBUG_ADLIB
- debug(6, "%10d: noteOff(%d)", tick, note);
+ debug(6, "%10d: noteOff(%d)", g_tick, note);
#endif
- _owner->part_key_off(this, note);
+ _owner->partKeyOff(this, note);
}
void AdLibPart::noteOn(byte note, byte velocity) {
#ifdef DEBUG_ADLIB
- debug(6, "%10d: noteOn(%d,%d)", tick, note, velocity);
+ debug(6, "%10d: noteOn(%d,%d)", g_tick, note, velocity);
+#endif
+ _owner->partKeyOn(this, &_partInstr, note, velocity,
+#ifdef ENABLE_OPL3
+ &_partInstrSecondary,
+#else
+ NULL,
#endif
- _owner->part_key_on(this, &_part_instr, note, velocity);
+ _pan);
}
void AdLibPart::programChange(byte program) {
if (program > 127)
return;
-/*
+ /*
uint i;
uint count = 0;
- for (i = 0; i < ARRAYSIZE(map_gm_to_fm[0]); ++i)
- count += map_gm_to_fm[program][i];
+ for (i = 0; i < ARRAYSIZE(g_gmInstruments[0]); ++i)
+ count += g_gmInstruments[program][i];
if (!count)
warning("No AdLib instrument defined for GM program %d", (int)program);
-*/
+ */
_program = program;
- memcpy(&_part_instr, &map_gm_to_fm[program], sizeof(AdLibInstrument));
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ memcpy(&_partInstr, &g_gmInstruments[program], sizeof(AdLibInstrument));
+#ifdef ENABLE_OPL3
+ } else {
+ memcpy(&_partInstr, &g_gmInstrumentsOPL3[program][0], sizeof(AdLibInstrument));
+ memcpy(&_partInstrSecondary, &g_gmInstrumentsOPL3[program][1], sizeof(AdLibInstrument));
+ }
+#endif
}
void AdLibPart::pitchBend(int16 bend) {
AdLibVoice *voice;
- _pitchbend = bend;
+ _pitchBend = bend;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ _owner->adlibNoteOn(voice->_channel, voice->_note/* + _transposeEff*/,
+ (_pitchBend * _pitchBendFactor >> 6) + _detuneEff);
+#ifdef ENABLE_OPL3
+ } else {
+ _owner->adlibNoteOn(voice->_channel, voice->_note, _pitchBend >> 1);
+ }
+#endif
}
}
@@ -699,75 +1102,137 @@ void AdLibPart::controlChange(byte control, byte value) {
switch (control) {
case 0:
case 32:
- break; // Bank select. Not supported
- case 1: modulationWheel(value); break;
- case 7: volume(value); break;
- case 10: break; // Pan position. Not supported.
- case 16: pitchBendFactor(value); break;
- case 17: detune(value); break;
- case 18: priority(value); break;
- case 64: sustain(value > 0); break;
- case 91: break; // Effects level. Not supported.
- case 93: break; // Chorus level. Not supported.
- case 119: break; // Unknown, used in Simon the Sorcerer 2
- case 121: // reset all controllers
+ // Bank select. Not supported
+ break;
+ case 1:
+ modulationWheel(value);
+ break;
+ case 7:
+ volume(value);
+ break;
+ case 10:
+ panPosition(value);
+ break;
+ case 16:
+ pitchBendFactor(value);
+ break;
+ case 17:
+ detune(value);
+ break;
+ case 18:
+ priority(value);
+ break;
+ case 64:
+ sustain(value > 0);
+ break;
+ case 91:
+ // Effects level. Not supported.
+ break;
+ case 93:
+ // Chorus level. Not supported.
+ break;
+ case 119:
+ // Unknown, used in Simon the Sorcerer 2
+ break;
+ case 121:
+ // reset all controllers
modulationWheel(0);
pitchBendFactor(0);
detune(0);
sustain(0);
break;
- case 123: allNotesOff(); break;
+ case 123:
+ allNotesOff();
+ break;
default:
- warning("AdLib: Unknown control change message %d (%d)", (int) control, (int)value);
+ warning("AdLib: Unknown control change message %d (%d)", (int)control, (int)value);
}
}
void AdLibPart::modulationWheel(byte value) {
AdLibVoice *voice;
- _modwheel = value;
+ _modWheel = value;
for (voice = _voice; voice; voice = voice->_next) {
if (voice->_s10a.active && voice->_s11a.flag0x40)
- voice->_s10a.modwheel = _modwheel >> 2;
+ voice->_s10a.modWheel = _modWheel >> 2;
if (voice->_s10b.active && voice->_s11b.flag0x40)
- voice->_s10b.modwheel = _modwheel >> 2;
+ voice->_s10b.modWheel = _modWheel >> 2;
}
}
void AdLibPart::volume(byte value) {
AdLibVoice *voice;
- _vol_eff = value;
+ _volEff = value;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_set_param(voice->_channel, 0, volume_table[lookup_table[voice->_vol_2][_vol_eff >> 2]]);
- if (voice->_twochan) {
- _owner->adlib_set_param(voice->_channel, 13, volume_table[lookup_table[voice->_vol_1][_vol_eff >> 2]]);
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ _owner->adlibSetParam(voice->_channel, 0, g_volumeTable[g_volumeLookupTable[voice->_vol2][_volEff >> 2]]);
+ if (voice->_twoChan) {
+ _owner->adlibSetParam(voice->_channel, 13, g_volumeTable[g_volumeLookupTable[voice->_vol1][_volEff >> 2]]);
+ }
+#ifdef ENABLE_OPL3
+ } else {
+ _owner->adlibSetParam(voice->_channel, 0, g_volumeTable[((voice->_vol2 + 1) * _volEff) >> 7], true);
+ _owner->adlibSetParam(voice->_channel, 0, g_volumeTable[((voice->_secVol2 + 1) * _volEff) >> 7], false);
+ if (voice->_twoChan) {
+ _owner->adlibSetParam(voice->_channel, 13, g_volumeTable[((voice->_vol1 + 1) * _volEff) >> 7], true);
+ }
+ if (voice->_secTwoChan) {
+ _owner->adlibSetParam(voice->_channel, 13, g_volumeTable[((voice->_secVol1 + 1) * _volEff) >> 7], false);
+ }
}
+#endif
}
}
+void AdLibPart::panPosition(byte value) {
+ _pan = value;
+}
+
void AdLibPart::pitchBendFactor(byte value) {
+#ifdef ENABLE_OPL3
+ // Not supported in OPL3 mode.
+ if (_owner->_opl3Mode) {
+ return;
+ }
+#endif
+
AdLibVoice *voice;
- _pitchbend_factor = value;
+ _pitchBendFactor = value;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+ _owner->adlibNoteOn(voice->_channel, voice->_note/* + _transposeEff*/,
+ (_pitchBend * _pitchBendFactor >> 6) + _detuneEff);
}
}
void AdLibPart::detune(byte value) {
+ // Sam&Max's OPL3 driver uses this for a completly different purpose. It
+ // is related to voice allocation. We ignore this for now.
+ // TODO: We probably need to look how the interpreter side of Sam&Max's
+ // iMuse version handles all this too. Implementing the driver side here
+ // would be not that hard.
+#ifdef ENABLE_OPL3
+ if (_owner->_opl3Mode) {
+ //_maxNotes = value;
+ return;
+ }
+#endif
+
AdLibVoice *voice;
- _detune_eff = value;
+ _detuneEff = value;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+ _owner->adlibNoteOn(voice->_channel, voice->_note/* + _transposeEff*/,
+ (_pitchBend * _pitchBendFactor >> 6) + _detuneEff);
}
}
void AdLibPart::priority(byte value) {
- _pri_eff = value;
+ _priEff = value;
}
void AdLibPart::sustain(bool value) {
@@ -776,20 +1241,29 @@ void AdLibPart::sustain(bool value) {
_pedal = value;
if (!value) {
for (voice = _voice; voice; voice = voice->_next) {
- if (voice->_waitforpedal)
- _owner->mc_off(voice);
+ if (voice->_waitForPedal)
+ _owner->mcOff(voice);
}
}
}
void AdLibPart::allNotesOff() {
while (_voice)
- _owner->mc_off(_voice);
+ _owner->mcOff(_voice);
}
void AdLibPart::sysEx_customInstrument(uint32 type, const byte *instr) {
+ // Sam&Max allows for instrument overwrites, but we will not support it
+ // until we can find any track actually using it.
+#ifdef ENABLE_OPL3
+ if (_owner->_opl3Mode) {
+ warning("AdLibPart::sysEx_customInstrument: Used in OPL3 mode");
+ return;
+ }
+#endif
+
if (type == 'ADL ') {
- memcpy(&_part_instr, instr, sizeof(AdLibInstrument));
+ memcpy(&_partInstr, instr, sizeof(AdLibInstrument));
}
}
@@ -803,8 +1277,8 @@ AdLibPercussionChannel::~AdLibPercussionChannel() {
void AdLibPercussionChannel::init(MidiDriver_ADLIB *owner, byte channel) {
AdLibPart::init(owner, channel);
- _pri_eff = 0;
- _vol_eff = 127;
+ _priEff = 0;
+ _volEff = 127;
// Initialize the custom instruments data
memset(_notes, 0, sizeof(_notes));
@@ -812,33 +1286,49 @@ void AdLibPercussionChannel::init(MidiDriver_ADLIB *owner, byte channel) {
}
void AdLibPercussionChannel::noteOff(byte note) {
- // Jamieson630: Unless I run into a specific instrument that
- // may require a key off, I'm going to ignore this message.
- // The rationale is that a percussion instrument should
- // fade out of its own accord, and the AdLib instrument
- // definitions used should follow this rule. Since
- // percussion voices are allocated at the lowest priority
- // anyway, we know that "hanging" percussion sounds will
- // not prevent later musical instruments (or even other
- // percussion sounds) from playing.
-/*
- _owner->part_key_off(this, note);
-*/
+ if (_customInstruments[note]) {
+ note = _notes[note];
+ }
+
+ // This used to ignore note off events, since the builtin percussion
+ // instrument data has a duration value, which causes the percussion notes
+ // to stop automatically. This is not the case for (Groovie's) custom
+ // percussion instruments though. Also the OPL3 driver of Sam&Max actually
+ // does not handle the duration value, so we need it there too.
+ _owner->partKeyOff(this, note);
}
void AdLibPercussionChannel::noteOn(byte note, byte velocity) {
- AdLibInstrument *inst = NULL;
+ const AdLibInstrument *inst = NULL;
+ const AdLibInstrument *sec = NULL;
// The custom instruments have priority over the default mapping
- inst = _customInstruments[note];
- if (inst)
- note = _notes[note];
+ // We do not support custom instruments in OPL3 mode though.
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ inst = _customInstruments[note];
+ if (inst)
+ note = _notes[note];
+#ifdef ENABLE_OPL3
+ }
+#endif
if (!inst) {
- // Use the default GM to FM mapping as a fallback as a fallback
- byte key = gm_percussion_lookup[note];
- if (key != 0xFF)
- inst = &gm_percussion_to_fm[key];
+ // Use the default GM to FM mapping as a fallback
+ byte key = g_gmPercussionInstrumentMap[note];
+ if (key != 0xFF) {
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ inst = &g_gmPercussionInstruments[key];
+#ifdef ENABLE_OPL3
+ } else {
+ inst = &g_gmPercussionInstrumentsOPL3[key][0];
+ sec = &g_gmPercussionInstrumentsOPL3[key][1];
+ }
+#endif
+ }
}
if (!inst) {
@@ -846,10 +1336,18 @@ void AdLibPercussionChannel::noteOn(byte note, byte velocity) {
return;
}
- _owner->part_key_on(this, inst, note, velocity);
+ _owner->partKeyOn(this, inst, note, velocity, sec, _pan);
}
void AdLibPercussionChannel::sysEx_customInstrument(uint32 type, const byte *instr) {
+ // We do not allow custom instruments in OPL3 mode right now.
+#ifdef ENABLE_OPL3
+ if (_owner->_opl3Mode) {
+ warning("AdLibPercussionChannel::sysEx_customInstrument: Used in OPL3 mode");
+ return;
+ }
+#endif
+
if (type == 'ADLP') {
byte note = instr[0];
_notes[note] = instr[1];
@@ -861,16 +1359,16 @@ void AdLibPercussionChannel::sysEx_customInstrument(uint32 type, const byte *ins
}
// Save the new instrument data
- _customInstruments[note]->mod_characteristic = instr[2];
- _customInstruments[note]->mod_scalingOutputLevel = instr[3];
- _customInstruments[note]->mod_attackDecay = instr[4];
- _customInstruments[note]->mod_sustainRelease = instr[5];
- _customInstruments[note]->mod_waveformSelect = instr[6];
- _customInstruments[note]->car_characteristic = instr[7];
- _customInstruments[note]->car_scalingOutputLevel = instr[8];
- _customInstruments[note]->car_attackDecay = instr[9];
- _customInstruments[note]->car_sustainRelease = instr[10];
- _customInstruments[note]->car_waveformSelect = instr[11];
+ _customInstruments[note]->modCharacteristic = instr[2];
+ _customInstruments[note]->modScalingOutputLevel = instr[3];
+ _customInstruments[note]->modAttackDecay = instr[4];
+ _customInstruments[note]->modSustainRelease = instr[5];
+ _customInstruments[note]->modWaveformSelect = instr[6];
+ _customInstruments[note]->carCharacteristic = instr[7];
+ _customInstruments[note]->carScalingOutputLevel = instr[8];
+ _customInstruments[note]->carAttackDecay = instr[9];
+ _customInstruments[note]->carSustainRelease = instr[10];
+ _customInstruments[note]->carWaveformSelect = instr[11];
_customInstruments[note]->feedback = instr[12];
}
}
@@ -882,21 +1380,28 @@ MidiDriver_ADLIB::MidiDriver_ADLIB(Audio::Mixer *mixer)
uint i;
_scummSmallHeader = false;
+#ifdef ENABLE_OPL3
+ _opl3Mode = false;
+#endif
- _adlib_reg_cache = 0;
+ _regCache = 0;
+#ifdef ENABLE_OPL3
+ _regCacheSecondary = 0;
+#endif
- _adlib_timer_counter = 0;
- _voice_index = 0;
- for (i = 0; i < ARRAYSIZE(curnote_table); ++i) {
- curnote_table[i] = 0;
+ _timerCounter = 0;
+ _voiceIndex = -1;
+ for (i = 0; i < ARRAYSIZE(_curNotTable); ++i) {
+ _curNotTable[i] = 0;
}
for (i = 0; i < ARRAYSIZE(_parts); ++i) {
_parts[i].init(this, i + ((i >= 9) ? 1 : 0));
}
_percussion.init(this, 9);
- _timer_p = 0xD69;
- _timer_q = 0x411B;
+ _timerIncrease = 0xD69;
+ _timerThreshold = 0x411B;
+ _opl = 0;
}
int MidiDriver_ADLIB::open() {
@@ -914,14 +1419,37 @@ int MidiDriver_ADLIB::open() {
voice->_s11b.s10 = &voice->_s10a;
}
- _adlib_reg_cache = (byte *)calloc(256, 1);
+ // Try to use OPL3 when requested.
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ _opl = OPL::Config::create(OPL::Config::kOpl3);
+ }
- _opl = makeAdLibOPL(getRate());
+ // Initialize plain OPL2 when no OPL3 is intiailized already.
+ if (!_opl) {
+#endif
+ _opl = OPL::Config::create();
+#ifdef ENABLE_OPL3
+ _opl3Mode = false;
+ }
+#endif
+ _opl->init(getRate());
- adlib_write(1, 0x20);
- adlib_write(8, 0x40);
- adlib_write(0xBD, 0x00);
- create_lookup_table();
+ _regCache = (byte *)calloc(256, 1);
+
+ adlibWrite(8, 0x40);
+ adlibWrite(0xBD, 0x00);
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ adlibWrite(1, 0x20);
+ createLookupTable();
+#ifdef ENABLE_OPL3
+ } else {
+ _regCacheSecondary = (byte *)calloc(256, 1);
+ adlibWriteSecondary(5, 1);
+ }
+#endif
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
@@ -938,14 +1466,17 @@ void MidiDriver_ADLIB::close() {
uint i;
for (i = 0; i < ARRAYSIZE(_voices); ++i) {
if (_voices[i]._part)
- mc_off(&_voices[i]);
+ mcOff(&_voices[i]);
}
// Turn off the OPL emulation
- OPLDestroy(_opl);
-// YM3812Shutdown();
+ delete _opl;
+ _opl = 0;
- free(_adlib_reg_cache);
+ free(_regCache);
+#ifdef ENABLE_OPL3
+ free(_regCacheSecondary);
+#endif
}
void MidiDriver_ADLIB::send(uint32 b) {
@@ -954,9 +1485,9 @@ void MidiDriver_ADLIB::send(uint32 b) {
void MidiDriver_ADLIB::send(byte chan, uint32 b) {
//byte param3 = (byte) ((b >> 24) & 0xFF);
- byte param2 = (byte) ((b >> 16) & 0xFF);
- byte param1 = (byte) ((b >> 8) & 0xFF);
- byte cmd = (byte) (b & 0xF0);
+ byte param2 = (byte)((b >> 16) & 0xFF);
+ byte param1 = (byte)((b >> 8) & 0xFF);
+ byte cmd = (byte)(b & 0xF0);
AdLibPart *part;
if (chan == 9)
@@ -997,29 +1528,42 @@ void MidiDriver_ADLIB::send(byte chan, uint32 b) {
uint32 MidiDriver_ADLIB::property(int prop, uint32 param) {
switch (prop) {
- case PROP_OLD_ADLIB: // Older games used a different operator volume algorithm
- _scummSmallHeader = (param > 0);
- if (_scummSmallHeader) {
- _timer_p = 473;
- _timer_q = 1000;
- } else {
- _timer_p = 0xD69;
- _timer_q = 0x411B;
- }
- return 1;
+ case PROP_OLD_ADLIB: // Older games used a different operator volume algorithm
+ _scummSmallHeader = (param > 0);
+ if (_scummSmallHeader) {
+ _timerIncrease = 473;
+ _timerThreshold = 1000;
+ } else {
+ _timerIncrease = 0xD69;
+ _timerThreshold = 0x411B;
+ }
+ return 1;
+
+ case PROP_SCUMM_OPL3: // Sam&Max OPL3 support.
+#ifdef ENABLE_OPL3
+ _opl3Mode = (param > 0);
+#endif
+ return 1;
}
return 0;
}
void MidiDriver_ADLIB::setPitchBendRange(byte channel, uint range) {
+#ifdef ENABLE_OPL3
+ // Not supported in OPL3 mode.
+ if (_opl3Mode) {
+ return;
+ }
+#endif
+
AdLibVoice *voice;
AdLibPart *part = &_parts[channel];
- part->_pitchbend_factor = range;
+ part->_pitchBendFactor = range;
for (voice = part->_voice; voice; voice = voice->_next) {
- adlib_note_on(voice->_channel, voice->_note + part->_transpose_eff,
- (part->_pitchbend * part->_pitchbend_factor >> 6) + part->_detune_eff);
+ adlibNoteOn(voice->_channel, voice->_note/* + part->_transposeEff*/,
+ (part->_pitchBend * part->_pitchBendFactor >> 6) + part->_detuneEff);
}
}
@@ -1043,54 +1587,77 @@ MidiChannel *MidiDriver_ADLIB::allocateChannel() {
// All the code brought over from IMuseAdLib
-void MidiDriver_ADLIB::adlib_write(byte reg, byte value) {
- if (_adlib_reg_cache[reg] == value)
+void MidiDriver_ADLIB::adlibWrite(byte reg, byte value) {
+ if (_regCache[reg] == value) {
return;
+ }
#ifdef DEBUG_ADLIB
- debug(6, "%10d: adlib_write[%x] = %x", tick, reg, value);
+ debug(6, "%10d: adlibWrite[%x] = %x", g_tick, reg, value);
#endif
- _adlib_reg_cache[reg] = value;
+ _regCache[reg] = value;
- OPLWriteReg(_opl, reg, value);
+ _opl->writeReg(reg, value);
}
+#ifdef ENABLE_OPL3
+void MidiDriver_ADLIB::adlibWriteSecondary(byte reg, byte value) {
+ assert(_opl3Mode);
+
+ if (_regCacheSecondary[reg] == value) {
+ return;
+ }
+#ifdef DEBUG_ADLIB
+ debug(6, "%10d: adlibWriteSecondary[%x] = %x", g_tick, reg, value);
+#endif
+ _regCacheSecondary[reg] = value;
+
+ _opl->writeReg(reg | 0x100, value);
+}
+#endif
+
void MidiDriver_ADLIB::generateSamples(int16 *data, int len) {
- memset(data, 0, sizeof(int16) * len);
- YM3812UpdateOne(_opl, data, len);
+ if (_opl->isStereo()) {
+ len *= 2;
+ }
+ _opl->readBuffer(data, len);
}
void MidiDriver_ADLIB::onTimer() {
- AdLibVoice *voice;
- int i;
-
- _adlib_timer_counter += _timer_p;
- while (_adlib_timer_counter >= _timer_q) {
- _adlib_timer_counter -= _timer_q;
+ _timerCounter += _timerIncrease;
+ while (_timerCounter >= _timerThreshold) {
+ _timerCounter -= _timerThreshold;
#ifdef DEBUG_ADLIB
- tick++;
+ g_tick++;
#endif
- voice = _voices;
- for (i = 0; i != ARRAYSIZE(_voices); i++, voice++) {
- if (!voice->_part)
- continue;
- if (voice->_duration && (voice->_duration -= 0x11) <= 0) {
- mc_off(voice);
- return;
- }
- if (voice->_s10a.active) {
- mc_inc_stuff(voice, &voice->_s10a, &voice->_s11a);
- }
- if (voice->_s10b.active) {
- mc_inc_stuff(voice, &voice->_s10b, &voice->_s11b);
+ // Sam&Max's OPL3 driver does not have any timer handling like this.
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ AdLibVoice *voice = _voices;
+ for (int i = 0; i != ARRAYSIZE(_voices); i++, voice++) {
+ if (!voice->_part)
+ continue;
+ if (voice->_duration && (voice->_duration -= 0x11) <= 0) {
+ mcOff(voice);
+ return;
+ }
+ if (voice->_s10a.active) {
+ mcIncStuff(voice, &voice->_s10a, &voice->_s11a);
+ }
+ if (voice->_s10b.active) {
+ mcIncStuff(voice, &voice->_s10b, &voice->_s11b);
+ }
}
+#ifdef ENABLE_OPL3
}
+#endif
}
}
-void MidiDriver_ADLIB::mc_off(AdLibVoice *voice) {
+void MidiDriver_ADLIB::mcOff(AdLibVoice *voice) {
AdLibVoice *tmp;
- adlib_key_off(voice->_channel);
+ adlibKeyOff(voice->_channel);
tmp = voice->_prev;
@@ -1103,57 +1670,62 @@ void MidiDriver_ADLIB::mc_off(AdLibVoice *voice) {
voice->_part = NULL;
}
-void MidiDriver_ADLIB::mc_inc_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11) {
+void MidiDriver_ADLIB::mcIncStuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11) {
byte code;
AdLibPart *part = voice->_part;
- code = struct10_ontimer(s10, s11);
+ code = struct10OnTimer(s10, s11);
if (code & 1) {
switch (s11->param) {
case 0:
- voice->_vol_2 = s10->start_value + s11->modify_val;
+ voice->_vol2 = s10->startValue + s11->modifyVal;
if (!_scummSmallHeader) {
- adlib_set_param(voice->_channel, 0,
- volume_table[lookup_table[voice->_vol_2]
- [part->_vol_eff >> 2]]);
+ adlibSetParam(voice->_channel, 0,
+ g_volumeTable[g_volumeLookupTable[voice->_vol2]
+ [part->_volEff >> 2]]);
} else {
- adlib_set_param(voice->_channel, 0, voice->_vol_2);
+ adlibSetParam(voice->_channel, 0, voice->_vol2);
}
break;
case 13:
- voice->_vol_1 = s10->start_value + s11->modify_val;
- if (voice->_twochan && !_scummSmallHeader) {
- adlib_set_param(voice->_channel, 13,
- volume_table[lookup_table[voice->_vol_1]
- [part->_vol_eff >> 2]]);
+ voice->_vol1 = s10->startValue + s11->modifyVal;
+ if (voice->_twoChan && !_scummSmallHeader) {
+ adlibSetParam(voice->_channel, 13,
+ g_volumeTable[g_volumeLookupTable[voice->_vol1]
+ [part->_volEff >> 2]]);
} else {
- adlib_set_param(voice->_channel, 13, voice->_vol_1);
+ adlibSetParam(voice->_channel, 13, voice->_vol1);
}
break;
case 30:
- s11->s10->modwheel = (char)s11->modify_val;
+ s11->s10->modWheel = (char)s11->modifyVal;
break;
case 31:
- s11->s10->unk3 = (char)s11->modify_val;
+ s11->s10->unk3 = (char)s11->modifyVal;
break;
default:
- adlib_set_param(voice->_channel, s11->param,
- s10->start_value + s11->modify_val);
+ adlibSetParam(voice->_channel, s11->param,
+ s10->startValue + s11->modifyVal);
break;
}
}
if (code & 2 && s11->flag0x10)
- adlib_key_onoff(voice->_channel);
+ adlibKeyOnOff(voice->_channel);
}
-void MidiDriver_ADLIB::adlib_key_off(int chan){
+void MidiDriver_ADLIB::adlibKeyOff(int chan) {
byte reg = chan + 0xB0;
- adlib_write(reg, adlib_get_reg_value(reg) & ~0x20);
+ adlibWrite(reg, adlibGetRegValue(reg) & ~0x20);
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ adlibWriteSecondary(reg, adlibGetRegValueSecondary(reg) & ~0x20);
+ }
+#endif
}
-byte MidiDriver_ADLIB::struct10_ontimer(Struct10 *s10, Struct11 *s11) {
+byte MidiDriver_ADLIB::struct10OnTimer(Struct10 *s10, Struct11 *s11) {
byte result = 0;
int i;
@@ -1162,51 +1734,54 @@ byte MidiDriver_ADLIB::struct10_ontimer(Struct10 *s10, Struct11 *s11) {
return 0;
}
- i = s10->cur_val + s10->speed_hi;
- s10->speed_lo_counter += s10->speed_lo;
- if (s10->speed_lo_counter >= s10->speed_lo_max) {
- s10->speed_lo_counter -= s10->speed_lo_max;
+ i = s10->curVal + s10->speedHi;
+ s10->speedLoCounter += s10->speedLo;
+ if (s10->speedLoCounter >= s10->speedLoMax) {
+ s10->speedLoCounter -= s10->speedLoMax;
i += s10->direction;
}
- if (s10->cur_val != i || s10->modwheel != s10->modwheel_last) {
- s10->cur_val = i;
- s10->modwheel_last = s10->modwheel;
- i = lookup_volume(i, s10->modwheel_last);
- if (i != s11->modify_val) {
- s11->modify_val = i;
+ if (s10->curVal != i || s10->modWheel != s10->modWheelLast) {
+ s10->curVal = i;
+ s10->modWheelLast = s10->modWheel;
+ i = lookupVolume(i, s10->modWheelLast);
+ if (i != s11->modifyVal) {
+ s11->modifyVal = i;
result = 1;
}
}
- if (!--s10->num_steps) {
+ if (!--s10->numSteps) {
s10->active++;
if (s10->active > 4) {
if (s10->loop) {
s10->active = 1;
result |= 2;
- struct10_setup(s10);
+ struct10Setup(s10);
} else {
s10->active = 0;
}
} else {
- struct10_setup(s10);
+ struct10Setup(s10);
}
}
return result;
}
-void MidiDriver_ADLIB::adlib_set_param(int channel, byte param, int value) {
+void MidiDriver_ADLIB::adlibSetParam(int channel, byte param, int value, bool primary) {
const AdLibSetParams *as;
byte reg;
assert(channel >= 0 && channel < 9);
+#ifdef ENABLE_OPL3
+ assert(!_opl3Mode || (param == 0 || param == 13));
+#endif
if (param <= 12) {
- reg = channel_mappings_2[channel];
+ reg = g_operator2Offsets[channel];
} else if (param <= 25) {
param -= 13;
- reg = channel_mappings[channel];
+ reg = g_operator1Offsets[channel];
} else if (param <= 27) {
param -= 13;
reg = channel;
@@ -1216,54 +1791,66 @@ void MidiDriver_ADLIB::adlib_set_param(int channel, byte param, int value) {
else
value -= 383;
value <<= 4;
- channel_table_2[channel] = value;
- adlib_playnote(channel, curnote_table[channel] + value);
+ _channelTable2[channel] = value;
+ adlibPlayNote(channel, _curNotTable[channel] + value);
return;
} else {
return;
}
- as = &adlib_setparam_table[param];
- if (as->d)
- value = as->d - value;
- reg += as->a;
- adlib_write(reg, (adlib_get_reg_value(reg) & ~as->c) | (((byte)value) << as->b));
+ as = &g_setParamTable[param];
+ if (as->inversion)
+ value = as->inversion - value;
+ reg += as->registerBase;
+#ifdef ENABLE_OPL3
+ if (primary) {
+#endif
+ adlibWrite(reg, (adlibGetRegValue(reg) & ~as->mask) | (((byte)value) << as->shift));
+#ifdef ENABLE_OPL3
+ } else {
+ adlibWriteSecondary(reg, (adlibGetRegValueSecondary(reg) & ~as->mask) | (((byte)value) << as->shift));
+ }
+#endif
}
-void MidiDriver_ADLIB::adlib_key_onoff(int channel) {
+void MidiDriver_ADLIB::adlibKeyOnOff(int channel) {
+#ifdef ENABLE_OPL3
+ assert(!_opl3Mode);
+#endif
+
byte val;
byte reg = channel + 0xB0;
assert(channel >= 0 && channel < 9);
- val = adlib_get_reg_value(reg);
- adlib_write(reg, val & ~0x20);
- adlib_write(reg, val | 0x20);
+ val = adlibGetRegValue(reg);
+ adlibWrite(reg, val & ~0x20);
+ adlibWrite(reg, val | 0x20);
}
-void MidiDriver_ADLIB::struct10_setup(Struct10 *s10) {
+void MidiDriver_ADLIB::struct10Setup(Struct10 *s10) {
int b, c, d, e, f, g, h;
byte t;
b = s10->unk3;
f = s10->active - 1;
- t = s10->table_a[f];
- e = num_steps_table[lookup_table[t & 0x7F][b]];
+ t = s10->tableA[f];
+ e = g_numStepsTable[g_volumeLookupTable[t & 0x7F][b]];
if (t & 0x80) {
- e = random_nr(e);
+ e = randomNr(e);
}
if (e == 0)
e++;
- s10->num_steps = s10->speed_lo_max = e;
+ s10->numSteps = s10->speedLoMax = e;
if (f != 2) {
- c = s10->max_value;
- g = s10->start_value;
- t = s10->table_b[f];
- d = lookup_volume(c, (t & 0x7F) - 31);
+ c = s10->maxValue;
+ g = s10->startValue;
+ t = s10->tableB[f];
+ d = lookupVolume(c, (t & 0x7F) - 31);
if (t & 0x80) {
- d = random_nr(d);
+ d = randomNr(d);
}
if (d + g > c) {
h = c - g;
@@ -1272,12 +1859,12 @@ void MidiDriver_ADLIB::struct10_setup(Struct10 *s10) {
if (d + g < 0)
h = -g;
}
- h -= s10->cur_val;
+ h -= s10->curVal;
} else {
h = 0;
}
- s10->speed_hi = h / e;
+ s10->speedHi = h / e;
if (h < 0) {
h = -h;
s10->direction = -1;
@@ -1285,11 +1872,11 @@ void MidiDriver_ADLIB::struct10_setup(Struct10 *s10) {
s10->direction = 1;
}
- s10->speed_lo = h % e;
- s10->speed_lo_counter = 0;
+ s10->speedLo = h % e;
+ s10->speedLoCounter = 0;
}
-void MidiDriver_ADLIB::adlib_playnote(int channel, int note) {
+void MidiDriver_ADLIB::adlibPlayNote(int channel, int note) {
byte old, oct, notex;
int note2;
int i;
@@ -1304,7 +1891,7 @@ void MidiDriver_ADLIB::adlib_playnote(int channel, int note) {
oct <<= 2;
notex = note2 % 12 + 3;
- old = adlib_get_reg_value(channel + 0xB0);
+ old = adlibGetRegValue(channel + 0xB0);
if (old & 0x20) {
old &= ~0x20;
if (oct > old) {
@@ -1321,58 +1908,58 @@ void MidiDriver_ADLIB::adlib_playnote(int channel, int note) {
}
i = (notex << 3) + ((note >> 4) & 0x7);
- adlib_write(channel + 0xA0, note_to_f_num[i]);
- adlib_write(channel + 0xB0, oct | 0x20);
+ adlibWrite(channel + 0xA0, g_noteFrequencies[i]);
+ adlibWrite(channel + 0xB0, oct | 0x20);
}
-int MidiDriver_ADLIB::random_nr(int a) {
- static byte _rand_seed = 1;
- if (_rand_seed & 1) {
- _rand_seed >>= 1;
- _rand_seed ^= 0xB8;
+int MidiDriver_ADLIB::randomNr(int a) {
+ static byte _randSeed = 1;
+ if (_randSeed & 1) {
+ _randSeed >>= 1;
+ _randSeed ^= 0xB8;
} else {
- _rand_seed >>= 1;
+ _randSeed >>= 1;
}
- return _rand_seed * a >> 8;
+ return _randSeed * a >> 8;
}
-void MidiDriver_ADLIB::part_key_off(AdLibPart *part, byte note) {
+void MidiDriver_ADLIB::partKeyOff(AdLibPart *part, byte note) {
AdLibVoice *voice;
for (voice = part->_voice; voice; voice = voice->_next) {
if (voice->_note == note) {
if (part->_pedal)
- voice->_waitforpedal = true;
+ voice->_waitForPedal = true;
else
- mc_off(voice);
+ mcOff(voice);
}
}
}
-void MidiDriver_ADLIB::part_key_on(AdLibPart *part, AdLibInstrument *instr, byte note, byte velocity) {
+void MidiDriver_ADLIB::partKeyOn(AdLibPart *part, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan) {
AdLibVoice *voice;
- voice = allocate_voice(part->_pri_eff);
+ voice = allocateVoice(part->_priEff);
if (!voice)
return;
- link_mc(part, voice);
- mc_key_on(voice, instr, note, velocity);
+ linkMc(part, voice);
+ mcKeyOn(voice, instr, note, velocity, second, pan);
}
-AdLibVoice *MidiDriver_ADLIB::allocate_voice(byte pri) {
+AdLibVoice *MidiDriver_ADLIB::allocateVoice(byte pri) {
AdLibVoice *ac, *best = NULL;
int i;
for (i = 0; i < 9; i++) {
- if (++_voice_index >= 9)
- _voice_index = 0;
- ac = &_voices[_voice_index];
+ if (++_voiceIndex >= 9)
+ _voiceIndex = 0;
+ ac = &_voices[_voiceIndex];
if (!ac->_part)
return ac;
if (!ac->_next) {
- if (ac->_part->_pri_eff <= pri) {
- pri = ac->_part->_pri_eff;
+ if (ac->_part->_priEff <= pri) {
+ pri = ac->_part->_priEff;
best = ac;
}
}
@@ -1383,11 +1970,11 @@ AdLibVoice *MidiDriver_ADLIB::allocate_voice(byte pri) {
return NULL;
if (best)
- mc_off(best);
+ mcOff(best);
return best;
}
-void MidiDriver_ADLIB::link_mc(AdLibPart *part, AdLibVoice *voice) {
+void MidiDriver_ADLIB::linkMc(AdLibPart *part, AdLibVoice *voice) {
voice->_part = part;
voice->_next = (AdLibVoice *)part->_voice;
part->_voice = voice;
@@ -1397,153 +1984,229 @@ void MidiDriver_ADLIB::link_mc(AdLibPart *part, AdLibVoice *voice) {
voice->_next->_prev = voice;
}
-void MidiDriver_ADLIB::mc_key_on(AdLibVoice *voice, AdLibInstrument *instr, byte note, byte velocity) {
+void MidiDriver_ADLIB::mcKeyOn(AdLibVoice *voice, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan) {
AdLibPart *part = voice->_part;
- int c;
- byte vol_1, vol_2;
+ byte vol1, vol2;
+#ifdef ENABLE_OPL3
+ byte secVol1 = 0, secVol2 = 0;
+#endif
- voice->_twochan = instr->feedback & 1;
+ voice->_twoChan = instr->feedback & 1;
voice->_note = note;
- voice->_waitforpedal = false;
+ voice->_waitForPedal = false;
voice->_duration = instr->duration;
if (voice->_duration != 0)
voice->_duration *= 63;
- if (!_scummSmallHeader)
- vol_1 = (instr->mod_scalingOutputLevel & 0x3F) + lookup_table[velocity >> 1][instr->mod_waveformSelect >> 2];
- else
- vol_1 = 0x3f - (instr->mod_scalingOutputLevel & 0x3F);
- if (vol_1 > 0x3F)
- vol_1 = 0x3F;
- voice->_vol_1 = vol_1;
-
- if (!_scummSmallHeader)
- vol_2 = (instr->car_scalingOutputLevel & 0x3F) + lookup_table[velocity >> 1][instr->car_waveformSelect >> 2];
- else
- vol_2 = 0x3f - (instr->car_scalingOutputLevel & 0x3F);
- if (vol_2 > 0x3F)
- vol_2 = 0x3F;
- voice->_vol_2 = vol_2;
+ if (!_scummSmallHeader) {
+#ifdef ENABLE_OPL3
+ if (_opl3Mode)
+ vol1 = (instr->modScalingOutputLevel & 0x3F) + (velocity * ((instr->modWaveformSelect >> 3) + 1)) / 64;
+ else
+#endif
+ vol1 = (instr->modScalingOutputLevel & 0x3F) + g_volumeLookupTable[velocity >> 1][instr->modWaveformSelect >> 2];
+ } else {
+ vol1 = 0x3f - (instr->modScalingOutputLevel & 0x3F);
+ }
+ if (vol1 > 0x3F)
+ vol1 = 0x3F;
+ voice->_vol1 = vol1;
- c = part->_vol_eff >> 2;
+ if (!_scummSmallHeader) {
+#ifdef ENABLE_OPL3
+ if (_opl3Mode)
+ vol2 = (instr->carScalingOutputLevel & 0x3F) + (velocity * ((instr->carWaveformSelect >> 3) + 1)) / 64;
+ else
+#endif
+ vol2 = (instr->carScalingOutputLevel & 0x3F) + g_volumeLookupTable[velocity >> 1][instr->carWaveformSelect >> 2];
+ } else {
+ vol2 = 0x3f - (instr->carScalingOutputLevel & 0x3F);
+ }
+ if (vol2 > 0x3F)
+ vol2 = 0x3F;
+ voice->_vol2 = vol2;
+
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ voice->_secTwoChan = second->feedback & 1;
+ secVol1 = (second->modScalingOutputLevel & 0x3F) + (velocity * ((second->modWaveformSelect >> 3) + 1)) / 64;
+ if (secVol1 > 0x3F) {
+ secVol1 = 0x3F;
+ }
+ voice->_secVol1 = secVol1;
+ secVol2 = (second->carScalingOutputLevel & 0x3F) + (velocity * ((second->carWaveformSelect >> 3) + 1)) / 64;
+ if (secVol2 > 0x3F) {
+ secVol2 = 0x3F;
+ }
+ voice->_secVol2 = secVol2;
+ }
+#endif
if (!_scummSmallHeader) {
- vol_2 = volume_table[lookup_table[vol_2][c]];
- if (voice->_twochan)
- vol_1 = volume_table[lookup_table[vol_1][c]];
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ int c = part->_volEff >> 2;
+ vol2 = g_volumeTable[g_volumeLookupTable[vol2][c]];
+ if (voice->_twoChan)
+ vol1 = g_volumeTable[g_volumeLookupTable[vol1][c]];
+#ifdef ENABLE_OPL3
+ } else {
+ vol2 = g_volumeTable[((vol2 + 1) * part->_volEff) >> 7];
+ secVol2 = g_volumeTable[((secVol2 + 1) * part->_volEff) >> 7];
+ if (voice->_twoChan)
+ vol1 = g_volumeTable[((vol1 + 1) * part->_volEff) >> 7];
+ if (voice->_secTwoChan)
+ secVol1 = g_volumeTable[((secVol1 + 1) * part->_volEff) >> 7];
+ }
+#endif
}
- adlib_setup_channel(voice->_channel, instr, vol_1, vol_2);
- adlib_note_on_ex(voice->_channel, part->_transpose_eff + note, part->_detune_eff + (part->_pitchbend * part->_pitchbend_factor >> 6));
+ adlibSetupChannel(voice->_channel, instr, vol1, vol2);
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ adlibNoteOnEx(voice->_channel, /*part->_transposeEff + */note, part->_detuneEff + (part->_pitchBend * part->_pitchBendFactor >> 6));
- if (instr->flags_a & 0x80) {
- mc_init_stuff(voice, &voice->_s10a, &voice->_s11a, instr->flags_a, &instr->extra_a);
- } else {
- voice->_s10a.active = 0;
- }
+ if (instr->flagsA & 0x80) {
+ mcInitStuff(voice, &voice->_s10a, &voice->_s11a, instr->flagsA, &instr->extraA);
+ } else {
+ voice->_s10a.active = 0;
+ }
- if (instr->flags_b & 0x80) {
- mc_init_stuff(voice, &voice->_s10b, &voice->_s11b, instr->flags_b, &instr->extra_b);
+ if (instr->flagsB & 0x80) {
+ mcInitStuff(voice, &voice->_s10b, &voice->_s11b, instr->flagsB, &instr->extraB);
+ } else {
+ voice->_s10b.active = 0;
+ }
+#ifdef ENABLE_OPL3
} else {
- voice->_s10b.active = 0;
+ adlibSetupChannelSecondary(voice->_channel, second, secVol1, secVol2, pan);
+ adlibNoteOnEx(voice->_channel, note, part->_pitchBend >> 1);
}
+#endif
}
-void MidiDriver_ADLIB::adlib_setup_channel(int chan, AdLibInstrument *instr, byte vol_1, byte vol_2) {
- byte channel;
-
+void MidiDriver_ADLIB::adlibSetupChannel(int chan, const AdLibInstrument *instr, byte vol1, byte vol2) {
assert(chan >= 0 && chan < 9);
- channel = channel_mappings[chan];
- adlib_write(channel + 0x20, instr->mod_characteristic);
- adlib_write(channel + 0x40, (instr->mod_scalingOutputLevel | 0x3F) - vol_1 );
- adlib_write(channel + 0x60, 0xff & (~instr->mod_attackDecay));
- adlib_write(channel + 0x80, 0xff & (~instr->mod_sustainRelease));
- adlib_write(channel + 0xE0, instr->mod_waveformSelect);
-
- channel = channel_mappings_2[chan];
- adlib_write(channel + 0x20, instr->car_characteristic);
- adlib_write(channel + 0x40, (instr->car_scalingOutputLevel | 0x3F) - vol_2 );
- adlib_write(channel + 0x60, 0xff & (~instr->car_attackDecay));
- adlib_write(channel + 0x80, 0xff & (~instr->car_sustainRelease));
- adlib_write(channel + 0xE0, instr->car_waveformSelect);
-
- adlib_write((byte)chan + 0xC0, instr->feedback);
+ byte channel = g_operator1Offsets[chan];
+ adlibWrite(channel + 0x20, instr->modCharacteristic);
+ adlibWrite(channel + 0x40, (instr->modScalingOutputLevel | 0x3F) - vol1);
+ adlibWrite(channel + 0x60, 0xff & (~instr->modAttackDecay));
+ adlibWrite(channel + 0x80, 0xff & (~instr->modSustainRelease));
+ adlibWrite(channel + 0xE0, instr->modWaveformSelect);
+
+ channel = g_operator2Offsets[chan];
+ adlibWrite(channel + 0x20, instr->carCharacteristic);
+ adlibWrite(channel + 0x40, (instr->carScalingOutputLevel | 0x3F) - vol2);
+ adlibWrite(channel + 0x60, 0xff & (~instr->carAttackDecay));
+ adlibWrite(channel + 0x80, 0xff & (~instr->carSustainRelease));
+ adlibWrite(channel + 0xE0, instr->carWaveformSelect);
+
+ adlibWrite((byte)chan + 0xC0, instr->feedback
+#ifdef ENABLE_OPL3
+ | (_opl3Mode ? 0x30 : 0)
+#endif
+ );
}
-void MidiDriver_ADLIB::adlib_note_on_ex(int chan, byte note, int mod) {
- int code;
+#ifdef ENABLE_OPL3
+void MidiDriver_ADLIB::adlibSetupChannelSecondary(int chan, const AdLibInstrument *instr, byte vol1, byte vol2, byte pan) {
assert(chan >= 0 && chan < 9);
- code = (note << 7) + mod;
- curnote_table[chan] = code;
- channel_table_2[chan] = 0;
- adlib_playnote(chan, code);
+ assert(_opl3Mode);
+
+ byte channel = g_operator1Offsets[chan];
+ adlibWriteSecondary(channel + 0x20, instr->modCharacteristic);
+ adlibWriteSecondary(channel + 0x40, (instr->modScalingOutputLevel | 0x3F) - vol1);
+ adlibWriteSecondary(channel + 0x60, 0xff & (~instr->modAttackDecay));
+ adlibWriteSecondary(channel + 0x80, 0xff & (~instr->modSustainRelease));
+ adlibWriteSecondary(channel + 0xE0, instr->modWaveformSelect);
+
+ channel = g_operator2Offsets[chan];
+ adlibWriteSecondary(channel + 0x20, instr->carCharacteristic);
+ adlibWriteSecondary(channel + 0x40, (instr->carScalingOutputLevel | 0x3F) - vol2);
+ adlibWriteSecondary(channel + 0x60, 0xff & (~instr->carAttackDecay));
+ adlibWriteSecondary(channel + 0x80, 0xff & (~instr->carSustainRelease));
+ adlibWriteSecondary(channel + 0xE0, instr->carWaveformSelect);
+
+ // The original uses the following (strange) behavior:
+#if 0
+ if (instr->feedback | (pan > 64)) {
+ adlibWriteSecondary((byte)chan + 0xC0, 0x20);
+ } else {
+ adlibWriteSecondary((byte)chan + 0xC0, 0x10);
+ }
+#else
+ adlibWriteSecondary((byte)chan + 0xC0, instr->feedback | ((pan > 64) ? 0x20 : 0x10));
+#endif
}
+#endif
-void MidiDriver_ADLIB::mc_init_stuff(AdLibVoice *voice, Struct10 *s10,
- Struct11 *s11, byte flags, InstrumentExtra *ie) {
+void MidiDriver_ADLIB::mcInitStuff(AdLibVoice *voice, Struct10 *s10,
+ Struct11 *s11, byte flags, const InstrumentExtra *ie) {
AdLibPart *part = voice->_part;
- s11->modify_val = 0;
+ s11->modifyVal = 0;
s11->flag0x40 = flags & 0x40;
s10->loop = flags & 0x20;
s11->flag0x10 = flags & 0x10;
- s11->param = param_table_1[flags & 0xF];
- s10->max_value = maxval_table[flags & 0xF];
+ s11->param = g_paramTable1[flags & 0xF];
+ s10->maxValue = g_maxValTable[flags & 0xF];
s10->unk3 = 31;
if (s11->flag0x40) {
- s10->modwheel = part->_modwheel >> 2;
+ s10->modWheel = part->_modWheel >> 2;
} else {
- s10->modwheel = 31;
+ s10->modWheel = 31;
}
switch (s11->param) {
case 0:
- s10->start_value = voice->_vol_2;
+ s10->startValue = voice->_vol2;
break;
case 13:
- s10->start_value = voice->_vol_1;
+ s10->startValue = voice->_vol1;
break;
case 30:
- s10->start_value = 31;
- s11->s10->modwheel = 0;
+ s10->startValue = 31;
+ s11->s10->modWheel = 0;
break;
case 31:
- s10->start_value = 0;
+ s10->startValue = 0;
s11->s10->unk3 = 0;
break;
default:
- s10->start_value = adlib_get_reg_value_param(voice->_channel, s11->param);
+ s10->startValue = adlibGetRegValueParam(voice->_channel, s11->param);
}
- struct10_init(s10, ie);
+ struct10Init(s10, ie);
}
-void MidiDriver_ADLIB::struct10_init(Struct10 *s10, InstrumentExtra *ie) {
+void MidiDriver_ADLIB::struct10Init(Struct10 *s10, const InstrumentExtra *ie) {
s10->active = 1;
if (!_scummSmallHeader) {
- s10->cur_val = 0;
+ s10->curVal = 0;
} else {
- s10->cur_val = s10->start_value;
- s10->start_value = 0;
+ s10->curVal = s10->startValue;
+ s10->startValue = 0;
}
- s10->modwheel_last = 31;
+ s10->modWheelLast = 31;
s10->count = ie->a;
if (s10->count)
s10->count *= 63;
- s10->table_a[0] = ie->b;
- s10->table_a[1] = ie->d;
- s10->table_a[2] = ie->f;
- s10->table_a[3] = ie->g;
+ s10->tableA[0] = ie->b;
+ s10->tableA[1] = ie->d;
+ s10->tableA[2] = ie->f;
+ s10->tableA[3] = ie->g;
- s10->table_b[0] = ie->c;
- s10->table_b[1] = ie->e;
- s10->table_b[2] = 0;
- s10->table_b[3] = ie->h;
+ s10->tableB[0] = ie->c;
+ s10->tableB[1] = ie->e;
+ s10->tableB[2] = 0;
+ s10->tableB[3] = ie->h;
- struct10_setup(s10);
+ struct10Setup(s10);
}
-int MidiDriver_ADLIB::adlib_get_reg_value_param(int chan, byte param) {
+int MidiDriver_ADLIB::adlibGetRegValueParam(int chan, byte param) {
const AdLibSetParams *as;
byte val;
byte channel;
@@ -1551,10 +2214,10 @@ int MidiDriver_ADLIB::adlib_get_reg_value_param(int chan, byte param) {
assert(chan >= 0 && chan < 9);
if (param <= 12) {
- channel = channel_mappings_2[chan];
+ channel = g_operator2Offsets[chan];
} else if (param <= 25) {
param -= 13;
- channel = channel_mappings[chan];
+ channel = g_operator1Offsets[chan];
} else if (param <= 27) {
param -= 13;
channel = chan;
@@ -1566,24 +2229,52 @@ int MidiDriver_ADLIB::adlib_get_reg_value_param(int chan, byte param) {
return 0;
}
- as = &adlib_setparam_table[param];
- val = adlib_get_reg_value(channel + as->a);
- val &= as->c;
- val >>= as->b;
- if (as->d)
- val = as->d - val;
+ as = &g_setParamTable[param];
+ val = adlibGetRegValue(channel + as->registerBase);
+ val &= as->mask;
+ val >>= as->shift;
+ if (as->inversion)
+ val = as->inversion - val;
return val;
}
-void MidiDriver_ADLIB::adlib_note_on(int chan, byte note, int mod) {
- int code;
+void MidiDriver_ADLIB::adlibNoteOn(int chan, byte note, int mod) {
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ adlibNoteOnEx(chan, note, mod);
+ return;
+ }
+#endif
+
assert(chan >= 0 && chan < 9);
- code = (note << 7) + mod;
- curnote_table[chan] = code;
- adlib_playnote(chan, (int16) channel_table_2[chan] + code);
+ int code = (note << 7) + mod;
+ _curNotTable[chan] = code;
+ adlibPlayNote(chan, (int16)_channelTable2[chan] + code);
}
+void MidiDriver_ADLIB::adlibNoteOnEx(int chan, byte note, int mod) {
+ assert(chan >= 0 && chan < 9);
+
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ const int noteAdjusted = note + (mod >> 8) - 7;
+ const int pitchAdjust = (mod >> 5) & 7;
+
+ adlibWrite(0xA0 + chan, g_noteFrequencies[(noteAdjusted % 12) * 8 + pitchAdjust + 6 * 8]);
+ adlibWriteSecondary(0xA0 + chan, g_noteFrequencies[(noteAdjusted % 12) * 8 + pitchAdjust + 6 * 8]);
+ adlibWrite(0xB0 + chan, (CLIP(noteAdjusted / 12, 0, 7) << 2) | 0x20);
+ adlibWriteSecondary(0xB0 + chan, (CLIP(noteAdjusted / 12, 0, 7) << 2) | 0x20);
+ } else {
+#endif
+ int code = (note << 7) + mod;
+ _curNotTable[chan] = code;
+ _channelTable2[chan] = 0;
+ adlibPlayNote(chan, code);
+#ifdef ENABLE_OPL3
+ }
+#endif
+}
// Plugin interface
diff --git a/audio/softsynth/fmtowns_pc98/towns_midi.cpp b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
index b8203944c0..46b1a6406d 100644
--- a/audio/softsynth/fmtowns_pc98/towns_midi.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
@@ -147,17 +147,10 @@ private:
TownsMidiOutputChannel *_out;
uint8 *_instrument;
- uint8 _prg;
uint8 _chanIndex;
- uint8 _effectLevel;
uint8 _priority;
- uint8 _ctrlVolume;
uint8 _tl;
- uint8 _pan;
- uint8 _panEff;
- uint8 _percS;
int8 _transpose;
- uint8 _fld_1f;
int8 _detune;
int8 _modWheel;
uint8 _sustain;
@@ -659,9 +652,8 @@ const uint16 TownsMidiOutputChannel::_freqLSB[] = {
0x055B, 0x055B, 0x055B, 0x055B, 0x055B, 0x055B, 0x055B, 0x055B
};
-TownsMidiInputChannel::TownsMidiInputChannel(MidiDriver_TOWNS *driver, int chanIndex) : MidiChannel(), _driver(driver), _out(0), _prg(0), _chanIndex(chanIndex),
- _effectLevel(0), _priority(0), _ctrlVolume(0), _tl(0), _pan(0), _panEff(0), _transpose(0), _percS(0), _pitchBendFactor(0), _pitchBend(0), _sustain(0), _freqLSB(0),
- _fld_1f(0), _detune(0), _modWheel(0), _allocated(false) {
+TownsMidiInputChannel::TownsMidiInputChannel(MidiDriver_TOWNS *driver, int chanIndex) : MidiChannel(), _driver(driver), _out(0), _chanIndex(chanIndex),
+ _priority(0), _tl(0), _transpose(0), _pitchBendFactor(0), _pitchBend(0), _sustain(0), _freqLSB(0), _detune(0), _modWheel(0), _allocated(false) {
_instrument = new uint8[30];
memset(_instrument, 0, 30);
}
diff --git a/audio/softsynth/mt32/AReverbModel.cpp b/audio/softsynth/mt32/AReverbModel.cpp
index 4ee6c87943..151f6c2c81 100644
--- a/audio/softsynth/mt32/AReverbModel.cpp
+++ b/audio/softsynth/mt32/AReverbModel.cpp
@@ -18,7 +18,7 @@
#include "mt32emu.h"
#include "AReverbModel.h"
-using namespace MT32Emu;
+namespace MT32Emu {
// Default reverb settings for modes 0-2
@@ -235,3 +235,5 @@ void AReverbModel::process(const float *inLeft, const float *inRight, float *out
outRight++;
}
}
+
+}
diff --git a/audio/softsynth/mt32/DelayReverb.cpp b/audio/softsynth/mt32/DelayReverb.cpp
index 89eebf0d79..23d25a596e 100644
--- a/audio/softsynth/mt32/DelayReverb.cpp
+++ b/audio/softsynth/mt32/DelayReverb.cpp
@@ -20,15 +20,14 @@
#include "mt32emu.h"
#include "DelayReverb.h"
-using namespace MT32Emu;
-
+namespace MT32Emu {
// CONFIRMED: The values below are found via analysis of digital samples. Checked with all time and level combinations.
// Obviously:
// rightDelay = (leftDelay - 2) * 2 + 2
// echoDelay = rightDelay - 1
// Leaving these separate in case it's useful for work on other reverb modes...
-const Bit32u REVERB_TIMINGS[8][3]= {
+static const Bit32u REVERB_TIMINGS[8][3]= {
// {leftDelay, rightDelay, feedbackDelay}
{402, 802, 801},
{626, 1250, 1249},
@@ -40,7 +39,7 @@ const Bit32u REVERB_TIMINGS[8][3]= {
{8002, 16002, 16001}
};
-const float REVERB_FADE[8] = {0.0f, -0.049400051f, -0.08220577f, -0.131861118f, -0.197344907f, -0.262956344f, -0.345162114f, -0.509508615f};
+static const float REVERB_FADE[8] = {0.0f, -0.049400051f, -0.08220577f, -0.131861118f, -0.197344907f, -0.262956344f, -0.345162114f, -0.509508615f};
const float REVERB_FEEDBACK67 = -0.629960524947437f; // = -EXP2F(-2 / 3)
const float REVERB_FEEDBACK = -0.682034520443118f; // = -EXP2F(-53 / 96)
const float LPF_VALUE = 0.594603558f; // = EXP2F(-0.75f)
@@ -148,3 +147,5 @@ bool DelayReverb::isActive() const {
}
return false;
}
+
+}
diff --git a/audio/softsynth/mt32/FreeverbModel.cpp b/audio/softsynth/mt32/FreeverbModel.cpp
index c11fa859d8..d9bd17e62e 100644
--- a/audio/softsynth/mt32/FreeverbModel.cpp
+++ b/audio/softsynth/mt32/FreeverbModel.cpp
@@ -20,7 +20,7 @@
#include "freeverb.h"
-using namespace MT32Emu;
+namespace MT32Emu {
FreeverbModel::FreeverbModel(float useScaleTuning, float useFiltVal, float useWet, Bit8u useRoom, float useDamp) {
freeverb = NULL;
@@ -76,3 +76,5 @@ bool FreeverbModel::isActive() const {
// FIXME: Not bothering to do this properly since we'll be replacing Freeverb soon...
return false;
}
+
+}
diff --git a/audio/softsynth/mt32/LA32Ramp.cpp b/audio/softsynth/mt32/LA32Ramp.cpp
index 9f1f01c3c2..4e4d6b4f30 100644
--- a/audio/softsynth/mt32/LA32Ramp.cpp
+++ b/audio/softsynth/mt32/LA32Ramp.cpp
@@ -79,11 +79,12 @@ LA32Ramp::LA32Ramp() :
void LA32Ramp::startRamp(Bit8u target, Bit8u increment) {
// CONFIRMED: From sample analysis, this appears to be very accurate.
- // FIXME: We could use a table for this in future
if (increment == 0) {
largeIncrement = 0;
} else {
- largeIncrement = (unsigned int)(EXP2F(((increment & 0x7F) + 24) / 8.0f) + 0.125f);
+ // Using integer argument here, no precision loss:
+ // (unsigned int)(EXP2F(((increment & 0x7F) + 24) / 8.0f) + 0.125f)
+ largeIncrement = (unsigned int)(EXP2I(((increment & 0x7F) + 24) << 9) + 0.125f);
}
descending = (increment & 0x80) != 0;
if (descending) {
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index 75912f38a8..88d42dbbd4 100644
--- a/audio/softsynth/mt32/Part.cpp
+++ b/audio/softsynth/mt32/Part.cpp
@@ -544,9 +544,12 @@ void Part::allNotesOff() {
// should treat the hold pedal as usual.
for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
Poly *poly = *polyIt;
- // FIXME: This has special handling of key 0 in NoteOff that Mok has not yet confirmed
- // applies to AllNotesOff.
- poly->noteOff(holdpedal);
+ // FIXME: This has special handling of key 0 in NoteOff that Mok has not yet confirmed applies to AllNotesOff.
+ // if (poly->canSustain() || poly->getKey() == 0) {
+ // FIXME: The real devices are found to be ignoring non-sustaining polys while processing AllNotesOff. Need to be confirmed.
+ if (poly->canSustain()) {
+ poly->noteOff(holdpedal);
+ }
}
}
diff --git a/audio/softsynth/mt32/Partial.cpp b/audio/softsynth/mt32/Partial.cpp
index 03bec560b8..a6d164f218 100644
--- a/audio/softsynth/mt32/Partial.cpp
+++ b/audio/softsynth/mt32/Partial.cpp
@@ -22,7 +22,7 @@
#include "mt32emu.h"
#include "mmath.h"
-using namespace MT32Emu;
+namespace MT32Emu {
#ifdef INACCURATE_SMOOTH_PAN
// Mok wanted an option for smoother panning, and we love Mok.
@@ -133,6 +133,25 @@ void Partial::startPartial(const Part *part, Poly *usePoly, const PatchCache *us
stereoVolume.leftVol = panVal / 7.0f;
stereoVolume.rightVol = 1.0f - stereoVolume.leftVol;
+ // SEMI-CONFIRMED: From sample analysis:
+ // Found that timbres with 3 or 4 partials (i.e. one using two partial pairs) are mixed in two different ways.
+ // Either partial pairs are added or subtracted, it depends on how the partial pairs are allocated.
+ // It seems that partials are grouped into quarters and if the partial pairs are allocated in different quarters the subtraction happens.
+ // Though, this matters little for the majority of timbres, it becomes crucial for timbres which contain several partials that sound very close.
+ // In this case that timbre can sound totally different depending of the way it is mixed up.
+ // Most easily this effect can be displayed with the help of a special timbre consisting of several identical square wave partials (3 or 4).
+ // Say, it is 3-partial timbre. Just play any two notes simultaneously and the polys very probably are mixed differently.
+ // Moreover, the partial allocator retains the last partial assignment it did and all the subsequent notes will sound the same as the last released one.
+ // The situation is better with 4-partial timbres since then a whole quarter is assigned for each poly. However, if a 3-partial timbre broke the normal
+ // whole-quarter assignment or after some partials got aborted, even 4-partial timbres can be found sounding differently.
+ // This behaviour is also confirmed with two more special timbres: one with identical sawtooth partials, and one with PCM wave 02.
+ // For my personal taste, this behaviour rather enriches the sounding and should be emulated.
+ // Also, the current partial allocator model probably needs to be refined.
+ if (debugPartialNum & 8) {
+ stereoVolume.leftVol = -stereoVolume.leftVol;
+ stereoVolume.rightVol = -stereoVolume.rightVol;
+ }
+
if (patchCache->PCMPartial) {
pcmNum = patchCache->pcm;
if (synth->controlROMMap->pcmCount > 128) {
@@ -149,7 +168,7 @@ void Partial::startPartial(const Part *part, Poly *usePoly, const PatchCache *us
}
// CONFIRMED: pulseWidthVal calculation is based on information from Mok
- pulseWidthVal = (poly->getVelocity() - 64) * (patchCache->srcPartial.wg.pulseWidthVeloSensitivity - 7) + synth->tables.pulseWidth100To255[patchCache->srcPartial.wg.pulseWidth];
+ pulseWidthVal = (poly->getVelocity() - 64) * (patchCache->srcPartial.wg.pulseWidthVeloSensitivity - 7) + Tables::getInstance().pulseWidth100To255[patchCache->srcPartial.wg.pulseWidth];
if (pulseWidthVal < 0) {
pulseWidthVal = 0;
} else if (pulseWidthVal > 255) {
@@ -175,6 +194,7 @@ float Partial::getPCMSample(unsigned int position) {
}
unsigned long Partial::generateSamples(float *partialBuf, unsigned long length) {
+ const Tables &tables = Tables::getInstance();
if (!isActive() || alreadyOutputed) {
return 0;
}
@@ -197,6 +217,9 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
deactivate();
break;
}
+
+ Bit16u pitch = tvp->nextPitch();
+
// SEMI-CONFIRMED: From sample analysis:
// (1) Tested with a single partial playing PCM wave 77 with pitchCoarse 36 and no keyfollow, velocity follow, etc.
// This gives results within +/- 2 at the output (before any DAC bitshifting)
@@ -206,10 +229,17 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
// positive amps, so negative still needs to be explored, as well as lower levels.
//
// Also still partially unconfirmed is the behaviour when ramping between levels, as well as the timing.
+
+#if MT32EMU_ACCURATE_WG == 1
float amp = EXP2F((32772 - ampRampVal / 2048) / -2048.0f);
+ float freq = EXP2F(pitch / 4096.0f - 16.0f) * 32000.0f;
+#else
+ static const float ampFactor = EXP2F(32772 / -2048.0f);
+ float amp = EXP2I(ampRampVal >> 10) * ampFactor;
- Bit16u pitch = tvp->nextPitch();
- float freq = synth->tables.pitchToFreq[pitch];
+ static const float freqFactor = EXP2F(-16.0f) * 32000.0f;
+ float freq = EXP2I(pitch) * freqFactor;
+#endif
if (patchCache->PCMPartial) {
// Render PCM waveform
@@ -225,8 +255,14 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
// Linear interpolation
float firstSample = synth->pcmROMData[pcmAddr + intPCMPosition];
- float nextSample = getPCMSample(intPCMPosition + 1);
- sample = firstSample + (nextSample - firstSample) * (pcmPosition - intPCMPosition);
+ // We observe that for partial structures with ring modulation the interpolation is not applied to the slave PCM partial.
+ // It's assumed that the multiplication circuitry intended to perform the interpolation on the slave PCM partial
+ // is borrowed by the ring modulation circuit (or the LA32 chip has a similar lack of resources assigned to each partial pair).
+ if (pair == NULL || mixType == 0 || structurePosition == 0) {
+ sample = firstSample + (getPCMSample(intPCMPosition + 1) - firstSample) * (pcmPosition - intPCMPosition);
+ } else {
+ sample = firstSample;
+ }
float newPCMPosition = pcmPosition + positionDelta;
if (pcmWave->loop) {
@@ -247,8 +283,8 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
// res corresponds to a value set in an LA32 register
Bit8u res = patchCache->srcPartial.tvf.resonance + 1;
- // EXP2F(1.0f - (32 - res) / 4.0f);
- float resAmp = synth->tables.resAmpMax[res];
+ // Using tiny exact table for computation of EXP2F(1.0f - (32 - res) / 4.0f)
+ float resAmp = tables.resAmpMax[res];
// The cutoffModifier may not be supposed to be directly added to the cutoff -
// it may for example need to be multiplied in some way.
@@ -268,7 +304,8 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
cosineLen *= EXP2F((cutoffVal - 128.0f) / -16.0f); // found from sample analysis
#else
- cosineLen *= synth->tables.cutoffToCosineLen[Bit32u((cutoffVal - 128.0f) * 8.0f)];
+ static const float cosineLenFactor = EXP2F(128.0f / -16.0f);
+ cosineLen *= EXP2I(Bit32u((256.0f - cutoffVal) * 256.0f)) * cosineLenFactor;
#endif
}
@@ -281,7 +318,7 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
float pulseLen = 0.5f;
if (pulseWidthVal > 128) {
- pulseLen += synth->tables.pulseLenFactor[pulseWidthVal - 128];
+ pulseLen += tables.pulseLenFactor[pulseWidthVal - 128];
}
pulseLen *= waveLen;
@@ -303,7 +340,7 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
resAmp *= sinf(FLOAT_PI * (cutoffVal - 128.0f) / 32.0f);
#else
- resAmp *= synth->tables.sinf10[Bit32u(64 * (cutoffVal - 128.0f))];
+ resAmp *= tables.sinf10[Bit32u(64 * (cutoffVal - 128.0f))];
#endif
}
@@ -314,7 +351,7 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
sample = -cosf(FLOAT_PI * relWavePos / cosineLen);
#else
- sample = -synth->tables.sinf10[Bit32u(2048.0f * relWavePos / cosineLen) + 1024];
+ sample = -tables.sinf10[Bit32u(2048.0f * relWavePos / cosineLen) + 1024];
#endif
} else
@@ -328,7 +365,7 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
sample = cosf(FLOAT_PI * (relWavePos - (cosineLen + hLen)) / cosineLen);
#else
- sample = synth->tables.sinf10[Bit32u(2048.0f * (relWavePos - (cosineLen + hLen)) / cosineLen) + 1024];
+ sample = tables.sinf10[Bit32u(2048.0f * (relWavePos - (cosineLen + hLen)) / cosineLen) + 1024];
#endif
} else {
@@ -343,7 +380,8 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
sample *= EXP2F(-0.125f * (128.0f - cutoffVal));
#else
- sample *= synth->tables.cutoffToFilterAmp[Bit32u(cutoffVal * 8.0f)];
+ static const float cutoffAttenuationFactor = EXP2F(-0.125f * 128.0f);
+ sample *= EXP2I(Bit32u(512.0f * cutoffVal)) * cutoffAttenuationFactor;
#endif
} else {
@@ -363,11 +401,17 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
resSample *= sinf(FLOAT_PI * relWavePos / cosineLen);
#else
- resSample *= synth->tables.sinf10[Bit32u(2048.0f * relWavePos / cosineLen) & 4095];
+ resSample *= tables.sinf10[Bit32u(2048.0f * relWavePos / cosineLen) & 4095];
#endif
// Resonance sine amp
- float resAmpFade = EXP2F(-synth->tables.resAmpFadeFactor[res >> 2] * (relWavePos / cosineLen)); // seems to be exact
+ float resAmpFadeLog2 = -tables.resAmpFadeFactor[res >> 2] * (relWavePos / cosineLen); // seems to be exact
+#if MT32EMU_ACCURATE_WG == 1
+ float resAmpFade = EXP2F(resAmpFadeLog2);
+#else
+ static const float resAmpFadeFactor = EXP2F(-30.0f);
+ float resAmpFade = (resAmpFadeLog2 < -30.0f) ? 0.0f : EXP2I(Bit32u((30.0f + resAmpFadeLog2) * 4096.0f)) * resAmpFadeFactor;
+#endif
// Now relWavePos set negative to the left from center of any cosine
relWavePos = wavePos;
@@ -388,7 +432,7 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
resAmpFade *= 0.5f * (1.0f - cosf(FLOAT_PI * relWavePos / (0.5f * cosineLen)));
#else
- resAmpFade *= 0.5f * (1.0f + synth->tables.sinf10[Bit32s(2048.0f * relWavePos / (0.5f * cosineLen)) + 3072]);
+ resAmpFade *= 0.5f * (1.0f + tables.sinf10[Bit32s(2048.0f * relWavePos / (0.5f * cosineLen)) + 3072]);
#endif
}
@@ -400,7 +444,7 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
#if MT32EMU_ACCURATE_WG == 1
sample *= cosf(FLOAT_2PI * wavePos / waveLen);
#else
- sample *= synth->tables.sinf10[(Bit32u(4096.0f * wavePos / waveLen) & 4095) + 1024];
+ sample *= tables.sinf10[(Bit32u(4096.0f * wavePos / waveLen) & 4095) + 1024];
#endif
}
@@ -516,10 +560,9 @@ bool Partial::produceOutput(float *leftBuf, float *rightBuf, unsigned long lengt
}
}
if (numGenerated > pairNumGenerated) {
- if (mixType == 1) {
- mixBuffersRingMix(partialBuf + pairNumGenerated, NULL, numGenerated - pairNumGenerated);
- } else {
- mixBuffersRing(partialBuf + pairNumGenerated, NULL, numGenerated - pairNumGenerated);
+ if (mixType == 2) {
+ numGenerated = pairNumGenerated;
+ deactivate();
}
}
}
@@ -555,3 +598,5 @@ void Partial::startDecayAll() {
tvp->startDecay();
tvf->startDecay();
}
+
+}
diff --git a/audio/softsynth/mt32/PartialManager.cpp b/audio/softsynth/mt32/PartialManager.cpp
index 0a6be826d6..f8c2dbcd48 100644
--- a/audio/softsynth/mt32/PartialManager.cpp
+++ b/audio/softsynth/mt32/PartialManager.cpp
@@ -20,7 +20,7 @@
#include "mt32emu.h"
#include "PartialManager.h"
-using namespace MT32Emu;
+namespace MT32Emu {
PartialManager::PartialManager(Synth *useSynth, Part **useParts) {
synth = useSynth;
@@ -248,3 +248,5 @@ const Partial *PartialManager::getPartial(unsigned int partialNum) const {
}
return partialTable[partialNum];
}
+
+}
diff --git a/audio/softsynth/mt32/Poly.cpp b/audio/softsynth/mt32/Poly.cpp
index a2f00db73c..c45391f672 100644
--- a/audio/softsynth/mt32/Poly.cpp
+++ b/audio/softsynth/mt32/Poly.cpp
@@ -58,6 +58,9 @@ bool Poly::noteOff(bool pedalHeld) {
return false;
}
if (pedalHeld) {
+ if (state == POLY_Held) {
+ return false;
+ }
state = POLY_Held;
} else {
startDecay();
diff --git a/audio/softsynth/mt32/Synth.cpp b/audio/softsynth/mt32/Synth.cpp
index 7a1b5c2275..f37d76cd85 100644
--- a/audio/softsynth/mt32/Synth.cpp
+++ b/audio/softsynth/mt32/Synth.cpp
@@ -36,7 +36,7 @@
namespace MT32Emu {
-const ControlROMMap ControlROMMaps[7] = {
+static const ControlROMMap ControlROMMaps[7] = {
// ID IDc IDbytes PCMmap PCMc tmbrA tmbrAO, tmbrAC tmbrB tmbrBO, tmbrBC tmbrR trC rhythm rhyC rsrv panpot prog rhyMax patMax sysMax timMax
{0x4014, 22, "\000 ver1.04 14 July 87 ", 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x73A6, 85, 0x57C7, 0x57E2, 0x57D0, 0x5252, 0x525E, 0x526E, 0x520A},
{0x4014, 22, "\000 ver1.05 06 Aug, 87 ", 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x7414, 85, 0x57C7, 0x57E2, 0x57D0, 0x5252, 0x525E, 0x526E, 0x520A},
@@ -423,7 +423,6 @@ bool Synth::open(SynthProperties &useProp) {
#if MT32EMU_MONITOR_INIT
printDebug("Initialising Constant Tables");
#endif
- tables.init();
#if !MT32EMU_REDUCE_REVERB_MEMORY
for (int i = 0; i < 4; i++) {
reverbModels[i]->open(useProp.sampleRate);
@@ -627,6 +626,11 @@ void Synth::playMsg(Bit32u msg) {
return;
}
playMsgOnPart(part, code, note, velocity);
+
+ // This ensures minimum 1-sample delay between sequential MIDI events
+ // Without this, a sequence of NoteOn and immediately succeeding NoteOff messages is always silent
+ // Technically, it's also impossible to send events through the MIDI interface faster than about each millisecond
+ prerender();
}
void Synth::playMsgOnPart(unsigned char part, unsigned char code, unsigned char note, unsigned char velocity) {
diff --git a/audio/softsynth/mt32/Synth.h b/audio/softsynth/mt32/Synth.h
index ccabce7282..a30df62911 100644
--- a/audio/softsynth/mt32/Synth.h
+++ b/audio/softsynth/mt32/Synth.h
@@ -321,7 +321,6 @@ private:
Bit32u renderedSampleCount;
- Tables tables;
MemParams mt32ram, mt32default;
diff --git a/audio/softsynth/mt32/TVA.cpp b/audio/softsynth/mt32/TVA.cpp
index f3e3f7bbc7..c581259a38 100644
--- a/audio/softsynth/mt32/TVA.cpp
+++ b/audio/softsynth/mt32/TVA.cpp
@@ -154,7 +154,7 @@ void TVA::reset(const Part *newPart, const TimbreParam::PartialParam *newPartial
playing = true;
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
int key = partial->getPoly()->getKey();
int velocity = partial->getPoly()->getVelocity();
@@ -215,7 +215,7 @@ void TVA::recalcSustain() {
return;
}
// We're sustaining. Recalculate all the values
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
int newTarget = calcBasicAmp(tables, partial, system_, partialParam, patchTemp, rhythmTemp, biasAmpSubtraction, veloAmpSubtraction, part->getExpression());
newTarget += partialParam->tva.envLevel[3];
// Since we're in TVA_PHASE_SUSTAIN at this point, we know that target has been reached and an interrupt fired, so we can rely on it being the current amp.
@@ -241,7 +241,7 @@ int TVA::getPhase() const {
}
void TVA::nextPhase() {
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
if (phase >= TVA_PHASE_DEAD || !playing) {
partial->getSynth()->printDebug("TVA::nextPhase(): Shouldn't have got here with phase %d, playing=%s", phase, playing ? "true" : "false");
diff --git a/audio/softsynth/mt32/TVF.cpp b/audio/softsynth/mt32/TVF.cpp
index 80b592ea67..47c4917632 100644
--- a/audio/softsynth/mt32/TVF.cpp
+++ b/audio/softsynth/mt32/TVF.cpp
@@ -117,7 +117,7 @@ void TVF::reset(const TimbreParam::PartialParam *newPartialParam, unsigned int b
unsigned int key = partial->getPoly()->getKey();
unsigned int velocity = partial->getPoly()->getVelocity();
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
baseCutoff = calcBaseCutoff(newPartialParam, basePitch, key);
#if MT32EMU_MONITOR_TVF >= 1
@@ -179,7 +179,7 @@ void TVF::startDecay() {
}
void TVF::nextPhase() {
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
int newPhase = phase + 1;
switch (newPhase) {
diff --git a/audio/softsynth/mt32/TVP.cpp b/audio/softsynth/mt32/TVP.cpp
index 0b339e8d71..32a6067841 100644
--- a/audio/softsynth/mt32/TVP.cpp
+++ b/audio/softsynth/mt32/TVP.cpp
@@ -171,9 +171,14 @@ void TVP::updatePitch() {
if (newPitch < 0) {
newPitch = 0;
}
+
+// Note: Temporary #ifdef until we have proper "quirk" configuration
+// This is about right emulation of MT-32 GEN0 quirk exploited in Colonel's Bequest timbre "Lightning"
+#ifndef MT32EMU_QUIRK_PITCH_ENVELOPE_OVERFLOW_MT32
if (newPitch > 59392) {
newPitch = 59392;
}
+#endif
pitch = (Bit16u)newPitch;
// FIXME: We're doing this here because that's what the CM-32L does - we should probably move this somewhere more appropriate in future.
diff --git a/audio/softsynth/mt32/Tables.cpp b/audio/softsynth/mt32/Tables.cpp
index c9bd40b7a4..b6e63840bc 100644
--- a/audio/softsynth/mt32/Tables.cpp
+++ b/audio/softsynth/mt32/Tables.cpp
@@ -22,18 +22,14 @@
#include "mt32emu.h"
#include "mmath.h"
-using namespace MT32Emu;
+namespace MT32Emu {
-Tables::Tables() {
- initialised = false;
+const Tables &Tables::getInstance() {
+ static const Tables instance;
+ return instance;
}
-void Tables::init() {
- if (initialised) {
- return;
- }
- initialised = true;
-
+Tables::Tables() {
int lf;
for (lf = 0; lf <= 100; lf++) {
// CONFIRMED:KG: This matches a ROM table found by Mok
@@ -83,19 +79,9 @@ void Tables::init() {
pulseLenFactor[i] = (1.241857812f - pt) * pt; // seems to be 2 ^ (5 / 16) = 1.241857812f
}
- for (int i = 0; i < 65536; i++) {
- // Aka (slightly slower): EXP2F(pitchVal / 4096.0f - 16.0f) * 32000.0f
- pitchToFreq[i] = EXP2F(i / 4096.0f - 1.034215715f);
- }
-
- // found from sample analysis
- for (int i = 0; i < 1024; i++) {
- cutoffToCosineLen[i] = EXP2F(i / -128.0f);
- }
-
- // found from sample analysis
- for (int i = 0; i < 1024; i++) {
- cutoffToFilterAmp[i] = EXP2F(-0.125f * (128.0f - i / 8.0f));
+ // The LA32 chip presumably has such a table inside as the internal computaions seem to be performed using fixed point math with 12-bit fractions
+ for (int i = 0; i < 4096; i++) {
+ exp2[i] = EXP2F(i / 4096.0f);
}
// found from sample analysis
@@ -117,3 +103,5 @@ void Tables::init() {
sinf10[i] = sin(FLOAT_PI * i / 2048.0f);
}
}
+
+}
diff --git a/audio/softsynth/mt32/Tables.h b/audio/softsynth/mt32/Tables.h
index a2b5ff5d56..a63eaf6d26 100644
--- a/audio/softsynth/mt32/Tables.h
+++ b/audio/softsynth/mt32/Tables.h
@@ -20,14 +20,21 @@
namespace MT32Emu {
+// Sample rate to use in mixing
+const unsigned int SAMPLE_RATE = 32000;
+
const int MIDDLEC = 60;
class Synth;
class Tables {
- bool initialised;
+private:
+ Tables();
+ Tables(Tables &);
public:
+ static const Tables &getInstance();
+
// Constant LUTs
// CONFIRMED: This is used to convert several parameters to amp-modifying values in the TVA envelope:
@@ -47,16 +54,11 @@ public:
// CONFIRMED:
Bit8u pulseWidth100To255[101];
+ float exp2[4096];
float pulseLenFactor[128];
- float pitchToFreq[65536];
- float cutoffToCosineLen[1024];
- float cutoffToFilterAmp[1024];
float resAmpMax[32];
float resAmpFadeFactor[8];
float sinf10[5120];
-
- Tables();
- void init();
};
}
diff --git a/audio/softsynth/mt32/mmath.h b/audio/softsynth/mt32/mmath.h
index 226d73e27e..25c79d57a9 100644
--- a/audio/softsynth/mt32/mmath.h
+++ b/audio/softsynth/mt32/mmath.h
@@ -52,6 +52,10 @@ static inline float EXP2F(float x) {
#endif
}
+static inline float EXP2I(unsigned int i) {
+ return float(1 << (i >> 12)) * Tables::getInstance().exp2[i & 0x0FFF];
+}
+
static inline float EXP10F(float x) {
return exp(FLOAT_LN_10 * x);
}
diff --git a/audio/softsynth/mt32/mt32emu.h b/audio/softsynth/mt32/mt32emu.h
index 091819b95c..f10bc1faab 100644
--- a/audio/softsynth/mt32/mt32emu.h
+++ b/audio/softsynth/mt32/mt32emu.h
@@ -59,9 +59,16 @@
#define MT32EMU_MONITOR_TVA 0
#define MT32EMU_MONITOR_TVF 0
-
-// 0: Use LUTs to speedup WG
-// 1: Use precise float math
+// The WG algorithm involves dozens of transcendent maths, e.g. exponents and trigonometry.
+// Unfortunately, the majority of systems perform such computations inefficiently,
+// standard math libs and FPUs make no optimisations for single precision floats,
+// and use no LUTs to speedup computing internal taylor series. Though, there're rare exceptions,
+// and there's a hope it will become common soon.
+// So, this is the crucial point of speed optimisations. We have now eliminated all the transcendent maths
+// within the critical path and use LUTs instead.
+// Besides, since the LA32 chip is assumed to use similar LUTs inside, the overall emulation accuracy should be better.
+// 0: Use LUTs to speedup WG. Most common setting. You can expect about 50% performance boost.
+// 1: Use precise float math. Use this setting to achieve more accurate wave generator. If your system performs better with this setting, it is really notable. :)
#define MT32EMU_ACCURATE_WG 0
#define MT32EMU_USE_EXTINT 0
diff --git a/audio/softsynth/opl/dosbox.cpp b/audio/softsynth/opl/dosbox.cpp
index e039845b8f..a1a736f9de 100644
--- a/audio/softsynth/opl/dosbox.cpp
+++ b/audio/softsynth/opl/dosbox.cpp
@@ -247,7 +247,7 @@ byte OPL::read(int port) {
}
void OPL::writeReg(int r, int v) {
- byte tempReg = 0;
+ int tempReg = 0;
switch (_type) {
case Config::kOpl2:
case Config::kDualOpl2:
@@ -257,12 +257,27 @@ void OPL::writeReg(int r, int v) {
// Backup old setup register
tempReg = _reg.normal;
- // We need to set the register we want to write to via port 0x388
- write(0x388, r);
- // Do the real writing to the register
- write(0x389, v);
+ // We directly allow writing to secondary OPL3 registers by using
+ // register values >= 0x100.
+ if (_type == Config::kOpl3 && r >= 0x100) {
+ // We need to set the register we want to write to via port 0x222,
+ // since we want to write to the secondary register set.
+ write(0x222, r);
+ // Do the real writing to the register
+ write(0x223, v);
+ } else {
+ // We need to set the register we want to write to via port 0x388
+ write(0x388, r);
+ // Do the real writing to the register
+ write(0x389, v);
+ }
+
// Restore the old register
- write(0x388, tempReg);
+ if (_type == Config::kOpl3 && tempReg >= 0x100) {
+ write(0x222, tempReg & ~0x100);
+ } else {
+ write(0x388, tempReg);
+ }
break;
};
}
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index fed02ef22e..c5605cae87 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -460,6 +460,10 @@ void OpenGLSdlGraphicsManager::toggleFullScreen(int loop) {
_activeFullscreenMode = -2;
setFullscreenMode(!isFullscreen);
}
+
+ // HACK: We need to force a refresh here, since we change the
+ // fullscreen mode.
+ _transactionDetails.needRefresh = true;
endGFXTransaction();
// Ignore resize events for the next 10 frames
diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp
index 4efad9ceae..d48b80c40b 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -90,9 +90,9 @@ int MidiDriver_SEQ::open() {
if ((device_name == NULL) || (device < 0)) {
if (device_name == NULL)
- warning("Opening /dev/null (no music will be heard) ");
+ warning("Opening /dev/null (no music will be heard)");
else
- warning("Cannot open rawmidi device %s - using /dev/null (no music will be heard) ",
+ warning("Cannot open rawmidi device %s - using /dev/null (no music will be heard)",
device_name);
device = (::open(("/dev/null"), O_RDWR, 0));
if (device < 0)
@@ -145,7 +145,7 @@ void MidiDriver_SEQ::send(uint32 b) {
buf[position++] = 0;
break;
default:
- warning("MidiDriver_SEQ::send: unknown : %08x", (int)b);
+ warning("MidiDriver_SEQ::send: unknown: %08x", (int)b);
break;
}
if (write(device, buf, position) == -1)
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index 249f72d8fc..bc6b3cb1a5 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -104,9 +104,7 @@ protected:
bool _cursorPaletteDisabled;
bool _dirtyPalette;
- // FIXME: This must be left as "int" for now, to fix the sign-comparison problem
- // there is a little more work involved than an int->uint change
- int _cursorWidth, _cursorHeight;
+ uint _cursorWidth, _cursorHeight;
int _cursorKeycolor;
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 7d6f8f0b5c..1e2aca9e51 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -100,8 +100,8 @@ OSystem_N64::OSystem_N64() {
_cursor_pal = NULL;
_cursor_hic = NULL;
- _cursorWidth = -1;
- _cursorHeight = -1;
+ _cursorWidth = 0;
+ _cursorHeight = 0;
_cursorKeycolor = -1;
_mouseHotspotX = _mouseHotspotY = -1;
@@ -575,19 +575,20 @@ void OSystem_N64::updateScreen() {
horiz_pix_skip = skip_pixels;
}
- int mX = _mouseX - _mouseHotspotX;
- int mY = _mouseY - _mouseHotspotY;
+ for (uint h = 0; h < _cursorHeight; h++) {
+ for (uint w = 0; w < _cursorWidth; w++) {
+ int posX = (_mouseX - _mouseHotspotX) + w;
+ int posY = (_mouseY - _mouseHotspotY) + h;
- for (int h = 0; h < _cursorHeight; h++)
- for (int w = 0; w < _cursorWidth; w++) {
// Draw pixel
- if (((mY + h) >= 0) && ((mY + h) < _mouseMaxY) && ((mX + w) >= 0) && ((mX + w) < _mouseMaxX)) {
+ if ((posY >= 0) && (posY < _mouseMaxY) && (posX >= 0) && (posX < _mouseMaxX)) {
uint16 cursor_pixel_hic = _cursor_hic[(h * _cursorWidth) + w];
if (!(cursor_pixel_hic & 0x00001))
- mouse_framebuffer[((mY + h) * _frameBufferWidth) + ((mX + w) + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic;
+ mouse_framebuffer[(posY * _frameBufferWidth) + (posX + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic;
}
}
+ }
}
#ifndef _ENABLE_DEBUG_
@@ -724,7 +725,7 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in
uint16 *dst = _overlayBuffer + (y * _overlayWidth + x);
- if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) {
+ if (_overlayWidth == (uint16)w && (uint16)pitch == _overlayWidth * sizeof(uint16)) {
memcpy(dst, src, h * pitch);
} else {
do {
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index f93166ef67..e818305c29 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -102,8 +102,7 @@ int vblankEndHandler(int cause) {
void createAnimThread(Gs2dScreen *screen);
-Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
-
+Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode mode) {
_systemQuit = false;
ee_sema_t newSema;
newSema.init_count = 1;
@@ -118,7 +117,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_vblankStartId = AddIntcHandler(INT_VBLANK_START, vblankStartHandler, 0);
_vblankEndId = AddIntcHandler(INT_VBLANK_END, vblankEndHandler, 0);
- _dmacId = AddDmacHandler(2, dmacHandler, 0);
+ _dmacId = AddDmacHandler(2, dmacHandler, 0);
_dmaPipe = new DmaPipe(0x2000);
@@ -139,7 +138,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_clut[1] = GS_RGBA(0xC0, 0xC0, 0xC0, 0);
clearOverlay();
- if (tvMode == TV_DONT_CARE) {
+ if (mode == TV_DONT_CARE) {
#if 1
char romver[8];
int fd = fioOpen("rom0:ROMVER", O_RDONLY);
@@ -157,12 +156,12 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_tvMode = TV_NTSC;
#endif
} else
- _tvMode = tvMode;
+ _tvMode = mode;
// _tvMode = TV_NTSC;
printf("Setting up %s mode\n", (_tvMode == TV_PAL) ? "PAL" : "NTSC");
- // set screen size, 640x512 for pal, 640x448 for ntsc
+ // set screen size, 640x512 for pal, 640x448 for ntsc
_tvWidth = 640;
_tvHeight = ((_tvMode == TV_PAL) ? 512 /*544*/ : 448);
kFullScreen[0].z = kFullScreen[1].z = 0;
@@ -186,8 +185,8 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_clutPtrs[MOUSE] = _clutPtrs[SCREEN] + 0x1000; // the cluts in PSMCT32 take up half a memory page each
_clutPtrs[TEXT] = _clutPtrs[SCREEN] + 0x2000;
_texPtrs[SCREEN] = _clutPtrs[SCREEN] + 0x3000;
- _texPtrs[TEXT] = 0; // these buffers are stored in the alpha gaps of the frame buffers
- _texPtrs[MOUSE] = 128 * 256 * 4;
+ _texPtrs[TEXT] = 0; // these buffers are stored in the alpha gaps of the frame buffers
+ _texPtrs[MOUSE] = 128 * 256 * 4;
_texPtrs[PRINTF] = _texPtrs[MOUSE] + M_SIZE * M_SIZE * 4;
_showOverlay = false;
@@ -201,14 +200,14 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_overlayFormat.bytesPerPixel = 2;
_overlayFormat.rLoss = 3;
- _overlayFormat.gLoss = 3;
- _overlayFormat.bLoss = 3;
- _overlayFormat.aLoss = 7;
+ _overlayFormat.gLoss = 3;
+ _overlayFormat.bLoss = 3;
+ _overlayFormat.aLoss = 7;
- _overlayFormat.rShift = 0;
- _overlayFormat.gShift = 5;
- _overlayFormat.bShift = 10;
- _overlayFormat.aShift = 15;
+ _overlayFormat.rShift = 0;
+ _overlayFormat.gShift = 5;
+ _overlayFormat.bShift = 10;
+ _overlayFormat.aShift = 15;
// setup hardware now.
GS_CSR = CSR_RESET; // Reset GS
@@ -249,18 +248,18 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
createAnimTextures();
- // create anim thread
- ee_thread_t animThread, thisThread;
+ // create animation thread
+ ee_thread_t animationThread, thisThread;
ReferThreadStatus(GetThreadId(), &thisThread);
_animStack = malloc(ANIM_STACK_SIZE);
- animThread.initial_priority = thisThread.current_priority - 3;
- animThread.stack = _animStack;
- animThread.stack_size = ANIM_STACK_SIZE;
- animThread.func = (void *)runAnimThread;
- animThread.gp_reg = &_gp;
+ animationThread.initial_priority = thisThread.current_priority - 3;
+ animationThread.stack = _animStack;
+ animationThread.stack_size = ANIM_STACK_SIZE;
+ animationThread.func = (void *)runAnimThread;
+ animationThread.gp_reg = &_gp;
- _animTid = CreateThread(&animThread);
+ _animTid = CreateThread(&animationThread);
assert(_animTid >= 0);
StartThread(_animTid, this);
}
@@ -268,13 +267,13 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
void Gs2dScreen::quit(void) {
_systemQuit = true;
ee_thread_t statAnim;
- do { // wait until thread called ExitThread()
+ do { // wait until thread called ExitThread()
SignalSema(g_AnimSema);
ReferThreadStatus(_animTid, &statAnim);
} while (statAnim.status != 0x10);
DeleteThread(_animTid);
free(_animStack);
- _dmaPipe->waitForDma(); // wait for dmac and vblank for the last time
+ _dmaPipe->waitForDma(); // wait for dmac and vblank for the last time
while (g_DmacCmd || g_VblankCmd);
sioprintf("kill handlers\n");
@@ -606,7 +605,7 @@ void Gs2dScreen::grabOverlay(byte *buf, uint16 pitch) {
for (uint32 cnt = 0; cnt < _height; cnt++) {
memcpy(buf, src, _width * 2);
buf += pitch;
- src += _width;
+ src += _width;
}
}
diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h
index 005dabc809..1a70dad170 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -29,7 +29,6 @@
#include "backends/platform/ps2/DmaPipe.h"
#include "graphics/surface.h"
-
enum TVMode {
TV_DONT_CARE = 0,
TV_PAL,
@@ -41,10 +40,9 @@ enum GsInterlace {
GS_INTERLACED
};
-
class Gs2dScreen {
public:
- Gs2dScreen(uint16 width, uint16 height, TVMode tvMode);
+ Gs2dScreen(uint16 width, uint16 height, TVMode mode);
~Gs2dScreen(void);
void newScreenSize(uint16 width, uint16 height);
uint8 tvMode(void);
@@ -94,27 +92,26 @@ private:
uint8 _curDrawBuf;
uint32 _frameBufPtr[2]; //
- uint32 _clutPtrs[3]; // vram pointers
+ uint32 _clutPtrs[3]; // vram pointers
uint32 _texPtrs[4]; //
Graphics::Surface _framebuffer;
- /* TODO : check if we do need this */
- struct VideoState {
- bool setup;
+ // TODO : check if we do need this
+ struct VideoState {
+ bool setup;
- bool fullscreen;
- bool aspectRatio;
+ bool fullscreen;
+ bool aspectRatio;
- int mode;
- int scaleFactor;
+ int mode;
+ int scaleFactor;
- int screenWidth, screenHeight;
- int overlayWidth, overlayHeight;
- };
+ int screenWidth, screenHeight;
+ int overlayWidth, overlayHeight;
+ };
VideoState _videoMode;
- /* */
uint16 _width, _height, _pitch;
int16 _mouseX, _mouseY, _hotSpotX, _hotSpotY;
diff --git a/backends/platform/ps2/ps2pad.cpp b/backends/platform/ps2/ps2pad.cpp
index b6afc217e6..607b614691 100644
--- a/backends/platform/ps2/ps2pad.cpp
+++ b/backends/platform/ps2/ps2pad.cpp
@@ -51,6 +51,9 @@ void Ps2Pad::initPad(void) {
} else {
if (checkPadReady(_port, _slot)) {
switch (_padStatus) {
+ case STAT_NONE:
+ printf("Pad Status is None. Shouldn't happen\n");
+ break;
case STAT_OPEN:
_padStatus = STAT_DETECT;
break;
diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
index 97c7edba3e..0d2a2ab7f2 100644
--- a/backends/platform/sdl/macosx/appmenu_osx.mm
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -35,9 +35,8 @@
- (void)setAppleMenu:(NSMenu *)menu;
@end
-NSString *constructNSStringFromCString(const char* rawCString, NSStringEncoding stringEncoding) {
- NSData *nsData = [NSData dataWithBytes:rawCString length:strlen(rawCString)];
- return [[NSString alloc] initWithData:nsData encoding:stringEncoding];
+NSString *constructNSStringFromCString(const char *rawCString, CFStringEncoding stringEncoding) {
+ return (NSString *)CFStringCreateWithCString(NULL, rawCString, stringEncoding);
}
void replaceApplicationMenuItems() {
@@ -59,11 +58,11 @@ void replaceApplicationMenuItems() {
// Get current encoding
#ifdef USE_TRANSLATION
- nsString = constructNSStringFromCString((TransMan.getCurrentCharset()).c_str(), NSASCIIStringEncoding);
- NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)nsString));
+ nsString = constructNSStringFromCString(TransMan.getCurrentCharset().c_str(), NSASCIIStringEncoding);
+ CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)nsString);
[nsString release];
#else
- NSStringEncoding stringEncoding = NSASCIIStringEncoding;
+ CFStringEncoding stringEncoding = kCFStringEncodingASCII;
#endif
// Add "About ScummVM" menu item
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index fb76c111f2..85342d62fd 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -39,7 +39,6 @@
#include "ApplicationServices/ApplicationServices.h" // for LSOpenFSRef
#include "CoreFoundation/CoreFoundation.h" // for CF* stuff
-#include "CoreServices/CoreServices.h" // for FSPathMakeRef
OSystem_MacOSX::OSystem_MacOSX()
:
@@ -107,13 +106,9 @@ bool OSystem_MacOSX::displayLogFile() {
if (_logFilePath.empty())
return false;
- FSRef ref;
- OSStatus err;
-
- err = FSPathMakeRef((const UInt8 *)_logFilePath.c_str(), &ref, NULL);
- if (err == noErr) {
- err = LSOpenFSRef(&ref, NULL);
- }
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)_logFilePath.c_str(), _logFilePath.size(), false);
+ OSStatus err = LSOpenCFURLRef(url, NULL);
+ CFRelease(url);
return err != noErr;
}
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index fc0802dd4c..a9bcdbb8d1 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -609,7 +609,7 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,
return;
uint16 *dst = _overlayPixels + (y * _overlayWidth + x);
- if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) {
+ if (_overlayWidth == (uint16)w && (uint16)pitch == _overlayWidth * sizeof(uint16)) {
memcpy(dst, src, h * pitch);
} else {
do {
diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index 741e89891c..f3b221cabf 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -59,10 +59,14 @@ MacOSXUpdateManager::MacOSXUpdateManager() {
[sparkleUpdater setFeedURL:[NSURL URLWithString:feedbackURL]];
// Get current encoding
- NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding]));
+ CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII);
+ CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
+ CFRelease(encStr);
// Add "Check for Updates..." menu item
- NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:[NSString stringWithCString:_("Check for Updates...") encoding:stringEncoding] action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1];
+ CFStringRef title = CFStringCreateWithCString(NULL, _("Check for Updates..."), stringEncoding);
+ NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:(NSString *)title action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1];
+ CFRelease(title);
// Set the target of the new menu item
[updateMenuItem setTarget:sparkleUpdater];
diff --git a/common/forbidden.h b/common/forbidden.h
index eec80bba59..9050114442 100644
--- a/common/forbidden.h
+++ b/common/forbidden.h
@@ -333,11 +333,21 @@
#define isalpha(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_iscntrl
+ #undef iscntrl
+ #define iscntrl(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_isdigit
#undef isdigit
#define isdigit(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_isgraph
+ #undef isgraph
+ #define isgraph(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_isnumber
#undef isnumber
#define isnumber(a) FORBIDDEN_SYMBOL_REPLACEMENT
@@ -348,6 +358,16 @@
#define islower(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_isprint
+ #undef isprint
+ #define isprint(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_ispunct
+ #undef ispunct
+ #define ispunct(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_isspace
#undef isspace
#define isspace(a) FORBIDDEN_SYMBOL_REPLACEMENT
@@ -358,6 +378,11 @@
#define isupper(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_isxdigit
+ #undef isxdigit
+ #define isxdigit(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#endif // FORBIDDEN_SYMBOL_EXCEPTION_ctype_h
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_mkdir
diff --git a/common/macresman.cpp b/common/macresman.cpp
index f2f020c6de..00562f746a 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -360,8 +360,8 @@ bool MacResManager::load(SeekableReadStream &stream) {
_mapLength = stream.readUint32BE();
// do sanity check
- if (_dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() ||
- _dataLength + _mapLength > (uint32)stream.size()) {
+ if (stream.eos() || _dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() ||
+ _dataLength + _mapLength > (uint32)stream.size()) {
_resForkOffset = -1;
_mode = kResForkNone;
return false;
diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index 173d3c6a97..5b3659b0d5 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -165,6 +165,8 @@ void QuickTimeParser::initParseTable() {
{ &QuickTimeParser::readWAVE, MKTAG('w', 'a', 'v', 'e') },
{ &QuickTimeParser::readESDS, MKTAG('e', 's', 'd', 's') },
{ &QuickTimeParser::readSMI, MKTAG('S', 'M', 'I', ' ') },
+ { &QuickTimeParser::readDefault, MKTAG('g', 'm', 'h', 'd') },
+ { &QuickTimeParser::readLeaf, MKTAG('g', 'm', 'i', 'n') },
{ 0, 0 }
};
@@ -477,6 +479,8 @@ int QuickTimeParser::readHDLR(Atom atom) {
track->codecType = CODEC_TYPE_VIDEO;
else if (type == MKTAG('s', 'o', 'u', 'n'))
track->codecType = CODEC_TYPE_AUDIO;
+ else if (type == MKTAG('m', 'u', 's', 'i'))
+ track->codecType = CODEC_TYPE_MIDI;
_fd->readUint32BE(); // component manufacture
_fd->readUint32BE(); // component flags
@@ -540,7 +544,7 @@ int QuickTimeParser::readSTSD(Atom atom) {
_fd->readUint16BE(); // reserved
_fd->readUint16BE(); // index
- track->sampleDescs[i] = readSampleDesc(track, format);
+ track->sampleDescs[i] = readSampleDesc(track, format, size - 16);
debug(0, "size=%d 4CC= %s codec_type=%d", size, tag2str(format), track->codecType);
diff --git a/common/quicktime.h b/common/quicktime.h
index 641718e13a..caa92578b1 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -120,7 +120,8 @@ protected:
enum CodecType {
CODEC_TYPE_MOV_OTHER,
CODEC_TYPE_VIDEO,
- CODEC_TYPE_AUDIO
+ CODEC_TYPE_AUDIO,
+ CODEC_TYPE_MIDI
};
struct Track {
@@ -161,7 +162,7 @@ protected:
byte objectTypeMP4;
};
- virtual SampleDesc *readSampleDesc(Track *track, uint32 format) = 0;
+ virtual SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize) = 0;
uint32 _timeScale;
uint32 _duration;
diff --git a/common/str.cpp b/common/str.cpp
index 84805082ac..8210ca6bb8 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -764,7 +764,7 @@ String tag2string(uint32 tag) {
str[4] = '\0';
// Replace non-printable chars by dot
for (int i = 0; i < 4; ++i) {
- if (!isprint((unsigned char)str[i]))
+ if (!Common::isPrint(str[i]))
str[i] = '.';
}
return String(str);
diff --git a/common/util.cpp b/common/util.cpp
index 4d9ff11c5c..3d40fffff5 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -26,6 +26,7 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_islower
#define FORBIDDEN_SYMBOL_EXCEPTION_isspace
#define FORBIDDEN_SYMBOL_EXCEPTION_isupper
+#define FORBIDDEN_SYMBOL_EXCEPTION_isprint
#include "common/util.h"
@@ -144,4 +145,8 @@ bool isUpper(int c) {
return isupper((byte)c);
}
+bool isPrint(int c) {
+ ENSURE_ASCII_CHAR(c);
+ return isprint((byte)c);
+}
} // End of namespace Common
diff --git a/common/util.h b/common/util.h
index 78340980d5..4ca1c42929 100644
--- a/common/util.h
+++ b/common/util.h
@@ -165,6 +165,17 @@ bool isSpace(int c);
*/
bool isUpper(int c);
-} // End of namespace Common
+/**
+ * Test whether the given character is printable. This includes the space
+ * character (' ').
+ *
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is printable, false otherwise.
+ */
+bool isPrint(int c);
+} // End of namespace Common
#endif
diff --git a/configure b/configure
index 336c79e332..f2d45c1305 100755
--- a/configure
+++ b/configure
@@ -2540,6 +2540,16 @@ if test -n "$_host"; then
_port_mk="backends/platform/openpandora/op-bundle.mk"
;;
ppc-amigaos)
+ # Only static builds link successfully on buildbot
+ LDFLAGS=`echo $LDFLAGS | sed 's/-use-dynld//'`
+ LDFLAGS="$LDFLAGS -static"
+
+ # toolchain binaries prefixed by host
+ _ranlib=$_host-ranlib
+ _strip=$_host-strip
+ _ar="$_host-ar cru"
+ _as="$_host-as"
+ _windres=$_host-windres
;;
ps2)
DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE"
diff --git a/devtools/credits.pl b/devtools/credits.pl
index e04e35d3be..3c97e6ab0b 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -940,6 +940,9 @@ begin_credits("Credits");
begin_section("Basque");
add_person("Mikel Iturbe Urretxa", "", "");
end_section();
+ begin_section("Belarusian");
+ add_person("Ivan Lukyanov", "", "");
+ end_section();
begin_section("Catalan");
add_person("Jordi Vilalta Prat", "jvprat", "");
end_section();
@@ -949,6 +952,9 @@ begin_credits("Credits");
begin_section("Danish");
add_person("Steffen Nyeland", "", "");
end_section();
+ begin_section("Finnish");
+ add_person("Toni Saarela", "catnose", "");
+ end_section();
begin_section("French");
add_person("Thierry Crozat", "criezy", "");
end_section();
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index dd06736290..b9a64bc572 100644
--- a/engines/agi/console.cpp
+++ b/engines/agi/console.cpp
@@ -35,7 +35,6 @@ Console::Console(AgiEngine *vm) : GUI::Debugger() {
DCmd_Register("debug", WRAP_METHOD(Console, Cmd_Debug));
DCmd_Register("cont", WRAP_METHOD(Console, Cmd_Cont));
DCmd_Register("agiver", WRAP_METHOD(Console, Cmd_Agiver));
- DCmd_Register("crc", WRAP_METHOD(Console, Cmd_Crc));
DCmd_Register("flags", WRAP_METHOD(Console, Cmd_Flags));
DCmd_Register("logic0", WRAP_METHOD(Console, Cmd_Logic0));
DCmd_Register("objs", WRAP_METHOD(Console, Cmd_Objs));
@@ -119,12 +118,6 @@ bool Console::Cmd_RunOpcode(int argc, const char **argv) {
return true;
}
-bool Console::Cmd_Crc(int argc, const char **argv) {
- DebugPrintf("command removed from scummvm\n");
-
- return true;
-}
-
bool Console::Cmd_Agiver(int argc, const char **argv) {
int ver, maj, min;
@@ -278,22 +271,17 @@ bool Console::Cmd_BT(int argc, const char **argv) {
MickeyConsole::MickeyConsole(MickeyEngine *mickey) : GUI::Debugger() {
_mickey = mickey;
- DCmd_Register("curRoom", WRAP_METHOD(MickeyConsole, Cmd_CurRoom));
- DCmd_Register("gotoRoom", WRAP_METHOD(MickeyConsole, Cmd_GotoRoom));
+ DCmd_Register("room", WRAP_METHOD(MickeyConsole, Cmd_Room));
DCmd_Register("drawPic", WRAP_METHOD(MickeyConsole, Cmd_DrawPic));
DCmd_Register("drawObj", WRAP_METHOD(MickeyConsole, Cmd_DrawObj));
}
-bool MickeyConsole::Cmd_CurRoom(int argc, const char **argv) {
+bool MickeyConsole::Cmd_Room(int argc, const char **argv) {
+ if (argc == 2)
+ _mickey->debugGotoRoom(atoi(argv[1]));
+
_mickey->debugCurRoom();
- return true;
-}
-bool MickeyConsole::Cmd_GotoRoom(int argc, const char **argv) {
- if (argc != 2)
- DebugPrintf("Usage: %s <Room number>\n", argv[0]);
- else
- _mickey->debugGotoRoom(atoi(argv[1]));
return true;
}
diff --git a/engines/agi/console.h b/engines/agi/console.h
index 5f69460907..f8025e0562 100644
--- a/engines/agi/console.h
+++ b/engines/agi/console.h
@@ -49,7 +49,6 @@ private:
bool Cmd_SetFlag(int argc, const char **argv);
bool Cmd_SetObj(int argc, const char **argv);
bool Cmd_RunOpcode(int argc, const char **argv);
- bool Cmd_Crc(int argc, const char **argv);
bool Cmd_Agiver(int argc, const char **argv);
bool Cmd_Flags(int argc, const char **argv);
bool Cmd_Vars(int argc, const char **argv);
@@ -75,8 +74,7 @@ public:
private:
MickeyEngine *_mickey;
- bool Cmd_CurRoom(int argc, const char **argv);
- bool Cmd_GotoRoom(int argc, const char **argv);
+ bool Cmd_Room(int argc, const char **argv);
bool Cmd_DrawPic(int argc, const char **argv);
bool Cmd_DrawObj(int argc, const char **argv);
};
diff --git a/engines/agi/opcodes.cpp b/engines/agi/opcodes.cpp
index 7a427bd94f..807ab2dc2c 100644
--- a/engines/agi/opcodes.cpp
+++ b/engines/agi/opcodes.cpp
@@ -376,6 +376,18 @@ void AgiEngine::setupOpcodes() {
logicNamesTest = insV1Test;
logicNamesCmd = insV1;
}
+
+ // Alter opcode parameters for specific games
+ // TODO: This could be either turned into a game feature, or a version
+ // specific check, instead of a game version check
+
+ // The Apple IIGS versions of MH1 and Goldrush both have a parameter for
+ // show.mouse and hide.mouse. Fixes bugs #3577754 and #3426946.
+ if ((getGameID() == GID_MH1 || getGameID() == GID_GOLDRUSH) &&
+ getPlatform() == Common::kPlatformApple2GS) {
+ logicNamesCmd[176].args = "n"; // hide.mouse
+ logicNamesCmd[178].args = "n"; // show.mouse
+ }
}
}
diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp
index 835f3c5683..8411441c60 100644
--- a/engines/composer/detection.cpp
+++ b/engines/composer/detection.cpp
@@ -374,7 +374,7 @@ static const ComposerGameDescription gameDescriptions[] = {
using namespace Composer;
// we match from data too, to stop detection from a non-top-level directory
-const static char *directoryGlobs[] = {
+static const char *directoryGlobs[] = {
"data",
"liam",
"programs",
diff --git a/engines/configure.engines b/engines/configure.engines
index b132c32ad0..3c2fc30dbb 100644
--- a/engines/configure.engines
+++ b/engines/configure.engines
@@ -19,7 +19,7 @@ add_engine groovie2 "Groovie 2 games" no
add_engine hugo "Hugo Trilogy" yes
add_engine kyra "Kyra" yes "lol eob" "Legend of Kyrandia 1-3"
add_engine lol "Lands of Lore" yes
-add_engine eob "Eye of the Beholder" no
+add_engine eob "Eye of the Beholder" yes
add_engine lastexpress "The Last Express" no "" "" "16bit"
add_engine lure "Lure of the Temptress" yes
add_engine made "MADE" yes
diff --git a/engines/cruise/staticres.cpp b/engines/cruise/staticres.cpp
index a3fc4f884b..08ff4d7548 100644
--- a/engines/cruise/staticres.cpp
+++ b/engines/cruise/staticres.cpp
@@ -177,9 +177,9 @@ const int16 spanish_fontCharacterTable[256] = {
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 92,
-1, -1, -1,
- 0x72, 0x80
+ 0x72, 0x80,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0x7f, 0x79, 0x7b, 0x81, 0x82, 0x83,
-1, -1,
0x7d,
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 760d8b7d98..598af5acff 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -305,7 +305,7 @@ public:
Common::String saveDesc;
SaveStateList saveList;
int line = 1;
- for (size_t i = 0; i < slots.size(); i++) {
+ for (uint i = 0; i < slots.size(); i++) {
// ignore lines corresponding to unused saveslots
for (; line < slots[i]; line++)
epa->readLine();
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp
index 1db2663624..5ccc68704a 100644
--- a/engines/dreamweb/backdrop.cpp
+++ b/engines/dreamweb/backdrop.cpp
@@ -25,35 +25,35 @@
namespace DreamWeb {
void DreamWebEngine::doBlocks() {
- uint16 dstOffset = _mapAdY * 320 + _mapAdX;
+ uint16 dstOffset = _mapAdY * kScreenwidth + _mapAdX;
uint16 mapOffset = _mapY * kMapWidth + _mapX;
const uint8 *mapData = _mapData + mapOffset;
uint8 *dstBuffer = workspace() + dstOffset;
- for (size_t i = 0; i < 10; ++i) {
- for (size_t j = 0; j < 11; ++j) {
+ for (uint i = 0; i < 10; ++i) {
+ for (uint j = 0; j < 11; ++j) {
uint16 blockType = mapData[j];
if (blockType != 0) {
- uint8 *dst = dstBuffer + i * 320 * 16 + j * 16;
+ uint8 *dst = dstBuffer + i * kScreenwidth * 16 + j * 16;
const uint8 *block = _backdropBlocks + blockType * 256;
- for (size_t k = 0; k < 4; ++k) {
+ for (uint k = 0; k < 4; ++k) {
memcpy(dst, block, 16);
block += 16;
- dst += 320;
+ dst += kScreenwidth;
}
- for (size_t k = 0; k < 12; ++k) {
+ for (uint k = 0; k < 12; ++k) {
memcpy(dst, block, 16);
memset(dst + 16, 0xdf, 4);
block += 16;
- dst += 320;
+ dst += kScreenwidth;
}
dst += 4;
memset(dst, 0xdf, 16);
- dst += 320;
+ dst += kScreenwidth;
memset(dst, 0xdf, 16);
- dst += 320;
+ dst += kScreenwidth;
memset(dst, 0xdf, 16);
- dst += 320;
+ dst += kScreenwidth;
memset(dst, 0xdf, 16);
}
}
@@ -129,7 +129,7 @@ void DreamWebEngine::showAllObs() {
_setList.clear();
const GraphicsFile &frameBase = _setFrames;
- for (size_t i = 0; i < 128; ++i) {
+ for (uint i = 0; i < 128; ++i) {
SetObject *setEntry = &_setDat[i];
uint16 x, y;
if (getMapAd(setEntry->mapad, &x, &y) == 0)
@@ -154,7 +154,7 @@ void DreamWebEngine::showAllObs() {
}
static bool addAlong(const MapFlag *mapFlags) {
- for (size_t i = 0; i < 11; ++i) {
+ for (uint i = 0; i < 11; ++i) {
if (mapFlags[i]._flag != 0)
return true;
}
@@ -162,7 +162,7 @@ static bool addAlong(const MapFlag *mapFlags) {
}
static bool addLength(const MapFlag *mapFlags) {
- for (size_t i = 0; i < 10; ++i) {
+ for (uint i = 0; i < 10; ++i) {
if (mapFlags[11 * i]._flag != 0)
return true;
}
@@ -205,13 +205,13 @@ void DreamWebEngine::calcMapAd() {
}
void DreamWebEngine::showAllFree() {
- const unsigned int count = 80;
+ const uint count = 80;
_freeList.clear();
const DynObject *freeObjects = _freeDat;
const GraphicsFile &frameBase = _freeFrames;
- for (size_t i = 0; i < count; ++i) {
+ for (uint i = 0; i < count; ++i) {
uint16 x, y;
uint8 mapAd = getMapAd(freeObjects[i].mapad, &x, &y);
if (mapAd != 0) {
@@ -236,8 +236,8 @@ void DreamWebEngine::drawFlags() {
uint16 mapOffset = _mapY * kMapWidth + _mapX;
const uint8 *mapData = _mapData + mapOffset;
- for (size_t i = 0; i < 10; ++i) {
- for (size_t j = 0; j < 11; ++j) {
+ for (uint i = 0; i < 10; ++i) {
+ for (uint j = 0; j < 11; ++j) {
uint8 tile = mapData[i * kMapWidth + j];
mapFlag->_flag = _backdropFlags[tile]._flag;
mapFlag->_flagEx = _backdropFlags[tile]._flagEx;
@@ -248,13 +248,13 @@ void DreamWebEngine::drawFlags() {
}
void DreamWebEngine::showAllEx() {
- const unsigned int count = 100;
+ const uint count = 100;
_exList.clear();
DynObject *objects = _exData;
const GraphicsFile &frameBase = _exFrames;
- for (size_t i = 0; i < count; ++i) {
+ for (uint i = 0; i < count; ++i) {
DynObject *object = objects + i;
if (object->mapad[0] == 0xff)
continue;
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 5f5d627553..c3ede46df2 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -208,7 +208,7 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam
_addToRed = 0;
_addToBlue = 0;
_lastSoundReel = 0;
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
_bufferIn = 0;
_bufferOut = 0;
_blinkFrame = 23;
@@ -263,7 +263,7 @@ void DreamWebEngine::waitForVSync() {
void DreamWebEngine::quit() {
_quitRequested = true;
- _lastHardKey = 1;
+ _lastHardKey = Common::KEYCODE_ESCAPE;
}
void DreamWebEngine::processEvents() {
@@ -274,7 +274,7 @@ void DreamWebEngine::processEvents() {
_sound->soundHandler();
Common::Event event;
- int softKey, hardKey;
+ int softKey;
while (_eventMan->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_RTL:
@@ -309,28 +309,21 @@ void DreamWebEngine::processEvents() {
return; //do not pass ctrl + key to the engine
}
- // Some parts of the ASM code uses the hardware key
- // code directly. We don't have that code, so we fake
- // it for the keys where it's needed and assume it's
- // 0 (which is actually an invalid value, as far as I
- // know) otherwise.
-
- hardKey = 0;
+ // Some parts of the code uses the hardware key
+ // code directly.
switch (event.kbd.keycode) {
case Common::KEYCODE_ESCAPE:
- hardKey = 1;
+ _lastHardKey = Common::KEYCODE_ESCAPE;
break;
case Common::KEYCODE_SPACE:
- hardKey = 57;
+ _lastHardKey = Common::KEYCODE_SPACE;
break;
default:
- hardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
break;
}
- _lastHardKey = hardKey;
-
// The rest of the keys are converted to ASCII. This
// is fairly restrictive, and eventually we may want
// to let through more keys. I think this is mostly to
@@ -338,11 +331,13 @@ void DreamWebEngine::processEvents() {
softKey = 0;
- if (event.kbd.keycode >= Common::KEYCODE_a && event.kbd.keycode <= Common::KEYCODE_z) {
- softKey = event.kbd.ascii & ~0x20;
- } else if (event.kbd.keycode == Common::KEYCODE_MINUS ||
- event.kbd.keycode == Common::KEYCODE_SPACE ||
- (event.kbd.keycode >= Common::KEYCODE_0 && event.kbd.keycode <= Common::KEYCODE_9)) {
+ debug(1, "DreamWebEngine::processEvents() KeyDown keycode:%d ascii:0x%02x", event.kbd.keycode, event.kbd.ascii);
+ if ((event.kbd.ascii >= 'a' && event.kbd.ascii <= 'z') ||
+ (event.kbd.ascii >= 'A' && event.kbd.ascii <= 'Z')) {
+ softKey = event.kbd.ascii & ~0x20; // (& ~0x20) forces ascii codes for a-z to map to A-Z
+ } else if (event.kbd.ascii == '-' ||
+ event.kbd.ascii == ' ' ||
+ (event.kbd.ascii >= '0' && event.kbd.ascii <= '9')) {
softKey = event.kbd.ascii;
} else if (event.kbd.keycode >= Common::KEYCODE_KP0 && event.kbd.keycode <= Common::KEYCODE_KP9) {
softKey = event.kbd.keycode - Common::KEYCODE_KP0 + '0';
@@ -374,6 +369,7 @@ Common::Error DreamWebEngine::run() {
ConfMan.registerDefault("bright_palette", true);
_hasSpeech = Common::File::exists(_speechDirName + "/r01c0000.raw") && !ConfMan.getBool("speech_mute");
_brightPalette = ConfMan.getBool("bright_palette");
+ _copyProtection = ConfMan.getBool("copy_protection");
_timer->installTimerProc(vSyncInterrupt, 1000000 / 70, this, "dreamwebVSync");
dreamweb();
@@ -403,14 +399,14 @@ Common::String DreamWebEngine::getSavegameFilename(int slot) const {
void DreamWebEngine::keyPressed(uint16 ascii) {
debug(2, "key pressed = %04x", ascii);
- uint16 in = (_bufferIn + 1) & 0x0f;
+ uint16 in = (_bufferIn + 1) % ARRAYSIZE(_keyBuffer);
uint16 out = _bufferOut;
if (in == out) {
warning("keyboard buffer is full");
return;
}
_bufferIn = in;
- DreamWeb::g_keyBuffer[in] = ascii;
+ _keyBuffer[in] = ascii;
}
void DreamWebEngine::getPalette(uint8 *data, uint start, uint count) {
@@ -421,7 +417,7 @@ void DreamWebEngine::getPalette(uint8 *data, uint start, uint count) {
void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) {
assert(start + count <= 256);
- uint8 fixed[768];
+ uint8 fixed[3*256];
for (uint i = 0; i < count * 3; ++i) {
fixed[i] = data[i] << 2;
}
@@ -429,10 +425,10 @@ void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) {
}
void DreamWebEngine::blit(const uint8 *src, int pitch, int x, int y, int w, int h) {
- if (y + h > 200)
- h = 200 - y;
- if (x + w > 320)
- w = 320 - x;
+ if (y + h > (int)kScreenheight)
+ h = kScreenheight - y;
+ if (x + w > (int)kScreenwidth)
+ w = kScreenwidth - x;
if (h <= 0 || w <= 0)
return;
_system->copyRectToScreen(src, pitch, x, y, w, h);
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index a4597b1867..eb35a73f66 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -25,6 +25,7 @@
#include "common/error.h"
#include "common/file.h"
+#include "common/keyboard.h"
#include "common/random.h"
#include "common/rect.h"
#include "common/savefile.h"
@@ -63,6 +64,7 @@ const unsigned int kMapHeight = 60;
const unsigned int kLengthOfMap = kMapWidth * kMapHeight;
const unsigned int kNumExObjects = 114;
const unsigned int kScreenwidth = 320;
+const unsigned int kScreenheight = 200;
const unsigned int kDiaryx = (68+24);
const unsigned int kDiaryy = (48+12);
const unsigned int kInventx = 80;
@@ -88,10 +90,6 @@ const unsigned int kNumRoomTexts = 38;
const unsigned int kNumFreeTexts = 82;
const unsigned int kNumPersonTexts = 1026;
-// Keyboard buffer. data.word(kBufferin) and data.word(kBufferout) are indexes
-// into this, making it a ring buffer
-extern uint8 g_keyBuffer[16];
-
// Engine Debug Flags
enum {
kDebugAnimation = (1 << 0),
@@ -156,6 +154,12 @@ public:
const Common::String& getSpeechDirName() { return _speechDirName; }
private:
+ // Keyboard buffer. _bufferIn and _bufferOut are indexes
+ // into this, making it a ring buffer
+ uint8 _keyBuffer[16];
+ uint16 _bufferIn;
+ uint16 _bufferOut;
+
void keyPressed(uint16 ascii);
void setSpeed(uint speed);
@@ -316,6 +320,7 @@ public:
uint16 _charShift;
uint8 _kerning;
bool _brightPalette;
+ bool _copyProtection;
uint8 _roomLoaded;
uint8 _didZoom;
uint16 _lineSpacing;
@@ -419,9 +424,7 @@ public:
uint8 _addToRed;
uint8 _addToBlue;
uint16 _lastSoundReel;
- uint8 _lastHardKey;
- uint16 _bufferIn;
- uint16 _bufferOut;
+ Common::KeyCode _lastHardKey;
uint8 _blinkFrame;
uint8 _blinkCount;
uint8 _reAssesChanges;
@@ -750,7 +753,6 @@ public:
void showRyanPage();
void switchRyanOn();
void switchRyanOff();
- void middlePanel();
void showDiary();
void readMouse();
uint16 readMouseState();
@@ -882,7 +884,6 @@ public:
void obsThatDoThings();
void describeOb();
void putBackObStuff();
- void reExFromOpen();
void showDiaryPage();
void showDiaryKeys();
void dumpDiaryKeys();
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index 3580f8ad52..7bbca2b979 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -103,7 +103,6 @@ void DreamWebEngine::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 d
// Note: isItRight comes from use.asm, but is only used by enterCode(),
// so we place it here.
bool DreamWebEngine::isItRight(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3) {
-
return digit0 == _pressList[0] && digit1 == _pressList[1]
&& digit2 == _pressList[2] && digit3 == _pressList[3];
}
@@ -434,7 +433,7 @@ void DreamWebEngine::folderExit() {
void DreamWebEngine::showLeftPage() {
showFrame(_folderGraphics2, 0, 12, 3, 0);
uint16 y = 12+5;
- for (size_t i = 0; i < 9; ++i) {
+ for (uint i = 0; i < 9; ++i) {
showFrame(_folderGraphics2, 0, y, 4, 0);
y += 16;
}
@@ -445,7 +444,7 @@ void DreamWebEngine::showLeftPage() {
uint8 pageIndex = _folderPage - 2;
const uint8 *string = getTextInFile1(pageIndex * 2);
y = 48;
- for (size_t i = 0; i < 2; ++i) {
+ for (uint i = 0; i < 2; ++i) {
uint8 lastChar;
do {
lastChar = printDirect(&string, 2, &y, 140, false);
@@ -455,19 +454,19 @@ void DreamWebEngine::showLeftPage() {
_kerning = 0;
_charShift = 0;
_lineSpacing = 10;
- uint8 *bufferToSwap = workspace() + (48*320)+2;
- for (size_t i = 0; i < 120; ++i) {
- for (size_t j = 0; j < 65; ++j) {
+ uint8 *bufferToSwap = workspace() + (48*kScreenwidth)+2;
+ for (uint i = 0; i < 120; ++i) {
+ for (uint j = 0; j < 65; ++j) {
SWAP(bufferToSwap[j], bufferToSwap[130 - j]);
}
- bufferToSwap += 320;
+ bufferToSwap += kScreenwidth;
}
}
void DreamWebEngine::showRightPage() {
showFrame(_folderGraphics2, 143, 12, 0, 0);
uint16 y = 12+37;
- for (size_t i = 0; i < 7; ++i) {
+ for (uint i = 0; i < 7; ++i) {
showFrame(_folderGraphics2, 143, y, 1, 0);
y += 16;
}
@@ -478,7 +477,7 @@ void DreamWebEngine::showRightPage() {
uint8 pageIndex = _folderPage - 1;
const uint8 *string = getTextInFile1(pageIndex * 2);
y = 48;
- for (size_t i = 0; i < 2; ++i) {
+ for (uint i = 0; i < 2; ++i) {
uint8 lastChar;
do {
lastChar = printDirect(&string, 152, &y, 140, false);
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 1886a80b6a..b6922cba51 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -149,6 +149,13 @@ bool DreamWebEngine::execCommand() {
return true;
case 1:
monMessage(6);
+ // An extra addition in ScummVM: available commands.
+ // Since the reference to the game manual is a form of copy protection,
+ // this extra text is wrapped around the common copy protection check,
+ // to keep it faithful to the original, if requested.
+ if (!_copyProtection) {
+ monPrint("VALID COMMANDS ARE EXIT, HELP, LIST, READ, LOGON, KEYS");
+ }
break;
case 2:
dirCom();
@@ -366,7 +373,7 @@ void DreamWebEngine::lockLightOff() {
}
void DreamWebEngine::turnOnPower() {
- for (size_t i = 0; i < 3; ++i) {
+ for (uint i = 0; i < 3; ++i) {
powerLightOn();
hangOn(30);
powerLightOff();
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 1e84aba6bd..bee3a6d511 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -31,7 +31,7 @@ void DreamWebEngine::showRyanPage() {
void DreamWebEngine::findAllRyan() {
memset(_ryanInvList, 0xff, sizeof(_ryanInvList));
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
const DynObject *extra = getExAd(i);
if (extra->mapad[0] != kExObjectType)
continue;
@@ -47,8 +47,8 @@ void DreamWebEngine::findAllRyan() {
void DreamWebEngine::fillRyan() {
ObjectRef *inv = &_ryanInvList[_vars._ryanPage * 10];
findAllRyan();
- for (size_t i = 0; i < 2; ++i) {
- for (size_t j = 0; j < 5; ++j) {
+ for (uint i = 0; i < 2; ++i) {
+ for (uint j = 0; j < 5; ++j) {
obToInv(inv->_index, inv->_type, kInventx + j * kItempicsize, kInventy + i * kItempicsize);
++inv;
}
@@ -435,10 +435,23 @@ void DreamWebEngine::deleteExFrame(uint8 frameNum) {
_vars._exFramePos -= frameSize;
// Adjust all frame pointers pointing into the shifted data
- for (unsigned int i = 0; i < 3*kNumexobjects; ++i) {
- frame = &_exFrames._frames[i];
- if (frame->ptr() >= startOff)
- frame->setPtr(frame->ptr() - frameSize);
+ for (unsigned int i = 0; i < kNumexobjects; ++i) {
+ if (_exData[i].mapad[0] != 0xff) {
+ frame = &_exFrames._frames[3*i+0];
+ if (frame->ptr() >= startOff) {
+ frame->setPtr(frame->ptr() - frameSize);
+ assert(frame->ptr() + frame->width*frame->height <= _vars._exFramePos);
+ } else {
+ assert(frame->ptr() + frame->width*frame->height <= startOff);
+ }
+ frame = &_exFrames._frames[3*i+1];
+ if (frame->ptr() >= startOff) {
+ frame->setPtr(frame->ptr() - frameSize);
+ assert(frame->ptr() + frame->width*frame->height <= _vars._exFramePos);
+ } else {
+ assert(frame->ptr() + frame->width*frame->height <= startOff);
+ }
+ }
}
}
@@ -875,7 +888,7 @@ void DreamWebEngine::useOpened() {
void DreamWebEngine::outOfOpen() {
if (_openedOb == 255)
- return; // cannot use opened object
+ return; // cannot use opened object
ObjectRef objectId = findOpenPos();
@@ -892,13 +905,10 @@ void DreamWebEngine::outOfOpen() {
}
if (_mouseButton == _oldButton)
- return; // notletgo4
+ return; // notletgo4
- if (_mouseButton != 1) {
- if (_mouseButton == 2)
- reExFromOpen();
+ if (_mouseButton != 1)
return;
- }
delPointer();
_pickUp = 1;
@@ -1102,4 +1112,136 @@ void DreamWebEngine::pickupConts(uint8 from, uint8 containerEx) {
}
}
+void DreamWebEngine::incRyanPage() {
+ commandOnlyCond(31, 222);
+
+ if (_mouseButton == _oldButton || !(_mouseButton & 1))
+ return;
+
+ _vars._ryanPage = (_mouseX - (kInventx + 167)) / 18;
+
+ delPointer();
+ fillRyan();
+ readMouse();
+ showPointer();
+ workToScreen();
+ delPointer();
+}
+
+void DreamWebEngine::emergencyPurge() {
+ debug(2, "Ex memory: frames %d/%d, text %d/%d", _vars._exFramePos, kExframeslen, _vars._exTextPos, kExtextlen);
+
+ while (_vars._exFramePos + 4000 >= kExframeslen ||
+ _vars._exTextPos + 400 >= kExtextlen)
+ {
+ purgeAnItem();
+ debug(2, "Ex memory after purging: frames %d/%d, text %d/%d", _vars._exFramePos, kExframeslen, _vars._exTextPos, kExtextlen);
+ }
+}
+
+void DreamWebEngine::purgeAnItem() {
+ const DynObject *extraObjects = _exData;
+
+
+ for (uint i = 0; i < kNumexobjects; ++i) {
+ if (extraObjects[i].mapad[0] == 0 &&
+ (extraObjects[i].objId[0] == 255 || extraObjects[i].objId[0] == 2) &&
+ extraObjects[i].initialLocation != _realLocation) {
+ debug(1, "Purging ex object %d", i);
+ deleteExObject(i);
+ return;
+ }
+ }
+
+ for (uint i = 0; i < kNumexobjects; ++i) {
+ if (extraObjects[i].mapad[0] == 0 && extraObjects[i].objId[0] == 255) {
+ debug(1, "Purging ex object %d", i);
+ deleteExObject(i);
+ return;
+ }
+ }
+
+ error("Out of Ex object memory");
+}
+
+void DreamWebEngine::dropError() {
+ _commandType = 255;
+ delPointer();
+ printMessage(76, 21, 56, 240, 240 & 1);
+ workToScreenM();
+ hangOnP(50);
+ showPanel();
+ showMan();
+ examIcon();
+ _commandType = 255;
+ workToScreenM();
+}
+
+void DreamWebEngine::cantDrop() {
+ _commandType = 255;
+ delPointer();
+ printMessage(76, 21, 24, 240, 240 & 1);
+ workToScreenM();
+ hangOnP(50);
+ showPanel();
+ showMan();
+ examIcon();
+ _commandType = 255;
+ workToScreenM();
+}
+
+void DreamWebEngine::examineInventory() {
+ commandOnlyCond(32, 249);
+
+ if (!(_mouseButton & 1))
+ return;
+
+ createPanel();
+ showPanel();
+ showMan();
+ showExit();
+ examIcon();
+ _pickUp = 0;
+ _invOpen = 2;
+ openInv();
+ workToScreenM();
+}
+
+void DreamWebEngine::openInv() {
+ _invOpen = 1;
+ printMessage(80, 58 - 10, 61, 240, (240 & 1));
+ fillRyan();
+ _commandType = 255;
+}
+
+void DreamWebEngine::pickupOb(uint8 command, uint8 pos) {
+ _lastInvPos = pos;
+ _objectType = kFreeObjectType;
+ _itemFrame = command;
+ _command = command;
+ //uint8 dummy;
+ //getAnyAd(&dummy, &dummy); // was in the original source, seems useless here
+ transferToEx(command);
+}
+
+void DreamWebEngine::initialInv() {
+ if (_realLocation != 24)
+ return;
+
+ pickupOb(11, 5);
+ pickupOb(12, 6);
+ pickupOb(13, 7);
+ pickupOb(14, 8);
+ pickupOb(18, 0);
+ pickupOb(19, 1);
+ pickupOb(20, 9);
+ pickupOb(16, 2);
+ _vars._watchMode = 1;
+ _vars._reelToHold = 0;
+ _vars._endOfHoldReel = 6;
+ _vars._watchSpeed = 1;
+ _vars._speedCount = 1;
+ switchRyanOff();
+}
+
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp
index c39070532c..64cffde4de 100644
--- a/engines/dreamweb/pathfind.cpp
+++ b/engines/dreamweb/pathfind.cpp
@@ -110,7 +110,7 @@ void DreamWebEngine::checkDest(const RoomPaths *roomsPaths) {
const PathSegment *segments = roomsPaths->segments;
const uint8 tmp = _mansPath << 4;
uint8 destination = _destination;
- for (size_t i = 0; i < 24; ++i) {
+ for (uint i = 0; i < 24; ++i) {
if ((segments[i].b0 & 0xf0) == tmp &&
(segments[i].b0 & 0x0f) == _destination) {
_destination = segments[i].b1 & 0x0f;
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index dbb81406cd..53f04d482b 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -194,7 +194,7 @@ void DreamWebEngine::madman(ReelRoutine &routine) {
if (newReelPointer == 66) {
++_vars._combatCount;
- if (_lastHardKey == 1) // ESC pressed, skip the mad man's speech
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) // ESC pressed, skip the mad man's speech
_vars._combatCount = _speechCount = (hasSpeech() ? 65 : 63);
madmanText();
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 64b9849980..bc75b97e71 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -49,7 +49,9 @@ uint8 DreamWebEngine::getNextWord(const GraphicsFile &charSet, const uint8 *stri
return 0;
}
firstChar = modifyChar(firstChar);
- if (firstChar != 255) {
+ // WORKAROUND: Also filter out invalid characters here (refer to the
+ // workaround in printChar() below for more info).
+ if (firstChar >= 32 && firstChar != 255) {
uint8 secondChar = *string;
uint8 width = charSet._frames[firstChar - 32 + _charShift].width;
width = kernChars(firstChar, secondChar, width);
@@ -59,9 +61,13 @@ uint8 DreamWebEngine::getNextWord(const GraphicsFile &charSet, const uint8 *stri
}
void DreamWebEngine::printChar(const GraphicsFile &charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
- if (c == 255)
+ // WORKAROUND: Some texts contain leftover tab characters, which will cause
+ // OOB memory access when showing a character, as all the printable ones are
+ // from 32 onwards. We compensate for that here by ignoring all the invalid
+ // characters (0 - 31).
+ if (c < 32 || c == 255)
return;
-
+
uint8 dummyWidth, dummyHeight;
if (width == NULL)
width = &dummyWidth;
@@ -315,7 +321,7 @@ void DreamWebEngine::rollEndCreditsGameLost() {
waitForVSync();
multiDump(25, 20, 160, 160);
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
return;
}
@@ -325,7 +331,7 @@ void DreamWebEngine::rollEndCreditsGameLost() {
c = *string++;
} while (c != ':' && c != 0);
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
return;
}
diff --git a/engines/dreamweb/rain.cpp b/engines/dreamweb/rain.cpp
index 8e42e0c161..b636b7def7 100644
--- a/engines/dreamweb/rain.cpp
+++ b/engines/dreamweb/rain.cpp
@@ -42,12 +42,12 @@ void DreamWebEngine::showRain() {
uint16 offset = (rain.w3 - rain.b5) & 511;
rain.w3 = offset;
const uint8 *src = frameData + offset;
- uint8 *dst = workspace() + y * 320 + x;
+ uint8 *dst = workspace() + y * kScreenwidth + x;
for (uint16 j = 0; j < size; ++j) {
uint8 v = src[j];
if (v != 0)
*dst = v;
- dst += 320-1; // advance diagonally
+ dst += kScreenwidth-1; // advance diagonally
}
}
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index ea9cdc0249..8a0791d19b 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -156,8 +156,16 @@ void DreamWebEngine::doLoad(int savegameId) {
} else {
if (savegameId == -1) {
- // Open dialog to get savegameId
+ // Wait till both mouse buttons are up. We should wait till the user
+ // releases the mouse button, otherwise the follow-up mouseup event
+ // will trigger a load of the save slot under the mouse cursor. Fixes
+ // bug #3582582.
+ while (_oldMouseState > 0) {
+ readMouse();
+ g_system->delayMillis(10);
+ }
+ // Open dialog to get savegameId
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
savegameId = dialog->runModalWithCurrentTarget();
delete dialog;
@@ -241,6 +249,15 @@ void DreamWebEngine::saveGame() {
}
return;
} else {
+ // Wait till both mouse buttons are up. We should wait till the user
+ // releases the mouse button, otherwise the follow-up mouseup event
+ // will trigger a save into the save slot under the mouse cursor. Fixes
+ // bug #3582582.
+ while (_oldMouseState > 0) {
+ readMouse();
+ g_system->delayMillis(10);
+ }
+
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
int savegameId = dialog->runModalWithCurrentTarget();
Common::String game_description = dialog->getResultString();
@@ -557,6 +574,14 @@ void DreamWebEngine::savePosition(unsigned int slot, const char *descbuf) {
delete outSaveFile;
}
+
+// Utility struct for a savegame sanity check in loadPosition
+struct FrameExtent {
+ uint16 start;
+ uint16 length;
+ bool operator<(const struct FrameExtent& other) const { return start<other.start; }
+};
+
void DreamWebEngine::loadPosition(unsigned int slot) {
_timeCount = 0;
clearChanges();
@@ -636,6 +661,42 @@ void DreamWebEngine::loadPosition(unsigned int slot) {
}
delete inSaveFile;
+
+
+ // Do a sanity check on exFrames data to detect exFrames corruption
+ // caused by a (now fixed) bug in emergencyPurge. See bug #3591088.
+ // Gather the location of frame data of all used ex object frames.
+ Common::List<FrameExtent> flist;
+ for (unsigned int i = 0; i < kNumexobjects; ++i) {
+ if (_exData[i].mapad[0] != 0xff) {
+ FrameExtent fe;
+ Frame *frame = &_exFrames._frames[3*i+0];
+ fe.start = frame->ptr();
+ fe.length = frame->width * frame->height;
+ flist.push_back(fe);
+
+ frame = &_exFrames._frames[3*i+1];
+ fe.start = frame->ptr();
+ fe.length = frame->width * frame->height;
+ flist.push_back(fe);
+ }
+ }
+ // ...and check if the frames overlap.
+ Common::sort(flist.begin(), flist.end(), Common::Less<FrameExtent>());
+ Common::List<FrameExtent>::const_iterator iter;
+ uint16 curEnd = 0;
+ for (iter = flist.begin(); iter != flist.end(); ++iter) {
+ if (iter->start < curEnd)
+ error("exFrames data corruption in savegame");
+ curEnd = iter->start + iter->length;
+ }
+ if (curEnd > _vars._exFramePos) {
+ if (curEnd > kExframeslen)
+ error("exFrames data corruption in savegame");
+ warning("Fixing up exFramePos");
+ _vars._exFramePos = curEnd;
+ }
+ // (end of sanity check)
}
// Count number of save files, and load their descriptions into _saveNames
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 01570c907a..1fa2e7d6a4 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -26,7 +26,7 @@
namespace DreamWeb {
void DreamWebEngine::printSprites() {
- for (size_t priority = 0; priority < 7; ++priority) {
+ for (uint priority = 0; priority < 7; ++priority) {
Common::List<Sprite>::const_iterator i;
for (i = _spriteTable.begin(); i != _spriteTable.end(); ++i) {
const Sprite &sprite = *i;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index f235f7c2fd..d93c2a951c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -26,10 +26,6 @@
namespace DreamWeb {
-// Keyboard buffer. _bufferIn and _bufferOut are indexes
-// into this, making it a ring buffer
-uint8 g_keyBuffer[16];
-
const Room g_roomData[] = {
// location 0
{ "DREAMWEB.R00", // Ryan's apartment
@@ -723,7 +719,6 @@ void DreamWebEngine::dreamweb() {
showGun();
fadeScreenDown();
hangOn(100);
-
}
}
@@ -965,7 +960,6 @@ void DreamWebEngine::useTimedText() {
}
void DreamWebEngine::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) {
-
if (hasSpeech() && voiceIndex != 0) {
_speechLoaded = _sound->loadSpeech('T', voiceIndex, 'T', textIndex);
if (_speechLoaded)
@@ -1056,7 +1050,7 @@ void DreamWebEngine::lockMon() {
// key because calling readkey() drains characters from the input
// buffer, we we want the user to be able to type ahead while the text
// is being printed.
- if (_lastHardKey == 57) {
+ if (_lastHardKey == Common::KEYCODE_SPACE) {
// Clear the keyboard buffer. Otherwise the space that caused
// the pause will be read immediately unpause the game.
do {
@@ -1072,7 +1066,7 @@ void DreamWebEngine::lockMon() {
}
// Forget the last "hard" key, otherwise the space that caused
// the unpausing will immediately re-pause the game.
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
lockLightOff();
}
}
@@ -1148,7 +1142,7 @@ void DreamWebEngine::plotReel(uint16 &reelPointer) {
reel += 8;
}
- for (size_t i = 0; i < 8; ++i) {
+ for (uint i = 0; i < 8; ++i) {
if (reel->frame() != 0xffff)
showReelFrame(reel);
++reel;
@@ -1247,7 +1241,7 @@ const uint8 *DreamWebEngine::findObName(uint8 type, uint8 index) {
void DreamWebEngine::copyName(uint8 type, uint8 index, uint8 *dst) {
const uint8 *src = findObName(type, index);
- size_t i;
+ uint i;
for (i = 0; i < 28; ++i) {
char c = src[i];
if (c == ':')
@@ -1377,7 +1371,7 @@ void DreamWebEngine::doChange(uint8 index, uint8 value, uint8 type) {
}
void DreamWebEngine::deleteTaken() {
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
uint8 location = _exData[i].initialLocation;
if (location == _realLocation) {
uint8 index = _exData[i].index;
@@ -1388,7 +1382,7 @@ void DreamWebEngine::deleteTaken() {
uint8 DreamWebEngine::getExPos() {
DynObject *objects = _exData;
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
if (objects[i].mapad[0] == 0xff)
return i;
}
@@ -1543,7 +1537,7 @@ void DreamWebEngine::printMessage2(uint16 x, uint16 y, uint8 index, uint8 maxWid
bool DreamWebEngine::objectMatches(void *object, const char *id) {
const char *objId = (const char *)object + 12; // whether it is a DynObject or a SetObject
- for (size_t i = 0; i < 4; ++i) {
+ for (uint i = 0; i < 4; ++i) {
if (id[i] != objId[i] + 'A')
return false;
}
@@ -2138,7 +2132,6 @@ void DreamWebEngine::workToScreenM() {
}
void DreamWebEngine::atmospheres() {
-
const Atmosphere *a = &g_atmosphereList[0];
for (; a->_location != 255; ++a) {
@@ -2208,8 +2201,8 @@ void DreamWebEngine::readKey() {
return;
}
- bufOut = (bufOut + 1) & 15; // The buffer has size 16
- _currentKey = g_keyBuffer[bufOut];
+ bufOut = (bufOut + 1) % ARRAYSIZE(_keyBuffer);
+ _currentKey = _keyBuffer[bufOut];
_bufferOut = bufOut;
}
@@ -2220,36 +2213,6 @@ void DreamWebEngine::newGame() {
_getBack = 3;
}
-void DreamWebEngine::pickupOb(uint8 command, uint8 pos) {
- _lastInvPos = pos;
- _objectType = kFreeObjectType;
- _itemFrame = command;
- _command = command;
- //uint8 dummy;
- //getAnyAd(&dummy, &dummy); // was in the original source, seems useless here
- transferToEx(command);
-}
-
-void DreamWebEngine::initialInv() {
- if (_realLocation != 24)
- return;
-
- pickupOb(11, 5);
- pickupOb(12, 6);
- pickupOb(13, 7);
- pickupOb(14, 8);
- pickupOb(18, 0);
- pickupOb(19, 1);
- pickupOb(20, 9);
- pickupOb(16, 2);
- _vars._watchMode = 1;
- _vars._reelToHold = 0;
- _vars._endOfHoldReel = 6;
- _vars._watchSpeed = 1;
- _vars._speedCount = 1;
- switchRyanOff();
-}
-
void DreamWebEngine::walkIntoRoom() {
if (_vars._location == 14 && _mapX == 22) {
_destination = 1;
@@ -2314,13 +2277,6 @@ void DreamWebEngine::makeMainScreen() {
_manIsOffScreen = 0;
}
-void DreamWebEngine::openInv() {
- _invOpen = 1;
- printMessage(80, 58 - 10, 61, 240, (240 & 1));
- fillRyan();
- _commandType = 255;
-}
-
void DreamWebEngine::obsThatDoThings() {
if (!compare(_command, _objectType, "MEMB"))
return; // notlouiscard
@@ -2420,10 +2376,6 @@ void DreamWebEngine::errorMessage3() {
delPointer();
}
-void DreamWebEngine::reExFromOpen() {
-
-}
-
void DreamWebEngine::putBackObStuff() {
createPanel();
showPanel();
@@ -2444,26 +2396,6 @@ bool DreamWebEngine::isSetObOnMap(uint8 index) {
return (getSetAd(index)->mapad[0] == 0);
}
-void DreamWebEngine::examineInventory() {
- commandOnlyCond(32, 249);
-
- if (!(_mouseButton & 1))
- return;
-
- createPanel();
- showPanel();
- showMan();
- showExit();
- examIcon();
- _pickUp = 0;
- _invOpen = 2;
- openInv();
- workToScreenM();
-}
-
-void DreamWebEngine::middlePanel() {
-}
-
void DreamWebEngine::underTextLine() {
if (_foreignRelease)
multiGet(_textUnder, _textAddressX, _textAddressY - 3, kUnderTextSizeX_f, kUnderTextSizeY_f);
@@ -2575,7 +2507,6 @@ void DreamWebEngine::madmanRun() {
_vars._lastWeapon = 8;
}
-
void DreamWebEngine::decide() {
setMode();
loadPalFromIFF();
@@ -2659,39 +2590,12 @@ void DreamWebEngine::showGun() {
getRidOfTempText();
}
-void DreamWebEngine::dropError() {
- _commandType = 255;
- delPointer();
- printMessage(76, 21, 56, 240, 240 & 1);
- workToScreenM();
- hangOnP(50);
- showPanel();
- showMan();
- examIcon();
- _commandType = 255;
- workToScreenM();
-}
-
-void DreamWebEngine::cantDrop() {
- _commandType = 255;
- delPointer();
- printMessage(76, 21, 24, 240, 240 & 1);
- workToScreenM();
- hangOnP(50);
- showPanel();
- showMan();
- examIcon();
- _commandType = 255;
- workToScreenM();
-}
-
void DreamWebEngine::getBack1() {
if (_pickUp != 0) {
blank();
return;
}
-
commandOnlyCond(26, 202);
if (_mouseButton == _oldButton)
@@ -3003,52 +2907,4 @@ void DreamWebEngine::edensFlatReminders() {
_vars._progressPoints++; // got card
}
-void DreamWebEngine::incRyanPage() {
- commandOnlyCond(31, 222);
-
- if (_mouseButton == _oldButton || !(_mouseButton & 1))
- return;
-
- _vars._ryanPage = (_mouseX - (kInventx + 167)) / 18;
-
- delPointer();
- fillRyan();
- readMouse();
- showPointer();
- workToScreen();
- delPointer();
-
-}
-
-void DreamWebEngine::emergencyPurge() {
- while (true) {
- if (_vars._exFramePos + 4000 < kExframeslen) {
- // Not near frame end
- if (_vars._exTextPos + 400 < kExtextlen)
- return; // notneartextend
- }
-
- purgeAnItem();
- }
-}
-
-void DreamWebEngine::purgeAnItem() {
- const DynObject *extraObjects = _exData;
-
- for (size_t i = 0; i < kNumexobjects; ++i) {
- if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 &&
- extraObjects[i].initialLocation != _realLocation) {
- deleteExObject(i);
- return;
- }
- }
-
- for (size_t i = 0; i < kNumexobjects; ++i) {
- if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) {
- deleteExObject(i);
- return;
- }
- }
-}
-
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp
index f005279ba0..4e4faa75a0 100644
--- a/engines/dreamweb/titles.cpp
+++ b/engines/dreamweb/titles.cpp
@@ -105,34 +105,34 @@ void DreamWebEngine::bibleQuote() {
fadeScreenUps();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "biblequotearly"
}
hangOne(560);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "biblequotearly"
}
fadeScreenDowns();
hangOne(200);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "biblequotearly"
}
_sound->cancelCh0();
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
}
void DreamWebEngine::hangOne(uint16 delay) {
do {
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
return; // "hangonearly"
} while (--delay);
}
@@ -150,8 +150,8 @@ void DreamWebEngine::intro() {
fadeScreenUps();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
@@ -160,8 +160,8 @@ void DreamWebEngine::intro() {
loadIntroRoom();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
@@ -170,8 +170,8 @@ void DreamWebEngine::intro() {
loadIntroRoom();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
@@ -181,15 +181,15 @@ void DreamWebEngine::intro() {
loadIntroRoom();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
getRidOfTempText();
clearBeforeLoad();
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
}
void DreamWebEngine::runIntroSeq() {
@@ -198,13 +198,13 @@ void DreamWebEngine::runIntroSeq() {
do {
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
spriteUpdate();
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
delEverything();
@@ -214,20 +214,20 @@ void DreamWebEngine::runIntroSeq() {
useTimedText();
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
dumpMap();
dumpTimedText();
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
} while (_getBack != 1);
- if (_lastHardKey == 1) {
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
getRidOfTempText();
clearBeforeLoad();
}
@@ -266,7 +266,7 @@ void DreamWebEngine::loadIntroRoom() {
_mapOffsetY = 16;
clearSprites();
_vars._throughDoor = 0;
- _currentKey = '0';
+ _currentKey = 0;
_mainMode = 0;
clearWork();
_vars._newObs = 1;
@@ -293,24 +293,24 @@ void DreamWebEngine::realCredits() {
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -318,24 +318,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -343,24 +343,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -368,24 +368,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -393,24 +393,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -418,23 +418,23 @@ void DreamWebEngine::realCredits() {
fadeScreenUps();
hangOne(60);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
_sound->playChannel0(13, 0);
hangOne(350);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
}
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 995eef04cd..476f847c40 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -131,7 +131,7 @@ void DreamWebEngine::useRoutine() {
uint8 dummy;
void *obj = getAnyAd(&dummy, &dummy);
- for (size_t i = 0; i < sizeof(kUseList)/sizeof(UseListEntry); ++i) {
+ for (uint i = 0; i < ARRAYSIZE(kUseList); ++i) {
const UseListEntry &entry = kUseList[i];
if (objectMatches(obj, entry.id)) {
(this->*entry.callback)();
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index c8f05641b5..d1e2480f70 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -56,8 +56,8 @@ void DreamWebEngine::fadeDOS() {
//processEvents will be called from waitForVSync
uint8 *dst = _startPal;
getPalette(dst, 0, 64);
- for (int fade = 0; fade < 64; ++fade) {
- for (int c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors
+ for (uint fade = 0; fade < 64; ++fade) {
+ for (uint c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors
if (dst[c]) {
--dst[c];
}
@@ -88,7 +88,7 @@ void DreamWebEngine::fadeCalculation() {
uint8 *startPal = _startPal;
const uint8 *endPal = _endPal;
- for (size_t i = 0; i < 256 * 3; ++i) {
+ for (uint i = 0; i < 256 * 3; ++i) {
uint8 s = startPal[i];
uint8 e = endPal[i];
if (s == e)
@@ -212,7 +212,7 @@ void DreamWebEngine::fadeScreenDownHalf() {
const uint8 *startPal = _startPal;
uint8 *endPal = _endPal;
- for (int i = 0; i < 256 * 3; ++i) {
+ for (uint i = 0; i < 256 * 3; ++i) {
*endPal >>= 1;
endPal++;
}
@@ -239,7 +239,7 @@ void DreamWebEngine::greyscaleSum() {
byte *src = _mainPal;
byte *dst = _endPal;
- for (int i = 0; i < 256; ++i) {
+ for (uint i = 0; i < 256; ++i) {
const unsigned int r = 20 * *src++;
const unsigned int g = 59 * *src++;
const unsigned int b = 11 * *src++;
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index d2390fb1fd..d8984d312b 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -31,14 +31,16 @@ const uint16 kZoomx = 8;
const uint16 kZoomy = 132;
void DreamWebEngine::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) {
- assert(x < 320);
- assert(y < 200);
+ assert(x < kScreenwidth);
+ assert(y < kScreenheight);
+
const uint8 *src = workspace() + x + y * kScreenwidth;
- if (y + h > 200)
- h = 200 - y;
- if (x + w > 320)
- w = 320 - x;
- //debug(1, "multiGet %u,%u %ux%u -> segment: %04x->%04x", x, y, w, h, (uint16)ds, (uint16)es);
+
+ if (y + h > kScreenheight)
+ h = kScreenheight - y;
+ if (x + w > kScreenwidth)
+ w = kScreenwidth - x;
+
for (unsigned l = 0; l < h; ++l) {
const uint8 *src_p = src + kScreenwidth * l;
uint8 *dst_p = dst + w * l;
@@ -47,14 +49,16 @@ void DreamWebEngine::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h)
}
void DreamWebEngine::multiPut(const uint8 *src, uint16 x, uint16 y, uint8 w, uint8 h) {
- assert(x < 320);
- assert(y < 200);
+ assert(x < kScreenwidth);
+ assert(y < kScreenheight);
+
uint8 *dst = workspace() + x + y * kScreenwidth;
- if (y + h > 200)
- h = 200 - y;
- if (x + w > 320)
- w = 320 - x;
- //debug(1, "multiPut %ux%u -> segment: %04x->%04x", w, h, (uint16)ds, (uint16)es);
+
+ if (y + h > kScreenheight)
+ h = kScreenheight - y;
+ if (x + w > kScreenwidth)
+ w = kScreenwidth - x;
+
for (unsigned l = 0; l < h; ++l) {
const uint8 *src_p = src + w * l;
uint8 *dst_p = dst + kScreenwidth * l;
@@ -64,12 +68,11 @@ void DreamWebEngine::multiPut(const uint8 *src, uint16 x, uint16 y, uint8 w, uin
void DreamWebEngine::multiDump(uint16 x, uint16 y, uint8 width, uint8 height) {
unsigned offset = x + y * kScreenwidth;
- //debug(1, "multiDump %ux%u(segment: %04x) -> %d,%d(address: %d)", w, h, (uint16)ds, x, y, offset);
blit(workspace() + offset, kScreenwidth, x, y, width, height);
}
void DreamWebEngine::workToScreen() {
- blit(workspace(), 320, 0, 0, 320, 200);
+ blit(workspace(), kScreenwidth, 0, 0, kScreenwidth, kScreenheight);
}
void DreamWebEngine::frameOutNm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
@@ -147,7 +150,7 @@ void DreamWebEngine::doShake() {
void DreamWebEngine::setMode() {
waitForVSync();
- initGraphics(320, 200, false);
+ initGraphics(kScreenwidth, kScreenheight, false);
}
void DreamWebEngine::showPCX(const Common::String &suffix) {
@@ -185,7 +188,7 @@ void DreamWebEngine::showPCX(const Common::String &suffix) {
void DreamWebEngine::frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y) {
// NB : These resilience checks were not in the original engine, but did they result in undefined behaviour
// or was something broken during porting to C++?
- assert(pitch == 320);
+ assert(pitch == kScreenwidth);
if (x < 0) {
assert(width >= -x);
@@ -199,15 +202,16 @@ void DreamWebEngine::frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint1
src += (-y) * width;
y = 0;
}
- if (x >= 320)
+
+ if ((uint16)x >= kScreenwidth)
return;
- if (y >= 200)
+ if ((uint16)y >= kScreenheight)
return;
- if (x + width > 320) {
- width = 320 - x;
+ if ((uint16)x + width > kScreenwidth) {
+ width = kScreenwidth - x;
}
- if (y + height > 200) {
- height = 200 - y;
+ if ((uint16)y + height > kScreenheight) {
+ height = kScreenheight - y;
}
uint16 stride = pitch - width;
@@ -246,20 +250,20 @@ void DreamWebEngine::showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, ui
//addToPrintList(x - _mapAdX, y - _mapAdY); // NB: Commented in the original asm
}
if (effectsFlag & 4) { // flippedX
- frameOutFx(workspace(), pSrc, 320, width, height, x, y);
+ frameOutFx(workspace(), pSrc, kScreenwidth, width, height, x, y);
return;
}
if (effectsFlag & 2) { // noMask
- frameOutNm(workspace(), pSrc, 320, width, height, x, y);
+ frameOutNm(workspace(), pSrc, kScreenwidth, width, height, x, y);
return;
}
if (effectsFlag & 32) {
- frameOutBh(workspace(), pSrc, 320, width, height, x, y);
+ frameOutBh(workspace(), pSrc, kScreenwidth, width, height, x, y);
return;
}
}
// "noEffects"
- frameOutV(workspace(), pSrc, 320, width, height, x, y);
+ frameOutV(workspace(), pSrc, kScreenwidth, width, height, x, y);
}
void DreamWebEngine::showFrame(const GraphicsFile &frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) {
@@ -285,7 +289,7 @@ void DreamWebEngine::showFrame(const GraphicsFile &frameData, uint16 x, uint16 y
}
void DreamWebEngine::clearWork() {
- memset(workspace(), 0, 320*200);
+ memset(workspace(), 0, kScreenwidth*kScreenheight);
}
void DreamWebEngine::dumpZoom() {
@@ -326,20 +330,20 @@ void DreamWebEngine::zoom() {
putUnderZoom();
return;
}
- uint16 srcOffset = (_oldPointerY - 9) * 320 + (_oldPointerX - 11);
- uint16 dstOffset = (kZoomy + 4) * 320 + (kZoomx + 5);
+ uint16 srcOffset = (_oldPointerY - 9) * kScreenwidth + (_oldPointerX - 11);
+ uint16 dstOffset = (kZoomy + 4) * kScreenwidth + (kZoomx + 5);
const uint8 *src = workspace() + srcOffset;
uint8 *dst = workspace() + dstOffset;
- for (size_t i = 0; i < 20; ++i) {
- for (size_t j = 0; j < 23; ++j) {
+ for (uint i = 0; i < 20; ++i) {
+ for (uint j = 0; j < 23; ++j) {
uint8 v = src[j];
dst[2*j+0] = v;
dst[2*j+1] = v;
- dst[2*j+320] = v;
- dst[2*j+321] = v;
+ dst[2*j+kScreenwidth] = v;
+ dst[2*j+kScreenwidth+1] = v;
}
- src += 320;
- dst += 320*2;
+ src += kScreenwidth;
+ dst += kScreenwidth*2;
}
crosshair();
_didZoom = 1;
@@ -375,7 +379,7 @@ void DreamWebEngine::loadPalFromIFF() {
const uint8 *src = buf + 0x30;
uint8 *dst = _mainPal;
- for (size_t i = 0; i < 256*3; ++i) {
+ for (uint i = 0; i < 256*3; ++i) {
uint8 c = src[i] / 4;
if (_brightPalette) {
if (c) {
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index 895686b5e0..e06dace0d7 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -137,6 +137,36 @@ static const GroovieGameDescription gameDescriptions[] = {
kGroovieV2, 1
},
+ // The 11th Hour Macintosh English
+ {
+ {
+ "11h", "",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "The 11th Hour Installer", 0, "bcdb4040b27f15b18f39fb9e496d384a", 1002987 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 1
+ },
+
+ // The 11th Hour Macintosh English (Installed)
+ {
+ {
+ "11h", "Installed",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "el01.mov", 0, "70f42dfc25b1488a08011dc45bb5145d", 6039 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 1
+ },
+
// The 11th Hour DOS Demo English
{
{
@@ -159,6 +189,36 @@ static const GroovieGameDescription gameDescriptions[] = {
kGroovieV2, 2
},
+ // The Making of The 11th Hour Macintosh English
+ {
+ {
+ "11h", "Making Of",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "The 11th Hour Installer", 0, "bcdb4040b27f15b18f39fb9e496d384a", 1002987 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 2
+ },
+
+ // The Making of The 11th Hour Macintosh English (Installed)
+ {
+ {
+ "11h", "Making Of (Installed)",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "el01.mov", 0, "70f42dfc25b1488a08011dc45bb5145d", 6039 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 2
+ },
+
// Clandestiny Trailer DOS English
{
{
@@ -170,6 +230,36 @@ static const GroovieGameDescription gameDescriptions[] = {
kGroovieV2, 3
},
+ // Clandestiny Trailer Macintosh English
+ {
+ {
+ "clandestiny", "Trailer",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "The 11th Hour Installer", 0, "bcdb4040b27f15b18f39fb9e496d384a", 1002987 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 3
+ },
+
+ // Clandestiny Trailer Macintosh English (Installed)
+ {
+ {
+ "clandestiny", "Trailer (Installed)",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "el01.mov", 0, "70f42dfc25b1488a08011dc45bb5145d", 6039 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 3
+ },
+
// Clandestiny DOS English
{
{
@@ -207,6 +297,11 @@ static const GroovieGameDescription gameDescriptions[] = {
{AD_TABLE_END_MARKER, kGroovieT7G, 0}
};
+static const char *directoryGlobs[] = {
+ "MIDI",
+ 0
+};
+
class GroovieMetaEngine : public AdvancedMetaEngine {
public:
GroovieMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(GroovieGameDescription), groovieGames) {
@@ -222,6 +317,10 @@ public:
// replaced with an according explanation.
_flags = kADFlagUseExtraAsHint;
_guioptions = GUIO3(GUIO_NOSUBTITLES, GUIO_NOSFX, GUIO_NOASPECT);
+
+ // Need MIDI directory to detect 11H Mac Installed
+ _maxScanDepth = 2;
+ _directoryGlobs = directoryGlobs;
}
const char *getName() const {
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 726e7cbede..16358bfa28 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -30,6 +30,7 @@
#include "groovie/music.h"
#include "groovie/resource.h"
#include "groovie/roq.h"
+#include "groovie/stuffit.h"
#include "groovie/vdx.h"
#include "common/config-manager.h"
@@ -56,6 +57,7 @@ GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) :
SearchMan.addSubDirectoryMatching(gameDataDir, "groovie");
SearchMan.addSubDirectoryMatching(gameDataDir, "media");
SearchMan.addSubDirectoryMatching(gameDataDir, "system");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "MIDI");
_modeSpeed = kGroovieSpeedNormal;
if (ConfMan.hasKey("t7g_speed")) {
@@ -93,6 +95,15 @@ GroovieEngine::~GroovieEngine() {
}
Common::Error GroovieEngine::run() {
+ if (_gameDescription->version == kGroovieV2 && getPlatform() == Common::kPlatformMacintosh) {
+ // Load the Mac installer with the lowest priority (in case the user has installed
+ // the game and has the MIDI folder present; faster to just load them)
+ Common::Archive *archive = createStuffItArchive("The 11th Hour Installer");
+
+ if (archive)
+ SearchMan.add("The 11th Hour Installer", archive);
+ }
+
_script = new Script(this, _gameDescription->version);
// Initialize the graphics
@@ -160,10 +171,10 @@ Common::Error GroovieEngine::run() {
// Create the music player
switch (getPlatform()) {
case Common::kPlatformMacintosh:
- // TODO: The 11th Hour Mac uses QuickTime MIDI files
- // Right now, since the XMIDI are present and it is still detected as
- // the DOS version, we don't have to do anything here.
- _musicPlayer = new MusicPlayerMac(this);
+ if (_gameDescription->version == kGroovieT7G)
+ _musicPlayer = new MusicPlayerMac_t7g(this);
+ else
+ _musicPlayer = new MusicPlayerMac_v2(this);
break;
case Common::kPlatformIOS:
_musicPlayer = new MusicPlayerIOS(this);
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index df2f062757..c66e54b500 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -72,6 +72,13 @@ enum DebugLevels {
// the current limitation is 32 debug levels (1 << 31 is the last one)
};
+/**
+ * This enum reflects the available movie speed settings:
+ * - Normal: both movies and 'teeth' animations are played at a normal speed
+ * - Tweaked: movies are played at a normal speed, 'teeth' animations at
+ increased speed
+ * - iOS: both movies and 'teeth' animations are played at increased speed
+ */
enum GameSpeed {
kGroovieSpeedNormal,
kGroovieSpeediOS,
diff --git a/engines/groovie/module.mk b/engines/groovie/module.mk
index 1e89ff66f5..b47eed912b 100644
--- a/engines/groovie/module.mk
+++ b/engines/groovie/module.mk
@@ -15,6 +15,7 @@ MODULE_OBJS := \
roq.o \
saveload.o \
script.o \
+ stuffit.o \
vdx.o
# This module can be built as a plugin
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index af929d439b..95637fc407 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -678,9 +678,9 @@ void MusicPlayerXMI::setTimbreMT(byte channel, const Timbre &timbre) {
}
-// MusicPlayerMac
+// MusicPlayerMac_t7g
-MusicPlayerMac::MusicPlayerMac(GroovieEngine *vm) : MusicPlayerMidi(vm) {
+MusicPlayerMac_t7g::MusicPlayerMac_t7g(GroovieEngine *vm) : MusicPlayerMidi(vm) {
// Create the parser
_midiParser = MidiParser::createParser_SMF();
@@ -701,7 +701,7 @@ MusicPlayerMac::MusicPlayerMac(GroovieEngine *vm) : MusicPlayerMidi(vm) {
assert(_vm->_macResFork);
}
-bool MusicPlayerMac::load(uint32 fileref, bool loop) {
+bool MusicPlayerMac_t7g::load(uint32 fileref, bool loop) {
debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: Starting the playback of song: %04X", fileref);
// First try for compressed MIDI
@@ -722,7 +722,7 @@ bool MusicPlayerMac::load(uint32 fileref, bool loop) {
return loadParser(file, loop);
}
-Common::SeekableReadStream *MusicPlayerMac::decompressMidi(Common::SeekableReadStream *stream) {
+Common::SeekableReadStream *MusicPlayerMac_t7g::decompressMidi(Common::SeekableReadStream *stream) {
// Initialize an output buffer of the given size
uint32 size = stream->readUint32BE();
byte *output = (byte *)malloc(size);
@@ -768,6 +768,52 @@ Common::SeekableReadStream *MusicPlayerMac::decompressMidi(Common::SeekableReadS
return new Common::MemoryReadStream(output, size, DisposeAfterUse::YES);
}
+// MusicPlayerMac_v2
+
+MusicPlayerMac_v2::MusicPlayerMac_v2(GroovieEngine *vm) : MusicPlayerMidi(vm) {
+ // Create the parser
+ _midiParser = MidiParser::createParser_QT();
+
+ // Create the driver
+ MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
+ _driver = MidiDriver::createMidi(dev);
+ assert(_driver);
+
+ _driver->open(); // TODO: Handle return value != 0 (indicating an error)
+
+ // Set the parser's driver
+ _midiParser->setMidiDriver(this);
+
+ // Set the timer rate
+ _midiParser->setTimerRate(_driver->getBaseTempo());
+}
+
+bool MusicPlayerMac_v2::load(uint32 fileref, bool loop) {
+ debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: Starting the playback of song: %04X", fileref);
+
+ // Find correct filename
+ ResInfo info;
+ _vm->_resMan->getResInfo(fileref, info);
+ uint len = info.filename.size();
+ if (len < 4)
+ return false; // This shouldn't actually occur
+
+ // Remove the extension and add ".mov"
+ info.filename.deleteLastChar();
+ info.filename.deleteLastChar();
+ info.filename.deleteLastChar();
+ info.filename += "mov";
+
+ Common::SeekableReadStream *file = SearchMan.createReadStreamForMember(info.filename);
+
+ if (!file) {
+ warning("Could not find file '%s'", info.filename.c_str());
+ return false;
+ }
+
+ return loadParser(file, loop);
+}
+
MusicPlayerIOS::MusicPlayerIOS(GroovieEngine *vm) : MusicPlayer(vm) {
vm->getTimerManager()->installTimerProc(&onTimer, 50 * 1000, this, "groovieMusic");
}
diff --git a/engines/groovie/music.h b/engines/groovie/music.h
index cc852aa8dc..92e9c8b487 100644
--- a/engines/groovie/music.h
+++ b/engines/groovie/music.h
@@ -150,9 +150,9 @@ private:
void setTimbreMT(byte channel, const Timbre &timbre);
};
-class MusicPlayerMac : public MusicPlayerMidi {
+class MusicPlayerMac_t7g : public MusicPlayerMidi {
public:
- MusicPlayerMac(GroovieEngine *vm);
+ MusicPlayerMac_t7g(GroovieEngine *vm);
protected:
bool load(uint32 fileref, bool loop);
@@ -161,6 +161,14 @@ private:
Common::SeekableReadStream *decompressMidi(Common::SeekableReadStream *stream);
};
+class MusicPlayerMac_v2 : public MusicPlayerMidi {
+public:
+ MusicPlayerMac_v2(GroovieEngine *vm);
+
+protected:
+ bool load(uint32 fileref, bool loop);
+};
+
class MusicPlayerIOS : public MusicPlayer {
public:
MusicPlayerIOS(GroovieEngine *vm);
diff --git a/engines/groovie/stuffit.cpp b/engines/groovie/stuffit.cpp
new file mode 100644
index 0000000000..37f12585e7
--- /dev/null
+++ b/engines/groovie/stuffit.cpp
@@ -0,0 +1,537 @@
+/* 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.
+ *
+ */
+
+// Based on the StuffIt code in ResidualVM
+// StuffIt parsing based on http://code.google.com/p/theunarchiver/wiki/StuffItFormat
+// Compression 14 based on libxad (http://sourceforge.net/projects/libxad/)
+
+#include "groovie/stuffit.h"
+
+#include "common/archive.h"
+#include "common/bitstream.h"
+#include "common/debug.h"
+#include "common/hash-str.h"
+#include "common/hashmap.h"
+#include "common/memstream.h"
+#include "common/substream.h"
+
+namespace Groovie {
+
+struct SIT14Data;
+
+class StuffItArchive : public Common::Archive {
+public:
+ StuffItArchive();
+ ~StuffItArchive();
+
+ bool open(const Common::String &filename);
+ void close();
+ bool isOpen() const { return _stream != 0; }
+
+ // Common::Archive API implementation
+ bool hasFile(const Common::String &name) const;
+ int listMembers(Common::ArchiveMemberList &list) const;
+ const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
+ Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
+
+private:
+ struct FileEntry {
+ byte compression;
+ uint32 uncompressedSize;
+ uint32 compressedSize;
+ uint32 offset;
+ };
+
+ Common::SeekableReadStream *_stream;
+
+ typedef Common::HashMap<Common::String, FileEntry, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> FileMap;
+ FileMap _map;
+
+ // Decompression Functions
+ Common::SeekableReadStream *decompress14(Common::SeekableReadStream *src, uint32 uncompressedSize) const;
+
+ // Decompression Helpers
+ void update14(uint16 first, uint16 last, byte *code, uint16 *freq) const;
+ void readTree14(Common::BitStream *bits, SIT14Data *dat, uint16 codesize, uint16 *result) const;
+};
+
+StuffItArchive::StuffItArchive() : Common::Archive() {
+ _stream = 0;
+}
+
+StuffItArchive::~StuffItArchive() {
+ close();
+}
+
+// Some known values of StuffIt FourCC's
+// 11H Mac in particular uses ST46
+static const uint32 s_magicNumbers[] = {
+ MKTAG('S', 'I', 'T', '!'), MKTAG('S', 'T', '6', '5'), MKTAG('S', 'T', '5', '0'),
+ MKTAG('S', 'T', '6', '0'), MKTAG('S', 'T', 'i', 'n'), MKTAG('S', 'T', 'i', '2'),
+ MKTAG('S', 'T', 'i', '3'), MKTAG('S', 'T', 'i', '4'), MKTAG('S', 'T', '4', '6')
+};
+
+bool StuffItArchive::open(const Common::String &filename) {
+ close();
+
+ _stream = SearchMan.createReadStreamForMember(filename);
+
+ if (!_stream)
+ return false;
+
+ uint32 tag = _stream->readUint32BE();
+
+ // Check all the possible FourCC's
+ bool found = false;
+ for (int i = 0; i < ARRAYSIZE(s_magicNumbers); i++) {
+ if (tag == s_magicNumbers[i]) {
+ found = true;
+ break;
+ }
+ }
+
+ // Didn't find one, let's bail out
+ if (!found) {
+ close();
+ return false;
+ }
+
+ /* uint16 fileCount = */ _stream->readUint16BE();
+ /* uint32 archiveSize = */ _stream->readUint32BE();
+
+ // Some sort of second magic number
+ if (_stream->readUint32BE() != MKTAG('r', 'L', 'a', 'u')) {
+ close();
+ return false;
+ }
+
+ /* byte version = */ _stream->readByte(); // meaning not clear
+
+ _stream->skip(7); // unknown
+
+ while (_stream->pos() < _stream->size() && !_stream->eos()) {
+ byte resForkCompression = _stream->readByte();
+ byte dataForkCompression = _stream->readByte();
+
+ byte fileNameLength = _stream->readByte();
+ Common::String name;
+
+ for (byte i = 0; i < fileNameLength; i++)
+ name += (char)_stream->readByte();
+
+ // Skip remaining bytes
+ _stream->skip(63 - fileNameLength);
+
+ /* uint32 fileType = */ _stream->readUint32BE();
+ /* uint32 fileCreator = */ _stream->readUint32BE();
+ /* uint16 finderFlags = */ _stream->readUint16BE();
+ /* uint32 creationDate = */ _stream->readUint32BE();
+ /* uint32 modificationDate = */ _stream->readUint32BE();
+ uint32 resForkUncompressedSize = _stream->readUint32BE();
+ uint32 dataForkUncompressedSize = _stream->readUint32BE();
+ uint32 resForkCompressedSize = _stream->readUint32BE();
+ uint32 dataForkCompressedSize = _stream->readUint32BE();
+ /* uint16 resForkCRC = */ _stream->readUint16BE();
+ /* uint16 dataForkCRC = */ _stream->readUint16BE();
+ _stream->skip(6); // unknown
+ /* uint16 headerCRC = */ _stream->readUint16BE();
+
+ // Ignore directories for now
+ if (dataForkCompression == 32 || dataForkCompression == 33)
+ continue;
+
+ if (dataForkUncompressedSize != 0) {
+ // We have a data fork
+
+ FileEntry entry;
+ entry.compression = dataForkCompression;
+ entry.uncompressedSize = dataForkUncompressedSize;
+ entry.compressedSize = dataForkCompressedSize;
+ entry.offset = _stream->pos() + resForkCompressedSize;
+ _map[name] = entry;
+
+ debug(0, "StuffIt file '%s', Compression = %d", name.c_str(), entry.compression);
+ }
+
+ if (resForkUncompressedSize != 0) {
+ // We have a resource fork
+
+ // Add a .rsrc extension so we know it's the resource fork
+ name += ".rsrc";
+
+ FileEntry entry;
+ entry.compression = resForkCompression;
+ entry.uncompressedSize = resForkUncompressedSize;
+ entry.compressedSize = resForkCompressedSize;
+ entry.offset = _stream->pos();
+ _map[name] = entry;
+
+ debug(0, "StuffIt file '%s', Compression = %d", name.c_str(), entry.compression);
+ }
+
+ // Go to the next entry
+ _stream->skip(dataForkCompressedSize + resForkCompressedSize);
+ }
+
+ return true;
+}
+
+void StuffItArchive::close() {
+ delete _stream; _stream = 0;
+ _map.clear();
+}
+
+bool StuffItArchive::hasFile(const Common::String &name) const {
+ return _map.contains(name);
+}
+
+int StuffItArchive::listMembers(Common::ArchiveMemberList &list) const {
+ for (FileMap::const_iterator it = _map.begin(); it != _map.end(); it++)
+ list.push_back(getMember(it->_key));
+
+ return _map.size();
+}
+
+const Common::ArchiveMemberPtr StuffItArchive::getMember(const Common::String &name) const {
+ return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this));
+}
+
+Common::SeekableReadStream *StuffItArchive::createReadStreamForMember(const Common::String &name) const {
+ if (!_stream || !_map.contains(name))
+ return 0;
+
+ const FileEntry &entry = _map[name];
+
+ if (entry.compression & 0xF0)
+ error("Unhandled StuffIt encryption");
+
+ Common::SeekableSubReadStream subStream(_stream, entry.offset, entry.offset + entry.compressedSize);
+
+ // We currently only support type 14 compression
+ switch (entry.compression) {
+ case 0: // Uncompressed
+ return subStream.readStream(subStream.size());
+ case 14: // Installer
+ return decompress14(&subStream, entry.uncompressedSize);
+ default:
+ error("Unhandled StuffIt compression %d", entry.compression);
+ }
+
+ return 0;
+}
+
+void StuffItArchive::update14(uint16 first, uint16 last, byte *code, uint16 *freq) const {
+ uint16 i, j;
+
+ while (last - first > 1) {
+ i = first;
+ j = last;
+
+ do {
+ while (++i < last && code[first] > code[i])
+ ;
+
+ while (--j > first && code[first] < code[j])
+ ;
+
+ if (j > i) {
+ SWAP(code[i], code[j]);
+ SWAP(freq[i], freq[j]);
+ }
+ } while (j > i);
+
+ if (first != j) {
+ SWAP(code[first], code[j]);
+ SWAP(freq[first], freq[j]);
+
+ i = j + 1;
+
+ if (last - i <= j - first) {
+ update14(i, last, code, freq);
+ last = j;
+ } else {
+ update14(first, j, code, freq);
+ first = i;
+ }
+ } else {
+ ++first;
+ }
+ }
+}
+
+struct SIT14Data {
+ byte code[308];
+ byte codecopy[308];
+ uint16 freq[308];
+ uint32 buff[308];
+
+ byte var1[52];
+ uint16 var2[52];
+ uint16 var3[75 * 2];
+
+ byte var4[76];
+ uint32 var5[75];
+ byte var6[1024];
+ uint16 var7[308 * 2];
+ byte var8[0x4000];
+
+ byte window[0x40000];
+};
+
+// Realign to a byte boundary
+#define ALIGN_BITS(b) \
+ if (b->pos() & 7) \
+ b->skip(8 - (b->pos() & 7))
+
+void StuffItArchive::readTree14(Common::BitStream *bits, SIT14Data *dat, uint16 codesize, uint16 *result) const {
+ uint32 i, l, n;
+ uint32 k = bits->getBit();
+ uint32 j = bits->getBits(2) + 2;
+ uint32 o = bits->getBits(3) + 1;
+ uint32 size = 1 << j;
+ uint32 m = size - 1;
+ k = k ? (m - 1) : 0xFFFFFFFF;
+
+ if (bits->getBits(2) & 1) { // skip 1 bit!
+ // requirements for this call: dat->buff[32], dat->code[32], dat->freq[32*2]
+ readTree14(bits, dat, size, dat->freq);
+
+ for (i = 0; i < codesize; ) {
+ l = 0;
+
+ do {
+ l = dat->freq[l + bits->getBit()];
+ n = size << 1;
+ } while (n > l);
+
+ l -= n;
+
+ if (k != l) {
+ if (l == m) {
+ l = 0;
+
+ do {
+ l = dat->freq[l + bits->getBit()];
+ n = size << 1;
+ } while (n > l);
+
+ l += 3 - n;
+
+ while (l--) {
+ dat->code[i] = dat->code[i - 1];
+ ++i;
+ }
+ } else {
+ dat->code[i++] = l + o;
+ }
+ } else {
+ dat->code[i++] = 0;
+ }
+ }
+ } else {
+ for (i = 0; i < codesize; ) {
+ l = bits->getBits(j);
+
+ if (k != l) {
+ if (l == m) {
+ l = bits->getBits(j) + 3;
+
+ while (l--) {
+ dat->code[i] = dat->code[i - 1];
+ ++i;
+ }
+ } else {
+ dat->code[i++] = l+o;
+ }
+ } else {
+ dat->code[i++] = 0;
+ }
+ }
+ }
+
+ for (i = 0; i < codesize; ++i) {
+ dat->codecopy[i] = dat->code[i];
+ dat->freq[i] = i;
+ }
+
+ update14(0, codesize, dat->codecopy, dat->freq);
+
+ for (i = 0; i < codesize && !dat->codecopy[i]; ++i)
+ ; // find first nonempty
+
+ for (j = 0; i < codesize; ++i, ++j) {
+ if (i)
+ j <<= (dat->codecopy[i] - dat->codecopy[i - 1]);
+
+ k = dat->codecopy[i]; m = 0;
+
+ for (l = j; k--; l >>= 1)
+ m = (m << 1) | (l & 1);
+
+ dat->buff[dat->freq[i]] = m;
+ }
+
+ for (i = 0; i < (uint32)codesize * 2; ++i)
+ result[i] = 0;
+
+ j = 2;
+
+ for (i = 0; i < codesize; ++i) {
+ l = 0;
+ m = dat->buff[i];
+
+ for (k = 0; k < dat->code[i]; ++k) {
+ l += (m & 1);
+
+ if (dat->code[i] - 1 <= (int32)k) {
+ result[l] = codesize * 2 + i;
+ } else {
+ if (!result[l]) {
+ result[l] = j;
+ j += 2;
+ }
+
+ l = result[l];
+ }
+
+ m >>= 1;
+ }
+ }
+
+ ALIGN_BITS(bits);
+}
+
+#define OUTPUT_VAL(x) \
+ out.writeByte(x); \
+ dat->window[j++] = x; \
+ j &= 0x3FFFF
+
+Common::SeekableReadStream *StuffItArchive::decompress14(Common::SeekableReadStream *src, uint32 uncompressedSize) const {
+ byte *dst = (byte *)malloc(uncompressedSize);
+ Common::MemoryWriteStream out(dst, uncompressedSize);
+
+ Common::BitStream *bits = new Common::BitStream8LSB(src);
+
+ uint32 i, j, k, l, m, n;
+
+ SIT14Data *dat = new SIT14Data();
+
+ // initialization
+ for (i = k = 0; i < 52; ++i) {
+ dat->var2[i] = k;
+ k += (1 << (dat->var1[i] = ((i >= 4) ? ((i - 4) >> 2) : 0)));
+ }
+
+ for (i = 0; i < 4; ++i)
+ dat->var8[i] = i;
+
+ for (m = 1, l = 4; i < 0x4000; m <<= 1) // i is 4
+ for (n = l+4; l < n; ++l)
+ for (j = 0; j < m; ++j)
+ dat->var8[i++] = l;
+
+ for (i = 0, k = 1; i < 75; ++i) {
+ dat->var5[i] = k;
+ k += (1 << (dat->var4[i] = (i >= 3 ? ((i - 3) >> 2) : 0)));
+ }
+
+ for (i = 0; i < 4; ++i)
+ dat->var6[i] = i - 1;
+
+ for (m = 1, l = 3; i < 0x400; m <<= 1) // i is 4
+ for (n = l + 4; l < n; ++l)
+ for (j = 0; j < m; ++j)
+ dat->var6[i++] = l;
+
+ m = bits->getBits(16); // number of blocks
+ j = 0; // window position
+
+ while (m-- && !bits->eos()) {
+ bits->getBits(16); // skip crunched block size
+ bits->getBits(16);
+ n = bits->getBits(16); // number of uncrunched bytes
+ n |= bits->getBits(16) << 16;
+ readTree14(bits, dat, 308, dat->var7);
+ readTree14(bits, dat, 75, dat->var3);
+
+ while (n && !bits->eos()) {
+ for (i = 0; i < 616;)
+ i = dat->var7[i + bits->getBit()];
+
+ i -= 616;
+
+ if (i < 0x100) {
+ OUTPUT_VAL(i);
+ --n;
+ } else {
+ i -= 0x100;
+ k = dat->var2[i]+4;
+ i = dat->var1[i];
+
+ if (i)
+ k += bits->getBits(i);
+
+ for (i = 0; i < 150;)
+ i = dat->var3[i + bits->getBit()];
+
+ i -= 150;
+ l = dat->var5[i];
+ i = dat->var4[i];
+
+ if (i)
+ l += bits->getBits(i);
+
+ n -= k;
+ l = j + 0x40000 - l;
+
+ while (k--) {
+ l &= 0x3FFFF;
+ OUTPUT_VAL(dat->window[l]);
+ l++;
+ }
+ }
+ }
+
+ ALIGN_BITS(bits);
+ }
+
+ delete dat;
+ delete bits;
+
+ return new Common::MemoryReadStream(dst, uncompressedSize, DisposeAfterUse::YES);
+}
+
+#undef OUTPUT_VAL
+#undef ALIGN_BITS
+
+Common::Archive *createStuffItArchive(const Common::String &fileName) {
+ StuffItArchive *archive = new StuffItArchive();
+
+ if (!archive->open(fileName)) {
+ delete archive;
+ return 0;
+ }
+
+ return archive;
+}
+
+} // End of namespace Groovie
diff --git a/engines/groovie/stuffit.h b/engines/groovie/stuffit.h
new file mode 100644
index 0000000000..44f593dbea
--- /dev/null
+++ b/engines/groovie/stuffit.h
@@ -0,0 +1,43 @@
+/* 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 GROOVIE_STUFFIT_H
+#define GROOVIE_STUFFIT_H
+
+namespace Common {
+class Archive;
+class String;
+}
+
+namespace Groovie {
+
+/**
+ * This factory method creates an Archive instance corresponding to the content
+ * of the StuffIt compressed file.
+ *
+ * May return 0 in case of a failure.
+ */
+Common::Archive *createStuffItArchive(const Common::String &fileName);
+
+} // End of namespace Groovie
+
+#endif
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 5fdb2026a7..2585c64fd8 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -235,7 +235,7 @@ void Parser::charHandler() {
if (_cmdLineIndex >= kMaxLineSize) {
//MessageBeep(MB_ICONASTERISK);
warning("STUB: MessageBeep() - Command line too long");
- } else if (isprint(static_cast<unsigned char>(c))) {
+ } else if (Common::isPrint(c)) {
_cmdLine[_cmdLineIndex++] = c;
_cmdLine[_cmdLineIndex] = '\0';
}
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index 54e1abcc2c..7ea2feb361 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -1206,7 +1206,7 @@ void CharacterGenerator::finish() {
static const int8 itemList1[] = { 1, 2, 0, 17, -1, 0, 0 };
static const int8 itemList2[] = { 2, 56, 1, 17, 31, 0, 1, 23, 1, 17, 31, 0, 1 };
static const int8 itemList3[] = { 2, 1, 1, 17, 31, 1, 1, 1, 0, 17, 31, 2, 1 };
- static const int8 *itemList[] = { itemList0, itemList1, itemList2, itemList3 };
+ static const int8 *const itemList[] = { itemList0, itemList1, itemList2, itemList3 };
for (int i = 0; i < 4; i++) {
EoBCharacter *c = &_characters[i];
@@ -1496,7 +1496,7 @@ TransferPartyWiz::~TransferPartyWiz() {
}
bool TransferPartyWiz::start() {
- _screen->copyPage(0, _vm->_useHiResDithering ? 1 : 12);
+ _screen->copyPage(0, 12);
if (!selectAndLoadTransferFile())
return false;
@@ -1536,7 +1536,7 @@ bool TransferPartyWiz::start() {
bool TransferPartyWiz::selectAndLoadTransferFile() {
do {
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
if (transferFileDialogue(_vm->_savegameFilename))
break;
} while (_vm->_gui->confirmDialogue2(15, 68, 1));
@@ -1566,7 +1566,7 @@ bool TransferPartyWiz::selectAndLoadTransferFile() {
return false;
Common::String target = _vm->_gui->transferTargetMenu(eobTargets);
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
if (target.empty())
return true;
@@ -1579,10 +1579,10 @@ bool TransferPartyWiz::selectAndLoadTransferFile() {
return true;
}
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
bool result = _vm->_gui->transferFileMenu(target, dest);
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
return result;
}
diff --git a/engines/kyra/darkmoon.cpp b/engines/kyra/darkmoon.cpp
index 16bd3dad58..054b2b285e 100644
--- a/engines/kyra/darkmoon.cpp
+++ b/engines/kyra/darkmoon.cpp
@@ -158,10 +158,7 @@ void DarkMoonEngine::generateMonsterPalettes(const char *file, int16 monsterInde
int colx = 302 + 3 * i;
for (int ii = 0; ii < 16; ii++) {
- // Don't use getPagePixel() here, since in EGA mode it will try to
- // undither the pixel (although the shape bitmap is undithered already)
- uint8 col = _screen->getCPagePtr(_screen->_curPage | 1)[(184 + ii) * Screen::SCREEN_W + colx];
-
+ uint8 col = _screen->getPagePixel(_screen->_curPage, colx, 184 + ii);
int iii = 0;
for (; iii < 16; iii++) {
if (tmpPal[iii] == col) {
@@ -178,9 +175,7 @@ void DarkMoonEngine::generateMonsterPalettes(const char *file, int16 monsterInde
memcpy(tmpPal, _monsterShapes[dci] + 4, 16);
for (int iii = 0; iii < 16; iii++) {
- // Don't use getPagePixel() here, since in EGA mode it will try to
- // undither the pixel (although the shape bitmap is undithered already)
- uint8 col = _screen->getCPagePtr(_screen->_curPage | 1)[(184 + iii) * Screen::SCREEN_W + colx + ii];
+ uint8 col = _screen->getPagePixel(_screen->_curPage, colx + ii, 184 + iii);
if (newPal[iii])
tmpPal[newPal[iii]] = col;
}
diff --git a/engines/kyra/darkmoon.h b/engines/kyra/darkmoon.h
index f6e7b3ed2c..f0057ddd66 100644
--- a/engines/kyra/darkmoon.h
+++ b/engines/kyra/darkmoon.h
@@ -72,21 +72,21 @@ private:
void seq_playFinale();
void seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *data, int sd, int backupPage, int tempPage, int speed);
- const char * const *_introStrings;
- const char * const *_cpsFilesIntro;
+ const char *const *_introStrings;
+ const char *const *_cpsFilesIntro;
const DarkMoonAnimCommand **_animIntro;
const DarkMoonShapeDef **_shapesIntro;
- const char * const *_finaleStrings;
+ const char *const *_finaleStrings;
const uint8 *_creditsData;
- const char * const *_cpsFilesFinale;
+ const char *const *_cpsFilesFinale;
const DarkMoonAnimCommand **_animFinale;
const DarkMoonShapeDef **_shapesFinale;
- static const char *_palFilesIntroVGA[];
- static const char *_palFilesIntroEGA[];
- static const char *_palFilesFinaleVGA[];
- static const char *_palFilesFinaleEGA[];
+ static const char *const _palFilesIntroVGA[];
+ static const char *const _palFilesIntroEGA[];
+ static const char *const _palFilesFinaleVGA[];
+ static const char *const _palFilesFinaleEGA[];
// Ingame sequence
void seq_nightmare();
@@ -140,7 +140,7 @@ private:
static const uint8 _egaDefaultPalette[];
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index e422f3ea19..95c4accd29 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -298,7 +298,7 @@ SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int s
if (in) {
Kyra::KyraEngine_v1::SaveHeader header;
- Kyra::KyraEngine_v1::kReadSaveHeaderError error;
+ Kyra::KyraEngine_v1::ReadSaveHeaderError error;
error = Kyra::KyraEngine_v1::readSaveHeader(in, true, header);
delete in;
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index e2162f20e2..5b9d665a0e 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -1495,7 +1495,7 @@ const KYRAGameDescription adGameDescs[] = {
ADGF_DEMO,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
- LOL_KYRA2_DEMO_FLAGS
+ LOL_DEMO_FLAGS
},
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
diff --git a/engines/kyra/eob.h b/engines/kyra/eob.h
index 37ce483702..bf5440b942 100644
--- a/engines/kyra/eob.h
+++ b/engines/kyra/eob.h
@@ -99,7 +99,7 @@ private:
void turnUndeadAuto();
void turnUndeadAutoHit();
- const char * const *_turnUndeadString;
+ const char *const *_turnUndeadString;
// Misc
bool checkPartyStatusExtra();
@@ -113,8 +113,7 @@ private:
static const uint8 _egaDefaultPalette[];
};
-
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index fadb1066e0..6c899b8c8e 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -57,7 +57,7 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags)
_configMouse = true;
_loading = false;
- _useHiResDithering = false;
+ _enableHiResDithering = false;
_envAudioTimer = 0;
_flashShapeTimer = 0;
@@ -371,7 +371,7 @@ Common::Error EoBCoreEngine::init() {
if (ConfMan.hasKey("render_mode"))
_configRenderMode = Common::parseRenderMode(ConfMan.get("render_mode"));
- _useHiResDithering = (_configRenderMode == Common::kRenderEGA && _flags.useHiRes);
+ _enableHiResDithering = (_configRenderMode == Common::kRenderEGA && _flags.useHiRes);
_screen = new Screen_EoB(this, _system);
assert(_screen);
@@ -417,12 +417,6 @@ Common::Error EoBCoreEngine::init() {
_screen->loadFont(Screen::FID_6_FNT, "FONT6.FNT");
_screen->loadFont(Screen::FID_8_FNT, "FONT8.FNT");
- if (_useHiResDithering) {
- _vcnBlockWidth <<= 1;
- _vcnBlockHeight <<= 1;
- SWAP(_vcnFlip0, _vcnFlip1);
- }
-
Common::Error err = KyraRpgEngine::init();
if (err.getCode() != Common::kNoError)
return err;
@@ -1748,7 +1742,7 @@ void EoBCoreEngine::seq_portal() {
bool EoBCoreEngine::checkPassword() {
char answ[20];
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
- _screen->copyPage(0, _useHiResDithering ? 4 : 10);
+ _screen->copyPage(0, 10);
_screen->setScreenDim(13);
gui_drawBox(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, guiSettings()->colors.frame1, guiSettings()->colors.frame2, -1);
@@ -1775,7 +1769,7 @@ bool EoBCoreEngine::checkPassword() {
_screen->modifyScreenDim(13, _screen->_curDim->sx - 1, _screen->_curDim->sy - 2, _screen->_curDim->w + 2, _screen->_curDim->h + 16);
_screen->setFont(of);
- _screen->copyPage(_useHiResDithering ? 4 : 10, 0);
+ _screen->copyPage(10, 0);
return true;
}
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index f60e755dd7..e42130cde0 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -845,7 +845,7 @@ protected:
const uint8 *_cgaMappingLevel[5];
const uint8 *_cgaLevelMappingIndex;
- bool _useHiResDithering;
+ bool _enableHiResDithering;
// Default parameters will import all present original save files and push them to the top of the save dialog.
bool importOriginalSaveFile(int destSlot, const char *sourceFile = 0);
@@ -858,11 +858,11 @@ protected:
void restoreWallOfForceTempData(LevelTempData *tmp);
void releaseWallOfForceTempData(LevelTempData *tmp);
- const char * const *_saveLoadStrings;
+ const char *const *_saveLoadStrings;
const uint8 *_mnDef;
- const char * const *_mnWord;
- const char * const *_mnPrompt;
+ const char *const *_mnWord;
+ const char *const *_mnPrompt;
int _mnNumWord;
int _rrCount;
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index e3c0743e5c..1c827e2802 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -321,7 +321,7 @@ void EoBCoreEngine::gui_drawWeaponSlotStatus(int x, int y, int status) {
break;
}
- int textColor= (_configRenderMode == Common::kRenderCGA) ? 2 : 15;
+ int textColor = (_configRenderMode == Common::kRenderCGA) ? 2 : 15;
if (!tmpStr2.empty()) {
_screen->printText(tmpStr.c_str(), x + (16 - tmpStr.size() * 3), y + 2, textColor, 0);
@@ -485,7 +485,7 @@ void EoBCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
uint8 col1 = guiSettings()->colors.frame1;
uint8 col2 = guiSettings()->colors.frame2;
- if (_configRenderMode == Common::kRenderCGA ) {
+ if (_configRenderMode == Common::kRenderCGA) {
col1 = 1;
col2 = 3;
}
@@ -777,11 +777,11 @@ int EoBCoreEngine::clickedCamp(Button *button) {
}
_screen->copyPage(0, 7);
- _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, _useHiResDithering ? 1 : 12, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, 12, Screen::CR_NO_P_CHECK);
_gui->runCampMenu();
- _screen->copyRegion(0, 0, 0, 120, 176, 24, _useHiResDithering ? 1 : 12, 2, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 0, 0, 120, 176, 24, 12, 2, Screen::CR_NO_P_CHECK);
_screen->setScreenDim(cd);
drawScene(0);
@@ -1170,7 +1170,7 @@ int EoBCoreEngine::clickedSceneSpecial(Button *button) {
int EoBCoreEngine::clickedSpellbookAbort(Button *button) {
_updateFlags = 0;
- _screen->copyRegion(0, 0, 64, 121, 112, 56, _useHiResDithering ? 4 : 10, 0, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 0, 64, 121, 112, 56, 10, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
gui_drawCompass(true);
gui_toggleButtons();
@@ -1568,8 +1568,8 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
// UNUSED
//if (buttonList->flags2 & 0x20) {
- //if (_processButtonListExtraCallback)
- // this->*_processButtonListExtraCallback(buttonList);
+ // if (_processButtonListExtraCallback)
+ // this->*_processButtonListExtraCallback(buttonList);
//}
if (buttonList->nextButton)
@@ -2172,7 +2172,7 @@ void GUI_EoB::runCampMenu() {
if (cnt > 4) {
_vm->dropCharacter(selectCharacterDialogue(53));
_vm->gui_drawPlayField(false);
- _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, _vm->_useHiResDithering ? 1 : 12, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, 12, Screen::CR_NO_P_CHECK);
_screen->setFont(Screen::FID_6_FNT);
_vm->gui_drawAllCharPortraitsWithStats();
_screen->setFont(Screen::FID_8_FNT);
@@ -2607,7 +2607,7 @@ Common::String GUI_EoB::transferTargetMenu(Common::Array<Common::String> &target
break;
} while (_saveSlotIdTemp[slot] == -1);
- _screen->copyRegion(72, 14, 72, 14, 176, 144, _vm->_useHiResDithering ? 7 : 12, 0, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(72, 14, 72, 14, 176, 144, 12, 0, Screen::CR_NO_P_CHECK);
_screen->modifyScreenDim(11, xo, yo, dm->w, dm->h);
return (slot < 6) ? _savegameList[_savegameOffset + slot] : Common::String();
@@ -2650,7 +2650,7 @@ void GUI_EoB::createScreenThumbnail(Graphics::Surface &dst) {
_screen->getRealPalette(0, screenPal);
uint16 width = Screen::SCREEN_W;
uint16 height = Screen::SCREEN_H;
- if (_vm->_useHiResDithering) {
+ if (_vm->gameFlags().useHiRes) {
width <<= 1;
height <<= 1;
}
@@ -2705,11 +2705,20 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
for (int in = -1; in == -1 && !_vm->shouldQuit();) {
_screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->guiSettings()->colors.fill);
in = getTextInput(_saveSlotStringsTemp[slot], x + 1, fy, 19, 2, 0, 8);
+ if (in == -1) {
+ useSlot = false;
+ break;
+ }
+
if (!strlen(_saveSlotStringsTemp[slot])) {
messageDialogue(11, 54, 6);
in = -1;
}
- };
+ }
+
+ if (!useSlot) {
+ continue;
+ }
_screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->guiSettings()->colors.fill);
_screen->printShadedText(_saveSlotStringsTemp[slot], (x + 1) << 3, fy, 15, 0);
diff --git a/engines/kyra/gui_eob.h b/engines/kyra/gui_eob.h
index f6be18ffbb..1b7bdf3482 100644
--- a/engines/kyra/gui_eob.h
+++ b/engines/kyra/gui_eob.h
@@ -156,7 +156,7 @@ private:
static const uint8 _highlightColorTableEGA[];
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index 37526f9a5f..bcbfe27b69 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -25,7 +25,7 @@
#include "kyra/text_mr.h"
#include "kyra/resource.h"
#include "kyra/timer.h"
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "common/system.h"
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 7fbecb7f53..b180285ffc 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -52,13 +52,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
_screen = 0;
_text = 0;
- _seqProcessedString = 0;
- _activeWSA = 0;
- _activeText = 0;
- _seqWsa = 0;
- _sequences = 0;
- _sequenceSoundList = 0;
-
_gamePlayBuffer = 0;
_cCodeBuffer = _optionsBuffer = _chapterBuffer = 0;
@@ -89,7 +82,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
memset(&_invWsa, 0, sizeof(_invWsa));
_itemAnimDefinition = 0;
- _demoAnimData = 0;
_nextAnimItem = 0;
for (int i = 0; i < 15; i++)
@@ -136,7 +128,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
memset(_cauldronStateTables, 0, sizeof(_cauldronStateTables));
_menuDirectlyToLoad = false;
- _menu = 0;
_chatIsNote = false;
memset(&_npcScriptData, 0, sizeof(_npcScriptData));
@@ -148,7 +139,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
KyraEngine_HoF::~KyraEngine_HoF() {
cleanup();
- seq_uninit();
delete _screen;
delete _text;
@@ -157,15 +147,6 @@ KyraEngine_HoF::~KyraEngine_HoF() {
_text = 0;
delete _invWsa.wsa;
- if (_sequenceSoundList) {
- for (int i = 0; i < _sequenceSoundListSize; i++) {
- if (_sequenceSoundList[i])
- delete[] _sequenceSoundList[i];
- }
- delete[] _sequenceSoundList;
- _sequenceSoundList = NULL;
- }
-
delete[] _dlgBuffer;
for (int i = 0; i < 19; i++)
delete[] _conversationState[i];
@@ -179,41 +160,13 @@ KyraEngine_HoF::~KyraEngine_HoF() {
void KyraEngine_HoF::pauseEngineIntern(bool pause) {
KyraEngine_v2::pauseEngineIntern(pause);
+ seq_pausePlayer(pause);
+
if (!pause) {
uint32 pausedTime = _system->getMillis() - _pauseStart;
_pauseStart = 0;
- // sequence player
- //
- // Timers in KyraEngine_HoF::seq_cmpFadeFrame() and KyraEngine_HoF::seq_animatedSubFrame()
- // have been left out for now. I think we don't need them here.
-
- _seqStartTime += pausedTime;
- _seqSubFrameStartTime += pausedTime;
- _seqEndTime += pausedTime;
- _seqSubFrameEndTimeInternal += pausedTime;
- _seqWsaChatTimeout += pausedTime;
- _seqWsaChatFrameTimeout += pausedTime;
-
- if (_activeText) {
- for (int x = 0; x < 10; x++) {
- if (_activeText[x].duration != -1)
- _activeText[x].startTime += pausedTime;
- }
- }
-
- if (_activeWSA) {
- for (int x = 0; x < 8; x++) {
- if (_activeWSA[x].flags != -1)
- _activeWSA[x].nextFrame += pausedTime;
- }
- }
-
_nextIdleAnim += pausedTime;
-
- for (int x = 0; x < _itemAnimDefinitionSize; x++)
- _activeItemAnim[x].nextFrameTime += pausedTime;
-
_tim->refreshTimersAfterPause(pausedTime);
}
}
@@ -244,8 +197,6 @@ Common::Error KyraEngine_HoF::init() {
_screen->loadFont(_screen->FID_8_FNT, "8FAT.FNT");
_screen->loadFont(_screen->FID_BOOKFONT_FNT, "BOOKFONT.FNT");
}
- _screen->loadFont(_screen->FID_GOLDFONT_FNT, "GOLDFONT.FNT");
-
_screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : _screen->FID_8_FNT);
_screen->setAnimBlockPtr(3504);
@@ -254,13 +205,6 @@ Common::Error KyraEngine_HoF::init() {
if (!_sound->init())
error("Couldn't init sound");
- _abortIntroFlag = false;
-
- if (_sequenceStrings) {
- for (int i = 0; i < MIN(33, _sequenceStringsSize); i++)
- _sequenceStringsDuration[i] = (int) strlen(_sequenceStrings[i]) * 8;
- }
-
// No mouse display in demo
if (_flags.isDemo && !_flags.isTalkie)
return Common::kNoError;
@@ -279,28 +223,24 @@ Common::Error KyraEngine_HoF::init() {
}
Common::Error KyraEngine_HoF::go() {
+ int menuChoice = 0;
+
if (_gameToLoad == -1) {
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
seq_showStarcraftLogo();
if (_flags.isDemo && !_flags.isTalkie) {
-#ifdef ENABLE_LOL
- if (_flags.gameID == GI_LOL)
- seq_playSequences(kSequenceLoLDemoScene1, kSequenceLoLDemoScene6);
- else
-#endif // ENABLE_LOL
- seq_playSequences(kSequenceDemoVirgin, kSequenceDemoFisher);
- _menuChoice = 4;
+ menuChoice = seq_playDemo();
} else {
- seq_playSequences(kSequenceVirgin, kSequenceZanfaun);
+ menuChoice = seq_playIntro();
}
} else {
- _menuChoice = 1;
+ menuChoice = 1;
}
_res->unloadAllPakFiles();
- if (_menuChoice != 4) {
+ if (menuChoice != 4) {
// load just the pak files needed for ingame
_staticres->loadStaticResourceFile();
@@ -317,24 +257,24 @@ Common::Error KyraEngine_HoF::go() {
}
}
- _menuDirectlyToLoad = (_menuChoice == 3) ? true : false;
+ _menuDirectlyToLoad = (menuChoice == 3) ? true : false;
_menuDirectlyToLoad &= saveFileLoadable(0);
- if (_menuChoice & 1) {
+ if (menuChoice & 1) {
startup();
if (!shouldQuit())
runLoop();
cleanup();
if (_showOutro)
- seq_playSequences(kSequenceFunters, kSequenceFrash);
+ seq_playOutro();
}
return Common::kNoError;
}
void KyraEngine_HoF::startup() {
- _sound->setSoundList(&_soundData[kMusicIngame]);
+ _sound->selectAudioResourceSet(kMusicIngame);
// The track map is exactly the same
// for FM-TOWNS and DOS
_trackMap = _dosTrackMap;
@@ -1508,7 +1448,7 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
if (vocIndex != -1) {
- _sound->voicePlay(_ingameSoundList[vocIndex], 0, 255, true);
+ _sound->voicePlay(_ingameSoundList[vocIndex], 0, 255, 255, true);
} else if (_flags.platform == Common::kPlatformPC) {
if (_sound->getSfxType() == Sound::kMidiMT32)
track = track < _mt32SfxMapSize ? _mt32SfxMap[track] - 1 : -1;
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index 182854cdf1..1b84e5b56f 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -35,158 +35,13 @@
namespace Kyra {
-enum Sequences {
- kSequenceVirgin = 0,
- kSequenceWestwood,
- kSequenceTitle,
- kSequenceOverview,
- kSequenceLibrary,
- kSequenceHand,
- kSequencePoint,
- kSequenceZanfaun,
-
- kSequenceFunters,
- kSequenceFerb,
- kSequenceFish,
- kSequenceFheep,
- kSequenceFarmer,
- kSequenceFuards,
- kSequenceFirates,
- kSequenceFrash,
-
- kSequenceArraySize
-};
-
-enum NestedSequences {
- kSequenceFiggle = 0,
- kSequenceOver1,
- kSequenceOver2,
- kSequenceForest,
- kSequenceDragon,
- kSequenceDarm,
- kSequenceLibrary2,
- kSequenceLibrary3,
- kSequenceMarco,
- kSequenceHand1a,
- kSequenceHand1b,
- kSequenceHand1c,
- kSequenceHand2,
- kSequenceHand3,
- kSequenceHand4
-};
-
-enum SequencesDemo {
- kSequenceDemoVirgin = 0,
- kSequenceDemoWestwood,
- kSequenceDemoTitle,
- kSequenceDemoHill,
- kSequenceDemoOuthome,
- kSequenceDemoWharf,
- kSequenceDemoDinob,
- kSequenceDemoFisher
-};
-
-enum NestedSequencesDemo {
- kSequenceDemoWharf2 = 0,
- kSequenceDemoDinob2,
- kSequenceDemoWater,
- kSequenceDemoBail,
- kSequenceDemoDig
-};
-
-#ifdef ENABLE_LOL
-enum SequencesLoLDemo {
- kSequenceLoLDemoScene1 = 0,
- kSequenceLoLDemoText1,
- kSequenceLoLDemoScene2,
- kSequenceLoLDemoText2,
- kSequenceLoLDemoScene3,
- kSequenceLoLDemoText3,
- kSequenceLoLDemoScene4,
- kSequenceLoLDemoText4,
- kSequenceLoLDemoScene5,
- kSequenceLoLDemoText5,
- kSequenceLoLDemoScene6
-};
-#endif // ENABLE_LOL
-
-class WSAMovie_v2;
-class KyraEngine_HoF;
+//class WSAMovie_v2;
+//class KyraEngine_HoF;
class TextDisplayer_HoF;
+class SeqPlayer_HOF;
struct TIM;
-typedef int (KyraEngine_HoF::*SeqProc)(WSAMovie_v2 *, int, int, int);
-
-struct ActiveWSA {
- SeqProc callback;
- WSAMovie_v2 *movie;
- const FrameControl *control;
- int16 flags;
- uint16 startFrame;
- uint16 endFrame;
- uint16 frameDelay;
- uint32 nextFrame;
- uint16 currentFrame;
- uint16 lastFrame;
- uint16 x;
- uint16 y;
- uint16 startupCommand;
- uint16 finalCommand;
-};
-
-struct ActiveText {
- uint16 strIndex;
- uint16 x;
- uint16 y;
- uint16 width;
- int32 duration;
- uint32 startTime;
- int16 textcolor;
-};
-
-struct Sequence {
- const char *wsaFile;
- const char *cpsFile;
- uint16 flags;
- uint8 startupCommand;
- uint8 finalCommand;
- int16 stringIndex1;
- int16 stringIndex2;
- uint16 startFrame;
- uint16 numFrames;
- uint16 frameDelay;
- uint16 xPos;
- uint16 yPos;
- uint16 duration;
-};
-
-struct NestedSequence {
- const char *wsaFile;
- const FrameControl *wsaControl;
- uint16 flags;
- uint16 startframe;
- uint16 endFrame;
- uint16 frameDelay;
- uint16 x;
- uint16 y;
- uint16 startupCommand;
- uint16 finalCommand;
-};
-
-struct HofSeqData {
- const Sequence *seq;
- int numSeq;
- const NestedSequence *seqn;
- int numSeqn;
-};
-
-struct ItemAnimData_v1 {
- int16 itemIndex;
- uint16 y;
- const uint16 *frames;
-};
-
class KyraEngine_HoF : public KyraEngine_v2 {
friend class Debugger_HoF;
friend class TextDisplayer_HoF;
@@ -202,98 +57,18 @@ public:
GUI *gui() const { return _gui; }
virtual TextDisplayer *text() { return _text; }
int language() const { return _lang; }
+
protected:
static const EngineDesc _hofEngineDesc;
// intro/outro
- void seq_playSequences(int startSeq, int endSeq = -1);
-
- int seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introPoint(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introZanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_introOver1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introOver2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introForest(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introDragon(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introDarm(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introLibrary2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introMarco(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_finaleFiggle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_demoVirgin(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoHill(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoOuthome(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoWharf(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoDinob(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoFisher(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_demoWharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoDinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoWater(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoBail(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoDig(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
-#ifdef ENABLE_LOL
- int seq_lolDemoScene1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene4(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoText5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-#endif // ENABLE_LOL
-
- void seq_sequenceCommand(int command);
- void seq_loadNestedSequence(int wsaNum, int seqNum);
- void seq_nestedSequenceFrame(int command, int wsaNum);
- void seq_animatedSubFrame(int srcPage, int dstPage, int delaytime,
- int steps, int x, int y, int w, int h, int openClose, int directionFlags);
- bool seq_processNextSubFrame(int wsaNum);
- void seq_resetActiveWSA(int wsaNum);
- void seq_unloadWSA(int wsaNum);
- void seq_processWSAs();
- void seq_cmpFadeFrame(const char *cmpFile);
- void seq_playTalkText(uint8 chatNum);
- void seq_resetAllTextEntries();
- uint32 seq_activeTextsTimeLeft();
- void seq_waitForTextsTimeout();
- int seq_setTextEntry(uint16 strIndex, uint16 posX, uint16 posY, int duration, uint16 width);
- void seq_processText();
- char *seq_preprocessString(const char *str, int width);
- void seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor);
- void seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width,
- WSAMovie_v2 * wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos);
- void seq_finaleActorScreen();
- void seq_displayScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed, int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData = 0, const char *const *specialData = 0);
- void seq_scrollPage(int bottom, int top);
void seq_showStarcraftLogo();
- MainMenu *_menu;
+ int seq_playIntro();
+ int seq_playOutro();
+ int seq_playDemo();
- void seq_init();
- void seq_uninit();
+ void seq_pausePlayer(bool toggle);
Common::Error init();
Common::Error go();
@@ -311,7 +86,6 @@ protected:
static const int8 _pcSpkSfxMap[];
static const int _pcSpkSfxMapSize;
- AudioDataStruct _soundData[3];
protected:
// game initialization
void startup();
@@ -841,19 +615,19 @@ protected:
bool _chatAltFlag;
// sequence player
- ActiveWSA *_activeWSA;
+/* ActiveWSA *_activeWSA;
ActiveText *_activeText;
-
- const char * const *_sequencePakList;
- int _sequencePakListSize;
- const char * const *_ingamePakList;
+ */
+ /*const char *const *_sequencePakList;
+ int _sequencePakListSize;*/
+ const char *const *_ingamePakList;
int _ingamePakListSize;
- const char * const *_musicFileListIntro;
+ const char *const *_musicFileListIntro;
int _musicFileListIntroSize;
- const char * const *_musicFileListFinale;
+ const char *const *_musicFileListFinale;
int _musicFileListFinaleSize;
- const char * const *_musicFileListIngame;
+ const char *const *_musicFileListIngame;
int _musicFileListIngameSize;
const uint8 *_cdaTrackTableIntro;
int _cdaTrackTableIntroSize;
@@ -861,34 +635,33 @@ protected:
int _cdaTrackTableIngameSize;
const uint8 *_cdaTrackTableFinale;
int _cdaTrackTableFinaleSize;
- const char * const *_sequenceSoundList;
- int _sequenceSoundListSize;
- const char * const *_ingameSoundList;
+ const char *const *_ingameSoundList;
int _ingameSoundListSize;
const uint16 *_ingameSoundIndex;
int _ingameSoundIndexSize;
- const char * const *_sequenceStrings;
- int _sequenceStringsSize;
const uint16 *_ingameTalkObjIndex;
int _ingameTalkObjIndexSize;
- const char * const *_ingameTimJpStr;
+ const char *const *_ingameTimJpStr;
int _ingameTimJpStrSize;
- const HofSeqData *_sequences;
+
const ItemAnimDefinition *_itemAnimDefinition;
int _itemAnimDefinitionSize;
+
+ /*const HofSeqData *_sequences;
+
const ItemAnimData_v1 *_demoAnimData;
int _demoAnimSize;
- int _sequenceStringsDuration[33];
+ int _sequenceStringsDuration[33];*/
- static const uint8 _seqTextColorPresets[];
+/* static const uint8 _seqTextColorPresets[];
char *_seqProcessedString;
WSAMovie_v2 *_seqWsa;
bool _abortIntroFlag;
- int _menuChoice;
+ int _menuChoice;*/
- uint32 _seqFrameDelay;
+ /*uint32 _seqFrameDelay;
uint32 _seqStartTime;
uint32 _seqSubFrameStartTime;
uint32 _seqEndTime;
@@ -902,10 +675,7 @@ protected:
bool _seqSpecialFlag;
bool _seqSubframePlaying;
uint8 _seqTextColor[2];
- uint8 _seqTextColorMap[16];
-
- const SeqProc *_callbackS;
- const SeqProc *_callbackN;
+ uint8 _seqTextColorMap[16];*/
static const uint8 _rainbowRoomData[];
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 27bc2ad22a..7d4e35092f 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -98,8 +98,6 @@ KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags)
_malcolmFrame = 0;
_malcolmTimer1 = _malcolmTimer2 = 0;
-
- _soundFiles = 0;
}
KyraEngine_LoK::~KyraEngine_LoK() {
@@ -123,8 +121,6 @@ KyraEngine_LoK::~KyraEngine_LoK() {
delete _animator;
delete _seq;
- delete[] _soundFiles;
-
delete[] _characterList;
delete[] _roomTable;
@@ -194,7 +190,7 @@ Common::Error KyraEngine_LoK::init() {
initStaticResource();
- _sound->setSoundList(&_soundData[kMusicIntro]);
+ _sound->selectAudioResourceSet(kMusicIntro);
if (_flags.platform == Common::kPlatformAmiga) {
_trackMap = _amigaTrackMap;
@@ -349,7 +345,7 @@ void KyraEngine_LoK::startup() {
static const uint8 colorMap[] = { 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0 };
_screen->setTextColorMap(colorMap);
- _sound->setSoundList(&_soundData[kMusicIngame]);
+ _sound->selectAudioResourceSet(kMusicIngame);
if (_flags.platform == Common::kPlatformPC98)
_sound->loadSoundFile("SE.DAT");
else
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index e5fb3cddca..def5cbcf6f 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -126,13 +126,13 @@ public:
typedef bool (KyraEngine_LoK::*IntroProc)();
// static data access
- const char * const *seqWSATable() { return _seq_WSATable; }
- const char * const *seqCPSTable() { return _seq_CPSTable; }
- const char * const *seqCOLTable() { return _seq_COLTable; }
- const char * const *seqTextsTable() { return _seq_textsTable; }
+ const char *const *seqWSATable() { return _seq_WSATable; }
+ const char *const *seqCPSTable() { return _seq_CPSTable; }
+ const char *const *seqCOLTable() { return _seq_COLTable; }
+ const char *const *seqTextsTable() { return _seq_textsTable; }
- const uint8 * const *palTable1() { return &_specialPalettes[0]; }
- const uint8 * const *palTable2() { return &_specialPalettes[29]; }
+ const uint8 *const *palTable1() { return &_specialPalettes[0]; }
+ const uint8 *const *palTable2() { return &_specialPalettes[29]; }
protected:
virtual Common::Error go();
@@ -538,12 +538,12 @@ protected:
const uint8 *_seq_Demo4;
const uint8 *_seq_Reunion;
- const char * const *_seq_WSATable;
- const char * const *_seq_CPSTable;
- const char * const *_seq_COLTable;
- const char * const *_seq_textsTable;
+ const char *const *_seq_WSATable;
+ const char *const *_seq_CPSTable;
+ const char *const *_seq_COLTable;
+ const char *const *_seq_textsTable;
- const char * const *_storyStrings;
+ const char *const *_storyStrings;
int _seq_WSATable_Size;
int _seq_CPSTable_Size;
@@ -552,25 +552,25 @@ protected:
int _storyStringsSize;
- const char * const *_itemList;
- const char * const *_takenList;
- const char * const *_placedList;
- const char * const *_droppedList;
- const char * const *_noDropList;
- const char * const *_putDownFirst;
- const char * const *_waitForAmulet;
- const char * const *_blackJewel;
- const char * const *_poisonGone;
- const char * const *_healingTip;
- const char * const *_thePoison;
- const char * const *_fluteString;
- const char * const *_wispJewelStrings;
- const char * const *_magicJewelString;
- const char * const *_flaskFull;
- const char * const *_fullFlask;
- const char * const *_veryClever;
- const char * const *_homeString;
- const char * const *_newGameString;
+ const char *const *_itemList;
+ const char *const *_takenList;
+ const char *const *_placedList;
+ const char *const *_droppedList;
+ const char *const *_noDropList;
+ const char *const *_putDownFirst;
+ const char *const *_waitForAmulet;
+ const char *const *_blackJewel;
+ const char *const *_poisonGone;
+ const char *const *_healingTip;
+ const char *const *_thePoison;
+ const char *const *_fluteString;
+ const char *const *_wispJewelStrings;
+ const char *const *_magicJewelString;
+ const char *const *_flaskFull;
+ const char *const *_fullFlask;
+ const char *const *_veryClever;
+ const char *const *_homeString;
+ const char *const *_newGameString;
int _itemList_Size;
int _takenList_Size;
@@ -592,13 +592,13 @@ protected:
int _homeString_Size;
int _newGameString_Size;
- const char * const *_characterImageTable;
+ const char *const *_characterImageTable;
int _characterImageTableSize;
- const char * const *_guiStrings;
+ const char *const *_guiStrings;
int _guiStringsSize;
- const char * const *_configStrings;
+ const char *const *_configStrings;
int _configStringsSize;
Shape *_defaultShapeTable;
@@ -636,20 +636,12 @@ protected:
Room *_roomTable;
int _roomTableSize;
- const char * const *_roomFilenameTable;
+ const char *const *_roomFilenameTable;
int _roomFilenameTableSize;
const uint8 *_amuleteAnim;
- const uint8 * const *_specialPalettes;
-
- const char * const *_soundFiles;
- int _soundFilesSize;
- const char * const *_soundFilesIntro;
- int _soundFilesIntroSize;
- const int32 *_cdaTrackTable;
- int _cdaTrackTableSize;
- AudioDataStruct _soundData[3];
+ const uint8 *const *_specialPalettes;
// positions of the inventory
static const uint16 _itemPosX[];
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 448e4ef70d..48ba96ec8b 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -28,7 +28,7 @@
#include "kyra/debugger.h"
#include "kyra/gui_mr.h"
#include "kyra/resource.h"
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "common/system.h"
#include "common/config-manager.h"
@@ -213,8 +213,6 @@ Common::Error KyraEngine_MR::init() {
_soundDigital = new SoundDigital(this, _mixer);
assert(_soundDigital);
- if (!_soundDigital->init())
- error("_soundDigital->init() failed");
KyraEngine_v1::_text = _text = new TextDisplayer_MR(this, _screen);
assert(_text);
_gui = new GUI_MR(this);
@@ -724,7 +722,7 @@ void KyraEngine_MR::loadCharacterShapes(int newShapes) {
static const uint8 numberOffset[] = { 3, 3, 4, 4, 3, 3 };
static const uint8 startShape[] = { 0x32, 0x58, 0x78, 0x98, 0xB8, 0xD8 };
static const uint8 endShape[] = { 0x57, 0x77, 0x97, 0xB7, 0xD7, 0xF7 };
- static const char * const filenames[] = {
+ static const char *const filenames[] = {
"MSW##.SHP",
"MTA##.SHP",
"MTFL##.SHP",
diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h
index 004236ca04..d194fedd4d 100644
--- a/engines/kyra/kyra_mr.h
+++ b/engines/kyra/kyra_mr.h
@@ -182,11 +182,11 @@ private:
private:
// main menu
- const char * const *_mainMenuStrings;
+ const char *const *_mainMenuStrings;
int _mainMenuStringsSize;
- static const char * const _mainMenuSpanishFan[];
- static const char * const _mainMenuItalianFan[];
+ static const char *const _mainMenuSpanishFan[];
+ static const char *const _mainMenuItalianFan[];
// animator
uint8 *_gamePlayBuffer;
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index f1d9550e8f..df2297ebfd 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -46,12 +46,7 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi
_vcnTransitionMask = 0;
_vcnShift = 0;
_vcnColTable = 0;
- _vcnBlockWidth = 4;
- _vcnBlockHeight = 8;
- _vcnFlip0 = 0;
- _vcnFlip1 = 1;
_vmpPtr = 0;
- _vmpSize = 0;
_blockBrightness = _wllVcnOffset = 0;
_blockDrawingBuffer = 0;
_sceneWindowBuffer = 0;
@@ -173,9 +168,8 @@ Common::Error KyraRpgEngine::init() {
_blockDrawingBuffer = new uint16[1320];
memset(_blockDrawingBuffer, 0, 1320 * sizeof(uint16));
- uint32 swbSize = 22 * _vcnBlockWidth * 2 * 15 * _vcnBlockHeight;
- _sceneWindowBuffer = new uint8[swbSize];
- memset(_sceneWindowBuffer, 0, swbSize);
+ _sceneWindowBuffer = new uint8[21120];
+ memset(_sceneWindowBuffer, 0, 21120);
_lvlShapeTop = new int16[18];
memset(_lvlShapeTop, 0, 18 * sizeof(int16));
diff --git a/engines/kyra/kyra_rpg.h b/engines/kyra/kyra_rpg.h
index 50a4c9bdc1..2615875f4d 100644
--- a/engines/kyra/kyra_rpg.h
+++ b/engines/kyra/kyra_rpg.h
@@ -222,7 +222,6 @@ protected:
uint16 _decorationCount;
int16 _mappedDecorationsCount;
uint16 *_vmpPtr;
- uint16 _vmpSize;
uint8 *_vcnBlocks;
uint8 *_vcfBlocks;
uint8 *_vcnTransitionMask;
@@ -232,10 +231,6 @@ protected:
uint8 *_sceneWindowBuffer;
uint8 _blockBrightness;
uint8 _wllVcnOffset;
- uint8 _vcnBlockWidth;
- uint8 _vcnBlockHeight;
- uint8 _vcnFlip0;
- uint8 _vcnFlip1;
uint8 **_doorShapes;
@@ -385,7 +380,7 @@ protected:
bool lineIsPassable(int, int) { return false; }
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB || ENABLE_LOL
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 2672618c67..f6fc4c3234 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -172,19 +172,6 @@ Common::Error KyraEngine_v1::init() {
assert(_res);
_res->reset();
- if (_flags.isDemo) {
- // HACK: check whether this is the HOF demo or the LOL demo.
- // The LOL demo needs to be detected and run as KyraEngine_HoF,
- // but the static resource loader and the sequence player will
- // need correct IDs.
- if (_res->exists("scene1.cps"))
-#ifdef ENABLE_LOL
- _flags.gameID = GI_LOL;
-#else
- error("Lands of Lore demo is not supported in this build");
-#endif // !ENABLE_LOL
- }
-
_staticres = new StaticResource(this);
assert(_staticres);
if (!_staticres->init())
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 0033969047..cd048563ca 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -140,14 +140,6 @@ enum {
GI_EOB2 = 6
};
-struct AudioDataStruct {
- const char *const *fileList;
- int fileListLen;
- const void *cdaTracks;
- int cdaNumTracks;
- int extraOffset;
-};
-
// TODO: this is just the start of makeing the debug output of the kyra engine a bit more useable
// in the future we maybe merge some flags and/or create new ones
enum DebugLevels {
@@ -164,7 +156,7 @@ enum DebugLevels {
kDebugLevelTimer = 1 << 10 ///< debug level for "TimerManager" functions
};
-enum MusicDataID {
+enum AudioResourceSet {
kMusicIntro = 0,
kMusicIngame,
kMusicFinale
@@ -188,6 +180,7 @@ friend class GUI;
friend class GUI_v1;
friend class GUI_EoB;
friend class SoundMidiPC; // For _eventMan
+friend class SeqPlayer_HOF; // For skipFlag()
friend class TransferPartyWiz; // For save state API
public:
KyraEngine_v1(OSystem *system, const GameFlags &flags);
@@ -415,14 +408,14 @@ protected:
Graphics::Surface *thumbnail;
};
- enum kReadSaveHeaderError {
+ enum ReadSaveHeaderError {
kRSHENoError = 0,
kRSHEInvalidType = 1,
kRSHEInvalidVersion = 2,
kRSHEIoError = 3
};
- static kReadSaveHeaderError readSaveHeader(Common::SeekableReadStream *file, bool loadThumbnail, SaveHeader &header);
+ static ReadSaveHeaderError readSaveHeader(Common::SeekableReadStream *file, bool loadThumbnail, SaveHeader &header);
void loadGameStateCheck(int slot);
virtual Common::Error loadGameState(int slot) = 0;
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index d3028c5e2d..dcfd2b7e10 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -499,6 +499,11 @@ void LoLEngine::initKeymap() {
#endif
}
+void LoLEngine::pauseEngineIntern(bool pause) {
+ KyraEngine_v1::pauseEngineIntern(pause);
+ pauseDemoPlayer(pause);
+}
+
Common::Error LoLEngine::go() {
int action = -1;
@@ -529,7 +534,7 @@ Common::Error LoLEngine::go() {
if (_flags.platform == Common::kPlatformPC98)
_sound->loadSoundFile("sound.dat");
- _sound->setSoundList(&_soundData[kMusicIngame]);
+ _sound->selectAudioResourceSet(kMusicIngame);
if (_flags.platform != Common::kPlatformPC)
_sound->loadSoundFile(0);
@@ -2361,7 +2366,7 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
playSpellAnimation(0, 0, 0, 2, 0, 0, 0, s.getData(), tpal.getData(), 40, false);
- _screen->fadePaletteStep(s.getData(), tpal.getData(), _system->getMillis(), _tickLength);
+ _screen->timedPaletteFadeStep(s.getData(), tpal.getData(), _system->getMillis(), _tickLength);
if (mov->opened()) {
int r = true;
if (spellLevel > 2) {
@@ -2430,7 +2435,7 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
playSpellAnimation(0, 0, 0, 2, 0, 0, 0, tpal.getData(), swampCol.getData(), 40, 0);
- _screen->fadePaletteStep(tpal.getData(), swampCol.getData(), _system->getMillis(), _tickLength);
+ _screen->timedPaletteFadeStep(tpal.getData(), swampCol.getData(), _system->getMillis(), _tickLength);
if (breakWall)
breakIceWall(tpal.getData(), swampCol.getData());
@@ -2886,7 +2891,7 @@ int LoLEngine::processMagicVaelansCube() {
uint32 endTime = _system->getMillis() + 70 * _tickLength;
while (_system->getMillis() < endTime) {
- _screen->fadePaletteStep(tmpPal1, tmpPal2, _system->getMillis() - ctime, 70 * _tickLength);
+ _screen->timedPaletteFadeStep(tmpPal1, tmpPal2, _system->getMillis() - ctime, 70 * _tickLength);
updateInput();
}
@@ -2915,7 +2920,7 @@ int LoLEngine::processMagicVaelansCube() {
endTime = _system->getMillis() + 70 * _tickLength;
while (_system->getMillis() < endTime) {
- _screen->fadePaletteStep(tmpPal2, tmpPal1, _system->getMillis() - ctime, 70 * _tickLength);
+ _screen->timedPaletteFadeStep(tmpPal2, tmpPal1, _system->getMillis() - ctime, 70 * _tickLength);
updateInput();
}
@@ -3244,7 +3249,7 @@ void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFra
continue;
}
- if (!_screen->fadePaletteStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov)
+ if (!_screen->timedPaletteFadeStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov)
return;
if (del) {
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index dcd13804b3..d8df6b6703 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -270,6 +270,8 @@ public:
virtual void initKeymap();
+ void pauseEngineIntern(bool pause);
+
Screen *screen();
GUI *gui() const;
@@ -389,7 +391,7 @@ private:
uint8 _outroShapeTable[256];
// TODO: Consider moving these tables to kyra.dat
- static const char * const _outroShapeFileTable[];
+ static const char *const _outroShapeFileTable[];
static const uint8 _outroFrameTable[];
static const int16 _outroRightMonsterPos[];
@@ -400,6 +402,10 @@ private:
static const int _outroMonsterScaleTableX[];
static const int _outroMonsterScaleTableY[];
+ // Non-interactive demo
+ int playDemo();
+ void pauseDemoPlayer(bool toggle);
+
// timers
void setupTimers();
@@ -464,8 +470,6 @@ private:
const uint8 *_ingamePCSpeakerSoundIndex;
int _ingamePCSpeakerSoundIndexSize;
- AudioDataStruct _soundData[3];
-
// gui
void gui_drawPlayField();
void gui_drawScene(int pageNum);
@@ -810,7 +814,7 @@ private:
void decodeSjis(const char *src, char *dst);
int decodeCyrillic(const char *src, char *dst);
- static const char * const _languageExt[];
+ static const char *const _languageExt[];
// graphics
void setupScreenDims();
@@ -1009,8 +1013,8 @@ private:
uint8 *_tempBuffer5120;
- const char * const *_levelDatList;
- const char * const *_levelShpList;
+ const char *const *_levelDatList;
+ const char *const *_levelShpList;
const int8 *_dscWalls;
diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp
index 985286854b..fbddd620d1 100644
--- a/engines/kyra/magic_eob.cpp
+++ b/engines/kyra/magic_eob.cpp
@@ -60,7 +60,7 @@ void EoBCoreEngine::useMagicBookOrSymbol(int charIndex, int type) {
}
if (!_updateFlags)
- _screen->copyRegion(64, 121, 0, 0, 112, 56, 0, _useHiResDithering ? 4 : 10, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(64, 121, 0, 0, 112, 56, 0, 10, Screen::CR_NO_P_CHECK);
_updateFlags = 1;
gui_setPlayFieldButtons();
gui_drawSpellbook();
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index f2bc4e8146..5364cce270 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -62,7 +62,7 @@ public:
bool isInCacheList(Common::String name);
bool loadFileList(const Common::String &filedata);
- bool loadFileList(const char * const *filelist, uint32 numFiles);
+ bool loadFileList(const char *const *filelist, uint32 numFiles);
// This unloads *all* pakfiles, even kyra.dat and protected ones.
// It does not remove files from cache though!
@@ -87,7 +87,7 @@ protected:
Common::Archive *loadArchive(const Common::String &name, Common::ArchiveMemberPtr member);
Common::Archive *loadInstallerArchive(const Common::String &file, const Common::String &ext, const uint8 offset);
- bool loadProtectedFiles(const char * const * list);
+ bool loadProtectedFiles(const char *const * list);
void initializeLoaders();
@@ -742,6 +742,8 @@ enum KyraResources {
struct Shape;
struct Room;
struct AmigaSfxTable;
+struct HoFSeqData;
+struct HoFSeqItemAnimData;
class StaticResource {
public:
@@ -755,13 +757,13 @@ public:
bool init();
void deinit();
- const char * const *loadStrings(int id, int &strings);
+ const char *const *loadStrings(int id, int &strings);
const uint8 *loadRawData(int id, int &size);
const Shape *loadShapeTable(int id, int &entries);
const AmigaSfxTable *loadAmigaSfxTable(int id, int &entries);
const Room *loadRoomTable(int id, int &entries);
- const HofSeqData *loadHofSequenceData(int id, int &entries);
- const ItemAnimData_v1 *loadShapeAnimData_v1(int id, int &entries);
+ const HoFSeqData *loadHoFSequenceData(int id, int &entries);
+ const HoFSeqItemAnimData *loadHoFSeqItemAnimData(int id, int &entries);
const ItemAnimDefinition *loadItemAnimDefinition(int id, int &entries);
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
const uint16 *loadRawDataBe16(int id, int &entries);
@@ -803,8 +805,8 @@ private:
bool loadShapeTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
bool loadAmigaSfxTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
bool loadRoomTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
- bool loadHofSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size);
- bool loadShapeAnimData_v1(Common::SeekableReadStream &stream, void *&ptr, int &size);
+ bool loadHoFSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size);
+ bool loadHoFSeqItemAnimData(Common::SeekableReadStream &stream, void *&ptr, int &size);
bool loadItemAnimDefinition(Common::SeekableReadStream &stream, void *&ptr, int &size);
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
bool loadRawDataBe16(Common::SeekableReadStream &stream, void *&ptr, int &size);
@@ -829,8 +831,8 @@ private:
void freeShapeTable(void *&ptr, int &size);
void freeAmigaSfxTable(void *&ptr, int &size);
void freeRoomTable(void *&ptr, int &size);
- void freeHofSequenceData(void *&ptr, int &size);
- void freeHofShapeAnimDataV1(void *&ptr, int &size);
+ void freeHoFSequenceData(void *&ptr, int &size);
+ void freeHoFSeqItemAnimData(void *&ptr, int &size);
void freeItemAnimDefinition(void *&ptr, int &size);
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
void freeRawDataBe16(void *&ptr, int &size);
@@ -857,7 +859,7 @@ private:
kAmigaSfxTable = 4,
k2SeqData = 5,
- k2ShpAnimDataV1 = 6,
+ k2SeqItemAnimData = 6,
k2ItemAnimDefinition = 7,
kLoLCharData = 8,
diff --git a/engines/kyra/resource_intern.h b/engines/kyra/resource_intern.h
index 9d9574d823..e63eab7d6a 100644
--- a/engines/kyra/resource_intern.h
+++ b/engines/kyra/resource_intern.h
@@ -75,7 +75,7 @@ private:
const uint32 *findFile(const Common::String &name) const;
const uint16 _entryCount;
- const uint32 * const _fileEntries;
+ const uint32 *const _fileEntries;
};
class CachedArchive : public Common::Archive {
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index 41ba1e5e50..bacfb62c16 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -37,7 +37,7 @@
namespace Kyra {
-KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header) {
+KyraEngine_v1::ReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header) {
uint32 type = in->readUint32BE();
header.originalSave = false;
header.oldHeader = false;
@@ -140,7 +140,7 @@ Common::SeekableReadStream *KyraEngine_v1::openSaveForReading(const char *filena
if (!(in = _saveFileMan->openForLoading(filename)))
return 0;
- kReadSaveHeaderError errorCode = KyraEngine_v1::readSaveHeader(in, false, header);
+ ReadSaveHeaderError errorCode = KyraEngine_v1::readSaveHeader(in, false, header);
if (errorCode != kRSHENoError) {
if (errorCode == kRSHEInvalidType)
warning("No ScummVM Kyra engine savefile header");
diff --git a/engines/kyra/saveload_eob.cpp b/engines/kyra/saveload_eob.cpp
index f7d7d95b57..70c690e452 100644
--- a/engines/kyra/saveload_eob.cpp
+++ b/engines/kyra/saveload_eob.cpp
@@ -298,7 +298,7 @@ Common::Error EoBCoreEngine::loadGameState(int slot) {
useMagicBookOrSymbol(_openBookChar, _openBookType);
}
- _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, _useHiResDithering ? 1 : 12, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, 12, Screen::CR_NO_P_CHECK);
gui_toggleButtons();
setHandItem(_itemInHand);
@@ -680,7 +680,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
in.skip(4);
delete[] c->faceShape;
c->faceShape = 0;
- in.read(c->mageSpells, (_flags.gameID == GI_EOB1) ? 30 :80);
+ in.read(c->mageSpells, (_flags.gameID == GI_EOB1) ? 30 : 80);
in.read(c->clericSpells, (_flags.gameID == GI_EOB1) ? 30 : 80);
c->mageSpellsAvailableFlags = in.readUint32();
for (int ii = 0; ii < 27; ii++)
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index b76d1da52a..f8cca1ab7b 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -150,7 +150,7 @@ Common::Error KyraEngine_LoK::loadGameState(int slot) {
// it wasn't made sure that _curSfxFile was initialized
// so if it's out of bounds we just set it to 0.
if (_flags.platform == Common::kPlatformFMTowns) {
- if (_curSfxFile >= _soundData->fileListLen || _curSfxFile < 0)
+ if (!_sound->hasSoundFile(_curSfxFile))
_curSfxFile = 0;
_sound->loadSoundFile(_curSfxFile);
}
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index 3db055db90..53f000a50c 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -100,7 +100,7 @@ void EoBCoreEngine::loadLevel(int level, int sub) {
void EoBCoreEngine::readLevelFileData(int level) {
Common::String file;
Common::SeekableReadStream *s = 0;
- static const char *suffix[] = { "INF", "DRO", "ELO", 0 };
+ static const char *const suffix[] = { "INF", "DRO", "ELO", 0 };
for (const char *const *sf = suffix; *sf && !s; sf++) {
file = Common::String::format("LEVEL%d.%s", level, *sf);
@@ -144,10 +144,10 @@ Common::String EoBCoreEngine::initLevelData(int sub) {
const char *vmpPattern = (_flags.gameID == GI_EOB1 && (_configRenderMode == Common::kRenderEGA || _configRenderMode == Common::kRenderCGA)) ? "%s.EMP" : "%s.VMP";
Common::SeekableReadStream *s = _res->createReadStream(Common::String::format(vmpPattern, (const char *)pos));
- _vmpSize = s->readUint16LE();
+ uint16 size = s->readUint16LE();
delete[] _vmpPtr;
- _vmpPtr = new uint16[_vmpSize];
- for (int i = 0; i < _vmpSize; i++)
+ _vmpPtr = new uint16[size];
+ for (int i = 0; i < size; i++)
_vmpPtr[i] = s->readUint16LE();
delete s;
@@ -283,7 +283,7 @@ void EoBCoreEngine::loadVcnData(const char *file, const uint8 *cgaMapping) {
_screen->loadBitmap(Common::String::format(filePattern, _lastBlockDataFile).c_str(), 3, 3, 0);
const uint8 *pos = _screen->getCPagePtr(3);
- uint32 vcnSize = READ_LE_UINT16(pos) * _vcnBlockWidth * _vcnBlockHeight;
+ uint32 vcnSize = READ_LE_UINT16(pos) << 5;
pos += 2;
const uint8 *colMap = pos;
@@ -292,78 +292,28 @@ void EoBCoreEngine::loadVcnData(const char *file, const uint8 *cgaMapping) {
delete[] _vcnBlocks;
_vcnBlocks = new uint8[vcnSize];
- if (_flags.gameID == GI_EOB2 && _configRenderMode == Common::kRenderEGA) {
- const uint8 *egaTable = _screen->getEGADitheringTable();
- assert(_vmpPtr);
- assert(egaTable);
-
- delete[] _vcnTransitionMask;
- _vcnTransitionMask = new uint8[vcnSize];
-
- for (int i = 0; i < _vmpSize; i++) {
- uint16 vcnOffs = _vmpPtr[i] & 0x3FFF;
- const uint8 *src = &pos[vcnOffs << 5];
- uint8 *dst1 = &_vcnBlocks[vcnOffs << 7];
- uint8 *dst3 = &_vcnTransitionMask[vcnOffs << 7];
- int palOffset = (i < 330) ? 0 : _wllVcnOffset;
-
- for (int y = 0; y < 8; y++) {
- uint8 *dst2 = dst1 + 8;
- uint8 *dst4 = dst3 + 8;
-
- for (int x = 0; x < 4; x++) {
- uint8 in = *src++;
-
- dst1[0] = dst2[0] = egaTable[colMap[(in >> 4) + palOffset]];
- dst1[1] = dst2[1] = egaTable[colMap[(in & 0x0f) + palOffset]];
- dst3[0] = dst4[0] = (in & 0xf0) ? 0 : 0xff;
- dst3[1] = dst4[1] = (in & 0x0f) ? 0 : 0xff;
-
- dst1 += 2;
- dst2 += 2;
- dst3 += 2;
- dst4 += 2;
- }
-
- dst1 += 8;
- dst3 += 8;
- }
- }
- } else if (_configRenderMode == Common::kRenderCGA) {
+ if (_configRenderMode == Common::kRenderCGA) {
uint8 *tmp = _screen->encodeShape(0, 0, 1, 8, false, cgaMapping);
delete[] tmp;
delete[] _vcnTransitionMask;
_vcnTransitionMask = new uint8[vcnSize];
- uint8 tblSwitch = 0;
+ uint8 tblSwitch = 1;
uint8 *dst = _vcnBlocks;
uint8 *dst2 = _vcnTransitionMask;
while (dst < _vcnBlocks + vcnSize) {
const uint16 *table = _screen->getCGADitheringTable((tblSwitch++) & 1);
for (int ii = 0; ii < 2; ii++) {
- *dst++ = ((table[pos[0]] & 0x000f) << 4) | ((table[pos[0]] & 0x0f00) >> 8);
- *dst++= ((table[pos[1]] & 0x000f) << 4) | ((table[pos[1]] & 0x0f00) >> 8);
-
- uint8 msk = 0;
- if (pos[0] & 0xf0)
- msk |= 0x30;
- if (pos[0] & 0x0f)
- msk |= 0x03;
- *dst2++ = msk ^ 0x33;
-
- msk = 0;
- if (pos[1] & 0xf0)
- msk |= 0x30;
- if (pos[1] & 0x0f)
- msk |= 0x03;
- *dst2++ = msk ^ 0x33;
-
+ *dst++ = (table[pos[0]] & 0x000f) | ((table[pos[0]] & 0x0f00) >> 4);
+ *dst++ = (table[pos[1]] & 0x000f) | ((table[pos[1]] & 0x0f00) >> 4);
+ *dst2++ = ((pos[0] & 0xf0 ? 0x30 : 0) | (pos[0] & 0x0f ? 0x03 : 0)) ^ 0x33;
+ *dst2++ = ((pos[1] & 0xf0 ? 0x30 : 0) | (pos[1] & 0x0f ? 0x03 : 0)) ^ 0x33;
pos += 2;
}
}
} else {
- if (_configRenderMode != Common::kRenderEGA)
+ if (!(_flags.gameID == GI_EOB1 && _configRenderMode == Common::kRenderEGA))
memcpy(_vcnColTable, colMap, 32);
memcpy(_vcnBlocks, pos, vcnSize);
}
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 628654f127..d916348fb8 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -1183,11 +1183,11 @@ void LoLEngine::processGasExplosion(int soundId) {
p2[i * 3] = 0x3f;
uint32 ctime = _system->getMillis();
- while (_screen->fadePaletteStep(_screen->getPalette(0).getData(), p2, _system->getMillis() - ctime, 10))
+ while (_screen->timedPaletteFadeStep(_screen->getPalette(0).getData(), p2, _system->getMillis() - ctime, 10))
updateInput();
ctime = _system->getMillis();
- while (_screen->fadePaletteStep(p2, _screen->getPalette(0).getData(), _system->getMillis() - ctime, 50))
+ while (_screen->timedPaletteFadeStep(p2, _screen->getPalette(0).getData(), _system->getMillis() - ctime, 50))
updateInput();
}
diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp
index d6df523f82..c9486d9c45 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -22,7 +22,7 @@
#include "kyra/kyra_mr.h"
#include "kyra/screen_mr.h"
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "kyra/resource.h"
#include "common/system.h"
diff --git a/engines/kyra/scene_rpg.cpp b/engines/kyra/scene_rpg.cpp
index 3a694e05fe..5a0433323c 100644
--- a/engines/kyra/scene_rpg.cpp
+++ b/engines/kyra/scene_rpg.cpp
@@ -348,9 +348,6 @@ bool KyraRpgEngine::checkSceneUpdateNeed(int block) {
void KyraRpgEngine::drawVcnBlocks() {
uint8 *d = _sceneWindowBuffer;
uint16 *bdb = _blockDrawingBuffer;
- uint16 pitch = 22 * _vcnBlockWidth * 2;
- uint8 pxl[2];
- pxl[0] = pxl[1] = 0;
for (int y = 0; y < 15; y++) {
for (int x = 0; x < 22; x++) {
@@ -374,7 +371,7 @@ void KyraRpgEngine::drawVcnBlocks() {
uint8 *src = 0;
if (vcnOffset) {
- src = &_vcnBlocks[vcnOffset * _vcnBlockWidth * _vcnBlockHeight];
+ src = &_vcnBlocks[vcnOffset << 5];
wllVcnOffset = _wllVcnOffset;
} else {
// floor/ceiling blocks
@@ -384,37 +381,36 @@ void KyraRpgEngine::drawVcnBlocks() {
vcnOffset &= 0x3fff;
}
- src = (_vcfBlocks ? _vcfBlocks : _vcnBlocks) + (vcnOffset * _vcnBlockWidth * _vcnBlockHeight);
+ src = (_vcfBlocks ? _vcfBlocks : _vcnBlocks) + (vcnOffset << 5);
}
uint8 shift = _vcnShift ? _vcnShift[vcnOffset] : _blockBrightness;
if (horizontalFlip) {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- src += (_vcnBlockWidth - 1);
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ src += 3;
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src--;
- d[_vcnFlip0] = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
- d[_vcnFlip1] = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
- d += 2;
+ *d++ = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
+ *d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
}
- src += (_vcnBlockWidth + 1);
- d += (pitch - 2 * _vcnBlockWidth);
+ src += 5;
+ d += 168;
}
} else {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src++;
*d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
*d++ = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
}
- d += (pitch - 2 * _vcnBlockWidth);
+ d += 168;
}
}
- d -= (pitch * _vcnBlockHeight - 2 * _vcnBlockWidth);
+ d -= 1400;
if (vcnExtraOffsetWll) {
- d -= (2 * _vcnBlockWidth);
+ d -= 8;
horizontalFlip = false;
if (vcnExtraOffsetWll & 0x4000) {
@@ -423,38 +419,38 @@ void KyraRpgEngine::drawVcnBlocks() {
}
shift = _vcnShift ? _vcnShift[vcnExtraOffsetWll] : _blockBrightness;
- src = &_vcnBlocks[vcnExtraOffsetWll * _vcnBlockWidth * _vcnBlockHeight];
- uint8 *maskTable = _vcnTransitionMask ? &_vcnTransitionMask[vcnExtraOffsetWll * _vcnBlockWidth * _vcnBlockHeight] : 0;
+ src = &_vcnBlocks[vcnExtraOffsetWll << 5];
+ uint8 *maskTable = _vcnTransitionMask ? &_vcnTransitionMask[vcnExtraOffsetWll << 5] : 0;
if (horizontalFlip) {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- src += (_vcnBlockWidth - 1);
- maskTable += (_vcnBlockWidth - 1);
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ src += 3;
+ maskTable += 3;
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src--;
uint8 mask = _vcnTransitionMask ? *maskTable-- : 0;
- pxl[_vcnFlip0] = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
- pxl[_vcnFlip1] = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
+ uint8 h = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
+ uint8 l = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
if (_vcnTransitionMask)
- *d = (*d & (mask & 0x0f)) | pxl[0];
- else if (pxl[0])
- *d = pxl[0];
+ *d = (*d & (mask & 0x0f)) | h;
+ else if (h)
+ *d = h;
d++;
if (_vcnTransitionMask)
- *d = (*d & (mask >> 4)) | pxl[1];
- else if (pxl[1])
- *d = pxl[1];
+ *d = (*d & (mask >> 4)) | l;
+ else if (l)
+ *d = l;
d++;
}
- src += (_vcnBlockWidth + 1);
- maskTable += (_vcnBlockWidth + 1);
- d += (pitch - 2 * _vcnBlockWidth);
+ src += 5;
+ maskTable += 5;
+ d += 168;
}
} else {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src++;
uint8 mask = _vcnTransitionMask ? *maskTable++ : 0;
uint8 h = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
@@ -472,13 +468,13 @@ void KyraRpgEngine::drawVcnBlocks() {
*d = l;
d++;
}
- d += (pitch - 2 * _vcnBlockWidth);
+ d += 168;
}
}
- d -= (pitch * _vcnBlockHeight - 2 * _vcnBlockWidth);
+ d -= 1400;
}
}
- d += (pitch * (_vcnBlockHeight - 1));
+ d += 1232;
}
screen()->copyBlockToPage(_sceneDrawPage1, _sceneXoffset, 0, 176, 120, _sceneWindowBuffer);
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 04d805737f..6c77870210 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -51,8 +51,6 @@ Screen::Screen(KyraEngine_v1 *vm, OSystem *system, const ScreenDim *dimTable, co
memset(_fonts, 0, sizeof(_fonts));
memset(_pagePtrs, 0, sizeof(_pagePtrs));
- // Set scale factor to 1 (no scaling) for all pages
- memset(_pageScaleFactor, 1, sizeof(_pageScaleFactor));
// In VGA mode the odd and even page pointers point to the same buffers.
for (int i = 0; i < SCREEN_PAGE_NUM; i++)
_pageMapping[i] = i & ~1;
@@ -114,7 +112,7 @@ bool Screen::init() {
}
// CGA and EGA modes use additional pages to do the CGA/EGA specific graphics conversions.
- if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA) {
+ if (_vm->game() == GI_EOB1 && (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA)) {
for (int i = 0; i < 8; i++)
_pageMapping[i] = i;
}
@@ -154,9 +152,7 @@ bool Screen::init() {
}
int numPages = realPages.size();
- uint32 bufferSize = 0;
- for (int i = 0; i < numPages; i++)
- bufferSize += (SCREEN_PAGE_SIZE * _pageScaleFactor[realPages[i]] * _pageScaleFactor[realPages[i]]);
+ uint32 bufferSize = numPages * SCREEN_PAGE_SIZE;
uint8 *pagePtr = new uint8[bufferSize];
memset(pagePtr, 0, bufferSize);
@@ -167,7 +163,7 @@ bool Screen::init() {
_pagePtrs[i] = _pagePtrs[_pageMapping[i]];
} else {
_pagePtrs[i] = pagePtr;
- pagePtr += (SCREEN_PAGE_SIZE * _pageScaleFactor[i] * _pageScaleFactor[i]);
+ pagePtr += SCREEN_PAGE_SIZE;
}
}
@@ -292,7 +288,7 @@ void Screen::updateScreen() {
needRealUpdate = true;
if (!_useOverlays)
- _system->copyRectToScreen(getPagePtr(2), SCREEN_W, 320, 0, SCREEN_W * _pageScaleFactor[2], SCREEN_H * _pageScaleFactor[2]);
+ _system->copyRectToScreen(getPagePtr(2), SCREEN_W, 320, 0, SCREEN_W, SCREEN_H);
else
_system->copyRectToScreen(getPagePtr(2), SCREEN_W, 640, 0, SCREEN_W, SCREEN_H);
}
@@ -303,12 +299,12 @@ void Screen::updateScreen() {
void Screen::updateDirtyRects() {
if (_forceFullUpdate) {
- _system->copyRectToScreen(getCPagePtr(0), SCREEN_W * _pageScaleFactor[0], 0, 0, SCREEN_W * _pageScaleFactor[0], SCREEN_H * _pageScaleFactor[0]);
+ _system->copyRectToScreen(getCPagePtr(0), SCREEN_W, 0, 0, SCREEN_W, SCREEN_H);
} else {
const byte *page0 = getCPagePtr(0);
Common::List<Common::Rect>::iterator it;
for (it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) {
- _system->copyRectToScreen(page0 + it->top * SCREEN_W * _pageScaleFactor[0] + it->left, SCREEN_W * _pageScaleFactor[0], it->left, it->top, it->width(), it->height());
+ _system->copyRectToScreen(page0 + it->top * SCREEN_W + it->left, SCREEN_W, it->left, it->top, it->width(), it->height());
}
}
_forceFullUpdate = false;
@@ -493,7 +489,7 @@ void Screen::clearPage(int pageNum) {
assert(pageNum < SCREEN_PAGE_NUM);
if (pageNum == 0 || pageNum == 1)
_forceFullUpdate = true;
- memset(getPagePtr(pageNum), 0, SCREEN_PAGE_SIZE * _pageScaleFactor[_curPage] * _pageScaleFactor[_curPage]);
+ memset(getPagePtr(pageNum), 0, SCREEN_PAGE_SIZE);
clearOverlayPage(pageNum);
}
@@ -507,7 +503,7 @@ int Screen::setCurPage(int pageNum) {
void Screen::clearCurPage() {
if (_curPage == 0 || _curPage == 1)
_forceFullUpdate = true;
- memset(getPagePtr(_curPage), 0, SCREEN_PAGE_SIZE * _pageScaleFactor[_curPage] * _pageScaleFactor[_curPage]);
+ memset(getPagePtr(_curPage), 0, SCREEN_PAGE_SIZE);
clearOverlayPage(_curPage);
}
@@ -672,7 +668,7 @@ void Screen::setPagePixel(int pageNum, int x, int y, uint8 color) {
color |= (color << 4);
} else if (_renderMode == Common::kRenderCGA) {
color &= 0x03;
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
color &= 0x0F;
}
@@ -881,26 +877,16 @@ void Screen::copyToPage0(int y, int h, uint8 page, uint8 *seqBuf) {
}
void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage, int flags) {
- // Since we don't (need to) do any actual scaling, we check for compatible pages here
- assert(_pageScaleFactor[srcPage] == _pageScaleFactor[dstPage]);
-
- x1 *= _pageScaleFactor[srcPage];
- y1 *= _pageScaleFactor[srcPage];
- x2 *= _pageScaleFactor[dstPage];
- y2 *= _pageScaleFactor[dstPage];
- w *= _pageScaleFactor[srcPage];
- h *= _pageScaleFactor[srcPage];
-
if (x2 < 0) {
if (x2 <= -w)
return;
w += x2;
x1 -= x2;
x2 = 0;
- } else if (x2 + w >= SCREEN_W * _pageScaleFactor[dstPage]) {
- if (x2 > SCREEN_W * _pageScaleFactor[dstPage])
+ } else if (x2 + w >= SCREEN_W) {
+ if (x2 > SCREEN_W)
return;
- w = SCREEN_W * _pageScaleFactor[srcPage] - x2;
+ w = SCREEN_W - x2;
}
if (y2 < 0) {
@@ -909,14 +895,14 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
h += y2;
y1 -= y2;
y2 = 0;
- } else if (y2 + h >= SCREEN_H * _pageScaleFactor[dstPage]) {
- if (y2 > SCREEN_H * _pageScaleFactor[dstPage])
+ } else if (y2 + h >= SCREEN_H) {
+ if (y2 > SCREEN_H)
return;
- h = SCREEN_H * _pageScaleFactor[srcPage] - y2;
+ h = SCREEN_H - y2;
}
- const uint8 *src = getPagePtr(srcPage) + y1 * SCREEN_W * _pageScaleFactor[srcPage] + x1;
- uint8 *dst = getPagePtr(dstPage) + y2 * SCREEN_W * _pageScaleFactor[dstPage] + x2;
+ const uint8 *src = getPagePtr(srcPage) + y1 * SCREEN_W + x1;
+ uint8 *dst = getPagePtr(dstPage) + y2 * SCREEN_W + x2;
if (src == dst)
return;
@@ -929,8 +915,8 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
if (flags & CR_NO_P_CHECK) {
while (h--) {
memmove(dst, src, w);
- src += SCREEN_W * _pageScaleFactor[srcPage];
- dst += SCREEN_W * _pageScaleFactor[dstPage];
+ src += SCREEN_W;
+ dst += SCREEN_W;
}
} else {
while (h--) {
@@ -938,24 +924,19 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
if (src[i])
dst[i] = src[i];
}
- src += SCREEN_W * _pageScaleFactor[srcPage];
- dst += SCREEN_W * _pageScaleFactor[dstPage];
+ src += SCREEN_W;
+ dst += SCREEN_W;
}
}
}
void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *dest) {
- x *= _pageScaleFactor[pageNum];
- y *= _pageScaleFactor[pageNum];
- w *= _pageScaleFactor[pageNum];
- h *= _pageScaleFactor[pageNum];
-
if (y < 0) {
dest += (-y) * w;
h += y;
y = 0;
} else if (y + h > SCREEN_H) {
- h = SCREEN_H * _pageScaleFactor[pageNum] - y;
+ h = SCREEN_H - y;
}
if (x < 0) {
@@ -963,7 +944,7 @@ void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *
w += x;
x = 0;
} else if (x + w > SCREEN_W) {
- w = SCREEN_W * _pageScaleFactor[pageNum] - x;
+ w = SCREEN_W - x;
}
if (w < 0 || h < 0)
@@ -972,17 +953,14 @@ void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *
uint8 *pagePtr = getPagePtr(pageNum);
for (int i = y; i < y + h; ++i)
- memcpy(dest + (i - y) * w, pagePtr + i * SCREEN_W * _pageScaleFactor[pageNum] + x, w);
+ memcpy(dest + (i - y) * w, pagePtr + i * SCREEN_W + x, w);
}
void Screen::copyPage(uint8 srcPage, uint8 dstPage) {
- // Since we don't (need to) do any actual scaling, we check for compatible pages here
- assert(_pageScaleFactor[srcPage] == _pageScaleFactor[dstPage]);
-
uint8 *src = getPagePtr(srcPage);
uint8 *dst = getPagePtr(dstPage);
if (src != dst)
- memcpy(dst, src, SCREEN_W * _pageScaleFactor[srcPage] * SCREEN_H * _pageScaleFactor[srcPage]);
+ memcpy(dst, src, SCREEN_W * SCREEN_H);
copyOverlayRegion(0, 0, 0, 0, SCREEN_W, SCREEN_H, srcPage, dstPage);
if (dstPage == 0 || dstPage == 1)
@@ -1009,12 +987,7 @@ void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint
if (w < 0 || h < 0)
return;
- x *= _pageScaleFactor[pageNum];
- y *= _pageScaleFactor[pageNum];
- w *= _pageScaleFactor[pageNum];
- h *= _pageScaleFactor[pageNum];
-
- uint8 *dst = getPagePtr(pageNum) + y * SCREEN_W * _pageScaleFactor[pageNum] + x;
+ uint8 *dst = getPagePtr(pageNum) + y * SCREEN_W + x;
if (pageNum == 0 || pageNum == 1)
addDirtyRect(x, y, w, h);
@@ -1023,7 +996,7 @@ void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint
while (h--) {
memcpy(dst, src, w);
- dst += SCREEN_W * _pageScaleFactor[pageNum];
+ dst += SCREEN_W;
src += w;
}
}
@@ -1101,7 +1074,7 @@ void Screen::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum,
color |= (color << 4);
} else if (_renderMode == Common::kRenderCGA) {
color &= 0x03;
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
color &= 0x0F;
}
@@ -1178,7 +1151,7 @@ void Screen::drawLine(bool vertical, int x, int y, int length, int color) {
color |= (color << 4);
} else if (_renderMode == Common::kRenderCGA) {
color &= 0x03;
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
color &= 0x0F;
}
@@ -1187,7 +1160,7 @@ void Screen::drawLine(bool vertical, int x, int y, int length, int color) {
int currLine = 0;
while (currLine < length) {
*ptr = color;
- ptr += SCREEN_W * _pageScaleFactor[_curPage];
+ ptr += SCREEN_W;
currLine++;
}
} else {
@@ -1233,7 +1206,8 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
fnt = new AMIGAFont();
#ifdef ENABLE_EOB
else if (_vm->game() == GI_EOB1 || _vm->game() == GI_EOB2)
- fnt = new OldDOSFont(_renderMode, _vm->gameFlags().useHiRes);
+ // We use normal VGA rendering in EOB II, since we do the complete EGA dithering in updateScreen().
+ fnt = new OldDOSFont(_useHiResEGADithering ? Common::kRenderVGA : _renderMode);
#endif // ENABLE_EOB
else
fnt = new DOSFont();
@@ -1362,9 +1336,6 @@ void Screen::drawChar(uint16 c, int x, int y) {
if (x + charWidth > SCREEN_W || y + charHeight > SCREEN_H)
return;
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
-
if (useOverlay) {
uint8 *destPage = getOverlayPtr(_curPage);
if (!destPage) {
@@ -1376,11 +1347,11 @@ void Screen::drawChar(uint16 c, int x, int y) {
fnt->drawChar(c, destPage, 640);
} else {
- fnt->drawChar(c, getPagePtr(_curPage) + y * SCREEN_W * _pageScaleFactor[_curPage] + x, SCREEN_W * _pageScaleFactor[_curPage]);
+ fnt->drawChar(c, getPagePtr(_curPage) + y * SCREEN_W + x, SCREEN_W);
}
if (_curPage == 0 || _curPage == 1)
- addDirtyRect(x, y, charWidth * _pageScaleFactor[_curPage], charHeight * _pageScaleFactor[_curPage]);
+ addDirtyRect(x, y, charWidth, charHeight);
}
void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags, ...) {
@@ -2891,8 +2862,6 @@ void Screen::setShapePages(int page1, int page2, int minY, int maxY) {
void Screen::setMouseCursor(int x, int y, const byte *shape) {
if (!shape)
return;
- // if mouseDisabled
- // return _mouseShape
if (_vm->gameFlags().useAltShapeHeader)
shape += 2;
@@ -3215,7 +3184,7 @@ void Screen::addDirtyRect(int x, int y, int w, int h) {
Common::Rect r(x, y, x + w, y + h);
// Clip rectangle
- r.clip(SCREEN_W * _pageScaleFactor[0], SCREEN_H * _pageScaleFactor[0]);
+ r.clip(SCREEN_W, SCREEN_H);
// If it is empty after clipping, we are done
if (r.isEmpty())
@@ -3322,8 +3291,6 @@ void Screen::crossFadeRegion(int x1, int y1, int x2, int y2, int w, int h, int s
if (srcPage > 13 || dstPage > 13)
error("Screen::crossFadeRegion(): attempting to use temp page as source or dest page.");
- assert(_pageScaleFactor[srcPage] == _pageScaleFactor[dstPage]);
-
hideMouse();
uint16 *wB = (uint16 *)_pagePtrs[14];
@@ -3341,6 +3308,9 @@ void Screen::crossFadeRegion(int x1, int y1, int x2, int y2, int w, int h, int s
for (int i = 0; i < h; i++)
SWAP(hB[_vm->_rnd.getRandomNumberRng(0, h - 1)], hB[i]);
+ uint8 *s = _pagePtrs[srcPage];
+ uint8 *d = _pagePtrs[dstPage];
+
for (int i = 0; i < h; i++) {
int iH = i;
uint32 end = _system->getMillis() + 3;
@@ -3353,7 +3323,8 @@ void Screen::crossFadeRegion(int x1, int y1, int x2, int y2, int w, int h, int s
if (++iH >= h)
iH = 0;
- setPagePixel(dstPage, dX, dY, getPagePixel(srcPage, sX, sY));
+ d[dY * 320 + dX] = s[sY * 320 + sX];
+ addDirtyRect(dX, dY, 1, 1);
}
// This tries to speed things up, to get similiar speeds as in DOSBox etc.
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index 60bfeb3241..7f3abf8b5f 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -146,7 +146,7 @@ private:
*/
class OldDOSFont : public Font {
public:
- OldDOSFont(Common::RenderMode mode, bool useHiResEGADithering);
+ OldDOSFont(Common::RenderMode mode);
~OldDOSFont();
bool load(Common::SeekableReadStream &file);
@@ -168,8 +168,6 @@ private:
int _numGlyphs;
Common::RenderMode _renderMode;
- bool _useHiResEGADithering;
- bool _useLoResEGA;
static uint16 *_cgaDitheringTable;
static int _numRef;
@@ -426,12 +424,12 @@ public:
void copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src);
void shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPage, int ticks, bool transparent);
- virtual void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false);
+ void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false);
void clearPage(int pageNum);
- virtual uint8 getPagePixel(int pageNum, int x, int y);
- virtual void setPagePixel(int pageNum, int x, int y, uint8 color);
+ uint8 getPagePixel(int pageNum, int x, int y);
+ void setPagePixel(int pageNum, int x, int y, uint8 color);
const uint8 *getCPagePtr(int pageNum) const;
uint8 *getPageRect(int pageNum, int x, int y, int w, int h);
@@ -457,7 +455,7 @@ public:
void copyPalette(const int dst, const int src);
// gui specific (processing on _curPage)
- virtual void drawLine(bool vertical, int x, int y, int length, int color);
+ void drawLine(bool vertical, int x, int y, int length, int color);
void drawClippedLine(int x1, int y1, int x2, int y2, int color);
virtual void drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2);
void drawBox(int x1, int y1, int x2, int y2, int color);
@@ -472,7 +470,7 @@ public:
int getCharWidth(uint16 c) const;
int getTextWidth(const char *str) const;
- virtual void printText(const char *str, int x, int y, uint8 color1, uint8 color2);
+ void printText(const char *str, int x, int y, uint8 color1, uint8 color2);
virtual void setTextColorMap(const uint8 *cmap) = 0;
void setTextColor(const uint8 *cmap, int a, int b);
@@ -549,7 +547,7 @@ public:
protected:
uint8 *getPagePtr(int pageNum);
- void updateDirtyRects();
+ virtual void updateDirtyRects();
void updateDirtyRectsAmiga();
void updateDirtyRectsOvl();
@@ -573,14 +571,12 @@ protected:
uint8 *_pagePtrs[16];
uint8 *_sjisOverlayPtrs[SCREEN_OVLS_NUM];
- uint8 _pageScaleFactor[SCREEN_PAGE_NUM];
uint8 _pageMapping[SCREEN_PAGE_NUM];
bool _useOverlays;
bool _useSJIS;
bool _use16ColorMode;
bool _useHiResEGADithering;
- bool _useLoResEGA;
bool _isAmiga;
Common::RenderMode _renderMode;
@@ -600,7 +596,7 @@ protected:
int _animBlockSize;
// dimension handling
- const ScreenDim * const _dimTable;
+ const ScreenDim *const _dimTable;
ScreenDim **_customDimTable;
const int _dimTableCount;
int _curDimIndex;
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index ae75c111b4..7cb50502f7 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -52,10 +52,10 @@ Screen_EoB::Screen_EoB(EoBCoreEngine *vm, OSystem *system) : Screen(vm, system,
_cgaScaleTable = 0;
_gfxMaxY = 0;
_egaDitheringTable = 0;
- _egaPixelValueTable = 0;
+ _egaDitheringTempPage = 0;
_cgaMappingDefault = 0;
_cgaDitheringTables[0] = _cgaDitheringTables[1] = 0;
- _useLoResEGA = _useHiResEGADithering = false;
+ _useHiResEGADithering = false;
}
Screen_EoB::~Screen_EoB() {
@@ -63,18 +63,12 @@ Screen_EoB::~Screen_EoB() {
delete[] _dsTempPage;
delete[] _cgaScaleTable;
delete[] _egaDitheringTable;
- delete[] _egaPixelValueTable;
+ delete[] _egaDitheringTempPage;
delete[] _cgaDitheringTables[0];
delete[] _cgaDitheringTables[1];
}
bool Screen_EoB::init() {
- // Define hi-res pages for EGA mode in EOB II
- if (_vm->gameFlags().useHiRes) {
- for (int i = 0; i < 8; i++)
- _pageScaleFactor[i] = 2;
- }
-
if (Screen::init()) {
int temp;
_gfxMaxY = _vm->staticres()->loadRawData(kEoBBaseExpObjectY, temp);
@@ -98,13 +92,9 @@ bool Screen_EoB::init() {
if (_vm->gameFlags().useHiRes && _renderMode == Common::kRenderEGA) {
_useHiResEGADithering = true;
_egaDitheringTable = new uint8[256];
- _egaPixelValueTable = new uint8[256];
- for (int i = 0; i < 256; i++) {
+ _egaDitheringTempPage = new uint8[SCREEN_W * 2 * SCREEN_H * 2];
+ for (int i = 0; i < 256; i++)
_egaDitheringTable[i] = i & 0x0f;
- _egaPixelValueTable[i] = i & 0x0f;
- }
- } else if (_renderMode == Common::kRenderEGA) {
- _useLoResEGA = true;
} else if (_renderMode == Common::kRenderCGA) {
_cgaMappingDefault = _vm->staticres()->loadRawData(kEoB1CgaMappingDefault, temp);
_cgaDitheringTables[0] = new uint16[256];
@@ -144,14 +134,20 @@ void Screen_EoB::setMouseCursor(int x, int y, const byte *shape, const uint8 *ov
int mouseH = (shape[3]);
int colorKey = (_renderMode == Common::kRenderCGA) ? 0 : _cursorColorKey;
- uint8 *cursor = new uint8[mouseW * _pageScaleFactor[6] * mouseH * _pageScaleFactor[6]];
+ int scaleFactor = _useHiResEGADithering ? 2 : 1;
+
+ uint8 *cursor = new uint8[mouseW * scaleFactor * mouseH * scaleFactor];
// We use memset and copyBlockToPage instead of fillRect to make sure that the
// color key 0xFF doesn't get converted into EGA color
- memset(cursor, colorKey, mouseW * _pageScaleFactor[6] * mouseH * _pageScaleFactor[6]);
- copyBlockToPage(6, 0, 0, mouseW, mouseH, cursor);
+ memset(cursor, colorKey, mouseW * scaleFactor * mouseH * scaleFactor);
+ copyBlockToPage(6, 0, 0, mouseW * scaleFactor, mouseH * scaleFactor, cursor);
drawShape(6, shape, 0, 0, 0, 2, ovl);
CursorMan.showMouse(false);
- copyRegionToBuffer(6, 0, 0, mouseW, mouseH, cursor);
+
+ if (_useHiResEGADithering)
+ ditherRect(getCPagePtr(6), cursor, mouseW * scaleFactor, mouseW, mouseH, colorKey);
+ else
+ copyRegionToBuffer(6, 0, 0, mouseW, mouseH, cursor);
// Mouse cursor post processing for CGA mode. Unlike the original (which uses drawShape for the mouse cursor)
// the cursor manager cannot know whether a pixel value of 0 is supposed to be black or transparent. Thus, we
@@ -176,7 +172,7 @@ void Screen_EoB::setMouseCursor(int x, int y, const byte *shape, const uint8 *ov
}
}
- CursorMan.replaceCursor(cursor, mouseW * _pageScaleFactor[6], mouseH * _pageScaleFactor[6], x, y, colorKey);
+ CursorMan.replaceCursor(cursor, mouseW * scaleFactor, mouseH * scaleFactor, x, y, colorKey);
if (isMouseVisible())
CursorMan.showMouse(true);
delete[] cursor;
@@ -192,19 +188,6 @@ void Screen_EoB::loadFileDataToPage(Common::SeekableReadStream *s, int pageNum,
s->read(_pagePtrs[pageNum], size);
}
-void Screen_EoB::printText(const char *str, int x, int y, uint8 color1, uint8 color2) {
- if (_useHiResEGADithering) {
- // This is sort of an abuse of the text color map. But since EOB doesn't use it anyway
- // and the font drawing code needs access to both the original color values and the
- // EGA dithering colors we pass them on like this.
- uint8 cmap[2];
- cmap[0] = _egaDitheringTable[color2];
- cmap[1] = _egaDitheringTable[color1];
- setTextColor(cmap, 2, 3);
- }
- Screen::printText(str, x, y, color1, color2);
-}
-
void Screen_EoB::printShadedText(const char *string, int x, int y, int col1, int col2) {
printText(string, x - 1, y, 12, col2);
printText(string, x, y + 1, 12, 0);
@@ -272,7 +255,7 @@ void Screen_EoB::convertPage(int srcPage, int dstPage, const uint8 *cgaMapping)
if (cgaMapping)
generateCGADitheringTables(cgaMapping);
- uint16 *d = (uint16*)dst;
+ uint16 *d = (uint16 *)dst;
uint8 tblSwitch = 0;
for (int height = SCREEN_H; height; height--) {
const uint16 *table = _cgaDitheringTables[(tblSwitch++) & 1];
@@ -281,23 +264,10 @@ void Screen_EoB::convertPage(int srcPage, int dstPage, const uint8 *cgaMapping)
src += 2;
}
}
-
- } else if (_useHiResEGADithering) {
- for (int height = SCREEN_H; height; height--) {
- uint8 *dst2 = dst + SCREEN_W * 2;
- for (int width = SCREEN_W; width; width--) {
- uint8 in = _egaDitheringTable[*src++];
- *dst++ = *dst2++ = in >> 4;
- *dst++ = *dst2++ = in & 0x0f;
- }
- dst += (SCREEN_W * 2);
- }
-
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
uint32 len = SCREEN_W * SCREEN_H;
while (len--)
*dst++ = *src++ & 0x0f;
-
} else {
copyPage(srcPage, dstPage);
}
@@ -306,111 +276,6 @@ void Screen_EoB::convertPage(int srcPage, int dstPage, const uint8 *cgaMapping)
_forceFullUpdate = true;
}
-void Screen_EoB::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum, bool xored) {
- if (!_useHiResEGADithering) {
- Screen::fillRect(x1, y1, x2, y2, color, pageNum, xored);
- return;
- }
-
- assert(x2 < SCREEN_W && y2 < SCREEN_H);
- if (pageNum == -1)
- pageNum = _curPage;
-
- uint16 pitch = (SCREEN_W - (x2 - x1 + 1)) * _pageScaleFactor[pageNum];
- uint8 col1 = (_egaDitheringTable[color] >> 4);
- uint8 col2 = (_egaDitheringTable[color] & 0x0f);
-
- x1 *= _pageScaleFactor[pageNum];
- y1 *= _pageScaleFactor[pageNum];
- x2 *= _pageScaleFactor[pageNum];
- y2 *= _pageScaleFactor[pageNum];
- uint16 w = x2 - x1 + _pageScaleFactor[pageNum];
- uint16 h = y2 - y1 + _pageScaleFactor[pageNum];
-
- uint8 *dst = getPagePtr(pageNum) + y1 * SCREEN_W * _pageScaleFactor[pageNum] + x1;
- if (pageNum == 0 || pageNum == 1)
- addDirtyRect(x1, y1, w, h);
-
- while (h--) {
- for (uint16 w1 = w; w1; w1 -= 2) {
- *dst++ = col1;
- *dst++ = col2;
- }
- dst += pitch;
- }
-}
-
-void Screen_EoB::drawLine(bool vertical, int x, int y, int length, int color) {
- if (!_useHiResEGADithering) {
- Screen::drawLine(vertical, x, y, length, color);
- return;
- }
-
- uint16 pitch = (SCREEN_W - 1) * _pageScaleFactor[_curPage];
- uint8 col1 = (_egaDitheringTable[color] >> 4);
- uint8 col2 = (_egaDitheringTable[color] & 0x0f);
-
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
- length *= _pageScaleFactor[_curPage];
- uint8 *ptr = getPagePtr(_curPage) + y * SCREEN_W * _pageScaleFactor[_curPage] + x;
- uint8 *ptr2 = ptr + SCREEN_W * _pageScaleFactor[_curPage];
-
- if (vertical) {
- assert((y + length) <= SCREEN_H * _pageScaleFactor[_curPage]);
- int currLine = 0;
- while (currLine < length) {
- *ptr++ = col1;
- *ptr++ = col2;
- ptr += pitch;
- currLine++;
- }
- } else {
- assert((x + length) <= SCREEN_W * _pageScaleFactor[_curPage]);
- int currLine = 0;
- while (currLine < length) {
- *ptr++ = *ptr2++ = col1;
- *ptr++ = *ptr2++ = col2;
- currLine += 2;
- }
- }
-
- if (_curPage == 0 || _curPage == 1)
- addDirtyRect(x, y, (vertical) ? _pageScaleFactor[_curPage] : length, (vertical) ? length : _pageScaleFactor[_curPage]);
-}
-
-uint8 Screen_EoB::getPagePixel(int pageNum, int x, int y) {
- if (!_useHiResEGADithering)
- return Screen::getPagePixel(pageNum, x, y);
-
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
- uint8 *pos = &_pagePtrs[pageNum][y * SCREEN_W * _pageScaleFactor[_curPage] + x];
-
- return _egaPixelValueTable[(pos[0] << 4) | (pos[1] & 0x0f)];
-}
-
-void Screen_EoB::setPagePixel(int pageNum, int x, int y, uint8 color) {
- if (!_useHiResEGADithering) {
- Screen::setPagePixel(pageNum, x, y, color);
- return;
- }
-
- assert(pageNum < SCREEN_PAGE_NUM);
- assert(x >= 0 && x < SCREEN_W && y >= 0 && y < SCREEN_H);
-
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
-
- if (pageNum == 0 || pageNum == 1)
- addDirtyRect(x, y, _pageScaleFactor[pageNum], _pageScaleFactor[pageNum]);
-
- uint8 *pos = &_pagePtrs[pageNum][y * SCREEN_W * _pageScaleFactor[_curPage] + x];
- uint8 *pos2 = pos + SCREEN_W * _pageScaleFactor[_curPage];
- pos[0] = pos2[0] = _egaDitheringTable[color] >> 4;
- pos[1] = pos2[1] = _egaDitheringTable[color] & 0x0f;
-}
-
void Screen_EoB::setScreenPalette(const Palette &pal) {
if (_useHiResEGADithering && pal.getNumColors() != 16) {
generateEGADitheringTable(pal);
@@ -444,7 +309,7 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
uint8 *srcLineStart = getPagePtr(_curPage | 1) + y * 320 + (x << 3);
uint8 *src = srcLineStart;
- if (_useLoResEGA)
+ if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering)
encode8bit = false;
if (_renderMode == Common::kRenderCGA) {
@@ -568,11 +433,11 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
*dst++ = (w & 0xff);
*dst++ = (h & 0xff);
- if (_useLoResEGA) {
+ if (_renderMode != Common::kRenderEGA || _useHiResEGADithering) {
+ memset(dst, 0xff, 0x10);
+ } else {
for (int i = 0; i < 16; i++)
dst[i] = i;
- } else {
- memset(dst, 0xff, 0x10);
}
uint8 *pal = dst;
@@ -632,7 +497,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
y += _dsY1;
}
- dst += (_dsX1 << 3) * _pageScaleFactor[pageNum];
+ dst += (_dsX1 << 3);
int16 dX = x - (_dsX1 << 3);
int16 dY = y;
int16 dW = _dsX2 - _dsX1;
@@ -704,11 +569,11 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
marginRight = w2 - marginLeft - width;
}
- dst += (dY * SCREEN_W * _pageScaleFactor[pageNum] * _pageScaleFactor[pageNum] + dX * _pageScaleFactor[pageNum]);
+ dst += (dY * SCREEN_W + dX);
uint8 *dstL = dst;
if (pageNum == 0 || pageNum == 1)
- addDirtyRect(rX * _pageScaleFactor[pageNum], rY * _pageScaleFactor[pageNum], rW * _pageScaleFactor[pageNum], rH * _pageScaleFactor[pageNum]);
+ addDirtyRect(rX, rY, rW, rH);
while (dH--) {
int16 xpos = (int16) marginLeft;
@@ -743,7 +608,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
} while (xpos > 0);
}
- dst -= (xpos * _pageScaleFactor[pageNum]);
+ dst -= xpos;
xpos += width;
while (xpos > 0) {
@@ -752,12 +617,12 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
src += pixelStep;
if (m) {
- drawShapeSetPixel(dst, c, SCREEN_W * _pageScaleFactor[pageNum]);
- dst += _pageScaleFactor[pageNum];
+ drawShapeSetPixel(dst, c);
+ dst++;
xpos--;
} else {
uint8 len = (flags & 1) ? src[1] : src[0];
- dst += (len * _pageScaleFactor[pageNum]);
+ dst += len;
xpos -= len;
src += pixelStep;
}
@@ -783,7 +648,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
} while (xpos > 0);
}
- dstL += SCREEN_W * _pageScaleFactor[pageNum] * _pageScaleFactor[pageNum];
+ dstL += SCREEN_W;
dst = dstL;
if (flags & 1)
src = src2 + 1;
@@ -851,12 +716,12 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
if (d < width)
width = d;
- dst += (dY * _pageScaleFactor[pageNum] * SCREEN_W * _pageScaleFactor[pageNum] + dX * _pageScaleFactor[pageNum]);
+ dst += (dY * SCREEN_W + dX);
if (pageNum == 0 || pageNum == 1)
- addDirtyRect(rX * _pageScaleFactor[pageNum], rY * _pageScaleFactor[pageNum], rW * _pageScaleFactor[pageNum], rH * _pageScaleFactor[pageNum]);
+ addDirtyRect(rX, rY, rW, rH);
- int pitch = SCREEN_W * _pageScaleFactor[pageNum] * _pageScaleFactor[pageNum] - width * _pageScaleFactor[pageNum];
+ int pitch = SCREEN_W - width;
int16 lineSrcStep = (w2 - width) / pixelsPerByte;
uint8 lineSrcStepRemainder = (w2 - width) % pixelsPerByte;
@@ -899,8 +764,8 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
}
uint8 col = (pixelsPerByte == 2) ? pal[(in >> shift) & pixelPackingMask] : (*dst & ((trans >> shift) & (pixelPackingMask))) | pal[(in >> shift) & pixelPackingMask];
if (col || pixelsPerByte == 4)
- drawShapeSetPixel(dst, col, SCREEN_W * _pageScaleFactor[pageNum]);
- dst += _pageScaleFactor[pageNum];
+ drawShapeSetPixel(dst, col);
+ dst++;
shift = ((shift - (pixelStep * pixelPacking)) & 7);
}
src += lineSrcStep;
@@ -922,7 +787,7 @@ const uint8 *Screen_EoB::scaleShapeStep(const uint8 *shp) {
uint8 *dst = (shp != _dsTempPage) ? _dsTempPage : _dsTempPage + 6000;
uint8 *d = dst;
uint8 pixelsPerByte = *d++ = *shp++;
- assert (pixelsPerByte > 1);
+ assert(pixelsPerByte > 1);
uint16 h = shp[0] + 1;
d[0] = d[2] = (h << 1) / 3;
@@ -976,7 +841,7 @@ const uint8 *Screen_EoB::scaleShapeStep(const uint8 *shp) {
shp += w2;
}
- return (const uint8*)dst;
+ return (const uint8 *)dst;
}
const uint8 *Screen_EoB::generateShapeOverlay(const uint8 *shp, int paletteOverlayIndex) {
@@ -1367,15 +1232,55 @@ const uint8 *Screen_EoB::getEGADitheringTable() {
return _egaDitheringTable;
}
-void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col, uint16 pitch) {
+void Screen_EoB::updateDirtyRects() {
+ if (!_useHiResEGADithering) {
+ Screen::updateDirtyRects();
+ return;
+ }
+
+ if (_forceFullUpdate) {
+ ditherRect(getCPagePtr(0), _egaDitheringTempPage, SCREEN_W * 2, SCREEN_W, SCREEN_H);
+ _system->copyRectToScreen(_egaDitheringTempPage, SCREEN_W * 2, 0, 0, SCREEN_W * 2, SCREEN_H * 2);
+ } else {
+ const byte *page0 = getCPagePtr(0);
+ Common::List<Common::Rect>::iterator it;
+ for (it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) {
+ ditherRect(page0 + it->top * SCREEN_W + it->left, _egaDitheringTempPage, SCREEN_W * 2, it->width(), it->height());
+ _system->copyRectToScreen(_egaDitheringTempPage, SCREEN_W * 2, it->left * 2, it->top * 2, it->width() * 2, it->height() * 2);
+ }
+ }
+ _forceFullUpdate = false;
+ _dirtyRects.clear();
+}
+
+void Screen_EoB::ditherRect(const uint8 *src, uint8 *dst, int dstPitch, int srcW, int srcH, int colorKey) {
+ while (srcH--) {
+ uint8 *dst2 = dst + dstPitch;
+ for (int i = 0; i < srcW; i++) {
+ int in = *src++;
+ if (in != colorKey) {
+ in = _egaDitheringTable[in];
+ *dst++ = *dst2++ = in >> 4;
+ *dst++ = *dst2++ = in & 0x0f;
+ } else {
+ dst[0] = dst[1] = dst2[0] = dst2[1] = colorKey;
+ dst += 2;
+ dst2 += 2;
+ }
+ }
+ src += (SCREEN_W - srcW);
+ dst += ((dstPitch - srcW) * 2);
+ }
+}
+
+void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col) {
if ((_renderMode != Common::kRenderCGA && _renderMode != Common::kRenderEGA) || _useHiResEGADithering) {
if (_shapeFadeMode[0]) {
if (_shapeFadeMode[1]) {
- col = _useHiResEGADithering ? _egaPixelValueTable[(dst[0] << 4) | (dst[1] & 0x0f)] : *dst;
+ col = *dst;
} else {
_shapeFadeInternal &= 7;
- col = _useHiResEGADithering ? _egaPixelValueTable[(dst[_shapeFadeInternal] << 4) | (dst[_shapeFadeInternal + 1] & 0x0f)] : dst[_shapeFadeInternal];
- _shapeFadeInternal++;
+ col = *(dst + _shapeFadeInternal++);
}
}
@@ -1386,13 +1291,7 @@ void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col, uint16 pitch) {
}
}
- if (_useHiResEGADithering) {
- col = _egaDitheringTable[col];
- dst[0] = dst[pitch] = col >> 4;
- dst[1] = dst[pitch + 1] = col & 0x0f;
- } else {
- *dst = col;
- }
+ *dst = col;
}
void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc, uint32 transOffsetDst, uint32 transOffsetSrc) {
@@ -1479,10 +1378,6 @@ void Screen_EoB::generateEGADitheringTable(const Palette &pal) {
}
*dst++ = col;
}
-
- memset(_egaPixelValueTable, 0, 256);
- for (int i = 0; i < 256; i++)
- _egaPixelValueTable[_egaDitheringTable[i]] = i;
}
void Screen_EoB::generateCGADitheringTables(const uint8 *mappingData) {
@@ -1546,11 +1441,10 @@ const uint8 Screen_EoB::_egaMatchTable[] = {
uint16 *OldDOSFont::_cgaDitheringTable = 0;
int OldDOSFont::_numRef = 0;
-OldDOSFont::OldDOSFont(Common::RenderMode mode, bool useHiResEGADithering) : _renderMode(mode), _useHiResEGADithering(useHiResEGADithering) {
+OldDOSFont::OldDOSFont(Common::RenderMode mode) : _renderMode(mode) {
_data = 0;
_width = _height = _numGlyphs = 0;
_bitmapOffsets = 0;
- _useLoResEGA = (_renderMode == Common::kRenderEGA && !_useHiResEGADithering);
_numRef++;
if (!_cgaDitheringTable && _numRef == 1) {
@@ -1662,22 +1556,14 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
int w = (_width - 1) >> 3;
pitch -= _width;
- if (_useHiResEGADithering)
- pitch *= 2;
-
uint8 color1 = _colorMap[1];
uint8 color2 = _colorMap[0];
- uint8 colEGA11 = _colorMap[3] >> 4;
- uint8 colEGA12 = _colorMap[3] & 0x0f;
- uint8 colEGA21 = _colorMap[2] >> 4;
- uint8 colEGA22 = _colorMap[2] & 0x0f;
-
static const uint16 cgaColorMask[] = { 0, 0x5555, 0xAAAA, 0xFFFF };
uint16 cgaMask1 = cgaColorMask[color1 & 3];
uint16 cgaMask2 = cgaColorMask[color2 & 3];
- if (_renderMode == Common::kRenderCGA || _useLoResEGA) {
+ if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA) {
color1 &= 0x0f;
color2 &= 0x0f;
}
@@ -1734,27 +1620,13 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
break;
}
- if (_useHiResEGADithering) {
- if (s & i) {
- if (color1) {
- dst[0] = dst2[0] = colEGA11;
- dst[1] = dst2[1] = colEGA12;
- }
- } else if (color2) {
- dst[0] = dst2[0] = colEGA21;
- dst[1] = dst2[1] = colEGA22;
- }
- dst += 2;
- dst2 += 2;
- } else {
- if (s & i) {
- if (color1)
- *dst = color1;
- } else if (color2) {
- *dst = color2;
- }
- dst++;
+ if (s & i) {
+ if (color1)
+ *dst = color1;
+ } else if (color2) {
+ *dst = color2;
}
+ dst++;
}
if (cW)
diff --git a/engines/kyra/screen_eob.h b/engines/kyra/screen_eob.h
index fc40cfe903..934483d146 100644
--- a/engines/kyra/screen_eob.h
+++ b/engines/kyra/screen_eob.h
@@ -45,7 +45,6 @@ public:
void loadFileDataToPage(Common::SeekableReadStream *s, int pageNum, uint32 size);
- void printText(const char *str, int x, int y, uint8 color1, uint8 color2);
void printShadedText(const char *string, int x, int y, int col1, int col2);
void loadEoBBitmap(const char *file, const uint8 *cgaMapping, int tempPage, int destPage, int convertToPage);
@@ -53,11 +52,6 @@ public:
void convertPage(int srcPage, int dstPage, const uint8 *cgaMapping);
- void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false);
- void drawLine(bool vertical, int x, int y, int length, int color);
- uint8 getPagePixel(int pageNum, int x, int y);
- void setPagePixel(int pageNum, int x, int y, uint8 color);
-
void setScreenPalette(const Palette &pal);
void getRealPalette(int num, uint8 *dst);
@@ -68,7 +62,7 @@ public:
const uint8 *generateShapeOverlay(const uint8 *shp, int paletteOverlayIndex);
void setShapeFrame(int x1, int y1, int x2, int y2);
- void setShapeFadeMode (uint8 i, bool b);
+ void setShapeFadeMode(uint8 i, bool b);
void setGfxParameters(int x, int y, int col);
void drawExplosion(int scale, int radius, int numElements, int stepSize, int aspectRatio, const uint8 *colorTable, int colorTableSize);
@@ -88,7 +82,10 @@ public:
const uint8 *getEGADitheringTable();
private:
- void drawShapeSetPixel(uint8 *dst, uint8 col, uint16 pitch);
+ void updateDirtyRects();
+ void ditherRect(const uint8 *src, uint8 *dst, int dstPitch, int srcW, int srcH, int colorKey = -1);
+
+ void drawShapeSetPixel(uint8 *dst, uint8 col);
void scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc, uint32 transOffsetDst, uint32 transOffsetSrc);
void scaleShapeProcessLine4Bit(uint8 *&dst, const uint8 *&src);
bool posWithinRect(int posX, int posY, int x1, int y1, int x2, int y2);
@@ -115,14 +112,14 @@ private:
const uint8 *_cgaMappingDefault;
uint8 *_egaDitheringTable;
- uint8 *_egaPixelValueTable;
+ uint8 *_egaDitheringTempPage;
static const uint8 _egaMatchTable[];
static const ScreenDim _screenDimTable[];
static const int _screenDimTableCount;
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index ac6ee5eb77..a8ec2cc4ca 100644
--- a/engines/kyra/screen_hof.cpp
+++ b/engines/kyra/screen_hof.cpp
@@ -93,46 +93,4 @@ void Screen_HoF::cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int
}
}
-void Screen_HoF::copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes) {
- const uint8 *src = getPagePtr(srcPage) + srcPos;
- uint8 *dst = getPagePtr(dstPage) + dstPos;
- memcpy(dst, src, numBytes);
-}
-
-void Screen_HoF::copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX, int dstY, int dstW, int dstH, const ScreenDim *dim, bool flag) {
- int x0 = dim->sx << 3;
- int y0 = dim->sy;
- int w0 = dim->w << 3;
- int h0 = dim->h;
-
- int x1 = dstX;
- int y1 = dstY;
- int w1 = dstW;
- int h1 = dstH;
-
- int x2, y2, w2;
-
- calcBounds(w0, h0, x1, y1, w1, h1, x2, y2, w2);
-
- const uint8 *src = getPagePtr(srcPage) + (320 * srcH) + srcW;
- uint8 *dst = getPagePtr(dstPage) + 320 * (y0 + y1);
-
- for (int y = 0; y < h1; y++) {
- const uint8 *s = src + x2;
- uint8 *d = dst + x0 + x1;
-
- if (flag)
- d += (h1 >> 1);
-
- for (int x = 0; x < w1; x++) {
- if (*s)
- *d = *s;
- s++;
- d++;
- }
- dst += 320;
- src += 320;
- }
-}
-
} // End of namespace Kyra
diff --git a/engines/kyra/screen_hof.h b/engines/kyra/screen_hof.h
index 51c6a001fa..95f461677d 100644
--- a/engines/kyra/screen_hof.h
+++ b/engines/kyra/screen_hof.h
@@ -37,8 +37,7 @@ public:
// sequence player
void generateGrayOverlay(const Palette &pal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag);
void cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW, int dstH, int dstX, int dstY, int cmpW, int cmpH, int cmpPage);
- void copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes);
- void copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX,int dstY, int dstW, int dstH, const ScreenDim *d, bool flag = false);
+
private:
KyraEngine_HoF *_vm;
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 3726b1f4b9..4e64f51269 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -233,8 +233,6 @@ void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
*(p + tmp) = col;
p += 2;
}
- } else {
- w = 1;
}
if (s == 1) {
@@ -810,34 +808,6 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT
return res;
}
-bool Screen_LoL::fadePaletteStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime) {
- Palette &p1 = getPalette(1);
-
- bool res = false;
- for (int i = 0; i < p1.getNumColors() * 3; i++) {
- uint8 out = 0;
-
- if (elapsedTime < targetTime) {
- int32 d = ((pal2[i] & 0x3f) - (pal1[i] & 0x3f));
- if (d)
- res = true;
-
- int32 val = ((((d << 8) / (int32)targetTime) * (int32)elapsedTime) >> 8);
- out = ((pal1[i] & 0x3f) + (int8)val);
- } else {
- out = p1[i] = (pal2[i] & 0x3f);
- res = false;
- }
-
- (*_internFadePalette)[i] = out;
- }
-
- setScreenPalette(*_internFadePalette);
- updateScreen();
-
- return res;
-}
-
Palette **Screen_LoL::generateFadeTable(Palette **dst, Palette *src1, Palette *src2, int numTabs) {
int len = _use16ColorMode ? 48 : 768;
if (!src1)
diff --git a/engines/kyra/screen_lol.h b/engines/kyra/screen_lol.h
index 09496705bb..8ceb8431bc 100644
--- a/engines/kyra/screen_lol.h
+++ b/engines/kyra/screen_lol.h
@@ -65,7 +65,6 @@ public:
void loadSpecialColors(Palette &dst);
void copyColor(int dstColorIndex, int srcColorIndex);
bool fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedTicks, uint32 totalTicks);
- bool fadePaletteStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime);
Palette **generateFadeTable(Palette **dst, Palette *src1, Palette *src2, int numTabs);
void generateGrayOverlay(const Palette &Pal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool skipSpecialColors);
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 7d4b064e2a..407d73a8ec 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -162,6 +162,34 @@ void Screen_v2::getFadeParams(const Palette &pal, int delay, int &delayInc, int
}
}
+bool Screen_v2::timedPaletteFadeStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 totalTime) {
+ Palette &p1 = getPalette(1);
+
+ bool res = false;
+ for (int i = 0; i < p1.getNumColors() * 3; i++) {
+ uint8 out = 0;
+
+ if (elapsedTime < totalTime) {
+ int32 d = ((pal2[i] & 0x3f) - (pal1[i] & 0x3f));
+ if (d)
+ res = true;
+
+ int32 val = ((((d << 8) / (int32)totalTime) * (int32)elapsedTime) >> 8);
+ out = ((pal1[i] & 0x3f) + (int8)val);
+ } else {
+ out = p1[i] = (pal2[i] & 0x3f);
+ res = false;
+ }
+
+ (*_internFadePalette)[i] = out;
+ }
+
+ setScreenPalette(*_internFadePalette);
+ updateScreen();
+
+ return res;
+}
+
const uint8 *Screen_v2::getPtrToShape(const uint8 *shpFile, int shape) {
uint16 shapes = READ_LE_UINT16(shpFile);
@@ -322,6 +350,48 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
addDirtyRect(x2, y2, w2, h2);
}
+void Screen_v2::copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes) {
+ const uint8 *src = getPagePtr(srcPage) + srcPos;
+ uint8 *dst = getPagePtr(dstPage) + dstPos;
+ memcpy(dst, src, numBytes);
+}
+
+void Screen_v2::copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX, int dstY, int dstW, int dstH, const ScreenDim *dim, bool flag) {
+ int x0 = dim->sx << 3;
+ int y0 = dim->sy;
+ int w0 = dim->w << 3;
+ int h0 = dim->h;
+
+ int x1 = dstX;
+ int y1 = dstY;
+ int w1 = dstW;
+ int h1 = dstH;
+
+ int x2, y2, w2;
+
+ calcBounds(w0, h0, x1, y1, w1, h1, x2, y2, w2);
+
+ const uint8 *src = getPagePtr(srcPage) + (320 * srcH) + srcW;
+ uint8 *dst = getPagePtr(dstPage) + 320 * (y0 + y1);
+
+ for (int y = 0; y < h1; y++) {
+ const uint8 *s = src + x2;
+ uint8 *d = dst + x0 + x1;
+
+ if (flag)
+ d += (h1 >> 1);
+
+ for (int x = 0; x < w1; x++) {
+ if (*s)
+ *d = *s;
+ s++;
+ d++;
+ }
+ dst += 320;
+ src += 320;
+ }
+}
+
bool Screen_v2::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, int &x2, int &y2, int &w2) {
x2 = 0;
y2 = 0;
diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h
index f84c923128..6f4d67136a 100644
--- a/engines/kyra/screen_v2.h
+++ b/engines/kyra/screen_v2.h
@@ -43,6 +43,8 @@ public:
virtual void getFadeParams(const Palette &pal, int delay, int &delayInc, int &diff);
+ bool timedPaletteFadeStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 totalTime);
+
// shape handling
uint8 *getPtrToShape(uint8 *shpFile, int shape);
const uint8 *getPtrToShape(const uint8 *shpFile, int shape);
@@ -66,6 +68,10 @@ public:
// special WSA handling
void wsaFrameAnimationStep(int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim);
+
+ // used in non-interactive HoF/LoL demos
+ void copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes);
+ void copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX,int dstY, int dstW, int dstH, const ScreenDim *d, bool flag = false);
protected:
uint8 *_wsaFrameAnimBuffer;
};
diff --git a/engines/kyra/script_eob.h b/engines/kyra/script_eob.h
index fc8b4cfc31..ff3a5e0fac 100644
--- a/engines/kyra/script_eob.h
+++ b/engines/kyra/script_eob.h
@@ -91,7 +91,7 @@ private:
EoBCoreEngine *_vm;
Screen_EoB *_screen;
- typedef Common::Functor1Mem<int8*, int, EoBInfProcessor> InfProc;
+ typedef Common::Functor1Mem<int8 *, int, EoBInfProcessor> InfProc;
struct InfOpcode : private Common::NonCopyable {
InfOpcode(InfProc *p, const char *d) : proc(p), desc(d) {}
~InfOpcode() { delete proc; }
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 177d7993a0..c358091223 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -299,7 +299,7 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) {
const bool isPC98 = (_vm->gameFlags().platform == Common::kPlatformPC98);
if (filename[0] && (_vm->speechEnabled() || !_vm->gameFlags().isTalkie))
- _vm->sound()->voicePlay(filename);
+ _vm->sound()->voicePlay(filename, 0, 255, 255, !_vm->gameFlags().isTalkie);
if (text[0] == '$')
text = strchr(text + 1, '$') + 1;
@@ -736,7 +736,7 @@ int TIMInterpreter::cmd_playVocFile(const uint16 *param) {
const int volume = (param[1] * 255) / 100;
if (index < ARRAYSIZE(_vocFiles) && !_vocFiles[index].empty())
- _vm->sound()->voicePlay(_vocFiles[index].c_str(), 0, volume, true);
+ _vm->sound()->voicePlay(_vocFiles[index].c_str(), 0, volume, 255, true);
else if (index == 7 && !_vm->gameFlags().isTalkie)
_vm->sound()->playTrack(index);
else
diff --git a/engines/kyra/sequences_eob.cpp b/engines/kyra/sequences_eob.cpp
index 4a9f7d8a65..d28da4df4b 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -706,7 +706,7 @@ void EoBIntroPlayer::waterdeepExit() {
_vm->delay(60 * _vm->_tickLength);
for (int i = 0; i < 56 && !_vm->shouldQuit() && !_vm->skipFlag(); i++) {
- uint32 end = _vm->_system->getMillis() +_vm->_tickLength;
+ uint32 end = _vm->_system->getMillis() + _vm->_tickLength;
_screen->copyRegion(0, 136 + i, 80, 16, 160, 56 - i, 2, 0, Screen::CR_NO_P_CHECK);
_screen->copyRegion(160, 0, 80, 72 - i, 160, 96 + i, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index f2abfb81dc..207d0ced15 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -21,94 +21,659 @@
*/
#include "kyra/kyra_hof.h"
-#include "kyra/timer.h"
+#include "kyra/screen_hof.h"
+#include "kyra/screen_lol.h"
#include "kyra/resource.h"
#include "kyra/sound.h"
+#include "kyra/sequences_hof.h"
+#include "kyra/timer.h"
#include "common/system.h"
namespace Kyra {
-void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
- seq_init();
+enum SequenceID {
+ kSequenceNoLooping = -1,
+ kSequenceVirgin = 0,
+ kSequenceWestwood,
+ kSequenceTitle,
+ kSequenceOverview,
+ kSequenceLibrary,
+ kSequenceHand,
+ kSequencePoint,
+ kSequenceZanfaun,
+
+ kSequenceFunters,
+ kSequenceFerb,
+ kSequenceFish,
+ kSequenceFheep,
+ kSequenceFarmer,
+ kSequenceFuards,
+ kSequenceFirates,
+ kSequenceFrash,
+
+ kSequenceHoFDemoVirgin,
+ kSequenceHoFDemoWestwood,
+ kSequenceHoFDemoTitle,
+ kSequenceHoFDemoHill,
+ kSequenceHoFDemoOuthome,
+ kSequenceHoFDemoWharf,
+ kSequenceHoFDemoDinob,
+ kSequenceHoFDemoFisher,
+
+// The following enums remain active even if LoL is disabled
+ kSequenceLoLDemoScene1,
+ kSequenceLoLDemoText1,
+ kSequenceLoLDemoScene2,
+ kSequenceLoLDemoText2,
+ kSequenceLoLDemoScene3,
+ kSequenceLoLDemoText3,
+ kSequenceLoLDemoScene4,
+ kSequenceLoLDemoText4,
+ kSequenceLoLDemoScene5,
+ kSequenceLoLDemoText5,
+ kSequenceLoLDemoScene6,
+
+ kSequenceArraySize
+};
+
+enum NestedSequenceID {
+ kNestedSequenceFiggle = 0,
+
+ kNestedSequenceOver1,
+ kNestedSequenceOver2,
+ kNestedSequenceForest,
+ kNestedSequenceDragon,
+ kNestedSequenceDarm,
+ kNestedSequenceLibrary2,
+ kNestedSequenceLibrary3,
+ kNestedSequenceMarco,
+ kNestedSequenceHand1a,
+ kNestedSequenceHand1b,
+ kNestedSequenceHand1c,
+ kNestedSequenceHand2,
+ kNestedSequenceHand3,
+ kNestedSequenceHand4,
+
+ kNestedSequenceHoFDemoWharf2,
+ kNestedSequenceHoFDemoDinob2,
+ kNestedSequenceHoFDemoWater,
+ kNestedSequenceHoFDemoBail,
+ kNestedSequenceHoFDemoDig,
+
+ kNestedSequenceArraySize
+};
+
+typedef int (SeqPlayer_HOF::*SeqProc)(WSAMovie_v2 *, int, int, int);
+
+struct SeqPlayerConfig {
+ SeqPlayerConfig(const HoFSeqData *data, const SeqProc *callbacks, const SeqProc *nestedCallbacks) : seq(data->seq), seqProc(callbacks), numSeq(data->numSeq), nestedSeq(data->nestedSeq), nestedSeqProc(nestedCallbacks), numNestedSeq(data->numNestedSeq) {}
+ const HoFSequence *seq;
+ const SeqProc *seqProc;
+ int numSeq;
+ const HoFNestedSequence *nestedSeq;
+ const SeqProc *nestedSeqProc;
+ int numNestedSeq;
+};
+
+class SeqPlayer_HOF {
+public:
+ SeqPlayer_HOF(KyraEngine_v1 *vm, Screen_v2 *screen, OSystem *system, bool startupSaveLoadable = false);
+ ~SeqPlayer_HOF();
+
+ int play(SequenceID firstScene, SequenceID loopStartScene);
+ void pause(bool toggle);
+
+ static SeqPlayer_HOF *instance() { return _instance; }
+
+private:
+ // Init
+ void setupCallbacks();
+
+ // Playback loop
+ void runLoop();
+ void playScenes();
+
+ bool checkAbortPlayback();
+ bool checkPlaybackStatus();
+
+ bool _abortRequested;
+ uint32 _pauseStart;
+
+ // Sequence transitions
+ void doTransition(int type);
+ void nestedFrameAnimTransition(int srcPage, int dstPage, int delaytime, int steps, int x, int y, int w, int h, int openClose, int directionFlags);
+ void nestedFrameFadeTransition(const char *cmpFile);
+
+ // Animations
+ void playAnimation(WSAMovie_v2 *wsaObj, int startFrame, int numFrames, int frameRate, int x, int y, const SeqProc callback, Palette *fadePal1, Palette *fadePal2, int fadeRate, bool restoreScreen);
+ void playDialogueAnimation(uint16 strID, uint16 soundID, int textColor, int textPosX, int textPosY, int textWidth, WSAMovie_v2 *wsaObj, int animStartFrame, int animLastFrame, int animPosX, int animPosY);
+
+ void startNestedAnimation(int animSlot, int sequenceID);
+ void closeNestedAnimation(int animSlot);
+ void unloadNestedAnimation(int animSlot);
+ void doNestedFrameTransition(int transitionType, int animSlot);
+ void updateAllNestedAnimations();
+ bool updateNestedAnimation(int animSlot);
+
+ struct AnimSlot {
+ SeqProc callback;
+ WSAMovie_v2 *movie;
+ const FrameControl *control;
+ int16 flags;
+ uint16 startFrame;
+ uint16 endFrame;
+ uint16 frameDelay;
+ uint32 nextFrame;
+ uint16 currentFrame;
+ uint16 lastFrame;
+ uint16 x;
+ uint16 y;
+ uint16 fadeInTransitionType;
+ uint16 fadeOutTransitionType;
+ };
+
+ AnimSlot _animSlots[8];
+
+ bool _updateAnimations;
+ uint32 _animDuration;
+ int _animCurrentFrame;
+ int _callbackCurrentFrame;
+
+ // The only reason to declare these here (instead of just locally) is being able to increase them after pausing the Engine
+ uint32 _specialAnimTimeOutTotal;
+ uint32 _specialAnimFrameTimeOut;
+
+ // Subtitles/Dialogue/Sound
+ void playSoundEffect(uint16 id, int16 vol);
+ void playSoundAndDisplaySubTitle(uint16 id);
+ void printFadingText(uint16 strID, int x, int y, const uint8 *colorMap, uint8 textcolor);
+
+ int displaySubTitle(uint16 strID, uint16 posX, uint16 posY, int duration, uint16 width);
+ void updateSubTitles();
+ char *preprocessString(const char *str, int width);
+ void waitForSubTitlesTimeout();
+ uint32 ticksTillSubTitlesTimeout();
+ void resetAllTextSlots();
+
+ void fadeOutMusic();
+
+ struct TextSlot {
+ uint16 strIndex;
+ uint16 x;
+ uint16 y;
+ uint16 width;
+ int32 duration;
+ uint32 startTime;
+ int16 textcolor;
+ };
- bool allowSkip = (_flags.isDemo && !_flags.isTalkie) || startSeq != kSequenceTitle;
+ TextSlot _textSlots[10];
- if (endSeq == -1)
- endSeq = startSeq;
+ char *_tempString;
- assert(startSeq >= 0 && endSeq < kSequenceArraySize && startSeq <= endSeq);
+ uint8 _textColor[2];
+ uint8 _textColorMap[16];
+ int _textDuration[33];
- _sound->setSoundList(&_soundData[(startSeq > kSequenceZanfaun) ? kMusicFinale : kMusicIntro]);
- _sound->loadSoundFile(0);
+ const char *const *_sequenceStrings;
+ const char *const *_sequenceSoundList;
+ int _sequenceSoundListSize;
- _screen->_charWidth = (_flags.gameID == GI_LOL) ? 0 : -2;
+ static const uint8 _textColorPresets[];
- memset(_activeWSA, 0, sizeof(ActiveWSA) * 8);
- for (int i = 0; i < 8; ++i)
- _activeWSA[i].flags = -1;
+ // HOF credits
+ void playHoFTalkieCredits();
+ void displayHoFTalkieScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed, int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData = 0, const char *const *specialData = 0);
+
+ bool _talkieFinaleExtraFlag;
+
+ // HOF+LOL demo specific
+ void updateDemoAdText(int bottom, int top);
+
+ ActiveItemAnim _hofDemoActiveItemAnim[5];
+ const HoFSeqItemAnimData *_hofDemoAnimData;
+
+ uint32 _fisherAnimCurTime;
+ int _scrollProgressCounter;
+
+ uint8 *_hofDemoShapeData;
+ uint8 *_hofDemoItemShapes[20];
+
+ // Misc
+ void delayTicks(uint32 ticks);
+ void delayUntil(uint32 dest);
+ void setCountDown(uint32 ticks);
+ bool countDownRunning();
+
+ uint32 _countDownRemainder;
+ uint32 _countDownLastUpdate;
+
+ enum SeqPlayerTargetInfo {
+ kHoF = 0,
+ kHoFDemo,
+ kLoLDemo
+ };
+
+ SeqPlayerTargetInfo _target;
+ int _firstScene, _loopStartScene, _curScene, _preventSkipBeforeScene, _lastScene;
+ bool _startupSaveLoadable, _isFinale, _preventLooping;
+
+ SeqPlayerConfig *_config;
+
+ MainMenu *_menu;
+ int _result;
+
+ bool _abortPlayback;
+
+ KyraEngine_v1 *_vm;
+ Screen_v2 *_screen;
+ // We might consider getting rid of Screen_HoF, since there are only 2 methods left in that class anyway
+ Screen_HoF *_screenHoF;
+ OSystem *_system;
+
+ static SeqPlayer_HOF *_instance;
+
+private:
+ // Sequence specific callback functions
+ int cbHOF_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_title(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_overview(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_library(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_point(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_zanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOF_over1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_over2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_forest(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_dragon(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_darm(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_library2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_marco(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOF_funters(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_ferb(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_fish(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_fheep(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_farmer(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_fuards(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_firates(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_frash(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOF_figgle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOFDEMO_virgin(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_title(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_hill(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_outhome(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_wharf(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_dinob(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOFDEMO_wharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_dinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_water(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_bail(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_dig(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+#ifdef ENABLE_LOL
+ int cbLOLDEMO_scene1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene4(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_text5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+#endif // ENABLE_LOL
+};
+
+SeqPlayer_HOF *SeqPlayer_HOF::_instance = 0;
+
+SeqPlayer_HOF::SeqPlayer_HOF(KyraEngine_v1 *vm, Screen_v2 *screen, OSystem *system, bool startupSaveLoadable) : _vm(vm), _screen(screen), _system(system), _startupSaveLoadable(startupSaveLoadable) {
+ // We use a static pointer for pauseEngine functionality. Since we don't
+ // ever need more than one SeqPlayer_HOF object at the same time we keep
+ // this simple and just add an assert to detect typos, regressions, etc.
+ assert(_instance == 0);
+
+ memset(_animSlots, 0, sizeof(_animSlots));
+ memset(_textSlots, 0, sizeof(_textSlots));
+ memset(_hofDemoActiveItemAnim, 0, sizeof(_hofDemoActiveItemAnim));
+
+ _screenHoF = _vm->game() == GI_KYRA2 ? (Screen_HoF*)screen : 0;
+ _config = 0;
+ _result = 0;
+ _sequenceSoundList = 0;
+ _hofDemoAnimData = 0;
+ _hofDemoShapeData = 0;
+ _isFinale = false;
+ _preventLooping = false;
+ _menu = 0;
+ _abortRequested = false;
+ _pauseStart = 0;
+
+ _updateAnimations = false;
+ _animDuration = 0;
+ _animCurrentFrame = 0;
+ _callbackCurrentFrame = 0;
+
+ _abortPlayback = false;
+ _curScene = 0;
+ _preventSkipBeforeScene = -1;
+ _lastScene = 0;
+
+ _scrollProgressCounter = 0;
+ _fisherAnimCurTime = 0;
+
+ _tempString = new char[200];
+
+ _countDownRemainder = 0;
+ _countDownLastUpdate = 0;
+
+ int tempSize = 0;
+ _vm->resource()->unloadAllPakFiles();
+ _vm->resource()->loadPakFile(StaticResource::staticDataFilename());
+ const char *const *files = _vm->staticres()->loadStrings(k2SeqplayPakFiles, tempSize);
+ _vm->resource()->loadFileList(files, tempSize);
+
+ _sequenceStrings = _vm->staticres()->loadStrings(k2SeqplayStrings, tempSize);
+ uint8 multiplier = (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) ? 12 : 8;
+ for (int i = 0; i < MIN(33, tempSize); i++)
+ _textDuration[i] = (int) strlen(_sequenceStrings[i]) * multiplier;
+
+ if (_sequenceSoundList) {
+ for (int i = 0; i < _sequenceSoundListSize; i++) {
+ if (_sequenceSoundList[i])
+ delete[] _sequenceSoundList[i];
+ }
+ delete[] _sequenceSoundList;
+ _sequenceSoundList = 0;
+ }
- memset(_activeText, 0, sizeof(ActiveText) * 10);
- seq_resetAllTextEntries();
+ const char *const *seqSoundList = _vm->staticres()->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize);
+
+ // replace sequence talkie files with localized versions
+ const char *const *tlkfiles = _vm->staticres()->loadStrings(k2SeqplayTlkFiles, tempSize);
+ char **tmpSndLst = new char *[_sequenceSoundListSize];
+
+ for (int i = 0; i < _sequenceSoundListSize; i++) {
+ const int len = strlen(seqSoundList[i]);
+
+ tmpSndLst[i] = new char[len + 1];
+ tmpSndLst[i][0] = 0;
+
+ if (tlkfiles && len > 1) {
+ for (int ii = 0; ii < tempSize; ii++) {
+ if (strlen(tlkfiles[ii]) > 1 && !scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1]))
+ strcpy(tmpSndLst[i], tlkfiles[ii]);
+ }
+ }
+
+ if (tmpSndLst[i][0] == 0)
+ strcpy(tmpSndLst[i], seqSoundList[i]);
+ }
+
+ tlkfiles = seqSoundList = 0;
+ _vm->staticres()->unloadId(k2SeqplayTlkFiles);
+ _vm->staticres()->unloadId(k2SeqplaySfxFiles);
+ _sequenceSoundList = tmpSndLst;
+
+ if (_vm->gameFlags().platform == Common::kPlatformPC98)
+ _vm->sound()->loadSoundFile("SOUND.DAT");
+
+ _screen->loadFont(_screen->FID_GOLDFONT_FNT, "GOLDFONT.FNT");
+ _screen->setFont(_vm->gameFlags().lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
+
+ if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) {
+ if (_vm->game() == GI_KYRA2) {
+ _hofDemoAnimData = _vm->staticres()->loadHoFSeqItemAnimData(k2SeqplayShapeAnimData, tempSize);
+ uint8 *shp = _vm->resource()->fileData("ICONS.SHP", 0);
+ uint32 outsize = READ_LE_UINT16(shp + 4);
+ _hofDemoShapeData = new uint8[outsize];
+ Screen::decodeFrame4(shp + 10, _hofDemoShapeData, outsize);
+ for (int i = 0; i < 20; i++)
+ _hofDemoItemShapes[i] = _screen->getPtrToShape(_hofDemoShapeData, i);
+ delete[] shp;
+ }
+ } else {
+ const MainMenu::StaticData data = {
+ { _sequenceStrings[97], _sequenceStrings[96], _sequenceStrings[95], _sequenceStrings[98], 0 },
+ { 0x01, 0x04, 0x0C, 0x04, 0x00, 0xd7, 0xd6 },
+ { 0xd8, 0xda, 0xd9, 0xd8 },
+ (_vm->gameFlags().lang == Common::JA_JPN) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT, 240
+ };
+
+ _menu = new MainMenu(_vm);
+ _menu->init(data, MainMenu::Animation());
+ }
+
+ _instance = this;
+}
+SeqPlayer_HOF::~SeqPlayer_HOF() {
+ _instance = 0;
+
+ if (_sequenceSoundList) {
+ for (int i = 0; i < _sequenceSoundListSize; i++) {
+ if (_sequenceSoundList[i])
+ delete[] _sequenceSoundList[i];
+ }
+ delete[] _sequenceSoundList;
+ _sequenceSoundList = NULL;
+ }
+
+ delete[] _tempString;
+ delete[] _hofDemoShapeData;
+ delete _menu;
+
+ if (_vm->game() != GI_LOL)
+ _screen->setFont(_vm->gameFlags().lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+}
+
+int SeqPlayer_HOF::play(SequenceID firstScene, SequenceID loopStartScene) {
+ bool incompatibleData = false;
+ AudioResourceSet soundSet = kMusicIntro;
+ _firstScene = firstScene;
+ _loopStartScene = loopStartScene;
+ _preventLooping = false;
+ _result = 0;
+
+ if (firstScene >= kSequenceArraySize || firstScene < kSequenceVirgin || loopStartScene >= kSequenceArraySize || loopStartScene < kSequenceNoLooping) {
+ return 0;
+ } else if (firstScene >= kSequenceLoLDemoScene1) {
+#ifndef ENABLE_LOL
+ error("SeqPlayer_HOF::play(): The Lands of Lore sub engine (including this non-interactive demo) has been disabled in this build");
+#endif
+ incompatibleData = (_vm->game() != GI_LOL);
+ _firstScene -= kSequenceLoLDemoScene1;
+ if (loopStartScene != kSequenceNoLooping)
+ _loopStartScene -= kSequenceLoLDemoScene1;
+ _lastScene = kSequenceLoLDemoScene6 - kSequenceLoLDemoScene1;
+ _target = kLoLDemo;
+ _screen->_charWidth = 0;
+ } else if (firstScene >= kSequenceHoFDemoVirgin) {
+ incompatibleData = (_vm->game() != GI_KYRA2 || !_vm->gameFlags().isDemo || _vm->gameFlags().isTalkie);
+ _firstScene -= kSequenceHoFDemoVirgin;
+ if (loopStartScene != kSequenceNoLooping)
+ _loopStartScene -= kSequenceHoFDemoVirgin;
+ _lastScene = kSequenceHoFDemoFisher - kSequenceHoFDemoVirgin;
+ _target = kHoFDemo;
+ _screen->_charWidth = -2;
+ } else {
+ _isFinale = _preventLooping = firstScene > kSequenceZanfaun;
+ incompatibleData = (_vm->game() != GI_KYRA2 || (_vm->gameFlags().isDemo && (!_vm->gameFlags().isTalkie || _isFinale)));
+ _target = kHoF;
+ _screen->_charWidth = -2;
+ if (_isFinale) {
+ soundSet = kMusicFinale;
+ _lastScene = kSequenceFrash;
+ } else {
+ _lastScene = kSequenceZanfaun;
+ }
+ }
+
+ if (incompatibleData)
+ error("SeqPlayer_HOF::play(): Specified sequences do not match the available sequence data for this target");
+
+ _vm->sound()->selectAudioResourceSet(soundSet);
+ _vm->sound()->loadSoundFile(0);
+
+ setupCallbacks();
+ runLoop();
+
+ return _result;
+}
+
+void SeqPlayer_HOF::pause(bool toggle) {
+ if (toggle) {
+ _pauseStart = _system->getMillis();
+ } else {
+ uint32 pausedTime = _system->getMillis() - _pauseStart;
+ _pauseStart = 0;
+
+ _countDownLastUpdate += pausedTime;
+ _fisherAnimCurTime += pausedTime;
+ _specialAnimTimeOutTotal += pausedTime;
+ _specialAnimFrameTimeOut += pausedTime;
+
+ for (int i = 0; i < 10; i++) {
+ if (_textSlots[i].duration != -1)
+ _textSlots[i].startTime += pausedTime;
+ }
+
+ for (int i = 0; i < 8; i++) {
+ if (_animSlots[i].flags != -1)
+ _animSlots[i].nextFrame += pausedTime;
+ }
+ }
+}
+
+void SeqPlayer_HOF::setupCallbacks() {
+#define SCB(x) &SeqPlayer_HOF::cbHOF_##x
+ static const SeqProc seqCallbacksHoF[] = { 0, SCB(westwood), SCB(title), SCB(overview), SCB(library), SCB(hand), SCB(point), SCB(zanfaun), SCB(funters), SCB(ferb), SCB(fish), SCB(fheep), SCB(farmer), SCB(fuards), SCB(firates), SCB(frash) };
+ static const SeqProc nestedSeqCallbacksHoF[] = { SCB(figgle), SCB(over1), SCB(over2), SCB(forest), SCB(dragon), SCB(darm), SCB(library2), SCB(library2), SCB(marco), SCB(hand1a), SCB(hand1b), SCB(hand1c), SCB(hand2), SCB(hand3), 0 };
+#undef SCB
+#define SCB(x) &SeqPlayer_HOF::cbHOFDEMO_##x
+ static const SeqProc seqCallbacksHoFDemo[] = { SCB(virgin), SCB(westwood), SCB(title), SCB(hill), SCB(outhome), SCB(wharf), SCB(dinob), SCB(fisher) };
+ static const SeqProc nestedSeqCallbacksHoFDemo[] = { SCB(wharf2), SCB(dinob2), SCB(water), SCB(bail), SCB(dig), 0 };
+#undef SCB
+#ifdef ENABLE_LOL
+#define SCB(x) &SeqPlayer_HOF::cbLOLDEMO_##x
+ static const SeqProc seqCallbacksLoLDemo[] = { SCB(scene1), 0, SCB(scene2), 0, SCB(scene3), 0, SCB(scene4), 0, SCB(scene5), SCB(text5), SCB(scene6), 0 };
+#undef SCB
+#else
+ static const SeqProc seqCallbacksLoLDemo[] = { 0 };
+#endif
+ static const SeqProc nestedSeqCallbacksLoLDemo[] = { 0 };
+
+ static const SeqProc *const seqCallbacks[] = { seqCallbacksHoF, seqCallbacksHoFDemo, seqCallbacksLoLDemo};
+ static const SeqProc *const nestedSeqCallbacks[] = { nestedSeqCallbacksHoF, nestedSeqCallbacksHoFDemo, nestedSeqCallbacksLoLDemo};
+
+ int tmpSize = 0;
+ delete _config;
+ _config = new SeqPlayerConfig(_vm->staticres()->loadHoFSequenceData(k2SeqplaySeqData, tmpSize), seqCallbacks[_target], nestedSeqCallbacks[_target]);
+}
+
+void SeqPlayer_HOF::runLoop() {
+ memset(_animSlots, 0, sizeof(_animSlots));
+ memset(_textSlots, 0, sizeof(_textSlots));
+ memset(_hofDemoActiveItemAnim, 0, sizeof(_hofDemoActiveItemAnim));
+ for (int i = 0; i < 8; ++i)
+ _animSlots[i].flags = -1;
+
+ _screen->clearPage(10);
+ _screen->clearPage(12);
_screen->hideMouse();
int oldPage = _screen->setCurPage(2);
for (int i = 0; i < 4; ++i)
_screen->getPalette(i).clear();
- _screen->clearPage(10);
- _screen->clearPage(12);
+ _updateAnimations = false;
+ _animCurrentFrame = 0;
+ _textColor[0] = _textColor[1] = 0;
+ _curScene = _firstScene;
- _seqSubframePlaying = false;
+ do {
+ playScenes();
+ doTransition(0);
+ resetAllTextSlots();
+ fadeOutMusic();
+ _firstScene = ((!_startupSaveLoadable || _preventLooping) && _curScene >= _loopStartScene) ? kSequenceNoLooping : _loopStartScene;
+ } while (!_vm->shouldQuit() && _firstScene != kSequenceNoLooping);
- _seqWsaCurrentFrame = 0;
- _seqTextColor[0] = _seqTextColor[1] = 0;
- _seqEndTime = 0;
- _menuChoice = 0;
+ checkPlaybackStatus();
- for (int seqNum = startSeq; seqNum <= endSeq && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice); seqNum++) {
- _screen->clearPage(0);
- _screen->clearPage(8);
- _screen->copyPalette(1, 0);
- _seqFrameCounter = 0;
- _seqStartTime = _system->getMillis();
+ for (int i = 0; i < 8; i++)
+ unloadNestedAnimation(i);
+
+ if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie)
+ _screen->fadeToBlack();
+
+ if (!_result)
+ delayTicks(75);
+
+ _screen->setCurPage(oldPage);
+ _screen->_charWidth = 0;
+ _screen->showMouse();
+}
+
+void SeqPlayer_HOF::playScenes() {
+ _vm->sound()->stopAllSoundEffects();
+ _curScene = _firstScene;
+
+ _screen->copyPalette(1, 0);
+ WSAMovie_v2 anim(_vm);
+ _abortRequested = false;
- allowSkip = (_flags.isDemo && !_flags.isTalkie) || seqNum != kSequenceTitle;
+ _scrollProgressCounter = 0;
+
+ while (!_vm->shouldQuit()) {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+
+ _callbackCurrentFrame = 0;
+
+ if (_curScene > _lastScene)
+ break;
- Sequence cseq = _sequences->seq[seqNum];
- SeqProc cb = _callbackS[seqNum];
+ const Kyra::HoFSequence &sq = _config->seq[_curScene];
- if (cseq.flags & 2) {
- _screen->loadBitmap(cseq.cpsFile, 2, 2, &_screen->getPalette(0));
+ if (sq.flags & 2) {
+ _screen->loadBitmap(sq.cpsFile, 2, 2, &_screen->getPalette(0));
_screen->setScreenPalette(_screen->getPalette(0));
} else {
_screen->setCurPage(2);
_screen->clearPage(2);
- _screen->loadPalette("goldfont.col", _screen->getPalette(0));
+ _screen->loadPalette("GOLDFONT.COL", _screen->getPalette(0));
}
- if (cb && !(_flags.isDemo && !_flags.isTalkie))
- (this->*cb)(0, 0, 0, -1);
+ if (_config->seqProc[_curScene] && !(_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie))
+ (this->*_config->seqProc[_curScene])(0, 0, 0, -1);
- if (cseq.flags & 1) {
- _seqWsa->close();
- _seqWsa->open(cseq.wsaFile, 0, &_screen->getPalette(0));
- _screen->setScreenPalette(_screen->getPalette(0));
- _seqWsa->displayFrame(0, 2, cseq.xPos, cseq.yPos, 0, 0, 0);
+ if (sq.flags & 1) {
+ anim.open(sq.wsaFile, 0, &_screen->getPalette(0));
+ if (!(sq.flags & 2))
+ anim.displayFrame(0, 2, sq.xPos, sq.yPos, 0x4000, 0, 0);
}
- if (cseq.flags & 4) {
+ if (sq.flags & 4) {
int cp = _screen->setCurPage(2);
- Screen::FontId cf = _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
- if (cseq.stringIndex1 != -1) {
- int sX = (320 - _screen->getTextWidth(_sequenceStrings[cseq.stringIndex1])) / 2;
- _screen->printText(_sequenceStrings[cseq.stringIndex1], sX, 100 - _screen->getFontHeight(), 1, 0);
- }
- if (cseq.stringIndex2 != -1) {
- int sX = (320 - _screen->getTextWidth(_sequenceStrings[cseq.stringIndex2])) / 2;
- _screen->printText(_sequenceStrings[cseq.stringIndex2], sX, 100, 1, 0);
- }
+ Screen::FontId cf = _screen->setFont(_vm->gameFlags().lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
+
+ if (sq.stringIndex1 != -1)
+ _screen->printText(_sequenceStrings[sq.stringIndex1], (320 - _screen->getTextWidth(_sequenceStrings[sq.stringIndex1])) / 2, 100 - _screen->getFontHeight(), 1, 0);
+
+ if (sq.stringIndex2 != -1)
+ _screen->printText(_sequenceStrings[sq.stringIndex2], (320 - _screen->getTextWidth(_sequenceStrings[sq.stringIndex2])) / 2, 100, 1, 0);
+
_screen->setFont(cf);
_screen->setCurPage(cp);
}
@@ -118,235 +683,1107 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
_screen->copyPage(2, 10);
_screen->copyPage(12, 2);
- seq_sequenceCommand(cseq.startupCommand);
+ doTransition(sq.fadeInTransitionType);
- if (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if (!(checkAbortPlayback() || _vm->shouldQuit() || _result)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
- if (cseq.flags & 1) {
- int x = cseq.xPos;
- int y = cseq.yPos;
+ //_screen->copyPage(2, 6);
- _seqFrameDelay = cseq.frameDelay;
+ if (sq.flags & 1) {
+ playAnimation(&anim, sq.startFrame, sq.numFrames, sq.duration, sq.xPos, sq.yPos, _config->seqProc[_curScene], &_screen->getPalette(1), &_screen->getPalette(0), 30, 0);
+ anim.close();
+ } else {
+ _animDuration = sq.duration;
+ setCountDown(_animDuration);
- if (_seqWsa) {
- if (x < 0) {
- _seqWsa->setWidth(_seqWsa->width() + x);
- x = 0;
- }
+ while (!checkAbortPlayback() && !_vm->shouldQuit() && (countDownRunning() || _updateAnimations)) {
+ uint32 endFrame = (_system->getMillis() + _vm->tickLength()) & ~(_vm->tickLength() - 1);
+ updateAllNestedAnimations();
- if (y < 0) {
- _seqWsa->setHeight(_seqWsa->height() + y);
- y = 0;
- }
+ if (_config->seqProc[_curScene])
+ (this->*_config->seqProc[_curScene])(0, 0, 0, 0);
- if (cseq.xPos + _seqWsa->width() > 319)
- _seqWsa->setWidth(320 - cseq.xPos);
+ updateSubTitles();
- if (cseq.yPos + _seqWsa->height() > 199)
- _seqWsa->setHeight(199 - cseq.yPos);
- }
- uint8 dir = (cseq.startFrame > cseq.numFrames) ? 0 : 1;
- _seqWsaCurrentFrame = cseq.startFrame;
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->copyPage(12, 2);
- bool loop = true;
- while (loop && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
+ do {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+ } while (_system->getMillis() < endFrame);
+ }
+ }
- if (_seqWsa || !cb)
- _screen->copyPage(12, 2);
+ if (_config->seqProc[_curScene] && !(_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie))
+ (this->*_config->seqProc[_curScene])(0, 0, 0, -2);
- if (cb) {
- int f = _seqWsaCurrentFrame % _seqWsa->frames();
- (this->*cb)(_seqWsa, cseq.xPos, cseq.yPos, f);
- }
+ uint32 textTimeOut = ticksTillSubTitlesTimeout();
+ setCountDown(sq.timeout < textTimeOut ? textTimeOut : sq.timeout);
- if (_seqWsa) {
- int f = _seqWsaCurrentFrame % _seqWsa->frames();
- _seqWsa->displayFrame(f, 2, cseq.xPos, cseq.yPos, 0, 0, 0);
- }
+ while (!checkAbortPlayback() && !_vm->shouldQuit() && (countDownRunning() || _updateAnimations)) {
+ updateAllNestedAnimations();
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->copyPage(12, 2);
+ }
- _screen->copyPage(2, 12);
+ doTransition(sq.fadeOutTransitionType);
+ _curScene++;
+ }
- seq_processWSAs();
- seq_processText();
+ resetAllTextSlots();
+ _vm->sound()->haltTrack();
+ _vm->sound()->voiceStop();
- if ((_seqWsa || !cb) && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- }
+ if ((!checkAbortPlayback() || _vm->shouldQuit()) && _vm->gameFlags().isDemo)
+ _curScene = -1;
+}
- bool loop2 = true;
- while (loop2 && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- if (_seqWsa) {
- seq_processText();
- if (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- }
+bool SeqPlayer_HOF::checkAbortPlayback() {
+ Common::Event event;
- uint32 now = _system->getMillis();
- if (now >= _seqEndTime) {
- loop2 = false;
- } else {
- uint32 tdiff = _seqEndTime - now;
- uint32 dly = tdiff < _tickLength ? tdiff : _tickLength;
- delay(dly);
- }
- } else {
- loop = loop2 = false;
- }
- }
+ if (_vm->skipFlag()) {
+ _abortRequested = true;
+ _vm->resetSkipFlag();
+ }
- if (loop) {
- if (dir == 1) {
- if (++_seqWsaCurrentFrame >= cseq.numFrames)
- loop = false;
- } else {
- if (--_seqWsaCurrentFrame < cseq.numFrames)
- loop = false;
- }
- }
+ if (_abortRequested)
+ return true;
+
+ while (_system->getEventManager()->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.hasFlags(Common::KBD_CTRL)) {
+ _abortRequested = true;
+ _vm->quitGame();
+ return true;
+ } else if (event.kbd.keycode != Common::KEYCODE_ESCAPE && event.kbd.keycode != Common::KEYCODE_RETURN && event.kbd.keycode != Common::KEYCODE_SPACE) {
+ continue;
}
- _seqWsa->close();
- } else {
- _seqFrameDelay = cseq.frameDelay;
- _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
- while (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _seqSubFrameStartTime = _system->getMillis();
- seq_processWSAs();
- if (cb)
- (this->*cb)(0, 0, 0, 0);
+ // fall through
+ case Common::EVENT_LBUTTONDOWN:
+ case Common::EVENT_RBUTTONDOWN:
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONUP:
+ _abortRequested = true;
+ return true;
+ default:
+ break;
+ }
+ }
- seq_processText();
+ return false;
+}
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- _screen->copyPage(12, 2);
+bool SeqPlayer_HOF::checkPlaybackStatus() {
+ _updateAnimations = false;
- uint32 now = _system->getMillis();
- if (now >= _seqEndTime && !_seqSubframePlaying)
- break;
+ if (_curScene <= _preventSkipBeforeScene || (_curScene == _loopStartScene && !_isFinale)) {
+ _abortRequested = false;
+ return false;
+ }
- uint32 tdiff = _seqEndTime - _seqSubFrameStartTime;
- int32 dly = _tickLength - (now - _seqSubFrameStartTime);
- if (dly > 0)
- delay(MIN<uint32>(dly, tdiff));
- else
- updateInput();
- }
+ if (_loopStartScene == kSequenceNoLooping) {
+ doTransition(0);
+ fadeOutMusic();
+ _abortPlayback = true;
+ } else {
+ return true;
+ }
+
+ return false;
+}
+
+void SeqPlayer_HOF::doTransition(int type) {
+ for (int i = 0; i < 8; i++)
+ closeNestedAnimation(i);
+
+ switch (type) {
+ case 0:
+ _screen->fadeToBlack(36);
+ _screen->getPalette(0).clear();
+ _screen->getPalette(1).clear();
+ break;
+
+ case 1:
+ playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
+
+ _screen->getPalette(0).fill(0, 256, 0x3F);
+ _screen->fadePalette(_screen->getPalette(0), 16);
+
+ _screen->copyPalette(1, 0);
+ break;
+
+ case 3:
+ _screen->copyPage(2, 0);
+ _screen->fadePalette(_screen->getPalette(0), 16);
+ _screen->copyPalette(1, 0);
+ break;
+
+ case 4:
+ _screen->copyPage(2, 0);
+ _screen->fadePalette(_screen->getPalette(0), 36);
+ _screen->copyPalette(1, 0);
+ break;
+
+ case 5:
+ _screen->copyPage(2, 0);
+ break;
+
+ case 6:
+ // UNUSED
+ // seq_loadBLD("library.bld");
+ break;
+
+ case 7:
+ // UNUSED
+ // seq_loadBLD("marco.bld");
+ break;
+
+ case 8:
+ _screen->fadeToBlack(16);
+ _screen->getPalette(0).clear();
+ _screen->getPalette(1).clear();
+
+ delayTicks(120);
+ break;
+
+ case 9: {
+ Palette &pal = _screen->getPalette(0);
+ for (int i = 0; i < 255; i++)
+ pal.fill(i, 1, (pal[3 * i] + pal[3 * i + 1] + pal[3 * i + 2]) / 3);
+ pal.fill(255, 1, 0x3F);
+
+ _screen->fadePalette(pal, 64);
+ _screen->copyPalette(1, 0);
+ } break;
+
+ default:
+ break;
+ }
+}
+
+void SeqPlayer_HOF::nestedFrameAnimTransition(int srcPage, int dstPage, int delaytime, int steps, int x, int y, int w, int h, int openClose, int directionFlags) {
+ if (openClose) {
+ for (int i = 1; i < steps; i++) {
+ uint32 endtime = _system->getMillis() + delaytime * _vm->tickLength();
+
+ int w2 = (((w * 256) / steps) * i) / 256;
+ int h2 = (((h * 256) / steps) * i) / 256;
+
+ int ym = (directionFlags & 2) ? (h - h2) : 0;
+ int xm = (directionFlags & 1) ? (w - w2) : 0;
+
+ _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
+
+ _screen->copyPage(dstPage, 6);
+ _screen->copyPage(dstPage, 0);
+ _screen->updateScreen();
+
+ _screen->copyPage(12, dstPage);
+ delayUntil(endtime);
}
- if (cb && !(_flags.isDemo && !_flags.isTalkie))
- (this->*cb)(0, 0, 0, -2);
+ _screen->wsaFrameAnimationStep(0, 0, x, y, w, h, w, h, srcPage, dstPage, 0);
+ _screen->copyPage(dstPage, 6);
+ _screen->copyPage(dstPage, 0);
+ _screen->updateScreen();
+ } else {
+ _screen->copyPage(12, dstPage);
+ for (int i = steps; i; i--) {
+ uint32 endtime = _system->getMillis() + delaytime * _vm->tickLength();
+
+ int w2 = (((w * 256) / steps) * i) / 256;
+ int h2 = (((h * 256) / steps) * i) / 256;
+
+ int ym = (directionFlags & 2) ? (h - h2) : 0;
+ int xm = (directionFlags & 1) ? (w - w2) : 0;
- uint32 ct = seq_activeTextsTimeLeft();
- uint32 dl = cseq.duration * _tickLength;
- if (dl < ct)
- dl = ct;
- _seqEndTime = _system->getMillis() + dl;
+ _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
- while (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _seqSubFrameStartTime = _system->getMillis();
- seq_processWSAs();
+ _screen->copyPage(dstPage, 6);
+ _screen->copyPage(dstPage, 0);
+ _screen->updateScreen();
+ _screen->copyPage(12, dstPage);
+ delayUntil(endtime);
+ }
+ }
+}
+
+void SeqPlayer_HOF::nestedFrameFadeTransition(const char *cmpFile) {
+ _screen->copyPage(10, 2);
+ _screen->copyPage(4, 10);
+ _screen->clearPage(6);
+ _screen->loadBitmap(cmpFile, 6, 6, 0);
+ _screen->copyPage(12, 4);
+
+ for (int i = 0; i < 3; i++) {
+ uint32 endtime = _system->getMillis() + 4 * _vm->tickLength();
+ assert(_screenHoF);
+ _screenHoF->cmpFadeFrameStep(4, 320, 200, 0, 0, 2, 320, 200, 0, 0, 320, 200, 6);
+ _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
+ _screen->updateScreen();
+ delayUntil(endtime);
+ }
+
+ _screen->copyPage(4, 0);
+ _screen->updateScreen();
+ _screen->copyPage(4, 2);
+ _screen->copyPage(4, 6);
+ _screen->copyPage(10, 4);
+}
+
+void SeqPlayer_HOF::playAnimation(WSAMovie_v2 *wsaObj, int startFrame, int lastFrame, int frameRate, int x, int y, const SeqProc callback, Palette *fadePal1, Palette *fadePal2, int fadeRate, bool restoreScreen) {
+ bool finished = false;
+ uint32 startTime = _system->getMillis();
+
+ int origW = wsaObj->width();
+ int origH = wsaObj->width();
+ int drwX = x;
+ int drwY = y;
+ int drwW = origW;
+ int drwH = origH;
+
+ _animDuration = frameRate;
+
+ if (wsaObj) {
+ if (x < 0) {
+ drwW += x;
+ drwX = 0;
+ }
+
+ if (y < 0) {
+ drwH += y;
+ drwY = 0;
+ }
+
+ if (x + origW > 319)
+ origW = 320 - x;
+
+ if (y + origH > 199)
+ origW = 200 - y;
+ }
+
+ int8 frameStep = (startFrame > lastFrame) ? -1 : 1;
+ _animCurrentFrame = startFrame;
+
+ while (!_vm->shouldQuit() && !finished) {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+
+ setCountDown(_animDuration);
+
+ if (wsaObj || callback)
+ _screen->copyPage(12, 2);
+
+ int frameIndex = _animCurrentFrame;
+ if (wsaObj)
+ frameIndex %= wsaObj->frames();
+
+ if (callback)
+ (this->*callback)(wsaObj, x, y, frameIndex);
+
+ if (wsaObj)
+ wsaObj->displayFrame(frameIndex, 2, x, y, 0, 0, 0);
+
+ _screen->copyPage(2, 12);
+
+ updateAllNestedAnimations();
+ updateSubTitles();
+
+ if ((wsaObj || callback) && (!(checkAbortPlayback() || _vm->shouldQuit() || _result))) {
_screen->copyPage(2, 0);
_screen->updateScreen();
+ }
+
+ while (!_vm->shouldQuit()) {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+
+ if (fadePal1 && fadePal2) {
+ if (!_screen->timedPaletteFadeStep(fadePal1->getData(), fadePal2->getData(), _system->getMillis() - startTime, fadeRate * _vm->tickLength()) && !wsaObj)
+ break;
+ }
+
+ if ((wsaObj || callback) && (!(checkAbortPlayback() || _vm->shouldQuit() || _result))) {
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ }
+
+ updateSubTitles();
+
+ if (!countDownRunning())
+ break;
+ }
+
+ if (wsaObj) {
+ _animCurrentFrame += frameStep;
+ if ((frameStep > 0 && _animCurrentFrame >= lastFrame) || (frameStep < 0 && _animCurrentFrame < lastFrame))
+ finished = true;
+ }
+
+ if (restoreScreen && (wsaObj || callback)) {
_screen->copyPage(12, 2);
+ _screen->copyRegion(drwX, drwY, drwX, drwY, drwW, drwH, 2, 0, Screen::CR_NO_P_CHECK);
+ _screen->updateScreen();
+ }
+ }
+}
+
+void SeqPlayer_HOF::playDialogueAnimation(uint16 strID, uint16 soundID, int textColor, int textPosX, int textPosY, int textWidth, WSAMovie_v2 *wsaObj, int animStartFrame, int animLastFrame, int animPosX, int animPosY) {
+ int dur = int(strlen(_sequenceStrings[strID])) * (_vm->gameFlags().isTalkie ? 7 : 15);
+ if (_vm->textEnabled()) {
+ int slot = displaySubTitle(strID, textPosX, textPosY, dur, textWidth);
+ _textSlots[slot].textcolor = textColor;
+ }
+ _specialAnimTimeOutTotal = _system->getMillis() + dur * _vm->tickLength();
+ int curframe = animStartFrame;
+
+ if (soundID && _vm->speechEnabled()) {
+ while (_vm->sound()->voiceIsPlaying() && !_abortPlayback)
+ delayTicks(1);
+ playSoundAndDisplaySubTitle(soundID);
+ }
+
+ while (_system->getMillis() < _specialAnimTimeOutTotal && !_abortPlayback) {
+ if (animLastFrame < 0) {
+ int t = ABS(animLastFrame);
+ if (t < curframe)
+ curframe = t;
+ }
- uint32 now = _system->getMillis();
- if (now >= _seqEndTime && !_seqSubframePlaying) {
+ if (ABS(animLastFrame) < curframe)
+ curframe = animStartFrame;
+
+ _specialAnimFrameTimeOut = _system->getMillis() + _animDuration * _vm->tickLength();
+ setCountDown(_animDuration);
+
+ if (wsaObj)
+ wsaObj->displayFrame(curframe % wsaObj->frames(), 2, animPosX, animPosY, 0, 0, 0);
+
+ _screen->copyPage(2, 12);
+ updateSubTitles();
+ delayUntil(MIN(_specialAnimFrameTimeOut, _specialAnimTimeOutTotal));
+
+ if (_vm->speechEnabled() && !_vm->textEnabled() && !_vm->snd_voiceIsPlaying())
+ break;
+
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
break;
- }
- uint32 tdiff = _seqEndTime - _seqSubFrameStartTime;
- int32 dly = _tickLength - (now - _seqSubFrameStartTime);
- if (dly > 0)
- delay(MIN<uint32>(dly, tdiff));
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ curframe++;
+ }
+
+ if (_abortPlayback)
+ _vm->sound()->voiceStop();
+
+ if (ABS(animLastFrame) < curframe)
+ curframe = ABS(animLastFrame);
+
+ if (curframe == animStartFrame)
+ curframe++;
+
+ _animCurrentFrame = curframe;
+}
+
+void SeqPlayer_HOF::startNestedAnimation(int animSlot, int sequenceID) {
+ if (_animSlots[animSlot].flags != -1)
+ return;
+
+ if (_target == kLoLDemo) {
+ return;
+ } else if (_target == kHoFDemo) {
+ assert(sequenceID >= kNestedSequenceHoFDemoWharf2);
+ sequenceID -= kNestedSequenceHoFDemoWharf2;
+ }
+
+ HoFNestedSequence s = _config->nestedSeq[sequenceID];
+
+ if (!_animSlots[animSlot].movie) {
+ _animSlots[animSlot].movie = new WSAMovie_v2(_vm);
+ assert(_animSlots[animSlot].movie);
+ }
+
+ _animSlots[animSlot].movie->close();
+
+ _animSlots[animSlot].movie->open(s.wsaFile, 0, 0);
+
+ if (!_animSlots[animSlot].movie->opened()) {
+ delete _animSlots[animSlot].movie;
+ _animSlots[animSlot].movie = 0;
+ return;
+ }
+
+ _animSlots[animSlot].endFrame = s.endFrame;
+ _animSlots[animSlot].startFrame = _animSlots[animSlot].currentFrame = s.startframe;
+ _animSlots[animSlot].frameDelay = s.frameDelay;
+ _animSlots[animSlot].callback = _config->nestedSeqProc[sequenceID];
+ _animSlots[animSlot].control = s.wsaControl;
+
+ _animSlots[animSlot].flags = s.flags | 1;
+ _animSlots[animSlot].x = s.x;
+ _animSlots[animSlot].y = s.y;
+ _animSlots[animSlot].fadeInTransitionType = s.fadeInTransitionType;
+ _animSlots[animSlot].fadeOutTransitionType = s.fadeOutTransitionType;
+ _animSlots[animSlot].lastFrame = 0xffff;
+
+ doNestedFrameTransition(s.fadeInTransitionType, animSlot);
+
+ if (!s.fadeInTransitionType)
+ updateNestedAnimation(animSlot);
+
+ _animSlots[animSlot].nextFrame = _system->getMillis() & ~(_vm->tickLength() - 1);
+}
+
+void SeqPlayer_HOF::closeNestedAnimation(int animSlot) {
+ if (_animSlots[animSlot].flags == -1)
+ return;
+
+ _animSlots[animSlot].flags = -1;
+ doNestedFrameTransition(_animSlots[animSlot].fadeOutTransitionType, animSlot);
+ _animSlots[animSlot].movie->close();
+}
+
+void SeqPlayer_HOF::unloadNestedAnimation(int animSlot) {
+ if (_animSlots[animSlot].movie) {
+ _animSlots[animSlot].movie->close();
+ delete _animSlots[animSlot].movie;
+ _animSlots[animSlot].movie = 0;
+ }
+}
+
+void SeqPlayer_HOF::doNestedFrameTransition(int transitionType, int animSlot) {
+ int xa = 0, ya = 0;
+ transitionType--;
+ if (!_animSlots[animSlot].movie || _abortPlayback || _vm->shouldQuit())
+ return;
+
+ switch (transitionType) {
+ case 0:
+ xa = -_animSlots[animSlot].movie->xAdd();
+ ya = -_animSlots[animSlot].movie->yAdd();
+ _animSlots[animSlot].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
+ nestedFrameAnimTransition(8, 2, 7, 8, _animSlots[animSlot].movie->xAdd(), _animSlots[animSlot].movie->yAdd(),
+ _animSlots[animSlot].movie->width(), _animSlots[animSlot].movie->height(), 1, 2);
+ break;
+
+ case 1:
+ xa = -_animSlots[animSlot].movie->xAdd();
+ ya = -_animSlots[animSlot].movie->yAdd();
+ _animSlots[animSlot].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
+ nestedFrameAnimTransition(8, 2, 7, 8, _animSlots[animSlot].movie->xAdd(), _animSlots[animSlot].movie->yAdd(),
+ _animSlots[animSlot].movie->width(), _animSlots[animSlot].movie->height(), 1, 1);
+ break;
+
+ case 2:
+ waitForSubTitlesTimeout();
+ xa = -_animSlots[animSlot].movie->xAdd();
+ ya = -_animSlots[animSlot].movie->yAdd();
+ _animSlots[animSlot].movie->displayFrame(21, 8, xa, ya, 0, 0, 0);
+ nestedFrameAnimTransition(8, 2, 7, 8, _animSlots[animSlot].movie->xAdd(), _animSlots[animSlot].movie->yAdd(),
+ _animSlots[animSlot].movie->width(), _animSlots[animSlot].movie->height(), 0, 2);
+ break;
+
+ case 3:
+ _screen->copyPage(2, 10);
+ _animSlots[animSlot].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
+ _screen->copyPage(2, 12);
+ nestedFrameFadeTransition("scene2.cmp");
+ break;
+
+ case 4:
+ _screen->copyPage(2, 10);
+ _animSlots[animSlot].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
+ _screen->copyPage(2, 12);
+ nestedFrameFadeTransition("scene3.cmp");
+ break;
+
+ default:
+ break;
+ }
+}
+
+void SeqPlayer_HOF::updateAllNestedAnimations() {
+ for (int i = 0; i < 8; i++) {
+ if (_animSlots[i].flags != -1) {
+ if (updateNestedAnimation(i))
+ closeNestedAnimation(i);
+ }
+ }
+}
+
+bool SeqPlayer_HOF::updateNestedAnimation(int animSlot) {
+ uint16 currentFrame = _animSlots[animSlot].currentFrame;
+ uint32 curTick = _system->getMillis() & ~(_vm->tickLength() - 1);
+
+ if (_animSlots[animSlot].callback && currentFrame != _animSlots[animSlot].lastFrame) {
+ _animSlots[animSlot].lastFrame = currentFrame;
+ currentFrame = (this->*_animSlots[animSlot].callback)(_animSlots[animSlot].movie, _animSlots[animSlot].x, _animSlots[animSlot].y, currentFrame);
+ }
+
+ if (_animSlots[animSlot].movie) {
+ if (_animSlots[animSlot].flags & 0x20) {
+ _animSlots[animSlot].movie->displayFrame(_animSlots[animSlot].control[currentFrame].index, 2, _animSlots[animSlot].x, _animSlots[animSlot].y, 0x4000, 0, 0);
+ _animSlots[animSlot].frameDelay = _animSlots[animSlot].control[currentFrame].delay;
+ } else {
+ _animSlots[animSlot].movie->displayFrame(currentFrame % _animSlots[animSlot].movie->frames(), 2, _animSlots[animSlot].x, _animSlots[animSlot].y, 0x4000, 0, 0);
+ }
+ }
+
+ if (_animSlots[animSlot].flags & 0x10) {
+ currentFrame = (curTick - _animSlots[animSlot].nextFrame) / (_animSlots[animSlot].frameDelay * _vm->tickLength());
+ } else {
+ int diff = (curTick - _animSlots[animSlot].nextFrame) / (_animSlots[animSlot].frameDelay * _vm->tickLength());
+ if (diff > 0) {
+ currentFrame++;
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ _animSlots[animSlot].nextFrame += ((curTick - _animSlots[animSlot].nextFrame) * 2 / 3);
else
- updateInput();
+ _animSlots[animSlot].nextFrame = curTick;
+ }
+ }
+
+ bool res = false;
+
+ if (currentFrame >= _animSlots[animSlot].endFrame) {
+ int sw = ((_animSlots[animSlot].flags & 0x1e) - 2);
+ switch (sw) {
+ case 0:
+ res = true;
+ currentFrame = _animSlots[animSlot].endFrame;
+ _screen->copyPage(2, 12);
+ break;
+
+ case 6:
+ case 8:
+ currentFrame = _animSlots[animSlot].endFrame - 1;
+ break;
+
+ case 2:
+ case 10:
+ currentFrame = _animSlots[animSlot].startFrame;
+ break;
+
+ default:
+ currentFrame = _animSlots[animSlot].endFrame - 1;
+ res = true;
}
+ }
+
+ _animSlots[animSlot].currentFrame = currentFrame;
+ return res;
+}
+
+void SeqPlayer_HOF::playSoundEffect(uint16 id, int16 vol) {
+ assert(id < _sequenceSoundListSize);
+ _vm->sound()->voicePlay(_sequenceSoundList[id], 0, vol);
+}
+
+void SeqPlayer_HOF::playSoundAndDisplaySubTitle(uint16 id) {
+ assert(id < _sequenceSoundListSize);
+
+ if (id < 12 && !_vm->gameFlags().isDemo && _vm->textEnabled())
+ displaySubTitle(id, 160, 168, _textDuration[id], 160);
+
+ _vm->sound()->voicePlay(_sequenceSoundList[id], 0);
+}
+
+void SeqPlayer_HOF::printFadingText(uint16 strID, int x, int y, const uint8 *colorMap, uint8 textcolor) {
+ uint8 cmap[16];
- seq_sequenceCommand(cseq.finalCommand);
- seq_resetAllTextEntries();
+ if (checkAbortPlayback())
+ checkPlaybackStatus();
+
+ if (_abortPlayback || _abortRequested || _vm->shouldQuit() || _result)
+ return;
+
+ Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
+ _screen->getPalette(0).fill(254, 2, 63);
+ _screen->setPaletteIndex(252, 63, 32, 48);
+ cmap[0] = colorMap[0];
+ cmap[1] = 253;
+ memcpy(&cmap[2], &colorMap[2], 14);
+ uint8 col0 = _textColor[0];
+
+ _textColor[0] = 253;
+ _screen->setTextColorMap(cmap);
+ resetAllTextSlots();
+ displaySubTitle(strID, x, y, 128, 120);
+ updateSubTitles();
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->getPalette(0).copy(_screen->getPalette(0), textcolor, 1, 253);
+ _screen->fadePalette(_screen->getPalette(0), 24);
+
+ _textColor[0] = textcolor;
+ _screen->setTextColorMap(colorMap);
+ resetAllTextSlots();
+ displaySubTitle(strID, x, y, 128, 120);
+ updateSubTitles();
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->getPalette(0).fill(253, 1, 0);
+ _screen->fadePalette(_screen->getPalette(0), 1);
- if (_abortIntroFlag || skipFlag()) {
- _sound->haltTrack();
- _sound->voiceStop();
+ _screen->copyPage(2, 12);
+ resetAllTextSlots();
+
+ _textColor[0] = col0;
+
+ _screen->setFont(of);
+}
+
+int SeqPlayer_HOF::displaySubTitle(uint16 strIndex, uint16 posX, uint16 posY, int duration, uint16 width) {
+ for (int i = 0; i < 10; i++) {
+ if (_textSlots[i].duration != -1) {
+ if (i < 9)
+ continue;
+ else
+ return -1;
}
- if (!_flags.isDemo || _flags.isTalkie) {
- if ((seqNum != kSequenceTitle && seqNum < kSequenceZanfaun &&
- (_abortIntroFlag || skipFlag())) || seqNum == kSequenceZanfaun) {
- _abortIntroFlag = false;
- _eventList.clear();
- seqNum = kSequenceWestwood;
- } else if (seqNum < kSequenceFrash && (_abortIntroFlag || skipFlag())) {
- _abortIntroFlag = false;
- _eventList.clear();
- seqNum = kSequenceFirates;
+ _textSlots[i].strIndex = strIndex;
+ _textSlots[i].x = posX;
+ _textSlots[i].y = posY;
+ _textSlots[i].duration = duration * _vm->tickLength();
+ _textSlots[i].width = width;
+ _textSlots[i].startTime = _system->getMillis();
+ _textSlots[i].textcolor = -1;
+
+ return i;
+ }
+ return -1;
+}
+
+void SeqPlayer_HOF::updateSubTitles() {
+ int curPage = _screen->setCurPage(2);
+ char outputStr[70];
+
+ for (int i = 0; i < 10; i++) {
+ if (_textSlots[i].startTime + _textSlots[i].duration > _system->getMillis() && _textSlots[i].duration != -1) {
+
+ char *srcStr = preprocessString(_sequenceStrings[_textSlots[i].strIndex], _textSlots[i].width);
+ int yPos = _textSlots[i].y;
+
+ while (*srcStr) {
+ uint32 linePos = 0;
+ for (; *srcStr; linePos++) {
+ if (*srcStr == '\r')
+ break;
+ outputStr[linePos] = *srcStr;
+ srcStr++;
+ }
+ outputStr[linePos] = 0;
+ if (*srcStr == '\r')
+ srcStr++;
+
+ uint8 textColor = (_textSlots[i].textcolor >= 0) ? _textSlots[i].textcolor : _textColor[0];
+ _screen->printText(outputStr, _textSlots[i].x - (_screen->getTextWidth(outputStr) / 2), yPos, textColor, 0);
+ yPos += 10;
}
- } else if (seqNum == endSeq && !(_abortIntroFlag || skipFlag())) {
- seqNum = 0;
+ } else {
+ _textSlots[i].duration = -1;
+ }
+ }
+
+ _screen->setCurPage(curPage);
+}
+
+char *SeqPlayer_HOF::preprocessString(const char *srcStr, int width) {
+ char *dstStr = _tempString;
+ int lineStart = 0;
+ int linePos = 0;
+
+ while (*srcStr) {
+ while (*srcStr && *srcStr != ' ')
+ dstStr[lineStart + linePos++] = *srcStr++;
+ dstStr[lineStart + linePos] = 0;
+
+ int len = _screen->getTextWidth(&dstStr[lineStart]);
+ if (width >= len && *srcStr) {
+ dstStr[lineStart + linePos++] = *srcStr++;
+ } else {
+ dstStr[lineStart + linePos] = '\r';
+ lineStart += linePos + 1;
+ linePos = 0;
+ if (*srcStr)
+ srcStr++;
}
+ }
+ dstStr[lineStart + linePos] = 0;
- if (_menuChoice) {
- _abortIntroFlag = false;
- _eventList.clear();
+ return strlen(_tempString) ? dstStr : 0;
+}
+
+void SeqPlayer_HOF::waitForSubTitlesTimeout() {
+ uint32 timeOut = _system->getMillis() + ticksTillSubTitlesTimeout() * _vm->tickLength();
- if (_menuChoice == 2) {
- seqNum = kSequenceTitle;
- _menuChoice = 0;
+ if (_vm->textEnabled()) {
+ delayUntil(timeOut);
+ } else if (_vm->speechEnabled()) {
+ while (_vm->snd_voiceIsPlaying())
+ delayTicks(1);
+ }
+
+ resetAllTextSlots();
+}
+
+uint32 SeqPlayer_HOF::ticksTillSubTitlesTimeout() {
+ uint32 longest = 0;
+
+ for (int i = 0; i < 10; i++) {
+ uint32 timeOut = (_textSlots[i].duration + _textSlots[i].startTime);
+ uint32 curtime = _system->getMillis();
+ if (_textSlots[i].duration != -1 && timeOut > curtime) {
+ timeOut -= curtime;
+ if (longest < timeOut)
+ longest = timeOut;
+ }
+ }
+
+ uint32 tl = _vm->tickLength();
+ return (longest + (tl - 1)) / tl;
+}
+
+void SeqPlayer_HOF::resetAllTextSlots() {
+ for (int i = 0; i < 10; i++)
+ _textSlots[i].duration = -1;
+}
+
+void SeqPlayer_HOF::fadeOutMusic() {
+ _vm->sound()->beginFadeOut();
+ delayTicks(80);
+}
+
+void SeqPlayer_HOF::playHoFTalkieCredits() {
+ static const uint8 colormap[] = {0, 0, 102, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ static const ScreenDim d = { 0x00, 0x0C, 0x28, 0xB4, 0xFF, 0x00, 0x00, 0x00 };
+
+ _screen->loadBitmap("finale.cps", 3, 3, &_screen->getPalette(0));
+ _screen->setFont(Screen::FID_GOLDFONT_FNT);
+
+ int talkieCreditsSize, talkieCreditsSpecialSize;
+ const uint8 *talkieCredits = _vm->staticres()->loadRawData(k2SeqplayCredits, talkieCreditsSize);
+ const char *const *talkieCreditsSpecial = _vm->staticres()->loadStrings(k2SeqplayCreditsSpecial, talkieCreditsSpecialSize);
+
+ _vm->sound()->selectAudioResourceSet(kMusicIngame);
+ _vm->sound()->loadSoundFile(3);
+ _vm->sound()->playTrack(3);
+
+ _screen->setTextColorMap(colormap);
+ _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
+ _screen->updateScreen();
+ _screen->fadeFromBlack();
+
+ _screen->_charWidth = -2;
+ uint8 *dataPtr = new uint8[0xafd];
+ memcpy(dataPtr, talkieCredits, talkieCreditsSize);
+ _vm->staticres()->unloadId(k2SeqplayCredits);
+
+ displayHoFTalkieScrollText(dataPtr, &d, 2, 6, 5, 1, Screen::FID_GOLDFONT_FNT, Screen::FID_GOLDFONT_FNT, 0, talkieCreditsSpecial);
+ delayTicks(8);
+
+ delete[] dataPtr;
+ _vm->staticres()->unloadId(k2SeqplayCreditsSpecial);
+ _vm->sound()->selectAudioResourceSet(kMusicFinale);
+ _vm->sound()->loadSoundFile(0);
+}
+
+void SeqPlayer_HOF::displayHoFTalkieScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed,
+ int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData, const char *const *specialData) {
+ if (!data)
+ return;
+
+ static const char mark[] = { 5, 13, 0 };
+
+ _screen->clearPage(tempPage1);
+ _screen->clearPage(tempPage2);
+ _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, 0, tempPage1);
+
+ struct ScrollTextData {
+ int16 x;
+ int16 y;
+ uint8 *text;
+ byte unk1;
+ byte height;
+ byte adjust;
+
+ ScrollTextData() {
+ x = 0; // 0 11
+ y = 0; // 2 13
+ text = 0; // 4 15
+ unk1 = 0; // 8 19
+ height = 0; // 9 20
+ adjust = 0; // 10 21
+ }
+ };
+
+ ScrollTextData *textData = new ScrollTextData[36];
+ uint8 *ptr = data;
+
+ bool loop = true;
+ int cnt = 0;
+
+ while (loop) {
+ uint32 loopEnd = _system->getMillis() + speed * _vm->tickLength();
+
+ while (cnt < 35 && *ptr) {
+ uint16 cH;
+
+ if (cnt)
+ cH = textData[cnt].y + textData[cnt].height + (textData[cnt].height >> 3);
+ else
+ cH = d->h;
+
+ char *str = (char *)ptr;
+
+ ptr = (uint8 *)strpbrk(str, mark);
+ if (!ptr)
+ ptr = (uint8 *)strchr(str, 0);
+
+ textData[cnt + 1].unk1 = *ptr;
+ *ptr = 0;
+ if (textData[cnt + 1].unk1)
+ ptr++;
+
+ if (*str == 3 || *str == 4)
+ textData[cnt + 1].adjust = *str++;
+ else
+ textData[cnt + 1].adjust = 0;
+
+ _screen->setFont(fid1);
+
+ if (*str == 1) {
+ _screen->setFont(fid2);
+ str++;
+ } else if (*str == 2) {
+ str++;
+ }
+
+ textData[cnt + 1].height = _screen->getFontHeight();
+
+ switch (textData[cnt + 1].adjust) {
+ case 3:
+ textData[cnt + 1].x = 157 - _screen->getTextWidth(str);
+ break;
+ case 4:
+ textData[cnt + 1].x = 161;
+ break;
+ default:
+ textData[cnt + 1].x = (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1;
}
+
+ if (textData[cnt].unk1 == 5)
+ cH -= (textData[cnt].height + (textData[cnt].height >> 3));
+
+ textData[cnt + 1].y = cH;
+ textData[cnt + 1].text = (uint8 *)str;
+ cnt++;
}
+
+ _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage1, tempPage2);
+
+ int cnt2 = 0;
+ bool palCycle = 0;
+
+ while (cnt2 < cnt) {
+ const char *str = (const char *)textData[cnt2 + 1].text;
+ const char *str2 = str;
+ int16 cW = textData[cnt2 + 1].x - 10;
+ int16 cH = textData[cnt2 + 1].y;
+ int x = (d->sx << 3) + cW;
+ int y = d->sy + cH;
+ int col1 = 255;
+
+ if (cH < d->h) {
+ _screen->setCurPage(tempPage2);
+ _screen->setFont(fid1);
+ if (textData[cnt2 + 1].height != _screen->getFontHeight())
+ _screen->setFont(fid2);
+
+ if (specialData) {
+ if (!strcmp(str, specialData[0])) {
+ col1 = 112;
+ char cChar[2] = " ";
+ while (*str2) {
+ cChar[0] = *str2;
+ _screen->printText(cChar, x, y, col1++, 0);
+ x += _screen->getCharWidth((uint8)*str2++);
+ }
+ palCycle = true;
+ } else if (!strcmp(str, specialData[1])) {
+ col1 = 133;
+ char cChar[2] = " ";
+ while (*str2) {
+ cChar[0] = *str2;
+ _screen->printText(cChar, x, y, col1--, 0);
+ x += _screen->getCharWidth((uint8)*str2++);
+ }
+ palCycle = true;
+ } else {
+ _screen->printText(str, x, y, col1, 0);
+ }
+ } else {
+ _screen->printText(str, x, y, col1, 0);
+ }
+ _screen->setCurPage(0);
+ }
+
+ textData[cnt2 + 1].y -= step;
+ cnt2++;
+ }
+
+ _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage2, 0);
+ _screen->updateScreen();
+
+ if (textData[1].y < -10) {
+ textData[1].text += strlen((char *)textData[1].text);
+ textData[1].text[0] = textData[1].unk1;
+ cnt--;
+ memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
+ }
+
+ if (palCycle) {
+ for (int col = 133; col > 112; col--)
+ _screen->getPalette(0).copy(_screen->getPalette(0), col - 1, 1, col);
+ _screen->getPalette(0).copy(_screen->getPalette(0), 133, 1, 112);
+ _screen->setScreenPalette(_screen->getPalette(0));
+ }
+
+ delayUntil(loopEnd);
+
+ if ((cnt < 36) && ((d->sy + d->h) > (textData[cnt].y + textData[cnt].height)) && !_abortPlayback) {
+ delayTicks(500);
+ cnt = 0;
+ }
+
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ loop = false;
+
+ if (!cnt || _abortPlayback)
+ loop = false;
}
- if (_flags.isDemo && !_flags.isTalkie) {
- _eventList.clear();
- _screen->fadeToBlack();
+ _vm->sound()->beginFadeOut();
+ _screen->fadeToBlack();
+
+ _abortPlayback = _abortRequested = false;
+
+ delete[] textData;
+}
+
+void SeqPlayer_HOF::updateDemoAdText(int bottom, int top) {
+ int dstY, dstH, srcH;
+
+ static const ScreenDim d = { 0x00, 0x00, 0x28, 0x320, 0xFF, 0xFE, 0x00, 0x00 };
+
+ if (_scrollProgressCounter - (top - 1) < 0) {
+ dstY = top - _scrollProgressCounter;
+ dstH = _scrollProgressCounter;
+ srcH = 0;
+ } else {
+ dstY = 0;
+ srcH = _scrollProgressCounter - top;
+ dstH = (400 - srcH <= top) ? 400 - srcH : top;
}
- if (!_menuChoice)
- delay(1200);
+ if (dstH > 0) {
+ if (_hofDemoAnimData) {
+ for (int i = 0; i < 4; i++) {
+ const HoFSeqItemAnimData *def = &_hofDemoAnimData[i];
+ ActiveItemAnim *a = &_hofDemoActiveItemAnim[i];
- _screen->setCurPage(oldPage);
- _screen->showMouse();
+ _screen->fillRect(12, def->y - 8, 28, def->y + 8, 0, 4);
+ _screen->drawShape(4, _hofDemoItemShapes[def->itemIndex + def->frames[a->currentFrame]], 12, def->y - 8, 0, 0);
+ if (_callbackCurrentFrame % 2 == 0)
+ a->currentFrame = (a->currentFrame + 1) % 20;
+ }
+ }
+ _screen->copyRegionEx(4, 0, srcH, 2, 2, dstY + bottom, 320, dstH, &d);
+ }
+}
- for (int i = 0; i < 8; i++)
- seq_unloadWSA(i);
+void SeqPlayer_HOF::delayTicks(uint32 ticks) {
+ uint32 len = ticks * _vm->tickLength();
+ while (len && !_vm->shouldQuit() && !checkAbortPlayback()) {
+ uint32 step = (len >= 10) ? 10 : len;
+ _system->delayMillis(step);
+ len -= step;
+ }
+}
- _seqWsa->close();
+void SeqPlayer_HOF::delayUntil(uint32 dest) {
+ for (uint32 ct = _system->getMillis(); ct < dest && !_vm->shouldQuit() && !checkAbortPlayback(); ) {
+ uint32 step = (dest - ct >= 10) ? 10 : (dest - ct);
+ _system->delayMillis(step);
+ ct = _system->getMillis();
+ }
+}
- _screen->_charWidth = 0;
+void SeqPlayer_HOF::setCountDown(uint32 ticks) {
+ _countDownRemainder = ticks * _vm->tickLength();
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ _countDownRemainder = _countDownRemainder * 2 / 3;
+ _countDownLastUpdate = _system->getMillis() & ~(_vm->tickLength() - 1);
+}
- seq_uninit();
+bool SeqPlayer_HOF::countDownRunning() {
+ uint32 cur = _system->getMillis();
+ uint32 step = cur - _countDownLastUpdate;
+ _countDownLastUpdate = cur;
+ _countDownRemainder = (step <= _countDownRemainder) ? _countDownRemainder - step : 0;
+ return _countDownRemainder;
}
-int KyraEngine_HoF::seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+#define CASE_ALT(dosCase, towns98Case)\
+ case dosCase:\
+ case towns98Case:\
+ if (!((_callbackCurrentFrame == towns98Case && (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)) || (_callbackCurrentFrame == dosCase && _vm->gameFlags().platform == Common::kPlatformPC)))\
+ break;
+
+int SeqPlayer_HOF::cbHOF_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == -2) {
- if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
- delay(300 * _tickLength);
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ delayTicks(300);
} else if (!frm) {
- _sound->playTrack(2);
+ _vm->sound()->playTrack(2);
}
return 0;
}
-int KyraEngine_HoF::seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_title(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 1) {
- _sound->playTrack(3);
- } else if (frm == 25) {
+ _vm->sound()->playTrack(3);
+ } else if (frm == 25 && _startupSaveLoadable) {
int cp = _screen->setCurPage(0);
_screen->showMouse();
_system->updateScreen();
- _menuChoice = _menu->handle(11) + 1;
- _seqEndTime = 0;
- _seqSubframePlaying = false;
- if (_menuChoice == 4)
- quitGame();
+ _result = _menu->handle(11) + 1;
+ _updateAnimations = false;
+
+ if (_result == 1) {
+ _curScene = _lastScene;
+ _preventLooping = true;
+ } else {
+ setCountDown(200);
+ }
+
+ if (_result == 4)
+ _vm->quitGame();
_screen->hideMouse();
_screen->setCurPage(cp);
@@ -355,31 +1792,29 @@ int KyraEngine_HoF::seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return 0;
}
-int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_overview(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
uint8 *tmpPal = _screen->getPalette(3).getData() + 0x101;
memset(tmpPal, 0, 256);
- _seqSubFrameEndTimeInternal = 0;
- uint32 now = 0;
+ uint32 frameEnd = 0;
- switch (_seqFrameCounter) {
+ switch (_callbackCurrentFrame) {
case 0:
- _seqSubframePlaying = true;
- _sound->playTrack(4);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 60 * _tickLength;
+ _updateAnimations = true;
+ fadeOutMusic();
+ _vm->sound()->playTrack(4);
+ frameEnd = _system->getMillis() + 60 * _vm->tickLength();
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _screen->setTextColorMap(_textColorMap);
- _screen->setTextColorMap(_seqTextColorMap);
-
- now = _system->getMillis();
- if (_seqSubFrameEndTimeInternal > now)
- delay(_seqSubFrameEndTimeInternal - now);
+ delayUntil(frameEnd);
break;
case 1:
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x40, 0, 0, 0, 0x100, true);
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x40, 0, 0, 0, 0x100, true);
for (int i = 0; i < 256; i++)
tmpPal[_screen->getPalette(3)[i]] = 1;
@@ -393,19 +1828,19 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm
break;
case 40:
- seq_loadNestedSequence(0, kSequenceOver1);
+ startNestedAnimation(0, kNestedSequenceOver1);
break;
case 60:
- seq_loadNestedSequence(1, kSequenceOver2);
+ startNestedAnimation(1, kNestedSequenceOver2);
break;
case 120:
- seq_playTalkText(0);
+ playSoundAndDisplaySubTitle(0);
break;
case 200:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
_screen->fadePalette(_screen->getPalette(2), 64);
break;
@@ -417,64 +1852,57 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
_screen->setScreenPalette(_screen->getPalette(0));
_screen->updateScreen();
- seq_resetActiveWSA(0);
- seq_resetActiveWSA(1);
+ closeNestedAnimation(0);
+ closeNestedAnimation(1);
break;
case 282:
- seq_loadNestedSequence(0, kSequenceForest);
- seq_playTalkText(1);
+ startNestedAnimation(0, kNestedSequenceForest);
+ playSoundAndDisplaySubTitle(1);
break;
- case 354:
- case 434:
- if (!((_seqFrameCounter == 354 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 434 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(0, kSequenceDragon);
+ CASE_ALT(434, 354)
+ closeNestedAnimation(0);
+ startNestedAnimation(0, kNestedSequenceDragon);
break;
- case 400:
- case 540:
- if (!((_seqFrameCounter == 400 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 540 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- _seqEndTime = 0;
- _seqSubframePlaying = false;
+ CASE_ALT(540, 400)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ setCountDown(0);
+ _updateAnimations = false;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter) {
+int SeqPlayer_HOF::cbHOF_library(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (_callbackCurrentFrame) {
case 0:
- _seqSubframePlaying = true;
- _sound->playTrack(5);
+ _updateAnimations = true;
+ _vm->sound()->playTrack(5);
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _screen->setTextColorMap(_textColorMap);
break;
case 1:
- seq_loadNestedSequence(0, kSequenceLibrary3);
- seq_playTalkText(4);
+ startNestedAnimation(0, kNestedSequenceLibrary3);
+ playSoundAndDisplaySubTitle(4);
break;
case 100:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
_screen->copyPage(12, 2);
_screen->applyOverlay(0, 0, 320, 200, 2, _screen->getPalette(3).getData());
@@ -482,585 +1910,560 @@ int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->updateScreen();
_screen->copyPage(2, 12);
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(0, kSequenceDarm);
+ closeNestedAnimation(0);
+ startNestedAnimation(0, kNestedSequenceDarm);
break;
case 104:
- seq_playTalkText(5);
+ playSoundAndDisplaySubTitle(5);
break;
case 240:
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(0, kSequenceLibrary2);
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ startNestedAnimation(0, kNestedSequenceLibrary2);
break;
case 340:
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
_screen->applyOverlay(0, 0, 320, 200, 2, _screen->getPalette(3).getData());
_screen->copyPage(2, 12);
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
_screen->updateScreen();
- seq_loadNestedSequence(0, kSequenceMarco);
- seq_playTalkText(6);
+ startNestedAnimation(0, kNestedSequenceMarco);
+ playSoundAndDisplaySubTitle(6);
break;
- case 480:
- case 660:
- if (!((_seqFrameCounter == 480 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 660 && _flags.platform == Common::kPlatformPC)))
- break;
-
+ CASE_ALT(660, 480)
_screen->copyPage(2, 12);
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- _seqEndTime = 0;
- _seqSubframePlaying = false;
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ setCountDown(0);
+ _updateAnimations = false;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-
-int KyraEngine_HoF::seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter) {
+int SeqPlayer_HOF::cbHOF_hand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (_callbackCurrentFrame) {
case 0:
- _seqSubframePlaying = true;
- _sound->playTrack(6);
+ _updateAnimations = true;
+ _vm->sound()->playTrack(6);
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _screen->setTextColorMap(_textColorMap);
break;
case 1:
- seq_loadNestedSequence(0, kSequenceHand1a);
- seq_loadNestedSequence(1, kSequenceHand1b);
- seq_loadNestedSequence(2, kSequenceHand1c);
- seq_playTalkText(7);
+ startNestedAnimation(0, kNestedSequenceHand1a);
+ startNestedAnimation(1, kNestedSequenceHand1b);
+ startNestedAnimation(2, kNestedSequenceHand1c);
+ playSoundAndDisplaySubTitle(7);
break;
case 201:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
_screen->applyOverlay(0, 0, 320, 200, 2, _screen->getPalette(3).getData());
_screen->copyPage(2, 12);
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
_screen->updateScreen();
- seq_resetActiveWSA(0);
- seq_resetActiveWSA(1);
- seq_resetActiveWSA(2);
- seq_loadNestedSequence(0, kSequenceHand2);
- seq_playTalkText(8);
+ closeNestedAnimation(0);
+ closeNestedAnimation(1);
+ closeNestedAnimation(2);
+ startNestedAnimation(0, kNestedSequenceHand2);
+ playSoundAndDisplaySubTitle(8);
break;
- case 260:
- case 395:
- if (!((_seqFrameCounter == 260 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 395 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(1, kSequenceHand3);
- seq_playTalkText(9);
+ CASE_ALT(395, 260)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ startNestedAnimation(1, kNestedSequenceHand3);
+ playSoundAndDisplaySubTitle(9);
break;
- case 365:
- case 500:
- if (!((_seqFrameCounter == 365 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 500 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(1);
- seq_loadNestedSequence(0, kSequenceHand4);
+ CASE_ALT(500, 365)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(1);
+ startNestedAnimation(0, kNestedSequenceHand4);
break;
- case 405:
- case 540:
- if (!((_seqFrameCounter == 405 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 540 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_playTalkText(10);
+ CASE_ALT(540, 405)
+ playSoundAndDisplaySubTitle(10);
break;
- case 484:
- case 630:
- if (!((_seqFrameCounter == 484 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 630 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- _seqEndTime = 0;
- _seqSubframePlaying = false;
+ CASE_ALT(630, 484)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ setCountDown(0);
+ _updateAnimations = false;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introPoint(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_point(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == -2) {
- seq_waitForTextsTimeout();
- _seqEndTime = 0;
+ waitForSubTitlesTimeout();
+ setCountDown(0);
}
- switch (_seqFrameCounter) {
+ switch (_callbackCurrentFrame) {
case -2:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
break;
case 0:
- _sound->playTrack(7);
+ _vm->sound()->playTrack(7);
- _seqTextColor[1] = 0xf7;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _textColor[1] = 0xf7;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _screen->setTextColorMap(_textColorMap);
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
break;
case 1:
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introZanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_zanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == -2) {
- seq_waitForTextsTimeout();
- _seqEndTime = 0;
+ waitForSubTitlesTimeout();
+ setCountDown(0);
return 0;
}
- switch (_seqFrameCounter) {
+ switch (_callbackCurrentFrame) {
case 0:
- _sound->playTrack(8);
+ _vm->sound()->playTrack(8);
- _seqTextColor[1] = 0xfd;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = 0xfd;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _screen->setTextColorMap(_textColorMap);
break;
case 1:
- if (_flags.isTalkie) {
- seq_playWsaSyncDialogue(21, 13, -1, 140, 70, 160, wsaObj, 0, 8, x, y);
+ if (_vm->gameFlags().isTalkie) {
+ playDialogueAnimation(21, 13, -1, 140, 70, 160, wsaObj, 0, 8, x, y);
} else {
- seq_setTextEntry(21, 140, 70, 200, 160);
- _seqFrameDelay = 200;
+ displaySubTitle(21, 140, 70, 200, 160);
+ _animDuration = 200;
}
break;
case 2:
case 11:
case 21:
- if (!_flags.isTalkie)
- _seqFrameDelay = 12;
+ if (!_vm->gameFlags().isTalkie)
+ _animDuration = 12;
break;
case 9:
- if (_flags.isTalkie)
- seq_playWsaSyncDialogue(13, 14, -1, 140, (_flags.lang == Common::FR_FRA
- || _flags.lang == Common::DE_DEU) ? 50 : 70, 160, wsaObj, 9, 15, x, y);
+ if (_vm->gameFlags().isTalkie)
+ playDialogueAnimation(13, 14, -1, 140, (_vm->gameFlags().lang == Common::FR_FRA
+ || _vm->gameFlags().lang == Common::DE_DEU) ? 50 : 70, 160, wsaObj, 9, 15, x, y);
break;
case 10:
- if (!_flags.isTalkie) {
- seq_waitForTextsTimeout();
- seq_setTextEntry(13, 140, 50, _sequenceStringsDuration[13], 160);
- _seqFrameDelay = 300;
+ if (!_vm->gameFlags().isTalkie) {
+ waitForSubTitlesTimeout();
+ displaySubTitle(13, 140, 50, _textDuration[13], 160);
+ _animDuration = 300;
}
break;
case 16:
- if (_flags.isTalkie)
- seq_playWsaSyncDialogue(18, 15, -1, 140, (_flags.lang == Common::FR_FRA) ? 50 :
- (_flags.lang == Common::DE_DEU ? 40 : 70), 160, wsaObj, 10, 16, x, y);
+ if (_vm->gameFlags().isTalkie)
+ playDialogueAnimation(18, 15, -1, 140, (_vm->gameFlags().lang == Common::FR_FRA) ? 50 :
+ (_vm->gameFlags().lang == Common::DE_DEU ? 40 : 70), 160, wsaObj, 10, 16, x, y);
break;
case 17:
- if (_flags.isTalkie)
- _seqFrameDelay = 12;
+ if (_vm->gameFlags().isTalkie)
+ _animDuration = 12;
break;
case 20:
- if (!_flags.isTalkie) {
- seq_waitForTextsTimeout();
- seq_setTextEntry(18, 160, 50, _sequenceStringsDuration[18], 160);
- _seqFrameDelay = 200;
+ if (!_vm->gameFlags().isTalkie) {
+ waitForSubTitlesTimeout();
+ displaySubTitle(18, 160, 50, _textDuration[18], 160);
+ _animDuration = 200;
}
break;
case 26:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
break;
case 46:
- if (_flags.isTalkie) {
- seq_playWsaSyncDialogue(16, 16, -1, 200, 50, 120, wsaObj, 46, 46, x, y);
+ if (_vm->gameFlags().isTalkie) {
+ playDialogueAnimation(16, 16, -1, 200, 50, 120, wsaObj, 46, 46, x, y);
} else {
- seq_waitForTextsTimeout();
- seq_setTextEntry(16, 200, 50, _sequenceStringsDuration[16], 120);
+ waitForSubTitlesTimeout();
+ displaySubTitle(16, 200, 50, _textDuration[16], 120);
}
- _seqEndTime = _system->getMillis() + 120 * _tickLength;
+ setCountDown(120);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introOver1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_over1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 2)
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
else if (frm == 3)
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
return frm;
}
-
-int KyraEngine_HoF::seq_introOver2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_over2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 1)
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
return frm;
}
-int KyraEngine_HoF::seq_introForest(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_forest(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 11)
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
else if (frm == 12)
- seq_playTalkText(2);
+ playSoundAndDisplaySubTitle(2);
return frm;
}
-int KyraEngine_HoF::seq_introDragon(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_dragon(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 11)
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
else if (frm == 3)
- seq_playTalkText(3);
+ playSoundAndDisplaySubTitle(3);
return frm;
}
-int KyraEngine_HoF::seq_introDarm(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_darm(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introLibrary2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_library2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introMarco(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_marco(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 36) {
- seq_waitForTextsTimeout();
- _seqEndTime = 0;
+ waitForSubTitlesTimeout();
+ setCountDown(0);
}
return frm;
}
-int KyraEngine_HoF::seq_introHand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_hand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introHand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_hand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 15)
frm = 12;
return frm;
}
-int KyraEngine_HoF::seq_introHand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_hand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 8)
frm = 4;
return frm;
}
-int KyraEngine_HoF::seq_introHand2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_hand2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introHand3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_hand3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
+int SeqPlayer_HOF::cbHOF_funters(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
+ doTransition(9);
break;
case 0:
- _sound->playTrack(3);
+ _vm->sound()->playTrack(3);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xff;
+ _screen->setTextColorMap(_textColorMap);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(81, 240, 70, _seqTextColorMap, 252);
- seq_printCreditsString(82, 240, 90, _seqTextColorMap, _seqTextColor[0]);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(81, 240, 70, _textColorMap, 252);
+ printFadingText(82, 240, 90, _textColorMap, _textColor[0]);
_screen->copyPage(2, 12);
- seq_playTalkText(_flags.isTalkie ? 28 : 24);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqTextColor[0] = 1;
-
- if (_flags.isTalkie) {
- chatY = (_flags.lang == Common::FR_FRA) ? 70 : 78;
- chatFirstFrame = 9;
- chatLastFrame = 15;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 28 : 24);
+ delayUntil(frameEnd);
+ _textColor[0] = 1;
+
+ if (_vm->gameFlags().isTalkie) {
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA) ? 70 : 78;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 15;
voiceIndex = 34;
} else {
- chatY = (_flags.lang == Common::FR_FRA) ? 78 : 70;
- chatFirstFrame = 0;
- chatLastFrame = 8;
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA) ? 78 : 70;
+ subTitleFirstFrame = 0;
+ subTitleLastFrame = 8;
}
- chatX = (_flags.lang == Common::FR_FRA) ? 84 : 88;
- chatW = 100;
+ subTitleX = (_vm->gameFlags().lang == Common::FR_FRA) ? 84 : 88;
+ subTitleW = 100;
- seq_playWsaSyncDialogue(22, voiceIndex, 187, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
+ playDialogueAnimation(22, voiceIndex, 187, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
break;
case 9:
case 16:
- if (!((frm == 9 && !_flags.isTalkie) || (frm == 16 && _flags.isTalkie)))
+ if (!((frm == 9 && !_vm->gameFlags().isTalkie) || (frm == 16 && _vm->gameFlags().isTalkie)))
break;
- _seqFrameDelay = 12;
+ _animDuration = 12;
- if (_flags.lang == Common::FR_FRA) {
- chatX = 80;
- chatW = 112;
+ if (_vm->gameFlags().lang == Common::FR_FRA) {
+ subTitleX = 80;
+ subTitleW = 112;
} else {
- chatX = (_flags.lang == Common::DE_DEU) ? 84 : 96;
- chatW = 100;
+ subTitleX = (_vm->gameFlags().lang == Common::DE_DEU) ? 84 : 96;
+ subTitleW = 100;
}
- if (_flags.isTalkie) {
- chatFirstFrame = 0;
- chatLastFrame = 8;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleFirstFrame = 0;
+ subTitleLastFrame = 8;
voiceIndex = 35;
} else {
- chatFirstFrame = 9;
- chatLastFrame = 15;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 15;
}
- chatY = 70;
+ subTitleY = 70;
- seq_playWsaSyncDialogue(23, voiceIndex, 137, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 17;
+ playDialogueAnimation(23, voiceIndex, 137, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 17;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
+int SeqPlayer_HOF::cbHOF_ferb(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(34, 240, _flags.isTalkie ? 60 : 40, _seqTextColorMap, 252);
- seq_printCreditsString(35, 240, _flags.isTalkie ? 70 : 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(36, 240, _flags.isTalkie ? 90 : 70, _seqTextColorMap, 252);
- seq_printCreditsString(37, 240, _flags.isTalkie ? 100 : 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(38, 240, _flags.isTalkie ? 120 : 110, _seqTextColorMap, 252);
- seq_printCreditsString(39, 240, _flags.isTalkie ? 130 : 120, _seqTextColorMap, _seqTextColor[0]);
- if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
- seq_printCreditsString(103, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(34, 240, _vm->gameFlags().isTalkie ? 60 : 40, _textColorMap, 252);
+ printFadingText(35, 240, _vm->gameFlags().isTalkie ? 70 : 50, _textColorMap, _textColor[0]);
+ printFadingText(36, 240, _vm->gameFlags().isTalkie ? 90 : 70, _textColorMap, 252);
+ printFadingText(37, 240, _vm->gameFlags().isTalkie ? 100 : 90, _textColorMap, _textColor[0]);
+ printFadingText(38, 240, _vm->gameFlags().isTalkie ? 120 : 110, _textColorMap, 252);
+ printFadingText(39, 240, _vm->gameFlags().isTalkie ? 130 : 120, _textColorMap, _textColor[0]);
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ printFadingText(103, 240, 130, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 255;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 255;
+ _screen->setTextColorMap(_textColorMap);
break;
case 5:
- if (!_flags.isTalkie)
- seq_playTalkText(18);
- _seqFrameDelay = 16;
+ if (!_vm->gameFlags().isTalkie)
+ playSoundAndDisplaySubTitle(18);
+ _animDuration = 16;
- if (_flags.isTalkie) {
- chatFirstFrame = 5;
- chatLastFrame = 8;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleFirstFrame = 5;
+ subTitleLastFrame = 8;
voiceIndex = 22;
} else {
- chatLastFrame = 14;
+ subTitleLastFrame = 14;
}
- chatX = 116;
- chatY = 90;
- chatW = 60;
+ subTitleX = 116;
+ subTitleY = 90;
+ subTitleW = 60;
- seq_playWsaSyncDialogue(24, voiceIndex, 149, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
+ playDialogueAnimation(24, voiceIndex, 149, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
break;
case 11:
- if (_flags.isTalkie)
- seq_playWsaSyncDialogue(24, 22, 149, 116, 90, 60, wsaObj, 11, 14, x, y);
+ if (_vm->gameFlags().isTalkie)
+ playDialogueAnimation(24, 22, 149, 116, 90, 60, wsaObj, 11, 14, x, y);
break;
case 16:
- seq_playTalkText(_flags.isTalkie ? 23 : 19);
- _seqFrameDelay = _flags.isTalkie ? 20 : 16;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 23 : 19);
+ _animDuration = _vm->gameFlags().isTalkie ? 20 : 16;
- if (_flags.lang == Common::FR_FRA) {
- chatY = 48;
- chatW = 88;
+ if (_vm->gameFlags().lang == Common::FR_FRA) {
+ subTitleY = 48;
+ subTitleW = 88;
} else {
- chatY = 60;
- chatW = 100;
+ subTitleY = 60;
+ subTitleW = 100;
}
- chatX = 60;
+ subTitleX = 60;
- if (_flags.isTalkie)
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 36;
- seq_playWsaSyncDialogue(25, voiceIndex, 143, chatX, chatY, chatW, wsaObj, 16, 25, x, y);
- _seqFrameDelay = 16;
+ playDialogueAnimation(25, voiceIndex, 143, subTitleX, subTitleY, subTitleW, wsaObj, 16, 25, x, y);
+ _animDuration = 16;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
+int SeqPlayer_HOF::cbHOF_fish(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
- seq_printCreditsString(40, 240, _flags.isTalkie ? 55 : 40, _seqTextColorMap, 252);
- seq_printCreditsString(41, 240, _flags.isTalkie ? 65 : 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(42, 240, _flags.isTalkie ? 75 : 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(43, 240, _flags.isTalkie ? 95 : 80, _seqTextColorMap, 252);
- seq_printCreditsString(44, 240, _flags.isTalkie ? 105 : 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(93, 240, _flags.isTalkie ? 125 : 110, _seqTextColorMap, 252);
- seq_printCreditsString(94, 240, _flags.isTalkie ? 135 : 120, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ printFadingText(40, 240, _vm->gameFlags().isTalkie ? 55 : 40, _textColorMap, 252);
+ printFadingText(41, 240, _vm->gameFlags().isTalkie ? 65 : 50, _textColorMap, _textColor[0]);
+ printFadingText(42, 240, _vm->gameFlags().isTalkie ? 75 : 60, _textColorMap, _textColor[0]);
+ printFadingText(43, 240, _vm->gameFlags().isTalkie ? 95 : 80, _textColorMap, 252);
+ printFadingText(44, 240, _vm->gameFlags().isTalkie ? 105 : 90, _textColorMap, _textColor[0]);
+ printFadingText(93, 240, _vm->gameFlags().isTalkie ? 125 : 110, _textColorMap, 252);
+ printFadingText(94, 240, _vm->gameFlags().isTalkie ? 135 : 120, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xff;
+ _screen->setTextColorMap(_textColorMap);
break;
case 4:
- chatX = 94;
- chatY = 42;
- chatW = 100;
- if (_flags.isTalkie)
+ subTitleX = 94;
+ subTitleY = 42;
+ subTitleW = 100;
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 37;
- seq_playWsaSyncDialogue(26, voiceIndex, 149, chatX, chatY, chatW, wsaObj, 3, 12, x, y);
+ playDialogueAnimation(26, voiceIndex, 149, subTitleX, subTitleY, subTitleW, wsaObj, 3, 12, x, y);
break;
case 14:
- seq_playTalkText(_flags.isTalkie ? 19 : 15);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 19 : 15);
break;
case 23:
- seq_playTalkText(_flags.isTalkie ? 20 : 16);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 20 : 16);
break;
case 29:
- chatX = (_flags.lang == Common::DE_DEU) ? 82 : ((_flags.lang == Common::FR_FRA) ? 92 : 88);
- chatY = 40;
- chatW = 100;
+ subTitleX = (_vm->gameFlags().lang == Common::DE_DEU) ? 82 : ((_vm->gameFlags().lang == Common::FR_FRA) ? 92 : 88);
+ subTitleY = 40;
+ subTitleW = 100;
- if (_flags.isTalkie) {
- if (_flags.lang == Common::DE_DEU)
- chatY = 35;
+ if (_vm->gameFlags().isTalkie) {
+ if (_vm->gameFlags().lang == Common::DE_DEU)
+ subTitleY = 35;
voiceIndex = 38;
}
- seq_playWsaSyncDialogue(27, voiceIndex, 187, chatX, chatY, chatW, wsaObj, 28, 34, x, y);
+ playDialogueAnimation(27, voiceIndex, 187, subTitleX, subTitleY, subTitleW, wsaObj, 28, 34, x, y);
break;
case 45:
- seq_playTalkText(_flags.isTalkie ? 21 : 17);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 21 : 17);
break;
case 50:
- seq_playTalkText(_flags.isTalkie ? 29 : 25);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 29 : 25);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
+int SeqPlayer_HOF::cbHOF_fheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
@@ -1068,79 +2471,79 @@ int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->copyPage(12, 2);
_screen->copyPage(2, 0);
_screen->updateScreen();
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(49, 240, 20, _seqTextColorMap, 252);
- seq_printCreditsString(50, 240, 30, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(51, 240, 40, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(52, 240, 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(53, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(54, 240, 70, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(55, 240, 80, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(56, 240, 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(57, 240, 100, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(58, 240, 110, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(60, 240, 120, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(61, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(62, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(63, 240, 150, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(64, 240, 160, _seqTextColorMap, _seqTextColor[0]);
-
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(49, 240, 20, _textColorMap, 252);
+ printFadingText(50, 240, 30, _textColorMap, _textColor[0]);
+ printFadingText(51, 240, 40, _textColorMap, _textColor[0]);
+ printFadingText(52, 240, 50, _textColorMap, _textColor[0]);
+ printFadingText(53, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(54, 240, 70, _textColorMap, _textColor[0]);
+ printFadingText(55, 240, 80, _textColorMap, _textColor[0]);
+ printFadingText(56, 240, 90, _textColorMap, _textColor[0]);
+ printFadingText(57, 240, 100, _textColorMap, _textColor[0]);
+ printFadingText(58, 240, 110, _textColorMap, _textColor[0]);
+ printFadingText(60, 240, 120, _textColorMap, _textColor[0]);
+ printFadingText(61, 240, 130, _textColorMap, _textColor[0]);
+ printFadingText(62, 240, 140, _textColorMap, _textColor[0]);
+ printFadingText(63, 240, 150, _textColorMap, _textColor[0]);
+ printFadingText(64, 240, 160, _textColorMap, _textColor[0]);
+
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xff;
+ _screen->setTextColorMap(_textColorMap);
break;
case 2:
- seq_playTalkText(_flags.isTalkie ? 25 : 21);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 25 : 21);
- if (_flags.lang == Common::FR_FRA) {
- chatX = 92;
- chatY = 72;
+ if (_vm->gameFlags().lang == Common::FR_FRA) {
+ subTitleX = 92;
+ subTitleY = 72;
} else {
- chatX = (_flags.lang == Common::DE_DEU) ? 90 : 98;
- chatY = 84;
+ subTitleX = (_vm->gameFlags().lang == Common::DE_DEU) ? 90 : 98;
+ subTitleY = 84;
}
- if (_flags.isTalkie) {
- chatFirstFrame = 8;
- chatLastFrame = 9;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleFirstFrame = 8;
+ subTitleLastFrame = 9;
voiceIndex = 39;
} else {
- chatFirstFrame = 2;
- chatLastFrame = -8;
+ subTitleFirstFrame = 2;
+ subTitleLastFrame = -8;
}
- chatW = 100;
+ subTitleW = 100;
- seq_playWsaSyncDialogue(28, voiceIndex, -1, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 4;
+ playDialogueAnimation(28, voiceIndex, -1, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 4;
break;
case 9:
- seq_playTalkText(_flags.isTalkie ? 24 : 20);
- _seqFrameDelay = 100;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 24 : 20);
+ _animDuration = 100;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
+int SeqPlayer_HOF::cbHOF_farmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
uint16 voiceIndex = 0;
switch (frm) {
@@ -1148,169 +2551,164 @@ int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->copyPage(12, 2);
_screen->copyPage(2, 0);
_screen->updateScreen();
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(45, 240, 40, _seqTextColorMap, 252);
- seq_printCreditsString(46, 240, 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(47, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(83, 240, 80, _seqTextColorMap, 252);
- seq_printCreditsString(48, 240, 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(65, 240, 110, _seqTextColorMap, 252);
- seq_printCreditsString(66, 240, 120, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(67, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(68, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(69, 240, 150, _seqTextColorMap, _seqTextColor[0]);
- if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
- seq_printCreditsString(104, 240, 160, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(45, 240, 40, _textColorMap, 252);
+ printFadingText(46, 240, 50, _textColorMap, _textColor[0]);
+ printFadingText(47, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(83, 240, 80, _textColorMap, 252);
+ printFadingText(48, 240, 90, _textColorMap, _textColor[0]);
+ printFadingText(65, 240, 110, _textColorMap, 252);
+ printFadingText(66, 240, 120, _textColorMap, _textColor[0]);
+ printFadingText(67, 240, 130, _textColorMap, _textColor[0]);
+ printFadingText(68, 240, 140, _textColorMap, _textColor[0]);
+ printFadingText(69, 240, 150, _textColorMap, _textColor[0]);
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ printFadingText(104, 240, 160, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = 1 + (_screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 254) & 0xff);
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = 1 + (_screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xff);
- _screen->setTextColorMap(_seqTextColorMap);
- seq_playTalkText(_flags.isTalkie ? 30 : 26);
+ _textColor[1] = 1 + (_screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 254) & 0xff);
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = 1 + (_screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xff);
+ _screen->setTextColorMap(_textColorMap);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 30 : 26);
break;
case 6:
- if (_flags.isTalkie)
- seq_playTalkText(18);
+ if (_vm->gameFlags().isTalkie)
+ playSoundAndDisplaySubTitle(18);
break;
case 12:
- if (!_flags.isTalkie)
- seq_playTalkText(14);
+ if (!_vm->gameFlags().isTalkie)
+ playSoundAndDisplaySubTitle(14);
- chatX = 90;
- chatY = 30;
- chatW = 100;
+ subTitleX = 90;
+ subTitleY = 30;
+ subTitleW = 100;
- if (_flags.isTalkie) {
- if (_flags.lang == Common::FR_FRA || _flags.lang == Common::DE_DEU) {
- chatX = 75;
- chatY = 25;
+ if (_vm->gameFlags().isTalkie) {
+ if (_vm->gameFlags().lang == Common::FR_FRA || _vm->gameFlags().lang == Common::DE_DEU) {
+ subTitleX = 75;
+ subTitleY = 25;
}
voiceIndex = 40;
}
- seq_playWsaSyncDialogue(29, voiceIndex, 150, chatX, chatY, chatW, wsaObj, 12, -21, x, y);
+ playDialogueAnimation(29, voiceIndex, 150, subTitleX, subTitleY, subTitleW, wsaObj, 12, -21, x, y);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
- //int textCol = 0;
+int SeqPlayer_HOF::cbHOF_fuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(70, 240, 20, _seqTextColorMap, 252);
- seq_printCreditsString(71, 240, 30, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(72, 240, 40, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(73, 240, 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(74, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(75, 240, 70, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(101, 240, 80, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(102, 240, 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(87, 240, 100, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(88, 240, 110, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(89, 240, 120, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(90, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(91, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(92, 240, 150, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(70, 240, 20, _textColorMap, 252);
+ printFadingText(71, 240, 30, _textColorMap, _textColor[0]);
+ printFadingText(72, 240, 40, _textColorMap, _textColor[0]);
+ printFadingText(73, 240, 50, _textColorMap, _textColor[0]);
+ printFadingText(74, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(75, 240, 70, _textColorMap, _textColor[0]);
+ printFadingText(101, 240, 80, _textColorMap, _textColor[0]);
+ printFadingText(102, 240, 90, _textColorMap, _textColor[0]);
+ printFadingText(87, 240, 100, _textColorMap, _textColor[0]);
+ printFadingText(88, 240, 110, _textColorMap, _textColor[0]);
+ printFadingText(89, 240, 120, _textColorMap, _textColor[0]);
+ printFadingText(90, 240, 130, _textColorMap, _textColor[0]);
+ printFadingText(91, 240, 140, _textColorMap, _textColor[0]);
+ printFadingText(92, 240, 150, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
for (int i = 0; i < 0x300; i++)
_screen->getPalette(0)[i] &= 0x3f;
- _seqTextColor[1] = 0xCf;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xfe;
+ _textColor[1] = 0xCf;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xfe;
- _screen->setTextColorMap(_seqTextColorMap);
+ _screen->setTextColorMap(_textColorMap);
break;
case 6:
- _seqFrameDelay = 20;
+ _animDuration = 20;
- if (_flags.isTalkie) {
- chatX = 82;
- //textCol = 143;
- chatFirstFrame = 16;
- chatLastFrame = 21;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleX = 82;
+ subTitleFirstFrame = 16;
+ subTitleLastFrame = 21;
voiceIndex = 41;
} else {
- chatX = 62;
- //textCol = 137;
- chatFirstFrame = 9;
- chatLastFrame = 13;
+ subTitleX = 62;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 13;
}
- chatY = (_flags.lang == Common::FR_FRA || _flags.lang == Common::DE_DEU) ? 88 :100;
- chatW = 80;
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA || _vm->gameFlags().lang == Common::DE_DEU) ? 88 :100;
+ subTitleW = 80;
- seq_playWsaSyncDialogue(30, voiceIndex, 137, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 8;
+ playDialogueAnimation(30, voiceIndex, 137, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 8;
break;
case 9:
case 16:
- if (_flags.isTalkie) {
+ if (_vm->gameFlags().isTalkie) {
if (frm == 16)
break;
- chatX = 64;
- //textCol = 137;
- chatFirstFrame = 9;
- chatLastFrame = 13;
+ subTitleX = 64;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 13;
voiceIndex = 42;
} else {
if (frm == 9)
break;
- chatX = 80;
- //textCol = 143;
- chatFirstFrame = 16;
- chatLastFrame = 21;
+ subTitleX = 80;
+ subTitleFirstFrame = 16;
+ subTitleLastFrame = 21;
}
- chatY = 100;
- chatW = 100;
+ subTitleY = 100;
+ subTitleW = 100;
- seq_playWsaSyncDialogue(31, voiceIndex, 143, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 21;
+ playDialogueAnimation(31, voiceIndex, 143, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 21;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
+int SeqPlayer_HOF::cbHOF_firates(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
uint16 voiceIndex = 0;
switch (frm) {
@@ -1318,87 +2716,87 @@ int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm
_screen->copyPage(12, 2);
_screen->copyPage(2, 0);
_screen->updateScreen();
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(76, 240, 40, _seqTextColorMap, 252);
- seq_printCreditsString(77, 240, 50, _seqTextColorMap, 252);
- seq_printCreditsString(78, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(79, 240, 70, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(80, 240, 80, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(84, 240, 100, _seqTextColorMap, 252);
- seq_printCreditsString(85, 240, 110, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(99, 240, 130, _seqTextColorMap, 252);
- seq_printCreditsString(100, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(76, 240, 40, _textColorMap, 252);
+ printFadingText(77, 240, 50, _textColorMap, 252);
+ printFadingText(78, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(79, 240, 70, _textColorMap, _textColor[0]);
+ printFadingText(80, 240, 80, _textColorMap, _textColor[0]);
+ printFadingText(84, 240, 100, _textColorMap, 252);
+ printFadingText(85, 240, 110, _textColorMap, _textColor[0]);
+ printFadingText(99, 240, 130, _textColorMap, 252);
+ printFadingText(100, 240, 140, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xff;
+ _screen->setTextColorMap(_textColorMap);
break;
case 6:
- seq_playTalkText(_flags.isTalkie ? 31 : 27);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 31 : 27);
break;
case 14:
case 15:
- if (!((frm == 15 && !_flags.isTalkie) || (frm == 14 && _flags.isTalkie)))
+ if (!((frm == 15 && !_vm->gameFlags().isTalkie) || (frm == 14 && _vm->gameFlags().isTalkie)))
break;
- seq_playTalkText(_flags.isTalkie ? 31 : 27);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 31 : 27);
- if (_flags.lang == Common::DE_DEU) {
- chatX = 82;
- chatY = 84;
- chatW = 140;
+ if (_vm->gameFlags().lang == Common::DE_DEU) {
+ subTitleX = 82;
+ subTitleY = 84;
+ subTitleW = 140;
} else {
- chatX = 74;
- chatY = (_flags.lang == Common::FR_FRA) ? 96: 108;
- chatW = 80;
+ subTitleX = 74;
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA) ? 96: 108;
+ subTitleW = 80;
}
- if (_flags.isTalkie)
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 43;
- seq_playWsaSyncDialogue(32, voiceIndex, 137, chatX, chatY, chatW, wsaObj, 14, 16, x, y);
+ playDialogueAnimation(32, voiceIndex, 137, subTitleX, subTitleY, subTitleW, wsaObj, 14, 16, x, y);
break;
case 28:
- seq_playTalkText(_flags.isTalkie ? 32 : 28);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 32 : 28);
break;
case 29:
- seq_playTalkText(_flags.isTalkie ? 33 : 29);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 33 : 29);
break;
case 31:
- if (_flags.isTalkie)
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 44;
- chatX = 90;
- chatY = (_flags.lang == Common::DE_DEU) ? 60 : 76;
- chatW = 80;
+ subTitleX = 90;
+ subTitleY = (_vm->gameFlags().lang == Common::DE_DEU) ? 60 : 76;
+ subTitleW = 80;
- seq_playWsaSyncDialogue(33, voiceIndex, 143, chatX, chatY, chatW, wsaObj, 31, 34, x, y);
+ playDialogueAnimation(33, voiceIndex, 143, subTitleX, subTitleY, subTitleW, wsaObj, 31, 34, x, y);
break;
case 35:
- _seqFrameDelay = 300;
+ _animDuration = 300;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_frash(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
int tmp = 0;
switch (frm) {
@@ -1408,473 +2806,440 @@ int KyraEngine_HoF::seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->copyPage(2, 12);
_screen->copyPage(2, 0);
_screen->updateScreen();
- _seqFrameCounter = 0;
- seq_loadNestedSequence(0, kSequenceFiggle);
+ _callbackCurrentFrame = 0;
+ startNestedAnimation(0, kNestedSequenceFiggle);
break;
case -1:
- if (_flags.isTalkie)
- seq_finaleActorScreen();
- _seqSpecialFlag = _flags.isTalkie;
+ if (_vm->gameFlags().isTalkie)
+ playHoFTalkieCredits();
+ _talkieFinaleExtraFlag = _vm->gameFlags().isTalkie;
break;
case 0:
- if (_seqFrameCounter == 1) {
- _sound->playTrack(4);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ if (_callbackCurrentFrame == 1) {
+ _vm->sound()->playTrack(4);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xff;
+ _screen->setTextColorMap(_textColorMap);
}
- _seqFrameDelay = 10;
+ _animDuration = 10;
break;
case 1:
- if (_seqFrameCounter < 20 && _seqSpecialFlag) {
- _seqWsaCurrentFrame = 0;
+ if (_callbackCurrentFrame < 20 && _talkieFinaleExtraFlag) {
+ _animCurrentFrame = 0;
} else {
- _seqFrameDelay = _flags.isTalkie ? 500 : (300 + _rnd.getRandomNumberRng(1, 300));
- seq_playTalkText(_flags.isTalkie ? 26 : 22);
- if (_seqSpecialFlag) {
- _seqFrameCounter = 3;
- _seqSpecialFlag = false;
+ _animDuration = _vm->gameFlags().isTalkie ? 500 : (300 + _vm->_rnd.getRandomNumberRng(1, 300));
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 26 : 22);
+ if (_talkieFinaleExtraFlag) {
+ _callbackCurrentFrame = 3;
+ _talkieFinaleExtraFlag = false;
}
}
break;
case 2:
- _seqFrameDelay = 20;
+ _animDuration = 20;
break;
case 3:
- seq_playTalkText(_flags.isTalkie ? 27 : 23);
- _seqFrameDelay = _flags.isTalkie ? 500 : (300 + _rnd.getRandomNumberRng(1, 300));
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 27 : 23);
+ _animDuration = _vm->gameFlags().isTalkie ? 500 : (300 + _vm->_rnd.getRandomNumberRng(1, 300));
break;
case 4:
- _seqFrameDelay = 10;
+ _animDuration = 10;
break;
case 5:
- seq_playTalkText(_flags.isTalkie ? 27 : 23);
- tmp = _seqFrameCounter / 6;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 27 : 23);
+ tmp = _callbackCurrentFrame / 6;
if (tmp == 2)
- _seqFrameDelay = _flags.isTalkie ? 7 : (1 + _rnd.getRandomNumberRng(1, 10));
+ _animDuration = _vm->gameFlags().isTalkie ? 7 : (1 + _vm->_rnd.getRandomNumberRng(1, 10));
else if (tmp < 2)
- _seqFrameDelay = _flags.isTalkie ? 500 : (300 + _rnd.getRandomNumberRng(1, 300));
+ _animDuration = _vm->gameFlags().isTalkie ? 500 : (300 + _vm->_rnd.getRandomNumberRng(1, 300));
break;
case 6:
- _seqFrameDelay = 10;
- tmp = _seqFrameCounter / 6;
+ _animDuration = 10;
+ tmp = _callbackCurrentFrame / 6;
if (tmp == 2)
- _seqWsaCurrentFrame = 4;
+ _animCurrentFrame = 4;
else if (tmp < 2)
- _seqWsaCurrentFrame = 0;
+ _animCurrentFrame = 0;
break;
case 7:
- _seqFrameCounter = 0;
- _seqFrameDelay = 5;
- seq_playTalkText(_flags.isTalkie ? 26 : 22);
+ _callbackCurrentFrame = 0;
+ _animDuration = 5;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 26 : 22);
break;
case 11:
- if (_seqFrameCounter < 8)
- _seqWsaCurrentFrame = 8;
+ if (_callbackCurrentFrame < 8)
+ _animCurrentFrame = 8;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-void KyraEngine_HoF::seq_finaleActorScreen() {
- static const uint8 colormap[] = {0, 0, 102, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- static const ScreenDim d = { 0x00, 0x0C, 0x28, 0xB4, 0xFF, 0x00, 0x00, 0x00 };
-
- _screen->loadBitmap("finale.cps", 3, 3, &_screen->getPalette(0));
- _screen->setFont(Screen::FID_GOLDFONT_FNT);
-
- int talkieCreditsSize, talkieCreditsSpecialSize;
- const uint8 *talkieCredits = _staticres->loadRawData(k2SeqplayCredits, talkieCreditsSize);
- const char * const *talkieCreditsSpecial = _staticres->loadStrings(k2SeqplayCreditsSpecial, talkieCreditsSpecialSize);
-
- _sound->setSoundList(&_soundData[kMusicIngame]);
- _sound->loadSoundFile(3);
- _sound->playTrack(3);
-
- _screen->setTextColorMap(colormap);
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
- _screen->updateScreen();
- _screen->fadeFromBlack();
+int SeqPlayer_HOF::cbHOF_figgle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (_callbackCurrentFrame == 10)
+ setCountDown(0);
+ if (_callbackCurrentFrame == 10 || _callbackCurrentFrame == 5 || _callbackCurrentFrame == 7)
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 45 : 30);
- _screen->_charWidth = -2;
- uint8 *dataPtr = new uint8[0xafd];
- memcpy(dataPtr, talkieCredits, talkieCreditsSize);
- _staticres->unloadId(k2SeqplayCredits);
-
- seq_displayScrollText(dataPtr, &d, 2, 6, 5, 1, Screen::FID_GOLDFONT_FNT, Screen::FID_GOLDFONT_FNT, 0, talkieCreditsSpecial);
- delay(120);
-
- delete[] dataPtr;
- _staticres->unloadId(k2SeqplayCreditsSpecial);
- _sound->setSoundList(&_soundData[kMusicFinale]);
- _sound->loadSoundFile(0);
-}
-
-int KyraEngine_HoF::seq_finaleFiggle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (_seqFrameCounter == 10)
- _seqEndTime = 0;
- if (_seqFrameCounter == 10 || _seqFrameCounter == 5 || _seqFrameCounter == 7)
- seq_playTalkText(_flags.isTalkie ? 45 : 30);
-
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_demoVirgin(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_virgin(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm)
- delay(50 * _tickLength);
+ delayTicks(50);
return 0;
}
-int KyraEngine_HoF::seq_demoWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm)
- _sound->playTrack(2);
+ _vm->sound()->playTrack(2);
return 0;
}
-int KyraEngine_HoF::seq_demoTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+
+int SeqPlayer_HOF::cbHOFDEMO_title(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm) {
- _sound->playTrack(3);
+ _vm->sound()->playTrack(3);
} else if (frm == 25) {
- delay(60 * _tickLength);
- _seqEndTime = 0;
- seq_sequenceCommand(0);
+ delayTicks(60);
+ setCountDown(0);
+ doTransition(0);
}
return 0;
}
-int KyraEngine_HoF::seq_demoHill(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_hill(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm) {
- _sound->playTrack(4);
+ _vm->sound()->playTrack(4);
} else if (frm == 25) {
- seq_loadNestedSequence(0, kSequenceDemoWater);
- _seqFrameDelay--;
+ startNestedAnimation(0, kNestedSequenceHoFDemoWater);
+ _animDuration--;
} else if (frm > 25 && frm < 50) {
- if (_seqFrameDelay > 3)
- _seqFrameDelay--;
+ if (_animDuration > 3)
+ _animDuration--;
} else if (frm == 95) {
- _seqFrameDelay = 70;
+ _animDuration = 70;
} else if (frm == 96) {
- _seqFrameDelay = 7;
+ _animDuration = 7;
} else if (frm == 129) {
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
}
return 0;
}
-int KyraEngine_HoF::seq_demoOuthome(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_outhome(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
switch (frm) {
case 12:
- seq_playTalkText(4);
+ playSoundAndDisplaySubTitle(4);
break;
case 32:
- seq_playTalkText(7);
+ playSoundAndDisplaySubTitle(7);
break;
case 36:
- seq_playTalkText(10);
+ playSoundAndDisplaySubTitle(10);
break;
case 57:
- seq_playTalkText(9);
+ playSoundAndDisplaySubTitle(9);
break;
case 80:
case 96:
case 149:
- _seqFrameDelay = 70;
+ _animDuration = 70;
break;
case 81:
case 97:
- _seqFrameDelay = 5;
+ _animDuration = 5;
break;
case 110:
- seq_playTalkText(5);
+ playSoundAndDisplaySubTitle(5);
break;
case 137:
- seq_playTalkText(6);
+ playSoundAndDisplaySubTitle(6);
break;
}
return 0;
}
-int KyraEngine_HoF::seq_demoWharf(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (!_seqFrameCounter)
- seq_loadNestedSequence(0, kSequenceDemoWharf2);
+int SeqPlayer_HOF::cbHOFDEMO_wharf(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (!_callbackCurrentFrame)
+ startNestedAnimation(0, kNestedSequenceHoFDemoWharf2);
switch (frm) {
case 0:
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
break;
case 5:
- if ((_seqFrameCounter / 8) <= 2 || _activeWSA[0].flags != -1)
- _seqWsaCurrentFrame = 0;
+ if ((_callbackCurrentFrame / 8) <= 2 || _animSlots[0].flags != -1)
+ _animCurrentFrame = 0;
else
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
break;
case 6:
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
break;
case 8:
case 10:
- seq_playTalkText(2);
+ playSoundAndDisplaySubTitle(2);
break;
case 13:
- seq_playTalkText(7);
+ playSoundAndDisplaySubTitle(7);
break;
case 16:
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_demoDinob(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_dinob(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 0) {
- if (!(_seqFrameCounter/8)) {
- seq_loadNestedSequence(0, kSequenceDemoDinob2);
- _seqWsaCurrentFrame = 0;
+ if (!(_callbackCurrentFrame/8)) {
+ startNestedAnimation(0, kNestedSequenceHoFDemoDinob2);
+ _animCurrentFrame = 0;
}
} else if (frm == 3) {
- if (_activeWSA[0].flags != -1) {
- _seqWsaCurrentFrame = 0;
+ if (_animSlots[0].flags != -1) {
+ _animCurrentFrame = 0;
} else {
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
_screen->copyPage(2, 12);
}
} else if (frm == 4) {
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_demoFisher(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (((_system->getMillis() - _seqStartTime) / (5 * _tickLength)) > 0) {
- _seqStartTime = _system->getMillis();
- if (!_seqFrameCounter) {
- seq_loadNestedSequence(0, kSequenceDemoBail);
- seq_loadNestedSequence(1, kSequenceDemoDig);
+int SeqPlayer_HOF::cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (((_system->getMillis() - _fisherAnimCurTime) / (5 * _vm->tickLength())) > 0) {
+ _fisherAnimCurTime = _system->getMillis();
+ if (!_callbackCurrentFrame) {
+ startNestedAnimation(0, kNestedSequenceHoFDemoBail);
+ startNestedAnimation(1, kNestedSequenceHoFDemoDig);
}
- if (_seqScrollTextCounter >= 0x18f && !_seqFrameCounter)
+ if (_scrollProgressCounter >= 0x18f && !_callbackCurrentFrame)
return 0;
- if (!_seqFrameCounter) {
+ if (!_callbackCurrentFrame) {
_screen->loadBitmap("adtext.cps", 4, 4, 0);
_screen->loadBitmap("adtext2.cps", 6, 6, 0);
_screen->copyPageMemory(6, 0, 4, 64000, 1024);
_screen->copyPageMemory(6, 1023, 6, 0, 64000);
- _seqScrollTextCounter = 0;
+ _scrollProgressCounter = 0;
}
- seq_scrollPage(24, 144);
- _seqFrameCounter++;
- if (_seqFrameCounter < 0x256 || _seqFrameCounter > 0x31c) {
- if (_seqFrameCounter < 0x174 || _seqFrameCounter > 0x1d7) {
- if (_seqFrameCounter < 0x84 || _seqFrameCounter > 0xe7) {
- _seqScrollTextCounter++;
+ updateDemoAdText(24, 144);
+ _callbackCurrentFrame++;
+ if (_callbackCurrentFrame < 0x256 || _callbackCurrentFrame > 0x31c) {
+ if (_callbackCurrentFrame < 0x174 || _callbackCurrentFrame > 0x1d7) {
+ if (_callbackCurrentFrame < 0x84 || _callbackCurrentFrame > 0xe7) {
+ _scrollProgressCounter++;
}
}
}
- if (_seqFrameCounter > 0x31e) {
- seq_resetActiveWSA(0);
- seq_resetActiveWSA(1);
- _seqEndTime = 0;
+ if (_callbackCurrentFrame > 0x31e) {
+ closeNestedAnimation(0);
+ closeNestedAnimation(1);
+ setCountDown(0);
_screen->copyPage(2, 12);
}
} else {
- seq_scrollPage(24, 144);
+ updateDemoAdText(24, 144);
}
return 0;
}
-int KyraEngine_HoF::seq_demoWharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_wharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 69)
- _seqWsaCurrentFrame = 8;
+ _animCurrentFrame = 8;
return frm;
}
-int KyraEngine_HoF::seq_demoDinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_dinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
switch (frm) {
case 19:
- seq_playTalkText(13);
+ playSoundAndDisplaySubTitle(13);
break;
case 54:
- seq_playTalkText(15);
+ playSoundAndDisplaySubTitle(15);
break;
case 61:
- seq_playTalkText(16);
+ playSoundAndDisplaySubTitle(16);
break;
case 69:
- seq_playTalkText(14);
+ playSoundAndDisplaySubTitle(14);
break;
case 77:
- seq_playTalkText(13);
+ playSoundAndDisplaySubTitle(13);
break;
case 79:
- _seqWsaCurrentFrame = 4;
+ _animCurrentFrame = 4;
break;
}
return frm;
}
-int KyraEngine_HoF::seq_demoWater(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_water(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 1)
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
return frm;
}
-int KyraEngine_HoF::seq_demoBail(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_bail(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_demoDig(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_dig(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
#ifdef ENABLE_LOL
-int KyraEngine_HoF::seq_lolDemoScene1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbLOLDEMO_scene1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
Palette &tmpPal = _screen->getPalette(2);
- if (!(_seqFrameCounter % 100)) {
- if (_seqFrameCounter == 0) {
- _sound->haltTrack();
- _sound->playTrack(6);
+ if (!(_callbackCurrentFrame % 100)) {
+ if (_callbackCurrentFrame == 0) {
+ _vm->sound()->haltTrack();
+ _vm->sound()->playTrack(6);
}
tmpPal.copy(_screen->getPalette(0));
- for (int i = 3; i < 0x300; i++) {
+ for (int i = 3; i < 768; i++) {
tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
if (tmpPal[i] > 0x3f)
tmpPal[i] = 0x3f;
}
- seq_playTalkText(_rnd.getRandomBit());
+ playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
_screen->setScreenPalette(tmpPal);
_screen->updateScreen();
- delay(8);
+ _vm->delay(8);
} else {
_screen->setScreenPalette(_screen->getPalette(0));
_screen->updateScreen();
- if (_seqFrameCounter == 40)
- seq_playTalkText(3);
+ if (_callbackCurrentFrame == 40)
+ playSoundAndDisplaySubTitle(3);
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter - 17) {
+int SeqPlayer_HOF::cbLOLDEMO_scene2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (frm - 17) {
case 0:
- _seqFrameDelay = 8;
+ _animDuration = 8;
break;
case 3:
case 6:
case 9:
- seq_playTalkText(8);
+ playSoundEffect(8, 255 - ((26 - frm) << 3));
break;
case 15:
- seq_playTalkText(9);
+ playSoundAndDisplaySubTitle(9);
break;
case 18:
- seq_playTalkText(2);
+ playSoundAndDisplaySubTitle(2);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (_seqFrameCounter == 1)
- seq_playTalkText(6);
- else if (frm == 26)
- seq_playTalkText(7);
+int SeqPlayer_HOF::cbLOLDEMO_scene3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (frm == 1)
+ playSoundAndDisplaySubTitle(6);
+ else if (frm == 24)
+ playSoundAndDisplaySubTitle(7);
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene4(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter) {
+int SeqPlayer_HOF::cbLOLDEMO_scene4(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (frm) {
case 11:
case 14:
case 17:
case 20:
- seq_playTalkText(8);
+ playSoundEffect(8, 255 - ((22 - frm) << 3));
break;
case 22:
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
break;
case 24:
- seq_playTalkText(8);
+ playSoundAndDisplaySubTitle(8);
break;
case 30:
- seq_playTalkText(15);
+ playSoundAndDisplaySubTitle(15);
break;
case 34:
- seq_playTalkText(14);
+ playSoundAndDisplaySubTitle(14);
break;
case 38:
- seq_playTalkText(13);
+ playSoundAndDisplaySubTitle(13);
break;
case 42:
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter++) {
+int SeqPlayer_HOF::cbLOLDEMO_scene5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (_callbackCurrentFrame++) {
case 0:
case 4:
case 6:
@@ -1889,13 +3254,13 @@ int KyraEngine_HoF::seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm
case 26:
case 28:
case 30:
- seq_playTalkText(15);
+ playSoundEffect(15, 255 - ((31 - frm) << 3));
break;
case 32:
- seq_playTalkText(16);
+ playSoundAndDisplaySubTitle(16);
break;
case 42:
- seq_playTalkText(6);
+ playSoundAndDisplaySubTitle(6);
break;
default:
break;
@@ -1903,24 +3268,24 @@ int KyraEngine_HoF::seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm
return frm;
}
-int KyraEngine_HoF::seq_lolDemoText5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (_seqFrameCounter++ == 100)
- seq_playTalkText(5);
+int SeqPlayer_HOF::cbLOLDEMO_text5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (_callbackCurrentFrame++ == 100)
+ playSoundAndDisplaySubTitle(5);
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- while (_seqScrollTextCounter < 0x122) {
- _seqEndTime = _system->getMillis() + 6 * _tickLength;
- if (!_seqFrameCounter) {
+int SeqPlayer_HOF::cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ while (_scrollProgressCounter < 290) {
+ setCountDown(6);
+ if (!_callbackCurrentFrame) {
_screen->loadBitmap("adtext.cps", 4, 4, 0);
_screen->loadBitmap("adtext2.cps", 6, 6, 0);
_screen->copyPageMemory(6, 0, 4, 64000, 1024);
_screen->copyPageMemory(6, 1023, 6, 0, 64000);
- _seqScrollTextCounter = 0;
+ _scrollProgressCounter = 0;
}
- if (_seqFrameCounter % 175) {
+ if (_callbackCurrentFrame % 175) {
_screen->setScreenPalette(_screen->getPalette(0));
} else {
Palette &tmpPal = _screen->getPalette(2);
@@ -1932,23 +3297,25 @@ int KyraEngine_HoF::seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm
tmpPal[i] = 0x3f;
}
- seq_playTalkText(_rnd.getRandomBit());
+ playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
_screen->setScreenPalette(tmpPal);
_screen->updateScreen();
- delay(8);
+ _vm->delay(8);
}
- if (_seqFrameCounter == 40 || _seqFrameCounter == 80 || _seqFrameCounter == 150 || _seqFrameCounter == 300)
- seq_playTalkText(3);
+ if (_callbackCurrentFrame == 40 || _callbackCurrentFrame == 80 || _callbackCurrentFrame == 150 || _callbackCurrentFrame == 300)
+ playSoundAndDisplaySubTitle(3);
_screen->copyPage(12, 2);
- seq_scrollPage(70, 130);
+ updateDemoAdText(70, 130);
_screen->copyPage(2, 0);
_screen->updateScreen();
- _seqFrameCounter++;
- if (_seqFrameCounter < 128 || _seqFrameCounter > 207)
- _seqScrollTextCounter++;
- delayUntil(_seqEndTime);
+ _callbackCurrentFrame++;
+ if (_callbackCurrentFrame < 128 || _callbackCurrentFrame > 207)
+ _scrollProgressCounter++;
+
+ while (countDownRunning())
+ delayTicks(1);
}
_screen->copyPage(2, 12);
@@ -1956,776 +3323,16 @@ int KyraEngine_HoF::seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm
}
#endif // ENABLE_LOL
-uint32 KyraEngine_HoF::seq_activeTextsTimeLeft() {
- uint32 res = 0;
-
- for (int i = 0; i < 10; i++) {
- uint32 chatend = (_activeText[i].duration + _activeText[i].startTime);
- uint32 curtime = _system->getMillis();
- if (_activeText[i].duration != -1 && chatend > curtime) {
- chatend -= curtime;
- if (res < chatend)
- res = chatend;
- }
- }
+#undef CASE_ALT
- return res;
-}
-
-void KyraEngine_HoF::seq_processWSAs() {
- for (int i = 0; i < 8; i++) {
- if (_activeWSA[i].flags != -1) {
- if (seq_processNextSubFrame(i))
- seq_resetActiveWSA(i);
- }
- }
-}
-
-void KyraEngine_HoF::seq_processText() {
- int curPage = _screen->setCurPage(2);
- char outputStr[70];
-
- for (int i = 0; i < 10; i++) {
- if (_activeText[i].startTime + _activeText[i].duration > _system->getMillis() && _activeText[i].duration != -1) {
-
- char *srcStr = seq_preprocessString(_sequenceStrings[_activeText[i].strIndex], _activeText[i].width);
- int yPos = _activeText[i].y;
-
- while (*srcStr) {
- uint32 linePos = 0;
- for (; *srcStr; linePos++) {
- if (*srcStr == 0x0d) // Carriage return
- break;
- outputStr[linePos] = *srcStr;
- srcStr++;
- }
- outputStr[linePos] = 0;
- if (*srcStr == 0x0d)
- srcStr++;
-
- uint8 textColor = (_activeText[i].textcolor >= 0) ? _activeText[i].textcolor : _seqTextColor[0];
- _screen->printText(outputStr, _activeText[i].x - (_screen->getTextWidth(outputStr) / 2), yPos, textColor, 0);
- yPos += 10;
- }
- } else {
- _activeText[i].duration = -1;
- }
- }
-
- _screen->setCurPage(curPage);
-}
-
-char *KyraEngine_HoF::seq_preprocessString(const char *srcStr, int width) {
- char *dstStr = _seqProcessedString;
- int lineStart = 0;
- int linePos = 0;
-
- while (*srcStr) {
- while (*srcStr && *srcStr != 0x20) // Space
- dstStr[lineStart + linePos++] = *srcStr++;
- dstStr[lineStart + linePos] = 0;
-
- int len = _screen->getTextWidth(&dstStr[lineStart]);
- if (width >= len && *srcStr) {
- dstStr[lineStart + linePos++] = *srcStr++;
- } else {
- dstStr[lineStart + linePos] = 0x0d; // Carriage return
- lineStart += linePos + 1;
- linePos = 0;
- if (*srcStr)
- srcStr++;
- }
- }
- dstStr[lineStart + linePos] = 0;
-
- return strlen(_seqProcessedString) ? dstStr : 0;
-}
-
-void KyraEngine_HoF::seq_sequenceCommand(int command) {
- for (int i = 0; i < 8; i++)
- seq_resetActiveWSA(i);
-
- switch (command) {
- case 0:
- _screen->fadeToBlack(36);
- _screen->getPalette(0).clear();
- _screen->getPalette(1).clear();
- break;
-
- case 1:
- seq_playTalkText(_rnd.getRandomBit());
-
- _screen->getPalette(0).fill(0, 256, 0x3F);
- _screen->fadePalette(_screen->getPalette(0), 16);
-
- _screen->copyPalette(1, 0);
- break;
-
- case 3:
- _screen->copyPage(2, 0);
- _screen->fadePalette(_screen->getPalette(0), 16);
- _screen->copyPalette(1, 0);
- break;
-
- case 4:
- _screen->copyPage(2, 0);
- _screen->fadePalette(_screen->getPalette(0), 36);
- _screen->copyPalette(1, 0);
- break;
-
- case 5:
- _screen->copyPage(2, 0);
- break;
-
- case 6:
- // UNUSED
- // seq_loadBLD("library.bld");
- break;
-
- case 7:
- // UNUSED
- // seq_loadBLD("marco.bld");
- break;
-
- case 8:
- _screen->fadeToBlack(16);
- _screen->getPalette(0).clear();
- _screen->getPalette(1).clear();
-
- delay(120 * _tickLength);
- break;
-
- case 9: {
- Palette &pal = _screen->getPalette(0);
- for (int i = 0; i < 256; i++) {
- int pv = (pal[3 * i] + pal[3 * i + 1] + pal[3 * i + 2]) / 3;
- pal[3 * i] = pal[3 * i + 1] = pal[3 * i + 2] = pv & 0xff;
- }
-
- //int a = 0x100;
- //int d = (0x800 << 5) - 0x100;
- //pal[3 * i] = pal[3 * i + 1] = pal[3 * i + 2] = 0x3f;
-
- _screen->fadePalette(pal, 64);
- _screen->copyPalette(1, 0);
- } break;
-
- default:
- break;
- }
-}
-
-void KyraEngine_HoF::seq_cmpFadeFrame(const char *cmpFile) {
- _screen->copyPage(10, 2);
- _screen->copyPage(4, 10);
- _screen->clearPage(6);
- _screen->loadBitmap(cmpFile, 6, 6, 0);
- _screen->copyPage(12, 4);
-
- for (int i = 0; i < 3; i++) {
- uint32 endtime = _system->getMillis() + 4 * _tickLength;
- _screen->cmpFadeFrameStep(4, 320, 200, 0, 0, 2, 320, 200, 0, 0, 320, 200, 6);
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
- _screen->updateScreen();
- delayUntil(endtime);
- }
-
- _screen->copyPage(4, 0);
- _screen->updateScreen();
- _screen->copyPage(4, 2);
- _screen->copyPage(4, 6);
- _screen->copyPage(10, 4);
-}
-
-void KyraEngine_HoF::seq_playTalkText(uint8 chatNum) {
- assert(chatNum < _sequenceSoundListSize);
-
- if (chatNum < 12 && !_flags.isDemo && textEnabled())
- seq_setTextEntry(chatNum, 160, 168, _sequenceStringsDuration[chatNum], 160);
-
- _sound->voicePlay(_sequenceSoundList[chatNum], &_speechHandle);
-}
-
-void KyraEngine_HoF::seq_waitForTextsTimeout() {
- uint32 longest = seq_activeTextsTimeLeft() + _system->getMillis();
- uint32 now = _system->getMillis();
-
- if (textEnabled()) {
- if (longest > now)
- delay(longest - now);
- } else if (speechEnabled()) {
- while (snd_voiceIsPlaying())
- delay(_tickLength);
- }
-
- seq_resetAllTextEntries();
-}
-
-void KyraEngine_HoF::seq_resetAllTextEntries() {
- for (int i = 0; i < 10; i++)
- _activeText[i].duration = -1;
-}
-
-int KyraEngine_HoF::seq_setTextEntry(uint16 strIndex, uint16 posX, uint16 posY, int duration, uint16 width) {
- for (int i = 0; i < 10; i++) {
- if (_activeText[i].duration != -1) {
- if (i < 9)
- continue;
- else
- return -1;
- }
-
- _activeText[i].strIndex = strIndex;
- _activeText[i].x = posX;
- _activeText[i].y = posY;
- _activeText[i].duration = duration * _tickLength;
- _activeText[i].width = width;
- _activeText[i].startTime = _system->getMillis();
- _activeText[i].textcolor = -1;
-
- return i;
- }
- return -1;
-}
-
-void KyraEngine_HoF::seq_loadNestedSequence(int wsaNum, int seqNum) {
- if (_activeWSA[wsaNum].flags != -1)
- return;
-
- NestedSequence s = _sequences->seqn[seqNum];
-
- if (!_activeWSA[wsaNum].movie) {
- _activeWSA[wsaNum].movie = new WSAMovie_v2(this);
- assert(_activeWSA[wsaNum].movie);
- }
-
- _activeWSA[wsaNum].movie->close();
-
- _activeWSA[wsaNum].movie->open(s.wsaFile, 0, 0);
-
- if (!_activeWSA[wsaNum].movie->opened()) {
- delete _activeWSA[wsaNum].movie;
- _activeWSA[wsaNum].movie = 0;
- return;
- }
-
- _activeWSA[wsaNum].endFrame = s.endFrame;
- _activeWSA[wsaNum].startFrame = _activeWSA[wsaNum].currentFrame = s.startframe;
- _activeWSA[wsaNum].frameDelay = s.frameDelay;
- _activeWSA[wsaNum].callback = _callbackN[seqNum];
- _activeWSA[wsaNum].control = s.wsaControl;
-
- _activeWSA[wsaNum].flags = s.flags | 1;
- _activeWSA[wsaNum].x = s.x;
- _activeWSA[wsaNum].y = s.y;
- _activeWSA[wsaNum].startupCommand = s.startupCommand;
- _activeWSA[wsaNum].finalCommand = s.finalCommand;
- _activeWSA[wsaNum].lastFrame = 0xffff;
-
- seq_nestedSequenceFrame(s.startupCommand, wsaNum);
-
- if (!s.startupCommand)
- seq_processNextSubFrame(wsaNum);
-
- _activeWSA[wsaNum].nextFrame = _system->getMillis();
-}
-
-void KyraEngine_HoF::seq_nestedSequenceFrame(int command, int wsaNum) {
- int xa = 0, ya = 0;
- command--;
- if (!_activeWSA[wsaNum].movie || skipFlag() || shouldQuit() || _abortIntroFlag)
- return;
-
- switch (command) {
- case 0:
- xa = -_activeWSA[wsaNum].movie->xAdd();
- ya = -_activeWSA[wsaNum].movie->yAdd();
- _activeWSA[wsaNum].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
- seq_animatedSubFrame(8, 2, 7, 8, _activeWSA[wsaNum].movie->xAdd(), _activeWSA[wsaNum].movie->yAdd(),
- _activeWSA[wsaNum].movie->width(), _activeWSA[wsaNum].movie->height(), 1, 2);
- break;
-
- case 1:
- xa = -_activeWSA[wsaNum].movie->xAdd();
- ya = -_activeWSA[wsaNum].movie->yAdd();
- _activeWSA[wsaNum].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
- seq_animatedSubFrame(8, 2, 7, 8, _activeWSA[wsaNum].movie->xAdd(), _activeWSA[wsaNum].movie->yAdd(),
- _activeWSA[wsaNum].movie->width(), _activeWSA[wsaNum].movie->height(), 1, 1);
- break;
-
- case 2:
- seq_waitForTextsTimeout();
- xa = -_activeWSA[wsaNum].movie->xAdd();
- ya = -_activeWSA[wsaNum].movie->yAdd();
- _activeWSA[wsaNum].movie->displayFrame(0x15, 8, xa, ya, 0, 0, 0);
- seq_animatedSubFrame(8, 2, 7, 8, _activeWSA[wsaNum].movie->xAdd(), _activeWSA[wsaNum].movie->yAdd(),
- _activeWSA[wsaNum].movie->width(), _activeWSA[wsaNum].movie->height(), 0, 2);
- break;
-
- case 3:
- _screen->copyPage(2, 10);
- _activeWSA[wsaNum].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
- _screen->copyPage(2, 12);
- seq_cmpFadeFrame("scene2.cmp");
- break;
-
- case 4:
- _screen->copyPage(2, 10);
- _activeWSA[wsaNum].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
- _screen->copyPage(2, 12);
- seq_cmpFadeFrame("scene3.cmp");
- break;
-
- default:
- break;
- }
-}
-
-void KyraEngine_HoF::seq_animatedSubFrame(int srcPage, int dstPage, int delaytime, int steps,
- int x, int y, int w, int h, int openClose, int directionFlags) {
- if (openClose) {
- for (int i = 1; i < steps; i++) {
- uint32 endtime = _system->getMillis() + delaytime * _tickLength;
-
- int w2 = (((w * 256) / steps) * i) / 256;
- int h2 = (((h * 256) / steps) * i) / 256;
-
- int ym = (directionFlags & 2) ? (h - h2) : 0;
- int xm = (directionFlags & 1) ? (w - w2) : 0;
-
- _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
-
- _screen->copyPage(dstPage, 6);
- _screen->copyPage(dstPage, 0);
- _screen->updateScreen();
-
- _screen->copyPage(12, dstPage);
- delayUntil(endtime);
- }
-
- _screen->wsaFrameAnimationStep(0, 0, x, y, w, h, w, h, srcPage, dstPage, 0);
- _screen->copyPage(dstPage, 6);
- _screen->copyPage(dstPage, 0);
- _screen->updateScreen();
- } else {
- _screen->copyPage(12, dstPage);
- for (int i = steps; i; i--) {
- uint32 endtime = _system->getMillis() + delaytime * _tickLength;
-
- int w2 = (((w * 256) / steps) * i) / 256;
- int h2 = (((h * 256) / steps) * i) / 256;
-
- int ym = (directionFlags & 2) ? (h - h2) : 0;
- int xm = (directionFlags & 1) ? (w - w2) : 0;
-
- _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
-
- _screen->copyPage(dstPage, 6);
- _screen->copyPage(dstPage, 0);
- _screen->updateScreen();
-
- _screen->copyPage(12, dstPage);
- delayUntil(endtime);
- }
- }
-}
-
-void KyraEngine_HoF::seq_resetActiveWSA(int wsaNum) {
- if (_activeWSA[wsaNum].flags == -1)
- return;
-
- _activeWSA[wsaNum].flags = -1;
- seq_nestedSequenceFrame(_activeWSA[wsaNum].finalCommand, wsaNum);
- _activeWSA[wsaNum].movie->close();
-}
-
-void KyraEngine_HoF::seq_unloadWSA(int wsaNum) {
- if (_activeWSA[wsaNum].movie) {
- _activeWSA[wsaNum].movie->close();
- delete _activeWSA[wsaNum].movie;
- _activeWSA[wsaNum].movie = 0;
- }
-}
-
-bool KyraEngine_HoF::seq_processNextSubFrame(int wsaNum) {
- uint32 currentFrame = _activeWSA[wsaNum].currentFrame;
- uint32 currentTime = _system->getMillis();
-
- if (_activeWSA[wsaNum].callback && currentFrame != _activeWSA[wsaNum].lastFrame) {
- _activeWSA[wsaNum].lastFrame = currentFrame;
- currentFrame = (this->*_activeWSA[wsaNum].callback)(_activeWSA[wsaNum].movie, _activeWSA[wsaNum].x, _activeWSA[wsaNum].y, currentFrame);
- }
-
- if (_activeWSA[wsaNum].movie) {
- if (_activeWSA[wsaNum].flags & 0x20) {
- _activeWSA[wsaNum].movie->displayFrame(_activeWSA[wsaNum].control[currentFrame].index, 2, _activeWSA[wsaNum].x, _activeWSA[wsaNum].y, 0x4000, 0, 0);
- _activeWSA[wsaNum].frameDelay = _activeWSA[wsaNum].control[currentFrame].delay;
- } else {
- _activeWSA[wsaNum].movie->displayFrame(currentFrame % _activeWSA[wsaNum].movie->frames(), 2, _activeWSA[wsaNum].x, _activeWSA[wsaNum].y, 0x4000, 0, 0);
- }
- }
-
- if (_activeWSA[wsaNum].flags & 0x10) {
- currentFrame = (currentTime - _activeWSA[wsaNum].nextFrame) / (_activeWSA[wsaNum].frameDelay * _tickLength);
- } else {
- if (((int32)(currentTime - _activeWSA[wsaNum].nextFrame) / (int32)(_activeWSA[wsaNum].frameDelay * _tickLength)) > 0) {
- currentFrame++;
- _activeWSA[wsaNum].nextFrame = currentTime;
- }
- }
-
- bool res = false;
-
- if (currentFrame >= _activeWSA[wsaNum].endFrame) {
- int sw = ((_activeWSA[wsaNum].flags & 0x1e) - 2);
- switch (sw) {
- case 0:
- res = true;
- currentFrame = _activeWSA[wsaNum].endFrame;
- _screen->copyPage(2, 12);
- break;
-
- case 6:
- case 8:
- currentFrame = _activeWSA[wsaNum].endFrame - 1;
- break;
-
- case 2:
- case 10:
- currentFrame = _activeWSA[wsaNum].startFrame;
- break;
-
- default:
- currentFrame = _activeWSA[wsaNum].endFrame - 1;
- res = true;
- }
- }
-
- _activeWSA[wsaNum].currentFrame = currentFrame & 0xffff;
- return res;
-}
-
-void KyraEngine_HoF::seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor) {
- uint8 colormap[16];
- if (skipFlag() || shouldQuit() || _abortIntroFlag || _menuChoice)
- return;
-
- Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
-
- memset(&_screen->getPalette(0)[0x2fa], 0x3f, 6);
- _screen->getPalette(0)[0x2f6] = 0x3f;
- _screen->getPalette(0)[0x2f5] = 0x20;
- _screen->getPalette(0)[0x2f4] = 0x30;
- colormap[0] = colorMap[0];
- colormap[1] = 0xfd;
- memcpy(&colormap[2], &colorMap[2], 14);
- uint8 seqTextColor0 = _seqTextColor[0];
-
- _seqTextColor[0] = 0xfd;
- _screen->setTextColorMap(colormap);
- seq_resetAllTextEntries();
- seq_setTextEntry(strIndex, x, y, 0x80, 0x78);
- seq_processText();
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- _screen->getPalette(0)[0x2f7] = _screen->getPalette(0)[textcolor * 3];
- _screen->getPalette(0)[0x2f8] = _screen->getPalette(0)[textcolor * 3 + 1];
- _screen->getPalette(0)[0x2f9] = _screen->getPalette(0)[textcolor * 3 + 2];
- _screen->fadePalette(_screen->getPalette(0), 0x18);
-
- _seqTextColor[0] = textcolor;
- _screen->setTextColorMap(colorMap);
- seq_resetAllTextEntries();
- seq_setTextEntry(strIndex, x, y, 0x80, 0x78);
- seq_processText();
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- _screen->getPalette(0)[0x2f7] = _screen->getPalette(0)[0x2f8] = _screen->getPalette(0)[0x2f9] = 0;
- _screen->fadePalette(_screen->getPalette(0), 1);
- _screen->copyPage(2, 12);
- seq_resetAllTextEntries();
-
- _seqTextColor[0] = seqTextColor0;
-
- _screen->setFont(of);
-}
-
-void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width, WSAMovie_v2 *wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos) {
- int dur = int(strlen(_sequenceStrings[strIndex])) * (_flags.isTalkie ? 7 : 15);
- if (textEnabled()) {
- int entry = seq_setTextEntry(strIndex, x, y, dur, width);
- _activeText[entry].textcolor = textColor;
- }
- _seqWsaChatTimeout = _system->getMillis() + dur * _tickLength;
- int curframe = firstframe;
-
- if (vocIndex && speechEnabled()) {
- while (_sound->voiceIsPlaying() && !skipFlag())
- delay(4);
- seq_playTalkText(vocIndex);
- }
-
- while (_system->getMillis() < _seqWsaChatTimeout && !(_abortIntroFlag || skipFlag())) {
- if (lastframe < 0) {
- int t = ABS(lastframe);
- if (t < curframe)
- curframe = t;
- }
-
- if (ABS(lastframe) < curframe)
- curframe = firstframe;
-
- _seqWsaChatFrameTimeout = _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
- if (wsa)
- wsa->displayFrame(curframe % wsa->frames(), 2, wsaXpos, wsaYpos, 0, 0, 0);
-
- _screen->copyPage(2, 12);
-
- seq_processText();
-
- uint32 tm = _system->getMillis();
- if (_seqWsaChatFrameTimeout > tm && _seqWsaChatTimeout > tm)
- delay(MIN(_seqWsaChatFrameTimeout - tm, _seqWsaChatTimeout - tm));
-
- if (speechEnabled() && !textEnabled() && !snd_voiceIsPlaying())
- break;
-
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- curframe++;
- }
-
- if (_abortIntroFlag || skipFlag())
- _sound->voiceStop();
-
- if (ABS(lastframe) < curframe)
- curframe = ABS(lastframe);
-
- if (curframe == firstframe)
- curframe++;
-
- _seqWsaCurrentFrame = curframe;
-}
-
-void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed,
- int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData, const char *const *specialData) {
- if (!data)
- return;
-
- static const char mark[] = { 5, 13, 0 };
-
- _screen->clearPage(tempPage1);
- _screen->clearPage(tempPage2);
- _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, 0, tempPage1);
-
- struct ScrollTextData {
- int16 x;
- int16 y;
- uint8 *text;
- byte unk1;
- byte height;
- byte adjust;
-
- ScrollTextData() {
- x = 0; // 0 11
- y = 0; // 2 13
- text = 0; // 4 15
- unk1 = 0; // 8 19
- height = 0; // 9 20
- adjust = 0; // 10 21
- }
- };
-
- ScrollTextData *textData = new ScrollTextData[36];
- uint8 *ptr = data;
-
- bool loop = true;
- int cnt = 0;
-
- while (loop) {
- _seqSubFrameEndTimeInternal = _system->getMillis() + speed * _tickLength;
-
- while (cnt < 35 && *ptr) {
- uint16 cH;
-
- if (cnt)
- cH = textData[cnt].y + textData[cnt].height + (textData[cnt].height >> 3);
- else
- cH = d->h;
-
- char *str = (char *)ptr;
-
- ptr = (uint8 *)strpbrk(str, mark);
- if (!ptr)
- ptr = (uint8 *)strchr(str, 0);
-
- textData[cnt + 1].unk1 = *ptr;
- *ptr = 0;
- if (textData[cnt + 1].unk1)
- ptr++;
-
- if (*str == 3 || *str == 4)
- textData[cnt + 1].adjust = *str++;
- else
- textData[cnt + 1].adjust = 0;
-
- _screen->setFont(fid1);
-
- if (*str == 1) {
- _screen->setFont(fid2);
- str++;
- } else if (*str == 2) {
- str++;
- }
-
- textData[cnt + 1].height = _screen->getFontHeight();
-
- switch (textData[cnt + 1].adjust) {
- case 3:
- textData[cnt + 1].x = 157 - _screen->getTextWidth(str);
- break;
- case 4:
- textData[cnt + 1].x = 161;
- break;
- default:
- textData[cnt + 1].x = (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1;
- }
-
- if (textData[cnt].unk1 == 5)
- cH -= (textData[cnt].height + (textData[cnt].height >> 3));
-
- textData[cnt + 1].y = cH;
- textData[cnt + 1].text = (uint8 *)str;
- cnt++;
- }
-
- _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage1, tempPage2);
-
- int cnt2 = 0;
- bool palCycle = 0;
-
- while (cnt2 < cnt) {
- const char *str = (const char *)textData[cnt2 + 1].text;
- const char *str2 = str;
- int16 cW = textData[cnt2 + 1].x - 10;
- int16 cH = textData[cnt2 + 1].y;
- int x = (d->sx << 3) + cW;
- int y = d->sy + cH;
- int col1 = 255;
-
- if (cH < d->h) {
- _screen->setCurPage(tempPage2);
- _screen->setFont(fid1);
- if (textData[cnt2 + 1].height != _screen->getFontHeight())
- _screen->setFont(fid2);
-
- if (specialData) {
- if (!strcmp(str, specialData[0])) {
- col1 = 112;
- char cChar[2] = " ";
- while (*str2) {
- cChar[0] = *str2;
- _screen->printText(cChar, x, y, col1++, 0);
- x += _screen->getCharWidth((uint8)*str2++);
- }
- palCycle = true;
- } else if (!strcmp(str, specialData[1])) {
- col1 = 133;
- char cChar[2] = " ";
- while (*str2) {
- cChar[0] = *str2;
- _screen->printText(cChar, x, y, col1--, 0);
- x += _screen->getCharWidth((uint8)*str2++);
- }
- palCycle = true;
- } else {
- _screen->printText(str, x, y, col1, 0);
- }
- } else {
- _screen->printText(str, x, y, col1, 0);
- }
- _screen->setCurPage(0);
- }
-
- textData[cnt2 + 1].y -= step;
- cnt2++;
- }
-
- _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage2, 0);
- _screen->updateScreen();
-
- if (textData[1].y < -10) {
- textData[1].text += strlen((char *)textData[1].text);
- textData[1].text[0] = textData[1].unk1;
- cnt--;
- memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
- }
-
- if (palCycle) {
- for (int col = 133; col > 112; col--)
- _screen->getPalette(0).copy(_screen->getPalette(0), col - 1, 1, col);
- _screen->getPalette(0).copy(_screen->getPalette(0), 133, 1, 112);
- _screen->setScreenPalette(_screen->getPalette(0));
- }
-
- delayUntil(_seqSubFrameEndTimeInternal);
-
- if ((cnt < 36) && ((d->sy + d->h) > (textData[cnt].y + textData[cnt].height)) && !skipFlag()) {
- resetSkipFlag();
- delay(_tickLength * 500);
- cnt = 0;
- }
-
- if (!cnt || skipFlag())
- loop = false;
- }
-
- _sound->beginFadeOut();
- _screen->fadeToBlack();
-
- _abortIntroFlag= false;
- resetSkipFlag();
-
- delete[] textData;
-}
-
-void KyraEngine_HoF::seq_scrollPage(int bottom, int top) {
- int dstY, dstH, srcH;
-
- static const ScreenDim d = { 0x00, 0x00, 0x28, 0x320, 0xFF, 0xFE, 0x00, 0x00 };
-
- if (_seqScrollTextCounter - (top - 1) < 0) {
- dstY = top - _seqScrollTextCounter;
- dstH = _seqScrollTextCounter;
- srcH = 0;
- } else {
- dstY = 0;
- srcH = _seqScrollTextCounter - top;
- dstH = (400 - srcH <= top) ? 400 - srcH : top;
- }
-
- if (dstH > 0) {
- if (_demoAnimData) {
- for (int i = 0; i < 4; i++) {
- const ItemAnimData_v1 *def = &_demoAnimData[i];
- ActiveItemAnim *a = &_activeItemAnim[i];
-
- _screen->fillRect(12, def->y - 8, 28, def->y + 8, 0, 4);
- _screen->drawShape(4, getShapePtr(def->itemIndex + def->frames[a->currentFrame]), 12, def->y - 8, 0, 0);
- if (_seqFrameCounter % 2 == 0)
- a->currentFrame = (a->currentFrame + 1) % 20;
- }
- }
- _screen->copyRegionEx(4, 0, srcH, 2, 2, dstY + bottom, 320, dstH, &d);
- }
-}
+const uint8 SeqPlayer_HOF::_textColorPresets[] = { 0x01, 0x01, 0x00, 0x3f, 0x3f, 0x3f };
void KyraEngine_HoF::seq_showStarcraftLogo() {
WSAMovie_v2 *ci = new WSAMovie_v2(this);
assert(ci);
_screen->clearPage(2);
_res->loadPakFile("INTROGEN.PAK");
- int endframe = ci->open("ci.wsa", 0, &_screen->getPalette(0));
+ int endframe = ci->open("CI.WSA", 0, &_screen->getPalette(0));
_res->unloadPakFile("INTROGEN.PAK");
if (!ci->opened()) {
delete ci;
@@ -2736,20 +3343,28 @@ void KyraEngine_HoF::seq_showStarcraftLogo() {
_screen->copyPage(2, 0);
_screen->fadeFromBlack();
for (int i = 1; i < endframe; i++) {
- _seqEndTime = _system->getMillis() + 50;
+ uint32 end = _system->getMillis() + 50;
if (skipFlag())
break;
ci->displayFrame(i, 2, 0, 0, 0, 0, 0);
_screen->copyPage(2, 0);
_screen->updateScreen();
- delay(_seqEndTime - _system->getMillis());
+ uint32 cur = _system->getMillis();
+ if (end > cur)
+ delay(end - cur);
+ else
+ updateInput();
}
if (!skipFlag()) {
- _seqEndTime = _system->getMillis() + 50;
+ uint32 end = _system->getMillis() + 50;
ci->displayFrame(0, 2, 0, 0, 0, 0, 0);
_screen->copyPage(2, 0);
_screen->updateScreen();
- delay(_seqEndTime - _system->getMillis());
+ uint32 cur = _system->getMillis();
+ if (end > cur)
+ delay(end - cur);
+ else
+ updateInput();
}
_screen->fadeToBlack();
_screen->showMouse();
@@ -2758,67 +3373,38 @@ void KyraEngine_HoF::seq_showStarcraftLogo() {
delete ci;
}
-void KyraEngine_HoF::seq_init() {
- _seqProcessedString = new char[200];
- _seqWsa = new WSAMovie_v2(this);
- _activeWSA = new ActiveWSA[8];
- _activeText = new ActiveText[10];
-
- _res->unloadAllPakFiles();
- _res->loadPakFile(StaticResource::staticDataFilename());
- _res->loadFileList(_sequencePakList, _sequencePakListSize);
-
- if (_flags.platform == Common::kPlatformPC98)
- _sound->loadSoundFile("SOUND.DAT");
-
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
-
- if (_flags.gameID == GI_LOL)
- return;
-
- if (_flags.isDemo && !_flags.isTalkie) {
- _demoAnimData = _staticres->loadShapeAnimData_v1(k2SeqplayShapeAnimData, _itemAnimDefinitionSize);
- uint8 *shp = _res->fileData("icons.shp", 0);
- uint32 outsize = READ_LE_UINT16(shp + 4);
- _animShapeFiledata = new uint8[outsize];
- Screen::decodeFrame4(shp + 10, _animShapeFiledata, outsize);
- delete[] shp;
-
- for (int i = 0; i < 20; i++)
- addShapeToPool(_screen->getPtrToShape(_animShapeFiledata, i), i);
- } else {
- const MainMenu::StaticData data = {
- { _sequenceStrings[97], _sequenceStrings[96], _sequenceStrings[95], _sequenceStrings[98], 0 },
- { 0x01, 0x04, 0x0C, 0x04, 0x00, 0xd7, 0xd6 },
- { 0xd8, 0xda, 0xd9, 0xd8 },
- (_flags.lang == Common::JA_JPN) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT, 240
- };
-
- _menu = new MainMenu(this);
- _menu->init(data, MainMenu::Animation());
- }
+int KyraEngine_HoF::seq_playIntro() {
+ bool startupSaveLoadable = saveFileLoadable(0);
+ return SeqPlayer_HOF(this, _screen, _system, startupSaveLoadable).play(kSequenceVirgin, startupSaveLoadable? kSequenceTitle : kSequenceNoLooping);
}
-void KyraEngine_HoF::seq_uninit() {
- delete[] _seqProcessedString;
- _seqProcessedString = NULL;
-
- delete[] _activeWSA;
- _activeWSA = NULL;
+int KyraEngine_HoF::seq_playOutro() {
+ return SeqPlayer_HOF(this, _screen, _system).play(kSequenceFunters, kSequenceFrash);
+}
- delete[] _activeText;
- _activeText = NULL;
+int KyraEngine_HoF::seq_playDemo() {
+ SeqPlayer_HOF(this, _screen, _system).play(kSequenceHoFDemoVirgin, kSequenceHoFDemoVirgin);
+ return 4;
+}
- delete _seqWsa;
- _seqWsa = NULL;
+void KyraEngine_HoF::seq_pausePlayer(bool toggle) {
+ SeqPlayer_HOF *activePlayer = SeqPlayer_HOF::instance();
+ if (activePlayer)
+ activePlayer->pause(toggle);
+}
- delete[] _animShapeFiledata;
- _animShapeFiledata = 0;
+#ifdef ENABLE_LOL
+int LoLEngine::playDemo() {
+ SeqPlayer_HOF(this, _screen, _system).play(kSequenceLoLDemoScene1, kSequenceLoLDemoScene1);
+ return -1;
+}
- delete _menu;
- _menu = 0;
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+void LoLEngine::pauseDemoPlayer(bool toggle) {
+ SeqPlayer_HOF *activePlayer = SeqPlayer_HOF::instance();
+ if (activePlayer)
+ activePlayer->pause(toggle);
}
+#endif // ENABLE_LOL
#pragma mark -
#pragma mark - Ingame sequences
diff --git a/engines/kyra/sequences_hof.h b/engines/kyra/sequences_hof.h
new file mode 100644
index 0000000000..2558a68a6a
--- /dev/null
+++ b/engines/kyra/sequences_hof.h
@@ -0,0 +1,74 @@
+/* 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 KYRA_SEQUENCES_HOF_H
+#define KYRA_SEQUENCES_HOF_H
+
+#include "kyra/kyra_v2.h"
+
+namespace Kyra {
+
+struct HoFSequence {
+ const char *wsaFile;
+ const char *cpsFile;
+ uint16 flags;
+ uint8 fadeInTransitionType;
+ uint8 fadeOutTransitionType;
+ int16 stringIndex1;
+ int16 stringIndex2;
+ uint16 startFrame;
+ uint16 numFrames;
+ uint16 duration;
+ uint16 xPos;
+ uint16 yPos;
+ uint16 timeout;
+};
+
+struct HoFNestedSequence {
+ const char *wsaFile;
+ const FrameControl *wsaControl;
+ uint16 flags;
+ uint16 startframe;
+ uint16 endFrame;
+ uint16 frameDelay;
+ uint16 x;
+ uint16 y;
+ uint16 fadeInTransitionType;
+ uint16 fadeOutTransitionType;
+};
+
+struct HoFSeqData {
+ const HoFSequence *seq;
+ int numSeq;
+ const HoFNestedSequence *nestedSeq;
+ int numNestedSeq;
+};
+
+struct HoFSeqItemAnimData {
+ int16 itemIndex;
+ uint16 y;
+ const uint16 *frames;
+};
+
+} // End of namespace Kyra
+
+#endif
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index a06f2077ba..83005367d7 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -36,10 +36,16 @@ namespace Kyra {
#pragma mark - Intro
int LoLEngine::processPrologue() {
- setupPrologueData(true);
-
- if (!saveFileLoadable(0) || _flags.isDemo)
- showIntro();
+ // There are two non-interactive demos (one which plays the intro and another one) which plays a number of specific scenes.
+ // We try to identify the latter one by looking for a specific file.
+ _res->loadPakFile("GENERAL.PAK");
+ if (_flags.isDemo && _res->exists("scene1.cps")) {
+ return playDemo();
+ } else {
+ setupPrologueData(true);
+ if (!saveFileLoadable(0) || _flags.isDemo)
+ showIntro();
+ }
if (_flags.isDemo) {
_screen->fadePalette(_screen->getPalette(1), 30, 0);
@@ -176,7 +182,7 @@ void LoLEngine::setupPrologueData(bool load) {
memset(_selectionAnimTimers, 0, sizeof(_selectionAnimTimers));
_screen->getPalette(1).clear();
- _sound->setSoundList(&_soundData[kMusicIntro]);
+ _sound->selectAudioResourceSet(kMusicIntro);
// We have three sound.dat files, one for the intro, one for the
// end sequence and one for ingame, each contained in a different
@@ -197,7 +203,7 @@ void LoLEngine::setupPrologueData(bool load) {
return;
_eventList.clear();
- _sound->setSoundList(0);
+ _sound->selectAudioResourceSet(kMusicIntro);
}
}
@@ -1035,7 +1041,7 @@ void LoLEngine::setupEpilogueData(bool load) {
_screen->clearPage(3);
if (load) {
- _sound->setSoundList(&_soundData[kMusicFinale]);
+ _sound->selectAudioResourceSet(kMusicFinale);
// We have three sound.dat files, one for the intro, one for the
// end sequence and one for ingame, each contained in a different
@@ -1051,7 +1057,7 @@ void LoLEngine::setupEpilogueData(bool load) {
return;
_eventList.clear();
- _sound->setSoundList(0);
+ _sound->selectAudioResourceSet(kMusicIntro);
}
}
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 73c20ee6df..32d175bdb0 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -37,7 +37,7 @@ namespace Kyra {
Sound::Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: _vm(vm), _mixer(mixer), _soundChannels(), _musicEnabled(1),
- _sfxEnabled(true), _soundDataList(0) {
+ _sfxEnabled(true) {
}
Sound::~Sound() {
@@ -47,14 +47,6 @@ Sound::kType Sound::getSfxType() const {
return getMusicType();
}
-void Sound::setSoundList(const AudioDataStruct *list) {
- _soundDataList = list;
-}
-
-bool Sound::hasSoundFile(uint file) const {
- return (fileListEntry(file) != 0);
-}
-
bool Sound::isPlaying() const {
return false;
}
@@ -73,7 +65,7 @@ bool Sound::isVoicePresent(const char *file) const {
return false;
}
-int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) {
+int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) {
Audio::SeekableAudioStream *audioStream = getVoiceStream(file);
if (!audioStream) {
@@ -81,7 +73,7 @@ int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volum
}
int playTime = audioStream->getLength().msecs();
- playVoiceStream(audioStream, handle, volume, isSfx);
+ playVoiceStream(audioStream, handle, volume, priority, isSfx);
return playTime;
}
@@ -109,12 +101,20 @@ Audio::SeekableAudioStream *Sound::getVoiceStream(const char *file) const {
}
}
-bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle, uint8 volume, bool isSfx) {
+bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) {
int h = 0;
- while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h]))
+ while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h].handle))
++h;
if (h >= kNumChannelHandles) {
+ h = 0;
+ while (h < kNumChannelHandles && _soundChannels[h].priority > priority)
+ ++h;
+ if (h < kNumChannelHandles)
+ voiceStop(&_soundChannels[h].handle);
+ }
+
+ if (h >= kNumChannelHandles) {
// When we run out of handles we need to destroy the stream object,
// this is to avoid memory leaks in some scenes where too many sfx
// are started.
@@ -123,9 +123,10 @@ bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *hand
return false;
}
- _mixer->playStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h], stream, -1, volume);
+ _mixer->playStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h].handle, stream, -1, volume);
+ _soundChannels[h].priority = priority;
if (handle)
- *handle = _soundChannels[h];
+ *handle = _soundChannels[h].handle;
return true;
}
@@ -133,8 +134,8 @@ bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *hand
void Sound::voiceStop(const Audio::SoundHandle *handle) {
if (!handle) {
for (int h = 0; h < kNumChannelHandles; ++h) {
- if (_mixer->isSoundHandleActive(_soundChannels[h]))
- _mixer->stopHandle(_soundChannels[h]);
+ if (_mixer->isSoundHandleActive(_soundChannels[h].handle))
+ _mixer->stopHandle(_soundChannels[h].handle);
}
} else {
_mixer->stopHandle(*handle);
@@ -144,7 +145,7 @@ void Sound::voiceStop(const Audio::SoundHandle *handle) {
bool Sound::voiceIsPlaying(const Audio::SoundHandle *handle) const {
if (!handle) {
for (int h = 0; h < kNumChannelHandles; ++h) {
- if (_mixer->isSoundHandleActive(_soundChannels[h]))
+ if (_mixer->isSoundHandleActive(_soundChannels[h].handle))
return true;
}
} else {
@@ -156,7 +157,7 @@ bool Sound::voiceIsPlaying(const Audio::SoundHandle *handle) const {
bool Sound::allVoiceChannelsPlaying() const {
for (int i = 0; i < kNumChannelHandles; ++i)
- if (!_mixer->isSoundHandleActive(_soundChannels[i]))
+ if (!_mixer->isSoundHandleActive(_soundChannels[i].handle))
return false;
return true;
}
@@ -194,9 +195,14 @@ void MixedSoundDriver::updateVolumeSettings() {
_sfx->updateVolumeSettings();
}
-void MixedSoundDriver::setSoundList(const AudioDataStruct *list) {
- _music->setSoundList(list);
- _sfx->setSoundList(list);
+void MixedSoundDriver::initAudioResourceInfo(int set, void *info) {
+ _music->initAudioResourceInfo(set, info);
+ _sfx->initAudioResourceInfo(set, info);
+}
+
+void MixedSoundDriver::selectAudioResourceSet(int set) {
+ _music->selectAudioResourceSet(set);
+ _sfx->selectAudioResourceSet(set);
}
bool MixedSoundDriver::hasSoundFile(uint file) const {
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 63cec48d00..9119fb44fa 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -37,6 +37,35 @@ class SeekableAudioStream;
namespace Kyra {
+// Helper structs to format the data passed to the various initAudioResourceInfo() implementations
+struct SoundResourceInfo_PC {
+ SoundResourceInfo_PC(const char *const *files, int numFiles) : fileList(files), fileListSize(numFiles) {}
+ const char *const *fileList;
+ uint fileListSize;
+};
+
+struct SoundResourceInfo_Towns {
+ SoundResourceInfo_Towns(const char *const *files, int numFiles, const int32 *cdaTbl, int cdaTblSize) : fileList(files), fileListSize(numFiles), cdaTable(cdaTbl), cdaTableSize(cdaTblSize) {}
+ const char *const *fileList;
+ uint fileListSize;
+ const int32 *cdaTable;
+ uint cdaTableSize;
+};
+
+struct SoundResourceInfo_PC98 {
+ SoundResourceInfo_PC98(const char *fileNamePattern) : pattern(fileNamePattern) {}
+ const char *pattern;
+};
+
+struct SoundResourceInfo_TownsPC98V2 {
+ SoundResourceInfo_TownsPC98V2(const char *const *files, int numFiles, const char *fileNamePattern, const uint16 *cdaTbl, int cdaTblSize) : fileList(files), fileListSize(numFiles), pattern(fileNamePattern), cdaTable(cdaTbl), cdaTableSize(cdaTblSize) {}
+ const char *const *fileList;
+ uint fileListSize;
+ const char *pattern;
+ const uint16 *cdaTable;
+ uint cdaTableSize;
+};
+
/**
* Analog audio output device API for Kyrandia games.
* It contains functionality to play music tracks,
@@ -78,12 +107,20 @@ public:
virtual void updateVolumeSettings() {}
/**
- * Sets the soundfiles the output device will use
- * when playing a track and/or sound effect.
+ * Assigns static resource data with information on how to load
+ * audio resources to
*
- * @param list soundfile list
+ * @param set value defined in AudioResourceSet enum
+ * info various types of resource info data (file list, file name pattern, struct, etc. - depending on the inheriting driver type)
*/
- virtual void setSoundList(const AudioDataStruct *list);
+ virtual void initAudioResourceInfo(int set, void *info) = 0;
+
+ /**
+ * Select audio resource set.
+ *
+ * @param set value defined in AudioResourceSet enum
+ */
+ virtual void selectAudioResourceSet(int set) = 0;
/**
* Checks if a given sound file is present.
@@ -91,7 +128,7 @@ public:
* @param track track number
* @return true if available, false otherwise
*/
- virtual bool hasSoundFile(uint file) const;
+ virtual bool hasSoundFile(uint file) const = 0;
/**
* Load a specifc sound file for use of
@@ -184,11 +221,11 @@ public:
* @param handle store a copy of the sound handle
* @return playtime of the voice file (-1 marks unknown playtime)
*/
- virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
+ virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, uint8 priority = 255, bool isSfx = false);
Audio::SeekableAudioStream *getVoiceStream(const char *file) const;
- bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
+ bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, uint8 priority = 255, bool isSfx = false);
/**
* Checks if a voice is being played.
@@ -228,17 +265,17 @@ public:
*/
virtual void resetTrigger() {}
protected:
- const char *fileListEntry(int file) const { return (_soundDataList != 0 && file >= 0 && file < _soundDataList->fileListLen) ? _soundDataList->fileList[file] : ""; }
- int fileListLen() const { return _soundDataList->fileListLen; }
- const void *cdaData() const { return _soundDataList != 0 ? _soundDataList->cdaTracks : 0; }
- int cdaTrackNum() const { return _soundDataList != 0 ? _soundDataList->cdaNumTracks : 0; }
- int extraOffset() const { return _soundDataList != 0 ? _soundDataList->extraOffset : 0; }
-
enum {
kNumChannelHandles = 4
};
- Audio::SoundHandle _soundChannels[kNumChannelHandles];
+ struct SoundChannel {
+ SoundChannel() : handle(), priority(0) {}
+ Audio::SoundHandle handle;
+ int priority;
+ };
+
+ SoundChannel _soundChannels[kNumChannelHandles];
int _musicEnabled;
bool _sfxEnabled;
@@ -247,8 +284,6 @@ protected:
Audio::Mixer *_mixer;
private:
- const AudioDataStruct *_soundDataList;
-
struct SpeechCodecs {
const char *fileext;
Audio::SeekableAudioStream *(*streamFunc)(
@@ -272,7 +307,8 @@ public:
virtual void updateVolumeSettings();
- virtual void setSoundList(const AudioDataStruct *list);
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
virtual bool hasSoundFile(uint file) const;
virtual void loadSoundFile(uint file);
virtual void loadSoundFile(Common::String file);
@@ -293,88 +329,6 @@ private:
Sound *_music, *_sfx;
};
-// Digital Audio
-class AUDStream;
-class KyraAudioStream;
-class KyraEngine_MR;
-
-/**
- * Digital audio output device.
- *
- * This is just used for Kyrandia 3.
- */
-class SoundDigital {
-public:
- SoundDigital(KyraEngine_MR *vm, Audio::Mixer *mixer);
- ~SoundDigital();
-
- bool init() { return true; }
-
- /**
- * Plays a sound.
- *
- * @param filename file to be played
- * @param priority priority of the sound
- * @param type type
- * @param volume channel volume
- * @param loop true if the sound should loop (endlessly)
- * @param channel tell the sound player to use a specific channel for playback
- *
- * @return channel playing the sound
- */
- int playSound(const char *filename, uint8 priority, Audio::Mixer::SoundType type, int volume = 255, bool loop = false, int channel = -1);
-
- /**
- * Checks if a given channel is playing a sound.
- *
- * @param channel channel number to check
- * @return true if playing, else false
- */
- bool isPlaying(int channel);
-
- /**
- * Stop the playback of a sound in the given
- * channel.
- *
- * @param channel channel number
- */
- void stopSound(int channel);
-
- /**
- * Stops playback of all sounds.
- */
- void stopAllSounds();
-
- /**
- * Makes the sound in a given channel
- * fading out.
- *
- * @param channel channel number
- * @param ticks fadeout time
- */
- void beginFadeOut(int channel, int ticks);
-private:
- KyraEngine_MR *_vm;
- Audio::Mixer *_mixer;
-
- struct Sound {
- Audio::SoundHandle handle;
-
- char filename[16];
- uint8 priority;
- KyraAudioStream *stream;
- } _sounds[4];
-
- struct AudioCodecs {
- const char *fileext;
- Audio::SeekableAudioStream *(*streamFunc)(
- Common::SeekableReadStream *stream,
- DisposeAfterUse::Flag disposeAfterUse);
- };
-
- static const AudioCodecs _supportedCodecs[];
-};
-
} // End of namespace Kyra
#endif
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 668e662413..958cfcbcb4 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -2292,6 +2292,8 @@ SoundAdLibPC::SoundAdLibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer)
_numSoundTriggers = 0;
_sfxPlayingSound = -1;
_soundFileLoaded.clear();
+ _currentResourceSet = 0;
+ memset(&_resInfo, 0, sizeof(_resInfo));
switch (vm->game()) {
case GI_LOL:
@@ -2322,6 +2324,8 @@ SoundAdLibPC::SoundAdLibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer)
SoundAdLibPC::~SoundAdLibPC() {
delete _driver;
delete[] _soundDataPtr;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundAdLibPC::init() {
@@ -2416,8 +2420,29 @@ void SoundAdLibPC::resetTrigger() {
_driver->resetSoundTrigger();
}
+void SoundAdLibPC::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_PC(*(SoundResourceInfo_PC*)info) : 0;
+ }
+}
+
+void SoundAdLibPC::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundAdLibPC::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundAdLibPC::loadSoundFile(uint file) {
- internalLoadFile(fileListEntry(file));
+ if (file < res()->fileListSize)
+ internalLoadFile(res()->fileList[file]);
}
void SoundAdLibPC::loadSoundFile(Common::String file) {
diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h
index 8492f3b99a..f78d812670 100644
--- a/engines/kyra/sound_adlib.h
+++ b/engines/kyra/sound_adlib.h
@@ -69,6 +69,9 @@ public:
virtual void updateVolumeSettings();
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
+ virtual bool hasSoundFile(uint file) const;
virtual void loadSoundFile(uint file);
virtual void loadSoundFile(Common::String file);
@@ -87,6 +90,10 @@ private:
void play(uint8 track, uint8 volume);
+ const SoundResourceInfo_PC *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_PC *_resInfo[3];
+ int _currentResourceSet;
+
AdLibDriver *_driver;
int _version;
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index ec2748dd38..7292541594 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -53,10 +53,26 @@ bool SoundAmiga::init() {
return _driver != 0 && _tableSfxIntro && _tableSfxGame;
}
+void SoundAmiga::initAudioResourceInfo(int set, void *info) {
+ // See comment below
+}
+
+void SoundAmiga::selectAudioResourceSet(int set) {
+ // It seems that loadSoundFile() is doing what would normally be done in here.
+ // As long as this driver is only required for one single target (Kyra 1 Amiga)
+ // this doesn't matter much.
+}
+
+bool SoundAmiga::hasSoundFile(uint file) const {
+ if (file < 3)
+ return true;
+ return false;
+}
+
void SoundAmiga::loadSoundFile(uint file) {
debugC(5, kDebugLevelSound, "SoundAmiga::loadSoundFile(%d)", file);
- static const char * const tableFilenames[3][2] = {
+ static const char *const tableFilenames[3][2] = {
{ "introscr.mx", "introinst.mx" },
{ "kyramusic.mx", 0 },
{ "finalescr.mx", "introinst.mx" }
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index fe0f1fb9bc..6ff1c3d2ea 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "kyra/resource.h"
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/sound_digital.h b/engines/kyra/sound_digital.h
new file mode 100644
index 0000000000..271dde6a21
--- /dev/null
+++ b/engines/kyra/sound_digital.h
@@ -0,0 +1,119 @@
+/* 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 KYRA_SOUND_DIGITAL_H
+#define KYRA_SOUND_DIGITAL_H
+
+#include "audio/mixer.h"
+
+namespace Common {
+class SeekableReadStream;
+} // End of namespace Common
+
+namespace Audio {
+class SeekableAudioStream;
+} // End of namespace Audio
+
+namespace Kyra {
+
+// Digital Audio
+class KyraAudioStream;
+class KyraEngine_MR;
+
+/**
+ * Digital audio output device.
+ *
+ * This is just used for Kyrandia 3.
+ */
+class SoundDigital {
+public:
+ SoundDigital(KyraEngine_MR *vm, Audio::Mixer *mixer);
+ ~SoundDigital();
+
+ /**
+ * Plays a sound.
+ *
+ * @param filename file to be played
+ * @param priority priority of the sound
+ * @param type type
+ * @param volume channel volume
+ * @param loop true if the sound should loop (endlessly)
+ * @param channel tell the sound player to use a specific channel for playback
+ *
+ * @return channel playing the sound
+ */
+ int playSound(const char *filename, uint8 priority, Audio::Mixer::SoundType type, int volume = 255, bool loop = false, int channel = -1);
+
+ /**
+ * Checks if a given channel is playing a sound.
+ *
+ * @param channel channel number to check
+ * @return true if playing, else false
+ */
+ bool isPlaying(int channel);
+
+ /**
+ * Stop the playback of a sound in the given
+ * channel.
+ *
+ * @param channel channel number
+ */
+ void stopSound(int channel);
+
+ /**
+ * Stops playback of all sounds.
+ */
+ void stopAllSounds();
+
+ /**
+ * Makes the sound in a given channel
+ * fading out.
+ *
+ * @param channel channel number
+ * @param ticks fadeout time
+ */
+ void beginFadeOut(int channel, int ticks);
+private:
+ KyraEngine_MR *_vm;
+ Audio::Mixer *_mixer;
+
+ struct Sound {
+ Audio::SoundHandle handle;
+
+ char filename[16];
+ uint8 priority;
+ KyraAudioStream *stream;
+ } _sounds[4];
+
+ struct AudioCodecs {
+ const char *fileext;
+ Audio::SeekableAudioStream *(*streamFunc)(
+ Common::SeekableReadStream *stream,
+ DisposeAfterUse::Flag disposeAfterUse);
+ };
+
+ static const AudioCodecs _supportedCodecs[];
+};
+
+} // End of namespace Kyra
+
+#endif
diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 827a487685..c5cf2658aa 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -23,6 +23,8 @@
#ifndef KYRA_SOUND_INTERN_H
#define KYRA_SOUND_INTERN_H
+
+
#include "kyra/sound.h"
#include "kyra/sound_adlib.h"
@@ -40,6 +42,7 @@ class MaxTrax;
} // End of namespace Audio
namespace Kyra {
+
class MidiOutput;
/**
@@ -59,6 +62,9 @@ public:
void updateVolumeSettings();
+ void initAudioResourceInfo(int set, void *info);
+ void selectAudioResourceSet(int set);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String file);
void loadSfxFile(Common::String file);
@@ -89,6 +95,10 @@ private:
MidiParser *_music;
MidiParser *_sfx[3];
+ const SoundResourceInfo_PC *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_PC *_resInfo[3];
+ int _currentResourceSet;
+
// misc
kType _type;
Common::String getFileName(const Common::String &str);
@@ -110,6 +120,9 @@ public:
bool init();
void process();
+ void initAudioResourceInfo(int set, void *info);
+ void selectAudioResourceSet(int set);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String) {}
@@ -142,6 +155,10 @@ private:
bool _cdaPlaying;
+ const SoundResourceInfo_Towns *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_Towns *_resInfo[3];
+ int _currentResourceSet;
+
const uint8 *_musicFadeTable;
const uint8 *_sfxBTTable;
const uint8 *_sfxWDTable;
@@ -157,6 +174,9 @@ public:
bool init();
void process() {}
+ void initAudioResourceInfo(int set, void *info);
+ void selectAudioResourceSet(int set);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String file);
@@ -169,11 +189,15 @@ public:
void updateVolumeSettings();
-protected:
+private:
int _lastTrack;
uint8 *_musicTrackData;
uint8 *_sfxTrackData;
TownsPC98_AudioDriver *_driver;
+
+ const char *resPattern() {return _resInfo[_currentResourceSet]->c_str(); }
+ Common::String *_resInfo[3];
+ int _currentResourceSet;
};
class SoundTownsPC98_v2 : public Sound {
@@ -186,6 +210,9 @@ public:
bool init();
void process();
+ void initAudioResourceInfo(int set, void *info);
+ void selectAudioResourceSet(int set);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file) {}
void loadSoundFile(Common::String file);
@@ -193,12 +220,12 @@ public:
void haltTrack();
void beginFadeOut();
- int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx);
+ int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume = 255, uint8 priority = 255, bool isSfx = true);
void playSoundEffect(uint8 track, uint8 volume = 0xff);
void updateVolumeSettings();
-protected:
+private:
Audio::AudioStream *_currentSFX;
int _lastTrack;
bool _useFmSfx;
@@ -206,6 +233,10 @@ protected:
uint8 *_musicTrackData;
uint8 *_sfxTrackData;
TownsPC98_AudioDriver *_driver;
+
+ const SoundResourceInfo_TownsPC98V2 *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_TownsPC98V2 *_resInfo[3];
+ int _currentResourceSet;
};
// PC Speaker MIDI driver
@@ -295,6 +326,10 @@ public:
bool init();
void process() {}
+
+ void initAudioResourceInfo(int set, void *info);
+ void selectAudioResourceSet(int set);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String) {}
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index cb9be43b07..3c2c931445 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -165,10 +165,18 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
return;
volume &= 0xff;
- int16 volIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
+ int16 prIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
+ uint16 priority = (prIndex > 0) ? (prIndex * volume) >> 8 : -prIndex;
- uint16 vocLevel = (volIndex > 0) ? (volIndex * volume) >> 8 : -volIndex;
- vocLevel = CLIP(volume >> 4, 2, 13) * 7 + 164;
+ static const uint8 volTable1[] = { 223, 159, 95, 47, 15, 0 };
+ static const uint8 volTable2[] = { 255, 191, 127, 63, 30, 0 };
+
+ for (int i = 0; i < 6; i++) {
+ if (volTable1[i] < volume) {
+ volume = volTable2[i];
+ break;
+ }
+ }
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
@@ -180,7 +188,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
if (hasVocFile) {
if (_sound->isVoicePresent(_ingameSoundList[vocIndex]))
- _sound->voicePlay(_ingameSoundList[vocIndex], 0, vocLevel & 0xff, true);
+ _sound->voicePlay(_ingameSoundList[vocIndex], 0, volume, priority, true);
} else if (_flags.platform == Common::kPlatformPC) {
if (_sound->getSfxType() == Sound::kMidiMT32)
track = (track < _ingameMT32SoundIndexSize) ? (_ingameMT32SoundIndex[track] - 1) : -1;
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index 70cc304192..a54c52612b 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -442,6 +442,8 @@ SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *dri
_output = 0;
_musicFile = _sfxFile = 0;
+ _currentResourceSet = 0;
+ memset(&_resInfo, 0, sizeof(_resInfo));
_music = MidiParser::createParser_XMIDI();
assert(_music);
@@ -495,6 +497,9 @@ SoundMidiPC::~SoundMidiPC() {
delete[] _sfxFile;
delete[] _musicFile;
+
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundMidiPC::init() {
@@ -586,8 +591,29 @@ void SoundMidiPC::updateVolumeSettings() {
_output->setSourceVolume(i, _sfxVolume, false);
}
+void SoundMidiPC::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_PC(*(SoundResourceInfo_PC*)info) : 0;
+ }
+}
+
+void SoundMidiPC::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundMidiPC::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundMidiPC::loadSoundFile(uint file) {
- loadSoundFile(fileListEntry(file));
+ if (file < res()->fileListSize)
+ loadSoundFile(res()->fileList[file]);
}
void SoundMidiPC::loadSoundFile(Common::String file) {
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 4b25db33f2..ee2ea6b6e4 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -35,8 +35,8 @@ namespace Kyra {
SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: Sound(vm, mixer), _lastTrack(-1), _musicTrackData(0), _sfxFileData(0), _cdaPlaying(0),
- _sfxFileIndex((uint)-1), _musicFadeTable(0), _sfxWDTable(0), _sfxBTTable(0), _sfxChannel(0x46) {
-
+ _sfxFileIndex((uint)-1), _musicFadeTable(0), _sfxWDTable(0), _sfxBTTable(0), _sfxChannel(0x46), _currentResourceSet(0) {
+ memset(&_resInfo, 0, sizeof(_resInfo));
_driver = new TownsEuphonyDriver(_mixer);
}
@@ -46,6 +46,8 @@ SoundTowns::~SoundTowns() {
delete _driver;
delete[] _musicTrackData;
delete[] _sfxFileData;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundTowns::init() {
@@ -78,11 +80,12 @@ void SoundTowns::playTrack(uint8 track) {
return;
track -= 2;
- const int32 *const tTable = (const int32 *)cdaData();
- int tTableIndex = 3 * track;
+ uint tTableIndex = 3 * track;
+
+ assert(tTableIndex + 2 < res()->cdaTableSize);
- int trackNum = (int)READ_LE_UINT32(&tTable[tTableIndex + 2]);
- int32 loop = (int32)READ_LE_UINT32(&tTable[tTableIndex + 1]);
+ int trackNum = (int)READ_LE_UINT32(&res()->cdaTable[tTableIndex + 2]);
+ int32 loop = (int32)READ_LE_UINT32(&res()->cdaTable[tTableIndex + 1]);
if (track == _lastTrack && _musicEnabled)
return;
@@ -95,7 +98,7 @@ void SoundTowns::playTrack(uint8 track) {
g_system->getAudioCDManager()->updateCD();
_cdaPlaying = true;
} else if (_musicEnabled) {
- playEuphonyTrack(READ_LE_UINT32(&tTable[tTableIndex]), loop);
+ playEuphonyTrack(READ_LE_UINT32(&res()->cdaTable[tTableIndex]), loop);
_cdaPlaying = false;
}
@@ -117,12 +120,32 @@ void SoundTowns::haltTrack() {
_driver->stopParser();
}
+void SoundTowns::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_Towns(*(SoundResourceInfo_Towns*)info) : 0;
+ }
+}
+
+void SoundTowns::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundTowns::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundTowns::loadSoundFile(uint file) {
- if (_sfxFileIndex == file)
+ if (_sfxFileIndex == file || file >= res()->fileListSize)
return;
_sfxFileIndex = file;
delete[] _sfxFileData;
- _sfxFileData = _vm->resource()->fileData(fileListEntry(file), 0);
+ _sfxFileData = _vm->resource()->fileData(res()->fileList[file], 0);
}
void SoundTowns::playSoundEffect(uint8 track, uint8) {
@@ -367,13 +390,16 @@ void SoundTowns::fadeOutSoundEffects() {
}
SoundPC98::SoundPC98(KyraEngine_v1 *vm, Audio::Mixer *mixer) :
- Sound(vm, mixer), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0) {
+ Sound(vm, mixer), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0), _currentResourceSet(0) {
+ memset(&_resInfo, 0, sizeof(_resInfo));
}
SoundPC98::~SoundPC98() {
delete[] _musicTrackData;
delete[] _sfxTrackData;
delete _driver;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundPC98::init() {
@@ -383,8 +409,26 @@ bool SoundPC98::init() {
return reslt;
}
-void SoundPC98::loadSoundFile(uint file) {
- if (!scumm_strnicmp(fileListEntry(0), "INTRO", 5)) {
+void SoundPC98::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new Common::String(((SoundResourceInfo_PC98*)info)->pattern) : 0;
+ }
+}
+
+void SoundPC98::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundPC98::hasSoundFile(uint file) const {
+ return true;
+}
+
+void SoundPC98::loadSoundFile(uint) {
+ if (_currentResourceSet == kMusicIntro) {
delete[] _sfxTrackData;
_sfxTrackData = 0;
@@ -407,14 +451,14 @@ void SoundPC98::loadSoundFile(Common::String file) {
}
void SoundPC98::playTrack(uint8 track) {
- track += extraOffset();
+ track -= 1;
if (track == _lastTrack && _musicEnabled)
return;
beginFadeOut();
- Common::String musicFile = fileListLen() == 1 ? Common::String::format(fileListEntry(0), track) : fileListEntry(track);
+ Common::String musicFile = Common::String::format(resPattern(), track);
delete[] _musicTrackData;
_musicTrackData = _vm->resource()->fileData(musicFile.c_str(), 0);
if (_musicEnabled)
@@ -464,13 +508,16 @@ void SoundPC98::updateVolumeSettings() {
// KYRA 2
SoundTownsPC98_v2::SoundTownsPC98_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer) :
- Sound(vm, mixer), _currentSFX(0), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0), _useFmSfx(false) {
+ Sound(vm, mixer), _currentSFX(0), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0), _useFmSfx(false), _currentResourceSet(0) {
+ memset(&_resInfo, 0, sizeof(_resInfo));
}
SoundTownsPC98_v2::~SoundTownsPC98_v2() {
delete[] _musicTrackData;
delete[] _sfxTrackData;
delete _driver;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundTownsPC98_v2::init() {
@@ -486,9 +533,9 @@ bool SoundTownsPC98_v2::init() {
// this misses the possibility that we play the tracks
// right off CD. So we should find another way to
// check if we have access to CD audio.
- Resource *res = _vm->resource();
+ Resource *r = _vm->resource();
if (_musicEnabled &&
- (res->exists("track1.mp3") || res->exists("track1.ogg") || res->exists("track1.flac") || res->exists("track1.fla")))
+ (r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla")))
_musicEnabled = 2;
else
_musicEnabled = 1;
@@ -503,6 +550,26 @@ bool SoundTownsPC98_v2::init() {
return reslt;
}
+void SoundTownsPC98_v2::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_TownsPC98V2(*(SoundResourceInfo_TownsPC98V2*)info) : 0;
+ }
+}
+
+void SoundTownsPC98_v2::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundTownsPC98_v2::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundTownsPC98_v2::loadSoundFile(Common::String file) {
delete[] _sfxTrackData;
_sfxTrackData = _vm->resource()->fileData(file.c_str(), 0);
@@ -513,18 +580,14 @@ void SoundTownsPC98_v2::process() {
}
void SoundTownsPC98_v2::playTrack(uint8 track) {
- track += extraOffset();
-
if (track == _lastTrack && _musicEnabled)
return;
- const uint16 *const cdaTracks = (const uint16 *)cdaData();
-
int trackNum = -1;
if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
- for (int i = 0; i < cdaTrackNum(); i++) {
- if (track == (uint8) READ_LE_UINT16(&cdaTracks[i * 2])) {
- trackNum = (int) READ_LE_UINT16(&cdaTracks[i * 2 + 1]) - 1;
+ for (uint i = 0; i < res()->cdaTableSize; i++) {
+ if (track == (uint8) READ_LE_UINT16(&res()->cdaTable[i * 2])) {
+ trackNum = (int) READ_LE_UINT16(&res()->cdaTable[i * 2 + 1]) - 1;
break;
}
}
@@ -532,9 +595,10 @@ void SoundTownsPC98_v2::playTrack(uint8 track) {
beginFadeOut();
- Common::String musicFile = fileListLen() == 1 ? Common::String::format(fileListEntry(0), track) : fileListEntry(track);
+ Common::String musicFile = res()->pattern ? Common::String::format(res()->pattern, track) : (res()->fileList ? res()->fileList[track] : 0);
if (musicFile.empty())
return;
+
delete[] _musicTrackData;
_musicTrackData = _vm->resource()->fileData(musicFile.c_str(), 0);
@@ -569,15 +633,24 @@ void SoundTownsPC98_v2::beginFadeOut() {
haltTrack();
}
-int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle, uint8, bool) {
+int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool) {
static const uint16 rates[] = { 0x10E1, 0x0CA9, 0x0870, 0x0654, 0x0438, 0x032A, 0x021C, 0x0194 };
static const char patternHOF[] = "%s.PCM";
static const char patternLOL[] = "%s.VOC";
int h = 0;
if (_currentSFX) {
- while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h]))
+ while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h].handle))
h++;
+
+ if (h >= kNumChannelHandles) {
+ h = 0;
+ while (h < kNumChannelHandles && _soundChannels[h].priority > priority)
+ ++h;
+ if (h < kNumChannelHandles)
+ voiceStop(&_soundChannels[h].handle);
+ }
+
if (h >= kNumChannelHandles)
return 0;
}
@@ -630,9 +703,10 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle,
}
_currentSFX = Audio::makeRawStream(sfx, outsize, sfxRate * 10, Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN);
- _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h], _currentSFX);
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h].handle, _currentSFX, -1, volume);
+ _soundChannels[h].priority = priority;
if (handle)
- *handle = _soundChannels[h];
+ *handle = _soundChannels[h].handle;
delete[] data;
return 1;
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 00dc4f9e13..dc4f4986fb 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -31,6 +31,7 @@
#include "kyra/gui_lok.h"
#include "kyra/gui_hof.h"
#include "kyra/gui_mr.h"
+#include "kyra/sequences_hof.h"
#include "kyra/sound_intern.h"
#include "common/endian.h"
@@ -245,8 +246,8 @@ bool StaticResource::init() {
{ kAmigaSfxTable, proc(loadAmigaSfxTable), proc(freeAmigaSfxTable) },
{ kRawData, proc(loadRawData), proc(freeRawData) },
- { k2SeqData, proc(loadHofSequenceData), proc(freeHofSequenceData) },
- { k2ShpAnimDataV1, proc(loadShapeAnimData_v1), proc(freeHofShapeAnimDataV1) },
+ { k2SeqData, proc(loadHoFSequenceData), proc(freeHoFSequenceData) },
+ { k2SeqItemAnimData, proc(loadHoFSeqItemAnimData), proc(freeHoFSeqItemAnimData) },
{ k2ItemAnimDefinition, proc(loadItemAnimDefinition), proc(freeItemAnimDefinition) },
#ifdef ENABLE_LOL
@@ -289,7 +290,7 @@ void StaticResource::deinit() {
}
const char *const *StaticResource::loadStrings(int id, int &strings) {
- return (const char * const *)getData(id, kStringList, strings);
+ return (const char *const *)getData(id, kStringList, strings);
}
const uint8 *StaticResource::loadRawData(int id, int &size) {
@@ -308,12 +309,12 @@ const Room *StaticResource::loadRoomTable(int id, int &entries) {
return (const Room *)getData(id, StaticResource::kRoomList, entries);
}
-const HofSeqData *StaticResource::loadHofSequenceData(int id, int &entries) {
- return (const HofSeqData *)getData(id, k2SeqData, entries);
+const HoFSeqData *StaticResource::loadHoFSequenceData(int id, int &entries) {
+ return (const HoFSeqData *)getData(id, k2SeqData, entries);
}
-const ItemAnimData_v1 *StaticResource::loadShapeAnimData_v1(int id, int &entries) {
- return (const ItemAnimData_v1 *)getData(id, k2ShpAnimDataV1, entries);
+const HoFSeqItemAnimData *StaticResource::loadHoFSeqItemAnimData(int id, int &entries) {
+ return (const HoFSeqItemAnimData *)getData(id, k2SeqItemAnimData, entries);
}
const ItemAnimDefinition *StaticResource::loadItemAnimDefinition(int id, int &entries) {
@@ -513,12 +514,12 @@ bool StaticResource::loadRoomTable(Common::SeekableReadStream &stream, void *&pt
return true;
}
-bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
+bool StaticResource::loadHoFSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
int numSeq = stream.readUint16BE();
uint32 offset = 2;
- Sequence *tmp_s = new Sequence[numSeq];
+ HoFSequence *tmp_s = new HoFSequence[numSeq];
- size = sizeof(HofSeqData) + numSeq * (sizeof(Sequence) + 28);
+ size = sizeof(HoFSeqData) + numSeq * (sizeof(HoFSequence) + 28);
for (int i = 0; i < numSeq; i++) {
stream.seek(offset, SEEK_SET); offset += 2;
@@ -529,22 +530,22 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi
stream.read(const_cast<char *>(tmp_s[i].wsaFile), 14);
tmp_s[i].cpsFile = new char[14];
stream.read(const_cast<char *>(tmp_s[i].cpsFile), 14);
- tmp_s[i].startupCommand = stream.readByte();
- tmp_s[i].finalCommand = stream.readByte();
+ tmp_s[i].fadeInTransitionType = stream.readByte();
+ tmp_s[i].fadeOutTransitionType = stream.readByte();
tmp_s[i].stringIndex1 = stream.readUint16BE();
tmp_s[i].stringIndex2 = stream.readUint16BE();
tmp_s[i].startFrame = stream.readUint16BE();
tmp_s[i].numFrames = stream.readUint16BE();
- tmp_s[i].frameDelay = stream.readUint16BE();
+ tmp_s[i].duration = stream.readUint16BE();
tmp_s[i].xPos = stream.readUint16BE();
tmp_s[i].yPos = stream.readUint16BE();
- tmp_s[i].duration = stream.readUint16BE();
+ tmp_s[i].timeout = stream.readUint16BE();
}
stream.seek(offset, SEEK_SET); offset += 2;
int numSeqN = stream.readUint16BE();
- NestedSequence *tmp_n = new NestedSequence[numSeqN];
- size += (numSeqN * (sizeof(NestedSequence) + 14));
+ HoFNestedSequence *tmp_n = new HoFNestedSequence[numSeqN];
+ size += (numSeqN * (sizeof(HoFNestedSequence) + 14));
for (int i = 0; i < numSeqN; i++) {
stream.seek(offset, SEEK_SET); offset += 2;
@@ -559,8 +560,8 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi
tmp_n[i].x = stream.readUint16BE();
tmp_n[i].y = stream.readUint16BE();
uint16 ctrlOffs = stream.readUint16BE();
- tmp_n[i].startupCommand = stream.readUint16BE();
- tmp_n[i].finalCommand = stream.readUint16BE();
+ tmp_n[i].fadeInTransitionType = stream.readUint16BE();
+ tmp_n[i].fadeOutTransitionType = stream.readUint16BE();
if (ctrlOffs) {
stream.seek(ctrlOffs, SEEK_SET);
@@ -580,21 +581,21 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi
}
}
- HofSeqData *loadTo = new HofSeqData;
+ HoFSeqData *loadTo = new HoFSeqData;
assert(loadTo);
loadTo->seq = tmp_s;
- loadTo->seqn = tmp_n;
+ loadTo->nestedSeq = tmp_n;
loadTo->numSeq = numSeq;
- loadTo->numSeqn = numSeqN;
+ loadTo->numNestedSeq = numSeqN;
ptr = loadTo;
return true;
}
-bool StaticResource::loadShapeAnimData_v1(Common::SeekableReadStream &stream, void *&ptr, int &size) {
+bool StaticResource::loadHoFSeqItemAnimData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
size = stream.readByte();
- ItemAnimData_v1 *loadTo = new ItemAnimData_v1[size];
+ HoFSeqItemAnimData *loadTo = new HoFSeqItemAnimData[size];
assert(loadTo);
for (int i = 0; i < size; i++) {
@@ -670,8 +671,8 @@ void StaticResource::freeRoomTable(void *&ptr, int &size) {
size = 0;
}
-void StaticResource::freeHofSequenceData(void *&ptr, int &size) {
- HofSeqData *h = (HofSeqData *)ptr;
+void StaticResource::freeHoFSequenceData(void *&ptr, int &size) {
+ HoFSeqData *h = (HoFSeqData *)ptr;
for (int i = 0; i < h->numSeq; i++) {
delete[] h->seq[i].wsaFile;
@@ -679,19 +680,19 @@ void StaticResource::freeHofSequenceData(void *&ptr, int &size) {
}
delete[] h->seq;
- for (int i = 0; i < h->numSeqn; i++) {
- delete[] h->seqn[i].wsaFile;
- delete[] h->seqn[i].wsaControl;
+ for (int i = 0; i < h->numNestedSeq; i++) {
+ delete[] h->nestedSeq[i].wsaFile;
+ delete[] h->nestedSeq[i].wsaControl;
}
- delete[] h->seqn;
+ delete[] h->nestedSeq;
delete h;
ptr = 0;
size = 0;
}
-void StaticResource::freeHofShapeAnimDataV1(void *&ptr, int &size) {
- ItemAnimData_v1 *d = (ItemAnimData_v1 *)ptr;
+void StaticResource::freeHoFSeqItemAnimData(void *&ptr, int &size) {
+ HoFSeqItemAnimData *d = (HoFSeqItemAnimData *)ptr;
for (int i = 0; i < size; i++)
delete[] d[i].frames;
delete[] d;
@@ -777,22 +778,6 @@ void KyraEngine_LoK::initStaticResource() {
_storyStrings = _staticres->loadStrings(k1PC98StoryStrings, _storyStringsSize);
- int size1, size2;
- const char *const *soundfiles1 = _staticres->loadStrings(k1AudioTracks, size1);
- const char *const *soundfiles2 = _staticres->loadStrings(k1AudioTracks2, size2);
- _soundFilesSize = size1 + size2;
- if (_soundFilesSize) {
- delete[] _soundFiles;
- const char **soundfiles = new const char*[_soundFilesSize];
- for (int i = 0; i < _soundFilesSize; i++)
- soundfiles[i] = (i < size1) ? soundfiles1[i] : soundfiles2[i - size1];
- _soundFiles = soundfiles;
- }
- _soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, _soundFilesIntroSize);
- _cdaTrackTable = (const int32 *)_staticres->loadRawData(k1TownsCDATable, _cdaTrackTableSize);
-
- // copied static res
-
// room list
const Room *tempRoomList = _staticres->loadRoomTable(k1RoomList, _roomTableSize);
@@ -819,34 +804,40 @@ void KyraEngine_LoK::initStaticResource() {
_staticres->unloadId(k1DefaultShapes);
}
- // audio data tables
- static const char *const tIntro98[] = { "INTRO%d.DAT" };
- static const char *const tIngame98[] = { "KYRAM%d.DAT" };
+ // audio resource assignment
+ int size1, size2;
+ const char *const *soundfiles1 = _staticres->loadStrings(k1AudioTracks, size1);
+ const char *const *soundfiles2 = _staticres->loadStrings(k1AudioTracks2, size2);
+ int soundFilesSize = size1 + size2;
+ int soundFilesIntroSize = 0;
+ int cdaTableSize = 0;
+ const char **soundFiles = 0;
+
+ if (soundFilesSize) {
+ soundFiles = new const char*[soundFilesSize];
+ for (int i = 0; i < soundFilesSize; i++)
+ soundFiles[i] = (i < size1) ? soundfiles1[i] : soundfiles2[i - size1];
+ }
+ const char *const *soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, temp);
+ const int32 *cdaTable = (const int32 *)_staticres->loadRawData(k1TownsCDATable, cdaTableSize);
// FIXME: It seems Kyra1 MAC CD includes AdLib and MIDI music and sfx, thus we enable
// support for those for now. (Based on patch #2767489 "Support for Mac Kyrandia 1 CD" by satz).
- memset(_soundData, 0, sizeof(_soundData));
if (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformMacintosh) {
- _soundData[0].fileList = _soundFilesIntro;
- _soundData[0].fileListLen = _soundFilesIntroSize;
- _soundData[1].fileList = _soundFiles;
- _soundData[1].fileListLen = _soundFilesSize;
+ SoundResourceInfo_PC resInfoIntro(soundFilesIntro, soundFilesIntroSize);
+ SoundResourceInfo_PC resInfoIngame(soundFiles, soundFilesSize);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
} else if (_flags.platform == Common::kPlatformFMTowns) {
- _soundData[0].fileList = _soundFiles;
- _soundData[0].fileListLen = _soundFilesSize;
- _soundData[0].cdaTracks = _cdaTrackTable;
- _soundData[0].cdaNumTracks = _cdaTrackTableSize;
- _soundData[1].fileList = _soundFiles;
- _soundData[1].fileListLen = _soundFilesSize;
- _soundData[1].cdaTracks = _cdaTrackTable;
- _soundData[1].cdaNumTracks = _cdaTrackTableSize;
+ SoundResourceInfo_Towns resInfoIntro(soundFiles, soundFilesSize, cdaTable, cdaTableSize);
+ SoundResourceInfo_Towns resInfoIngame(soundFiles, soundFilesSize, cdaTable, cdaTableSize);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
} else if (_flags.platform == Common::kPlatformPC98) {
- _soundData[0].fileList = tIntro98;
- _soundData[0].fileListLen = 1;
- _soundData[0].extraOffset = -1;
- _soundData[1].fileList = tIngame98;
- _soundData[1].fileListLen = 1;
- _soundData[1].extraOffset = -1;
+ SoundResourceInfo_PC98 resInfoIntro("INTRO%d.DAT");
+ SoundResourceInfo_PC98 resInfoIngame("KYRAM%d.DAT");
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
}
}
@@ -992,11 +983,7 @@ void KyraEngine_LoK::loadMainScreen(int page) {
}
void KyraEngine_HoF::initStaticResource() {
- int tmpSize = 0;
-
- _sequencePakList = _staticres->loadStrings(k2SeqplayPakFiles, _sequencePakListSize);
_ingamePakList = _staticres->loadStrings(k2IngamePakFiles, _ingamePakListSize);
- _sequenceStrings = _staticres->loadStrings(k2SeqplayStrings, _sequenceStringsSize);
_ingameSoundList = _staticres->loadStrings(k2IngameSfxFiles, _ingameSoundListSize);
_ingameSoundIndex = (const uint16 *)_staticres->loadRawData(k2IngameSfxIndex, _ingameSoundIndexSize);
_musicFileListIntro = _staticres->loadStrings(k2SeqplayIntroTracks, _musicFileListIntroSize);
@@ -1009,131 +996,29 @@ void KyraEngine_HoF::initStaticResource() {
_ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize);
_itemAnimDefinition = _staticres->loadItemAnimDefinition(k2IngameShapeAnimData, _itemAnimDefinitionSize);
- // replace sequence talkie files with localized versions
- const char *const *seqSoundList = _staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize);
- const char *const *tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmpSize);
- char **tmpSndLst = new char *[_sequenceSoundListSize];
-
- for (int i = 0; i < _sequenceSoundListSize; i++) {
- const int len = strlen(seqSoundList[i]);
-
- tmpSndLst[i] = new char[len + 1];
- tmpSndLst[i][0] = 0;
-
- if (tlkfiles && len > 1) {
- for (int ii = 0; ii < tmpSize; ii++) {
- if (strlen(tlkfiles[ii]) > 1 && !scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1]))
- strcpy(tmpSndLst[i], tlkfiles[ii]);
- }
- }
-
- if (tmpSndLst[i][0] == 0)
- strcpy(tmpSndLst[i], seqSoundList[i]);
- }
-
- tlkfiles = seqSoundList = 0;
- _staticres->unloadId(k2SeqplayTlkFiles);
- _staticres->unloadId(k2SeqplaySfxFiles);
- _sequenceSoundList = tmpSndLst;
-
// assign music data
- static const char *const fmtMusicFileListIntro[] = { "intro%d.twn" };
- static const char *const fmtMusicFileListFinale[] = { "finale%d.twn" };
- static const char *const fmtMusicFileListIngame[] = { "km%02d.twn" };
-
- static const char *const pc98MusicFileListIntro[] = { "intro%d.86" };
- static const char *const pc98MusicFileListFinale[] = { "finale%d.86" };
- static const char *const pc98MusicFileListIngame[] = { "km%02d.86" };
-
- memset(_soundData, 0, sizeof(_soundData));
if (_flags.platform == Common::kPlatformPC) {
- _soundData[0].fileList = _musicFileListIntro;
- _soundData[0].fileListLen = _musicFileListIntroSize;
- _soundData[1].fileList = _musicFileListIngame;
- _soundData[1].fileListLen = _musicFileListIngameSize;
- _soundData[2].fileList = _musicFileListFinale;
- _soundData[2].fileListLen = _musicFileListIntroSize;
+ SoundResourceInfo_PC resInfoIntro(_musicFileListIntro, _musicFileListIntroSize);
+ SoundResourceInfo_PC resInfoIngame(_musicFileListIngame, _musicFileListIngameSize);
+ SoundResourceInfo_PC resInfoFinale(_musicFileListFinale, _musicFileListFinaleSize);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
} else if (_flags.platform == Common::kPlatformFMTowns) {
- _soundData[0].fileList = fmtMusicFileListIntro;
- _soundData[0].fileListLen = 1;
- _soundData[0].cdaTracks = _cdaTrackTableIntro;
- _soundData[0].cdaNumTracks = _cdaTrackTableIntroSize >> 1;
- _soundData[1].fileList = fmtMusicFileListIngame;
- _soundData[1].fileListLen = 1;
- _soundData[1].cdaTracks = _cdaTrackTableIngame;
- _soundData[1].cdaNumTracks = _cdaTrackTableIngameSize >> 1;
- _soundData[2].fileList = fmtMusicFileListFinale;
- _soundData[2].fileListLen = 1;
- _soundData[2].cdaTracks = _cdaTrackTableFinale;
- _soundData[2].cdaNumTracks = _cdaTrackTableFinaleSize >> 1;
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(0, 0, "intro%d.twn", (const uint16*)_cdaTrackTableIntro, _cdaTrackTableIntroSize >> 1);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "km%02d.twn", (const uint16*)_cdaTrackTableIngame, _cdaTrackTableIngameSize >> 1);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(0, 0, "finale%d.twn", (const uint16*)_cdaTrackTableFinale, _cdaTrackTableFinaleSize >> 1);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
} else if (_flags.platform == Common::kPlatformPC98) {
- _soundData[0].fileList = pc98MusicFileListIntro;
- _soundData[0].fileListLen = 1;
- _soundData[1].fileList = pc98MusicFileListIngame;
- _soundData[1].fileListLen = 1;
- _soundData[2].fileList = pc98MusicFileListFinale;
- _soundData[2].fileListLen = 1;
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(0, 0, "intro%d.86", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "km%02d.86", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(0, 0, "finale%d.86", 0, 0);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
}
-
- // setup sequence data
- _sequences = _staticres->loadHofSequenceData(k2SeqplaySeqData, tmpSize);
-
- static const SeqProc hofSequenceCallbacks[] = {
- 0, &KyraEngine_HoF::seq_introWestwood,
- &KyraEngine_HoF::seq_introTitle, &KyraEngine_HoF::seq_introOverview,
- &KyraEngine_HoF::seq_introLibrary, &KyraEngine_HoF::seq_introHand,
- &KyraEngine_HoF::seq_introPoint, &KyraEngine_HoF::seq_introZanfaun,
- &KyraEngine_HoF::seq_finaleFunters, &KyraEngine_HoF::seq_finaleFerb,
- &KyraEngine_HoF::seq_finaleFish, &KyraEngine_HoF::seq_finaleFheep,
- &KyraEngine_HoF::seq_finaleFarmer, &KyraEngine_HoF::seq_finaleFuards,
- &KyraEngine_HoF::seq_finaleFirates, &KyraEngine_HoF::seq_finaleFrash
- };
-
- static const SeqProc hofNestedSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_finaleFiggle, &KyraEngine_HoF::seq_introOver1,
- &KyraEngine_HoF::seq_introOver2, &KyraEngine_HoF::seq_introForest,
- &KyraEngine_HoF::seq_introDragon, &KyraEngine_HoF::seq_introDarm,
- &KyraEngine_HoF::seq_introLibrary2, &KyraEngine_HoF::seq_introLibrary2,
- &KyraEngine_HoF::seq_introMarco, &KyraEngine_HoF::seq_introHand1a,
- &KyraEngine_HoF::seq_introHand1b, &KyraEngine_HoF::seq_introHand1c,
- &KyraEngine_HoF::seq_introHand2, &KyraEngine_HoF::seq_introHand3, 0
- };
-
- static const SeqProc hofDemoSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_demoVirgin, &KyraEngine_HoF::seq_demoWestwood,
- &KyraEngine_HoF::seq_demoTitle, &KyraEngine_HoF::seq_demoHill,
- &KyraEngine_HoF::seq_demoOuthome, &KyraEngine_HoF::seq_demoWharf,
- &KyraEngine_HoF::seq_demoDinob, &KyraEngine_HoF::seq_demoFisher, 0
- };
-
- static const SeqProc hofDemoNestedSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_demoWharf2, &KyraEngine_HoF::seq_demoDinob2,
- &KyraEngine_HoF::seq_demoWater, &KyraEngine_HoF::seq_demoBail,
- &KyraEngine_HoF::seq_demoDig, 0
- };
-
-#ifdef ENABLE_LOL
- static const SeqProc kLoLDemoSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_lolDemoScene1, 0, &KyraEngine_HoF::seq_lolDemoScene2, 0,
- &KyraEngine_HoF::seq_lolDemoScene3, 0, &KyraEngine_HoF::seq_lolDemoScene4, 0,
- &KyraEngine_HoF::seq_lolDemoScene5, &KyraEngine_HoF::seq_lolDemoText5,
- &KyraEngine_HoF::seq_lolDemoScene6, 0
- };
-
- static const SeqProc kLoLDemoNestedSequenceCallbacks[] = { 0 };
-#endif // ENABLE_LOL
-
- _callbackS =
-#ifdef ENABLE_LOL
- _flags.gameID == GI_LOL ? kLoLDemoSequenceCallbacks :
-#endif // ENABLE_LOL
- ((_flags.isDemo && !_flags.isTalkie) ? hofDemoSequenceCallbacks : hofSequenceCallbacks);
-
- _callbackN =
-#ifdef ENABLE_LOL
- _flags.gameID == GI_LOL ? kLoLDemoNestedSequenceCallbacks :
-#endif // ENABLE_LOL
- ((_flags.isDemo && !_flags.isTalkie) ? hofDemoNestedSequenceCallbacks : hofNestedSequenceCallbacks);
}
void KyraEngine_MR::initStaticResource() {
@@ -1412,8 +1297,6 @@ const int GUI_v2::_sliderBarsPosition[] = {
// kyra 2 static res
-const uint8 KyraEngine_HoF::_seqTextColorPresets[] = { 0x01, 0x01, 0x00, 0x3f, 0x3f, 0x3f };
-
const char *const KyraEngine_HoF::_languageExtension[] = {
"ENG",
"FRE",
@@ -1631,7 +1514,7 @@ void KyraEngine_HoF::initInventoryButtonList() {
_inventoryButtons[i].buttonCallback = inventoryCallback;
_buttonList = &_inventoryButtons[0];
- for (size_t i = 1; i < 15; ++i)
+ for (int i = 1; i < 15; ++i)
_buttonList = _gui->addButtonToList(_buttonList, &_inventoryButtons[i]);
}
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index 7a5012f117..79f018c53e 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -465,13 +465,13 @@ void EoBCoreEngine::initStaticResource() {
// EOB I doesn't have load and save menus, because there is only one single
// save slot. Instead of emulating this we provide a menu similiar to EOB II.
- static const char *saveLoadStrings[3][4] = {
+ static const char *const saveLoadStrings[3][4] = {
{ "Cancel", "Empty Slot", "Save Game", "Load Game" },
{ "Abbr.", "Leerer Slot", "Speichern", " Laden" },
{ 0, 0, 0, 0 }
};
- static const char *errorSlotEmptyString[3] = {
+ static const char *const errorSlotEmptyString[3] = {
"There is no game\rsaved in that slot!",
"Hier ist noch kein\rSpiel gespeichert!",
0
@@ -1096,7 +1096,7 @@ void EoBEngine::initStaticResource() {
p->dmgModifierEvade = *ps++;
}
- static const char *errorSlotNoNameString[3] = {
+ static const char *const errorSlotNoNameString[3] = {
" You must specify\r a name for your\r save game!",
" Spielstaende mues-\r sen einen Namen\r haben!",
0
@@ -1187,7 +1187,7 @@ void EoBEngine::initSpells() {
const KyraRpgGUISettings EoBEngine::_guiSettingsVGA = {
{ 9, 15, 95, 9, 7, { 285, 139 }, { 189, 162 }, { 31, 31 } },
- { 135, 130, 132, 133, 133, 17, 23, 20, 184, 177, 180, 184, 177, 180 }
+ { 135, 130, 132, 133, 133, 17, 23, 20, 184, 177, 180, 184, 177, 180 }
};
const KyraRpgGUISettings EoBEngine::_guiSettingsEGA = {
@@ -1210,7 +1210,7 @@ void DarkMoonEngine::initStaticResource() {
_animIntro[i] = _staticres->loadEoB2SeqData(kEob2IntroAnimData00 + i, temp);
_shapesIntro = new const DarkMoonShapeDef*[13];
- memset(_shapesIntro, 0, sizeof(DarkMoonShapeDef*) * 13);
+ memset(_shapesIntro, 0, sizeof(DarkMoonShapeDef *) * 13);
_shapesIntro[0] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes00, temp);
_shapesIntro[1] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes01, temp);
_shapesIntro[4] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes04, temp);
@@ -1225,7 +1225,7 @@ void DarkMoonEngine::initStaticResource() {
_animFinale[i] = _staticres->loadEoB2SeqData(kEob2FinaleAnimData00 + i, temp);
_shapesFinale = new const DarkMoonShapeDef*[13];
- memset(_shapesFinale, 0, sizeof(DarkMoonShapeDef*) * 13);
+ memset(_shapesFinale, 0, sizeof(DarkMoonShapeDef *) * 13);
_shapesFinale[0] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes00, temp);
_shapesFinale[3] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes03, temp);
_shapesFinale[7] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes07, temp);
@@ -1249,7 +1249,7 @@ void DarkMoonEngine::initStaticResource() {
_wallOfForceDsNumH = _staticres->loadRawData(kEoB2WallOfForceNumH, temp);
_wallOfForceShpId = _staticres->loadRawData(kEoB2WallOfForceShpId, temp);
- static const char *errorSlotNoNameString[3] = {
+ static const char *const errorSlotNoNameString[3] = {
" You must specify\r a name for your\r save game!",
" Spielst[nde m]ssen\r einen Namen haben!",
0
@@ -1258,7 +1258,7 @@ void DarkMoonEngine::initStaticResource() {
_errorSlotNoNameString = errorSlotNoNameString[(_flags.lang == Common::EN_ANY) ? 0 : ((_flags.lang == Common::DE_DEU) ? 1 : 2)];
// ScummVM specific
- static const char *transferStringsScummVM[3][5] = {
+ static const char *const transferStringsScummVM[3][5] = {
{
"\r We cannot find any EOB save game\r file. Please make sure that the\r save game file with the party\r you wish to transfer is located\r in your ScummVM save game\r directory. If you have set up\r multiple save directories you\r have to copy the EOB save file\r into your EOB II save directory.\r Do you wish to try again?",
"Game ID",
@@ -1300,7 +1300,7 @@ void DarkMoonEngine::initSpells() {
}
}
-const char *DarkMoonEngine::_palFilesIntroVGA[] = {
+const char *const DarkMoonEngine::_palFilesIntroVGA[] = {
"PALETTE1.PAL",
"PALETTE3.PAL",
"PALETTE2.PAL",
@@ -1308,7 +1308,7 @@ const char *DarkMoonEngine::_palFilesIntroVGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesIntroEGA[] = {
+const char *const DarkMoonEngine::_palFilesIntroEGA[] = {
"PALETTE0.PAL",
"PALETTE3.PAL",
"PALETTE2.PAL",
@@ -1316,7 +1316,7 @@ const char *DarkMoonEngine::_palFilesIntroEGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesFinaleVGA[] = {
+const char *const DarkMoonEngine::_palFilesFinaleVGA[] = {
"FINALE_0.PAL",
"FINALE_0.PAL",
"FINALE_1.PAL",
@@ -1329,7 +1329,7 @@ const char *DarkMoonEngine::_palFilesFinaleVGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesFinaleEGA[] = {
+const char *const DarkMoonEngine::_palFilesFinaleEGA[] = {
"FINALE_0.PAL",
"FINALE_0.PAL",
"FINALE_1.PAL",
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index 63bc7fa99b..f97424005d 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -24,6 +24,7 @@
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
#include "kyra/gui_lol.h"
+#include "kyra/sound_intern.h"
#ifdef ENABLE_LOL
@@ -213,30 +214,30 @@ void StaticResource::freeButtonDefs(void *&ptr, int &size) {
}
void LoLEngine::initStaticResource() {
- // assign music data
- static const char *const pcMusicFileListIntro[] = { "LOREINTR" };
- static const char *const pcMusicFileListFinale[] = { "LOREFINL" };
- static const char *const pcMusicFileListIngame[] = { "LORE%02d%c" };
-
- static const char *const pc98MusicFileListIntro[] = { 0, "lore84.86", "lore82.86", 0, 0, 0, "lore83.86", "lore81.86" };
- static const char *const pc98MusicFileListFinale[] = { 0, 0, "lore85.86", "lore86.86", "lore87.86" };
- static const char *const pc98MusicFileListIngame[] = { "lore%02d.86" };
-
- memset(_soundData, 0, sizeof(_soundData));
+ // assign music resource data.
if (_flags.platform == Common::kPlatformPC) {
- _soundData[0].fileList = pcMusicFileListIntro;
- _soundData[0].fileListLen = ARRAYSIZE(pcMusicFileListIntro);
- _soundData[1].fileList = pcMusicFileListIngame;
- _soundData[1].fileListLen = ARRAYSIZE(pcMusicFileListIngame);
- _soundData[2].fileList = pcMusicFileListFinale;
- _soundData[2].fileListLen = ARRAYSIZE(pcMusicFileListFinale);
+ if (_flags.isDemo) {
+ static const char *const file[] = { "LOREDEMO" };
+ SoundResourceInfo_PC resInfoDemo(file, ARRAYSIZE(file));
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoDemo);
+ } else {
+ static const char *const intro[] = { "LOREINTR" };
+ static const char *const finale[] = { "LOREFINL" };
+ SoundResourceInfo_PC resInfoIntro(intro, ARRAYSIZE(intro));
+ SoundResourceInfo_PC resInfoFinale(finale, ARRAYSIZE(finale));
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ // In game music file handling is different, thus does not need a file list.
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
+ }
} else if (_flags.platform == Common::kPlatformPC98) {
- _soundData[0].fileList = pc98MusicFileListIntro;
- _soundData[0].fileListLen = ARRAYSIZE(pc98MusicFileListIntro);
- _soundData[1].fileList = pc98MusicFileListIngame;
- _soundData[1].fileListLen = ARRAYSIZE(pc98MusicFileListIngame);
- _soundData[2].fileList = pc98MusicFileListFinale;
- _soundData[2].fileListLen = ARRAYSIZE(pc98MusicFileListFinale);
+ static const char *const fileListIntro[] = { 0, "lore84.86", "lore82.86", 0, 0, 0, "lore83.86", "lore81.86" };
+ static const char *const fileListFinale[] = { 0, 0, "lore85.86", "lore86.86", "lore87.86" };
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(fileListIntro, ARRAYSIZE(fileListIntro), 0, 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "lore%02d.86", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(fileListFinale, ARRAYSIZE(fileListFinale), 0, 0, 0);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
}
if (_flags.isDemo)
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index 5664929948..ef07de0180 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -143,6 +143,7 @@ static const PlainGameDescriptor mohawkGames[] = {
{"harryhh","Harry and the Haunted House"},
{"stellaluna", "Stellaluna"},
{"sheila", "Sheila Rae, the Brave"},
+ {"rugratsps", "Rugrats Print Shop" },
{0, 0}
};
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 55814af1c3..fc7dfce9bb 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -2096,6 +2096,24 @@ static const MohawkGameDescription gameDescriptions[] = {
0
},
+ // Rugrats Adventure Game
+ // English Windows Demo
+ // From GeorgeQGreg (Rugrats Movie Soundtrack)
+ {
+ {
+ "rugrats",
+ "Demo",
+ AD_ENTRY1("outline", "adbd7ff6c5e1bdb7062c89879a4e39e6"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_LIVINGBOOKSV4,
+ 0,
+ 0
+ },
+
{
{
"lbsampler",
@@ -2507,6 +2525,24 @@ static const MohawkGameDescription gameDescriptions[] = {
0
},
+ // Rugrats Print Shop
+ // English Windows Demo
+ // From GeorgeQGreg (Rugrats Movie Soundtrack)
+ {
+ {
+ "rugratsps",
+ "Demo",
+ AD_ENTRY1("outline", "808d5ee8427180ddebdd5dd4199b47cb"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_LIVINGBOOKSV4,
+ 0,
+ 0
+ },
+
{ AD_TABLE_END_MARKER, 0, 0, 0 }
};
diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp
index e7f1b1b1ed..e60349ffa8 100644
--- a/engines/parallaction/parser_br.cpp
+++ b/engines/parallaction/parser_br.cpp
@@ -325,6 +325,7 @@ DECLARE_LOCATION_PARSER(location) {
nextToken = 2;
}
+ debugC(7, kDebugParser, "flip: %d", flip);
// TODO: handle background horizontal flip (via a context parameter)
if (_tokens[nextToken][0] != '\0') {
diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp
index 75c287c7a6..59814a753d 100644
--- a/engines/pegasus/movie.cpp
+++ b/engines/pegasus/movie.cpp
@@ -161,9 +161,10 @@ void Movie::setTime(const TimeValue time, const TimeScale scale) {
}
void Movie::setRate(const Common::Rational rate) {
- if (rate != 1 && rate != 0) {
- warning("Cannot set movie rate");
- start();
+ if (_video) {
+ _video->setRate(rate);
+
+ TimeBase::setRate(_video->getRate());
return;
}
diff --git a/engines/pegasus/neighborhood/neighborhood.cpp b/engines/pegasus/neighborhood/neighborhood.cpp
index 07be62c957..38366c4ba2 100644
--- a/engines/pegasus/neighborhood/neighborhood.cpp
+++ b/engines/pegasus/neighborhood/neighborhood.cpp
@@ -1761,10 +1761,10 @@ void Neighborhood::pauseTimer() {
}
void Neighborhood::resumeTimer() {
- // NOTE: Yes, this function calls pauseFuse!
- // Looks like an original game bug, will need
- // to investigate how this affects gameplay.
- _eventTimer.pauseFuse();
+ // NOTE: The original calls pauseFuse() here, which causes a bug with the robot
+ // in WSC on the catwalk, causing him never to come after you if you don't act
+ // against him.
+ _eventTimer.resumeFuse();
}
bool Neighborhood::timerPaused() {
diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
index b598841b45..9b843da5d6 100644
--- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
@@ -622,6 +622,13 @@ void RipTimer::draw(const Common::Rect &updateRect) {
}
void RipTimer::timeChanged(const TimeValue newTime) {
+ // WORKAROUND: If the timer isn't running, don't run the following code.
+ // Fixes use of the code when it shouldn't be running (since this is an
+ // IdlerAnimation, this is called on useIdleTime() but this specific
+ // timer only makes sense when used as an actual timer).
+ if (!isRunning())
+ return;
+
Common::Rect bounds;
getBounds(bounds);
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 420ca39331..502a79ec25 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -33,6 +33,7 @@
#include "common/textconsole.h"
#include "common/translation.h"
#include "common/random.h"
+#include "backends/keymapper/keymapper.h"
#include "base/plugins.h"
#include "base/version.h"
#include "gui/saveload.h"
@@ -151,6 +152,7 @@ Common::Error PegasusEngine::run() {
}
// Set up input
+ initKeymap();
InputHandler::setInputHandler(this);
allowInput(true);
@@ -818,7 +820,8 @@ void PegasusEngine::doGameMenuCommand(const GameMenuCommand command) {
case kMenuCmdDeathQuitDemo:
if (isDemo())
showTempScreen("Images/Demo/NGquitScrn.pict");
- _system->quit();
+ _gfx->doFadeOutSync();
+ quitGame();
break;
case kMenuCmdOverview:
stopIntroTimer();
@@ -1132,8 +1135,12 @@ void PegasusEngine::doInterfaceOverview() {
controllerHighlight.hide();
}
- overviewText.setTime(time * 3 + 2, 15);
- overviewText.redrawMovieWorld();
+ // The original just constantly redraws the frame, but that
+ // doesn't actually need to be done.
+ if ((time * 3 + 2) * 40 != overviewText.getTime()) {
+ overviewText.setTime(time * 3 + 2, 15);
+ overviewText.redrawMovieWorld();
+ }
refreshDisplay();
_system->delayMillis(10);
@@ -2344,4 +2351,41 @@ uint PegasusEngine::getNeighborhoodCD(const NeighborhoodID neighborhood) const {
return 1;
}
+void PegasusEngine::initKeymap() {
+#ifdef ENABLE_KEYMAPPER
+ static const char *const kKeymapName = "pegasus";
+ Common::Keymapper *const mapper = _eventMan->getKeymapper();
+
+ // Do not try to recreate same keymap over again
+ if (mapper->getKeymap(kKeymapName) != 0)
+ return;
+
+ Common::Keymap *const engineKeyMap = new Common::Keymap(kKeymapName);
+
+ // Since the game has multiple built-in keys for each of these anyway,
+ // this just attempts to remap one of them.
+ const Common::KeyActionEntry keyActionEntries[] = {
+ { Common::KEYCODE_UP, "UP", _("Up/Zoom In/Move Forward/Open Doors") },
+ { Common::KEYCODE_DOWN, "DWN", _("Down/Zoom Out") },
+ { Common::KEYCODE_LEFT, "TL", _("Turn Left") },
+ { Common::KEYCODE_RIGHT, "TR", _("Turn Right") },
+ { Common::KEYCODE_BACKQUOTE, "TIV", _("Display/Hide Inventory Tray") },
+ { Common::KEYCODE_BACKSPACE, "TBI", _("Display/Hide Biochip Tray") },
+ { Common::KEYCODE_RETURN, "ENT", _("Action/Select") },
+ { Common::KEYCODE_t, "TMA", _("Toggle Center Data Display") },
+ { Common::KEYCODE_i, "TIN", _("Display/Hide Info Screen") },
+ { Common::KEYCODE_ESCAPE, "PM", _("Display/Hide Pause Menu") },
+ { Common::KEYCODE_e, "WTF", _("???") } // easter egg key (without being completely upfront about it)
+ };
+
+ for (uint i = 0; i < ARRAYSIZE(keyActionEntries); i++) {
+ Common::Action *const act = new Common::Action(engineKeyMap, keyActionEntries[i].id, keyActionEntries[i].description);
+ act->addKeyEvent(keyActionEntries[i].ks);
+ }
+
+ mapper->addGameKeymap(engineKeyMap);
+ mapper->pushKeymap(kKeymapName, true);
+#endif
+}
+
} // End of namespace Pegasus
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index 2a8ba22470..a8f2e1ffca 100644
--- a/engines/pegasus/pegasus.h
+++ b/engines/pegasus/pegasus.h
@@ -265,6 +265,7 @@ private:
void doSubChase();
uint getNeighborhoodCD(const NeighborhoodID neighborhood) const;
uint _currentCD;
+ void initKeymap();
// Menu
GameMenu *_gameMenu;
diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp
index 704019641b..474f72eca5 100644
--- a/engines/queen/journal.cpp
+++ b/engines/queen/journal.cpp
@@ -400,7 +400,7 @@ static void removeLeadingAndTrailingSpaces(char *dst, size_t dstSize, const char
while (src[lastNonSpaceIndex] == ' ')
--lastNonSpaceIndex;
- size_t newLen = lastNonSpaceIndex - firstNonSpaceIndex + 1;
+ uint newLen = lastNonSpaceIndex - firstNonSpaceIndex + 1;
assert(newLen < dstSize);
for (size_t i = 0; i < newLen; ++i) {
dst[i] = src[firstNonSpaceIndex + i];
@@ -559,7 +559,7 @@ void Journal::updateTextField(uint16 ascii, int keycode) {
}
break;
default:
- if (isprint((char)ascii) &&
+ if (Common::isPrint((char)ascii) &&
_textField.textCharsCount < (sizeof(_textField.text) - 1) &&
_vm->display()->textWidth(_textField.text) < _textField.w) {
_textField.text[_textField.textCharsCount] = (char)ascii;
diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp
index 94bc105bb0..1531510ba4 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -96,7 +96,6 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
}
int16 oldLevel = 0;
- bool personWalking = false; // FIXME: unused
// Lines 828-846 in talk.c
for (i = 1; i <= 4; i++) {
@@ -174,8 +173,7 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
if (1 == choicesLeft) {
// Automatically run the final dialogue option
- if (speak(_talkString[0], &person, otherVoiceFilePrefix))
- personWalking = true;
+ speak(_talkString[0], &person, otherVoiceFilePrefix);
if (_vm->input()->talkQuit())
break;
@@ -251,8 +249,7 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
findDialogueString(_person1PtrOff, head, _pMax, _talkString[0]);
if (_talkString[0][0] != '\0') {
sprintf(otherVoiceFilePrefix, "%2d%4xP", _talkKey, head);
- if (speak(_talkString[0], &person, otherVoiceFilePrefix))
- personWalking = true;
+ speak(_talkString[0], &person, otherVoiceFilePrefix);
}
}
}
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index 9c178559f2..f6872c41ad 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -156,7 +156,8 @@ bool SagaMetaEngine::hasFeature(MetaEngineFeature f) const {
(f == kSupportsDeleteSave) ||
(f == kSavesSupportMetaInfo) ||
(f == kSavesSupportThumbnail) ||
- (f == kSavesSupportCreationDate);
+ (f == kSavesSupportCreationDate) ||
+ (f == kSavesSupportPlayTime);
}
bool Saga::SagaEngine::hasFeature(EngineFeature f) const {
@@ -270,7 +271,10 @@ SaveStateDescriptor SagaMetaEngine::querySaveMetaInfos(const char *target, int s
desc.setSaveTime(hour, minutes);
- // TODO: played time
+ if (version >= 8) {
+ uint32 playTime = in->readUint32BE();
+ desc.setPlayTime(playTime * 1000);
+ }
}
delete in;
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index ec3ef2f6f9..d98cef0740 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -332,13 +332,22 @@ int Events::handleOneShot(Event *event) {
#ifdef ENABLE_IHNM
if (_vm->getGameId() == GID_IHNM) {
+ PalEntry portraitBgColor = _vm->_interface->_portraitBgColor;
+ byte portraitColor = (_vm->getLanguage() == Common::ES_ESP) ? 253 : 254;
+
+ // Set the portrait bg color, in case a saved state is restored from the
+ // launcher. In this case, sfSetPortraitBgColor is not called, thus the
+ // portrait color will always be 0 (black).
+ if (portraitBgColor.red == 0 && portraitBgColor.green == 0 && portraitBgColor.blue == 0)
+ portraitBgColor.green = 255;
+
if (_vm->_spiritualBarometer > 255)
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait, 0xff, 0xff, 0xff);
+ _vm->_gfx->setPaletteColor(portraitColor, 0xff, 0xff, 0xff);
else
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.red / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.green / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.blue / 256);
+ _vm->_gfx->setPaletteColor(portraitColor,
+ _vm->_spiritualBarometer * portraitBgColor.red / 256,
+ _vm->_spiritualBarometer * portraitBgColor.green / 256,
+ _vm->_spiritualBarometer * portraitBgColor.blue / 256);
}
#endif
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 13850a0b6d..0eebf3f175 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -30,6 +30,7 @@
#include "audio/audiostream.h"
#include "audio/mididrv.h"
#include "audio/midiparser.h"
+#include "audio/midiparser_qt.h"
#include "audio/decoders/raw.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -76,19 +77,14 @@ void MusicDriver::play(SagaEngine *vm, ByteArray *buffer, bool loop) {
}
// Check if the game is using XMIDI or SMF music
- if (vm->getGameId() == GID_IHNM && vm->isMacResources()) {
- // Just set an XMIDI parser for Mac IHNM for now
+ if (!memcmp(buffer->getBuffer(), "FORM", 4)) {
_parser = MidiParser::createParser_XMIDI();
+ // ITE had MT32 mapped instruments
+ _isGM = (vm->getGameId() != GID_ITE);
} else {
- if (!memcmp(buffer->getBuffer(), "FORM", 4)) {
- _parser = MidiParser::createParser_XMIDI();
- // ITE had MT32 mapped instruments
- _isGM = (vm->getGameId() != GID_ITE);
- } else {
- _parser = MidiParser::createParser_SMF();
- // ITE with standalone MIDI files is General MIDI
- _isGM = (vm->getGameId() == GID_ITE);
- }
+ _parser = MidiParser::createParser_SMF();
+ // ITE with standalone MIDI files is General MIDI
+ _isGM = (vm->getGameId() == GID_ITE);
}
if (!_parser->loadMusic(buffer->getBuffer(), buffer->size()))
@@ -107,6 +103,27 @@ void MusicDriver::play(SagaEngine *vm, ByteArray *buffer, bool loop) {
_isPlaying = true;
}
+void MusicDriver::playQuickTime(const Common::String &musicName, bool loop) {
+ // IHNM Mac uses QuickTime MIDI
+ _parser = MidiParser::createParser_QT();
+ _isGM = true;
+
+ if (!((MidiParser_QT *)_parser)->loadFromContainerFile(musicName))
+ error("MusicDriver::playQuickTime(): Failed to load file '%s'", musicName.c_str());
+
+ _parser->setTrack(0);
+ _parser->setMidiDriver(this);
+ _parser->setTimerRate(_driver->getBaseTempo());
+ _parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1);
+ _parser->property(MidiParser::mpSendSustainOffOnNotesOff, 1);
+
+ // Handle music looping
+ _parser->property(MidiParser::mpAutoLoop, loop);
+// _isLooping = loop;
+
+ _isPlaying = true;
+}
+
void MusicDriver::pause() {
_isPlaying = false;
}
@@ -343,31 +360,19 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
// Load MIDI/XMI resource data
if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
- // Load the external music file for Mac IHNM
-#if 0
- Common::File musicFile;
- char musicFileName[40];
- sprintf(musicFileName, "Music/Music%02x", resourceId);
- musicFile.open(musicFileName);
- resourceSize = musicFile.size();
- resourceData = new byte[resourceSize];
- musicFile.read(resourceData, resourceSize);
- musicFile.close();
-
- // TODO: The Mac music format is unsupported (QuickTime MIDI)
- // so stop here
-#endif
- return;
+ // Load the external music file for Mac IHNM
+ _player->playQuickTime(Common::String::format("Music/Music%02x", resourceId), flags & MUSIC_LOOP);
} else {
if (_currentMusicBuffer == &_musicBuffer[1]) {
_currentMusicBuffer = &_musicBuffer[0];
} else {
_currentMusicBuffer = &_musicBuffer[1];
}
+
_vm->_resource->loadResource(_musicContext, resourceId, *_currentMusicBuffer);
+ _player->play(_vm, _currentMusicBuffer, (flags & MUSIC_LOOP));
}
- _player->play(_vm, _currentMusicBuffer, (flags & MUSIC_LOOP));
setVolume(_vm->_musicVolume);
}
diff --git a/engines/saga/music.h b/engines/saga/music.h
index 5a4e662af4..081fab21f6 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -46,6 +46,7 @@ public:
MusicDriver();
void play(SagaEngine *vm, ByteArray *buffer, bool loop);
+ void playQuickTime(const Common::String &musicName, bool loop);
virtual void pause();
virtual void resume();
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 6e272d37c0..239a3be9db 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -202,6 +202,8 @@ SagaEngine::~SagaEngine() {
}
Common::Error SagaEngine::run() {
+ setTotalPlayTime(0);
+
// Assign default values to the config manager, in case settings are missing
ConfMan.registerDefault("talkspeed", "255");
ConfMan.registerDefault("subtitles", "true");
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 829425aeaf..01cab21f5d 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -395,9 +395,7 @@ enum ColorId {
kITEColorBlue = 0x93,
kITEColorLightBlue94 = 0x94,
kITEColorLightBlue96 = 0x96,
- kITEColorGreen = 0xba,
-
- kIHNMColorPortrait = 0xfe
+ kITEColorGreen = 0xba
};
enum KnownColor {
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 6a5a7d8e14..3cd44eba40 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -34,7 +34,7 @@
#include "saga/scene.h"
#include "saga/script.h"
-#define CURRENT_SAGA_VER 7
+#define CURRENT_SAGA_VER 8
namespace Saga {
@@ -204,10 +204,11 @@ void SagaEngine::save(const char *fileName, const char *saveName) {
uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
+ uint32 playTime = g_engine->getTotalPlayTime() / 1000;
out->writeUint32BE(saveDate);
out->writeUint16BE(saveTime);
- // TODO: played time
+ out->writeUint32BE(playTime);
// Surrounding scene
out->writeSint32LE(_scene->getOutsetSceneNumber());
@@ -299,7 +300,11 @@ void SagaEngine::load(const char *fileName) {
in->readUint32BE(); // save date
in->readUint16BE(); // save time
- // TODO: played time
+
+ if (_saveHeader.version >= 8) {
+ uint32 playTime = in->readUint32BE();
+ g_engine->setTotalPlayTime(playTime * 1000);
+ }
}
// Clear pending events here, and don't process queued music events
diff --git a/engines/saga/sfuncs_ihnm.cpp b/engines/saga/sfuncs_ihnm.cpp
index 3fbf3b6e67..fdfd0fdf2c 100644
--- a/engines/saga/sfuncs_ihnm.cpp
+++ b/engines/saga/sfuncs_ihnm.cpp
@@ -168,17 +168,25 @@ void Script::sfSetChapterPoints(SCRIPTFUNC_PARAMS) {
_vm->_ethicsPoints[chapter] = thread->pop();
int16 barometer = thread->pop();
static PalEntry cur_pal[PAL_ENTRIES];
+ PalEntry portraitBgColor = _vm->_interface->_portraitBgColor;
+ byte portraitColor = (_vm->getLanguage() == Common::ES_ESP) ? 253 : 254;
_vm->_spiritualBarometer = _vm->_ethicsPoints[chapter] * 256 / barometer;
_vm->_scene->setChapterPointsChanged(true); // don't save this music when saving in IHNM
+ // Set the portrait bg color, in case a saved state is restored from the
+ // launcher. In this case, sfSetPortraitBgColor is not called, thus the
+ // portrait color will always be 0 (black).
+ if (portraitBgColor.red == 0 && portraitBgColor.green == 0 && portraitBgColor.blue == 0)
+ portraitBgColor.green = 255;
+
if (_vm->_spiritualBarometer > 255)
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait, 0xff, 0xff, 0xff);
+ _vm->_gfx->setPaletteColor(portraitColor, 0xff, 0xff, 0xff);
else
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.red / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.green / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.blue / 256);
+ _vm->_gfx->setPaletteColor(portraitColor,
+ _vm->_spiritualBarometer * portraitBgColor.red / 256,
+ _vm->_spiritualBarometer * portraitBgColor.green / 256,
+ _vm->_spiritualBarometer * portraitBgColor.blue / 256);
_vm->_gfx->getCurrentPal(cur_pal);
_vm->_gfx->setPalette(cur_pal);
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 8e8b818854..736d0b7ddc 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -581,6 +581,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ // Freddy Pharkas - French DOS Floppy (supplied by misterhands in bug report #3589449)
+ // Executable scanning reports "1.cfs.081"
+ {"freddypharkas", "Floppy", {
+ {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816},
+ {"resource.000", 0, "fed4808fdb72486908ac7ad0044b14d8", 5233230},
+ {"resource.msg", 0, "4dc478f5c73b57e5d690bdfffdcf1c44", 816518},
+ AD_LISTEND},
+ Common::FR_FRA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
// Freddy Pharkas - Windows (supplied by abevi in bug report #2612718)
// Executable scanning reports "1.cfs.081"
// SCI interpreter version 1.001.132 (just a guess)
@@ -3121,6 +3130,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::DE_DEU, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ // Quest for Glory 3 - French DOS v1.1 (supplied by misterhands in bug report #3586214)
+ // Executable scanning reports "L.rry.083"
+ {"qfg3", "", {
+ {"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958},
+ {"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868000},
+ {"resource.msg", 0, "0fa1047002df904b8d1807bb7bab4fab", 267210},
+ AD_LISTEND},
+ Common::FR_FRA, Common::kPlatformPC, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
// Quest for Glory 3 - Spanish DOS CD (from jvprat)
// Executable scanning reports "L.rry.083", VERSION file reports "1.000.000, June 30, 1994"
{"qfg3", "", {
@@ -3281,7 +3299,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.msg", 0, "1aeafe2b495de288d002109650b66614", 1364},
{"resource.000", 0, "8e10d4f05c1fd9f883384fa38a898489", 377394},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Slater & Charlie Go Camping - English DOS/Windows
{"slater", "", {
@@ -3289,7 +3307,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044},
{"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformPC, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Slater & Charlie Go Camping - English DOS/Windows (Sierra Originals)
@@ -3298,7 +3316,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044},
{"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformPC, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Slater & Charlie Go Camping - English Macintosh
{"slater", "", {
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index ff3f19b53d..b2d95c599e 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -696,8 +696,9 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsSint32LE(_palVaryPaused);
}
+ _palVarySignal = 0;
+
if (s.isLoading() && _palVaryResourceId != -1) {
- _palVarySignal = 0;
palVaryInstallTimer();
}
}
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 53d69cdcca..52d44647e2 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -386,9 +386,9 @@ void GfxPalette::setRemappingPercentGray(byte color, byte percent) {
// Note: This is not what the original does, but the results are the same visually
for (int i = 0; i < 256; i++) {
- byte rComponent = _sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100;
- byte gComponent = _sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100;
- byte bComponent = _sysPalette.colors[i].b * _remappingPercentToSet * 0.11 / 100;
+ byte rComponent = (byte)(_sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100);
+ byte gComponent = (byte)(_sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100);
+ byte bComponent = (byte)(_sysPalette.colors[i].b * _remappingPercentToSet * 0.11 / 100);
byte luminosity = rComponent + gComponent + bComponent;
_remappingByPercent[i] = kernelFindColor(luminosity, luminosity, luminosity);
}
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 15b18ce8e6..1f5c354d1f 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -699,9 +699,11 @@ void SciEngine::runGame() {
patchGameSaveRestore();
setLauncherLanguage();
_gamestate->gameIsRestarting = GAMEISRESTARTING_RESTART;
+ _gamestate->_throttleLastTime = 0;
if (_gfxMenu)
_gfxMenu->reset();
_gamestate->abortScriptProcessing = kAbortNone;
+ _gamestate->_syncedAudioOptions = false;
} else if (_gamestate->abortScriptProcessing == kAbortLoadGame) {
_gamestate->abortScriptProcessing = kAbortNone;
_gamestate->_executionStack.clear();
@@ -713,6 +715,7 @@ void SciEngine::runGame() {
syncSoundSettings();
syncIngameAudioOptions();
+ // Games do not set their audio settings when loading
} else {
break; // exit loop
}
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index dc5acbdb7d..9b6dd1e687 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -741,10 +741,6 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
"Silence", "Shaping", "Unmaking",
"Transcendence"
};
- int odds[] = {
- 15162, 15676, 16190, 64, 16961, 17475, 17989, 18503,
- 73, 19274, 76, 77, 20302, 20816, 21330, 84
- };
const char *notes = "cdefgabC";
int i, base, draft;
@@ -754,9 +750,9 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
return true;
}
- // There are 16 drafts, stored from variable 50 or 100 and upwards.
- // Each draft occupies two variables. Even-numbered variables contain
- // the notes for each draft, and a number of flags:
+ // There are 16 drafts, stored from variable 50, 55 or 100 and upwards.
+ // Each draft occupies two variables, the first of which contains the
+ // notes for the draft and a number of flags.
//
// +---+---+---+---+-----+-----+-----+-----+
// | A | B | C | D | 444 | 333 | 222 | 111 |
@@ -771,13 +767,16 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
// 222 The second note
// 111 The first note
//
- // I don't yet know what the odd-numbered variables are used for.
- // Possibly they store information on where and/or how the draft can
- // be used. They appear to remain constant throughout the game.
+ // I don't yet know what the second variable is used for. Possibly to
+ // store information on where and/or how the draft can be used. They
+ // appear to remain constant throughout the game.
if (_vm->_game.version == 4 || _vm->_game.platform == Common::kPlatformPCEngine) {
// DOS CD version / PC-Engine version
base = 100;
+ } else if (_vm->_game.platform == Common::kPlatformMacintosh) {
+ // Macintosh version
+ base = 55;
} else {
// All (?) other versions
base = 50;
@@ -801,28 +800,13 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
DebugPrintf("Learned all drafts and notes.\n");
return true;
}
-
- // During the testing of EGA Loom we had some trouble with the
- // drafts data structure being overwritten. I don't expect
- // this command is particularly useful any more, but it will
- // attempt to repair the (probably) static part of it.
-
- if (strcmp(argv[1], "fix") == 0) {
- for (i = 0; i < 16; i++)
- _vm->_scummVars[base + 2 * i + 1] = odds[i];
- DebugPrintf(
- "An attempt has been made to repair\n"
- "the internal drafts data structure.\n"
- "Continue on your own risk.\n");
- return true;
- }
}
// Probably the most useful command for ordinary use: list the drafts.
for (i = 0; i < 16; i++) {
draft = _vm->_scummVars[base + i * 2];
- DebugPrintf("%d %-13s %c%c%c%c %c%c %5d %c\n",
+ DebugPrintf("%d %-13s %c%c%c%c %c%c\n",
base + 2 * i,
names[i],
notes[draft & 0x0007],
@@ -830,9 +814,7 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
notes[(draft & 0x01c0) >> 6],
notes[(draft & 0x0e00) >> 9],
(draft & 0x2000) ? 'K' : ' ',
- (draft & 0x4000) ? 'U' : ' ',
- _vm->_scummVars[base + 2 * i + 1],
- (_vm->_scummVars[base + 2 * i + 1] != odds[i]) ? '!' : ' ');
+ (draft & 0x4000) ? 'U' : ' ');
}
return true;
diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp
index 89c16a8bb5..5e928f3d44 100644
--- a/engines/scumm/imuse/imuse_part.cpp
+++ b/engines/scumm/imuse/imuse_part.cpp
@@ -111,8 +111,19 @@ void Part::saveLoadWithSerializer(Serializer *ser) {
}
void Part::set_detune(int8 detune) {
- _detune_eff = clamp((_detune = detune) + _player->getDetune(), -128, 127);
- sendPitchBend();
+ // Sam&Max does not have detune, so we just ignore this here. We still get
+ // this called, since Sam&Max uses the same controller for a different
+ // purpose.
+ if (_se->_game_id == GID_SAMNMAX) {
+#if 0
+ if (_mc) {
+ _mc->controlChange(17, detune + 0x40);
+ }
+#endif
+ } else {
+ _detune_eff = clamp((_detune = detune) + _player->getDetune(), -128, 127);
+ sendPitchBend();
+ }
}
void Part::pitchBend(int16 value) {
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 77c75c4ad6..ed77a863cd 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -433,10 +433,14 @@ void ScummEngine::getObjectXYPos(int object, int &x, int &y, int &dir) {
y = od.y_pos + (int16)READ_LE_UINT16(&imhd->old.hotspot[state].y);
}
} else if (_game.version <= 2) {
- if (od.actordir) {
- x = od.walk_x;
- y = od.walk_y;
- } else {
+ x = od.walk_x;
+ y = od.walk_y;
+
+ // Adjust x, y when no actor direction is set, but only perform this
+ // adjustment for V0 games (e.g. MM C64), otherwise certain scenes in
+ // newer games are affected as well (e.g. the interior of the Shuttle
+ // Bus scene in Zak V2, where no actor is present). Refer to bug #3526089.
+ if (!od.actordir && _game.version == 0) {
x = od.x_pos + od.width / 2;
y = od.y_pos + od.height / 2;
}
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 888a7ff2f7..3afeeda13d 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1866,6 +1866,8 @@ void ScummEngine::setupMusic(int midi) {
if (_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS || multi_midi) {
adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_sound->_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
+ // Try to use OPL3 mode for Sam&Max when possible.
+ adlibMidiDriver->property(MidiDriver::PROP_SCUMM_OPL3, (_game.id == GID_SAMNMAX) ? 1 : 0);
} else if (_sound->_musicType == MDT_PCSPK) {
adlibMidiDriver = new PcSpkDriver(_mixer);
}
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 5662e4672b..f3af04c81d 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -143,9 +143,24 @@ GameDescriptor SwordMetaEngine::findGame(const char *gameid) const {
return GameDescriptor();
}
-void Sword1CheckDirectory(const Common::FSList &fslist, bool *filesFound) {
+void Sword1CheckDirectory(const Common::FSList &fslist, bool *filesFound, bool recursion = false) {
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
+ // The required game data files can be located in the game directory, or in
+ // a subdirectory called "clusters". In the latter case, we don't want to
+ // detect the game in that subdirectory, as this will detect the game twice
+ // when mass add is searching inside a directory. In this case, the first
+ // result (the game directory) will be correct, but the second result (the
+ // clusters subdirectory) will be wrong, as the optional speech, music and
+ // video data files will be ignored. Note that this fix will skip the game
+ // data files if the user has placed them inside a "clusters" subdirectory,
+ // or if he/she points ScummVM directly to the "clusters" directory of the
+ // game CD. Fixes bug #3049346.
+ Common::String directory = file->getParent().getName();
+ directory.toLowercase();
+ if (directory.hasPrefix("clusters") && directory.size() <= 9 && !recursion)
+ continue;
+
const char *fileName = file->getName().c_str();
for (int cnt = 0; cnt < NUM_FILES_TO_CHECK; cnt++)
if (scumm_stricmp(fileName, g_filesToCheck[cnt]) == 0)
@@ -155,7 +170,7 @@ void Sword1CheckDirectory(const Common::FSList &fslist, bool *filesFound) {
if (scumm_stricmp(file->getName().c_str(), g_dirNames[cnt]) == 0) {
Common::FSList fslist2;
if (file->getChildren(fslist2, Common::FSNode::kListFilesOnly))
- Sword1CheckDirectory(fslist2, filesFound);
+ Sword1CheckDirectory(fslist2, filesFound, true);
}
}
}
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 458a2d33ed..dfa6a23320 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -144,22 +144,52 @@ GameDescriptor Sword2MetaEngine::findGame(const char *gameid) const {
return GameDescriptor(g->gameid, g->description);
}
-GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
+bool isFullGame(const Common::FSList &fslist) {
+ Common::FSList::const_iterator file;
+
+ // We distinguish between the two versions by the presense of paris.clu
+ for (file = fslist.begin(); file != fslist.end(); ++file) {
+ if (!file->isDirectory()) {
+ if (file->getName().equalsIgnoreCase("paris.clu"))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+GameList detectGamesImpl(const Common::FSList &fslist, bool recursion = false) {
GameList detectedGames;
const Sword2::GameSettings *g;
Common::FSList::const_iterator file;
-
- // TODO: It would be nice if we had code here which distinguishes
- // between the 'sword2' and 'sword2demo' targets. The current code
- // can't do that since they use the same detectname.
+ bool isFullVersion = isFullGame(fslist);
for (g = Sword2::sword2_settings; g->gameid; ++g) {
// Iterate over all files in the given directory
for (file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
- const char *fileName = file->getName().c_str();
+ // The required game data files can be located in the game directory, or in
+ // a subdirectory called "clusters". In the latter case, we don't want to
+ // detect the game in that subdirectory, as this will detect the game twice
+ // when mass add is searching inside a directory. In this case, the first
+ // result (the game directory) will be correct, but the second result (the
+ // clusters subdirectory) will be wrong, as the optional speech, music and
+ // video data files will be ignored. Note that this fix will skip the game
+ // data files if the user has placed them inside a "clusters" subdirectory,
+ // or if he/she points ScummVM directly to the "clusters" directory of the
+ // game CD. Fixes bug #3049336.
+ Common::String directory = file->getParent().getName();
+ directory.toLowercase();
+ if (directory.hasPrefix("clusters") && directory.size() <= 9 && !recursion)
+ continue;
+
+ if (file->getName().equalsIgnoreCase(g->detectname)) {
+ // Make sure that the sword2 demo is not mixed up with the
+ // full version, since they use the same filename for detection
+ if ((g->features == Sword2::GF_DEMO && isFullVersion) ||
+ (g->features == 0 && !isFullVersion))
+ continue;
- if (0 == scumm_stricmp(g->detectname, fileName)) {
// Match found, add to list of candidates, then abort inner loop.
detectedGames.push_back(GameDescriptor(g->gameid, g->description, Common::UNK_LANG, Common::kPlatformUnknown, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
break;
@@ -174,12 +204,10 @@ GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
// present e.g. if the user copied the data straight from CD.
for (file = fslist.begin(); file != fslist.end(); ++file) {
if (file->isDirectory()) {
- const char *fileName = file->getName().c_str();
-
- if (0 == scumm_stricmp("clusters", fileName)) {
+ if (file->getName().equalsIgnoreCase("clusters")) {
Common::FSList recList;
if (file->getChildren(recList, Common::FSNode::kListAll)) {
- GameList recGames(detectGames(recList));
+ GameList recGames(detectGamesImpl(recList, true));
if (!recGames.empty()) {
detectedGames.push_back(recGames);
break;
@@ -194,6 +222,10 @@ GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
return detectedGames;
}
+GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
+ return detectGamesImpl(fslist);
+}
+
SaveStateList Sword2MetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Common::StringArray filenames;
diff --git a/engines/sword25/util/lua/llex.cpp b/engines/sword25/util/lua/llex.cpp
index f8433d3afa..423f0285ca 100644
--- a/engines/sword25/util/lua/llex.cpp
+++ b/engines/sword25/util/lua/llex.cpp
@@ -4,6 +4,8 @@
** See Copyright Notice in lua.h
*/
+// FIXME: Do not directly use iscntrl from ctype.h.
+#define FORBIDDEN_SYMBOL_EXCEPTION_iscntrl
#include "common/util.h"
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index 0ba8b7cdba..531a8e3d12 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -406,7 +406,7 @@ void ActorEvent(CORO_PARAM, int ano, TINSEL_EVENT tEvent, bool bWait, int myEsca
* @param bRunScript Flag for whether to run actor's script for the scene
*/
void StartActor(const T1_ACTOR_STRUC *as, bool bRunScript) {
- SCNHANDLE hActorId = FROM_LE_32(as->hActorId);
+ SCNHANDLE hActorId = FROM_32(as->hActorId);
// Zero-out many things
actorInfo[hActorId - 1].bHidden = false;
@@ -418,15 +418,15 @@ void StartActor(const T1_ACTOR_STRUC *as, bool bRunScript) {
actorInfo[hActorId - 1].presObj = NULL;
// Store current scene's parameters for this actor
- actorInfo[hActorId - 1].mtype = FROM_LE_32(as->masking);
- actorInfo[hActorId - 1].actorCode = FROM_LE_32(as->hActorCode);
+ actorInfo[hActorId - 1].mtype = FROM_32(as->masking);
+ actorInfo[hActorId - 1].actorCode = FROM_32(as->hActorCode);
// Run actor's script for this scene
if (bRunScript) {
if (bActorsOn)
actorInfo[hActorId - 1].bAlive = true;
- if (actorInfo[hActorId - 1].bAlive && FROM_LE_32(as->hActorCode))
+ if (actorInfo[hActorId - 1].bAlive && FROM_32(as->hActorCode))
ActorEvent(hActorId, STARTUP, PLR_NOEVENT);
}
}
@@ -465,11 +465,11 @@ void StartTaggedActors(SCNHANDLE ah, int numActors, bool bRunScript) {
assert(as->hActorCode);
// Store current scene's parameters for this tagged actor
- taggedActors[i].id = FROM_LE_32(as->hActorId);
- taggedActors[i].hTagText = FROM_LE_32(as->hTagText);
- taggedActors[i].tagPortionV = FROM_LE_32(as->tagPortionV);
- taggedActors[i].tagPortionH = FROM_LE_32(as->tagPortionH);
- taggedActors[i].hActorCode = FROM_LE_32(as->hActorCode);
+ taggedActors[i].id = FROM_32(as->hActorId);
+ taggedActors[i].hTagText = FROM_32(as->hTagText);
+ taggedActors[i].tagPortionV = FROM_32(as->tagPortionV);
+ taggedActors[i].tagPortionH = FROM_32(as->tagPortionH);
+ taggedActors[i].hActorCode = FROM_32(as->hActorCode);
// Run actor's script for this scene
if (bRunScript) {
@@ -1310,9 +1310,9 @@ void SetActorRGB(int ano, COLORREF color) {
assert(ano >= 0 && ano <= NumActors);
if (ano)
- actorInfo[ano - 1].textColor = TO_LE_32(color);
+ actorInfo[ano - 1].textColor = TO_32(color);
else
- defaultColor = TO_LE_32(color);
+ defaultColor = TO_32(color);
}
/**
diff --git a/engines/tinsel/anim.cpp b/engines/tinsel/anim.cpp
index 034296ccc7..a1ec02186c 100644
--- a/engines/tinsel/anim.cpp
+++ b/engines/tinsel/anim.cpp
@@ -44,9 +44,9 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
while (1) { // repeat until a real image
debugC(DEBUG_DETAILED, kTinselDebugAnimations,
"DoNextFrame %ph index=%d, op=%xh", (byte *)pAnim, pAnim->scriptIndex,
- FROM_LE_32(pAni[pAnim->scriptIndex].op));
+ FROM_32(pAni[pAnim->scriptIndex].op));
- switch ((int32)FROM_LE_32(pAni[pAnim->scriptIndex].op)) {
+ switch ((int32)FROM_32(pAni[pAnim->scriptIndex].op)) {
case ANI_END: // end of animation script
// move to next opcode
@@ -61,7 +61,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
pAnim->scriptIndex++;
// jump to new frame position
- pAnim->scriptIndex += (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ pAnim->scriptIndex += (int32)FROM_32(pAni[pAnim->scriptIndex].op);
// go fetch a real image
break;
@@ -101,7 +101,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
// move to x adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op), 0);
+ MultiAdjustXY(pAnim->pObject, (int32)FROM_32(pAni[pAnim->scriptIndex].op), 0);
// next opcode
pAnim->scriptIndex++;
@@ -114,7 +114,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
// move to y adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op));
+ MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_32(pAni[pAnim->scriptIndex].op));
// next opcode
pAnim->scriptIndex++;
@@ -128,11 +128,11 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
// move to x adjustment operand
pAnim->scriptIndex++;
- x = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ x = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
// move to y adjustment operand
pAnim->scriptIndex++;
- y = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ y = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
MultiAdjustXY(pAnim->pObject, x, y);
@@ -189,7 +189,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
default: // must be an actual animation frame handle
// set objects new animation frame
- pAnim->pObject->hShape = FROM_LE_32(pAni[pAnim->scriptIndex].hFrame);
+ pAnim->pObject->hShape = FROM_32(pAni[pAnim->scriptIndex].hFrame);
// re-shape the object
MultiReshape(pAnim->pObject);
@@ -273,7 +273,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
while (1) { // repeat until a real image
- switch ((int32)FROM_LE_32(pAni[pAnim->scriptIndex].op)) {
+ switch ((int32)FROM_32(pAni[pAnim->scriptIndex].op)) {
case ANI_END: // end of animation script
// going off the end is probably a error, but only in Tinsel 1
if (!TinselV2)
@@ -286,7 +286,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
pAnim->scriptIndex++;
// jump to new frame position
- pAnim->scriptIndex += (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ pAnim->scriptIndex += (int32)FROM_32(pAni[pAnim->scriptIndex].op);
if (TinselV2)
// Done if skip to jump
@@ -323,7 +323,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
// move to x adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op), 0);
+ MultiAdjustXY(pAnim->pObject, (int32)FROM_32(pAni[pAnim->scriptIndex].op), 0);
// next opcode
pAnim->scriptIndex++;
@@ -334,7 +334,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
// move to y adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op));
+ MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_32(pAni[pAnim->scriptIndex].op));
// next opcode
pAnim->scriptIndex++;
@@ -346,11 +346,11 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
// move to x adjustment operand
pAnim->scriptIndex++;
- x = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ x = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
// move to y adjustment operand
pAnim->scriptIndex++;
- y = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ y = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
MultiAdjustXY(pAnim->pObject, x, y);
@@ -389,7 +389,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
pAnim->scriptIndex++;
} else {
// set objects new animation frame
- pAnim->pObject->hShape = FROM_LE_32(pAni[pAnim->scriptIndex].hFrame);
+ pAnim->pObject->hShape = FROM_32(pAni[pAnim->scriptIndex].hFrame);
// re-shape the object
MultiReshape(pAnim->pObject);
@@ -414,7 +414,7 @@ bool AboutToJumpOrEnd(PANIM pAnim) {
for (;;) {
// repeat until a real image
- switch (FROM_LE_32(pAni[zzz].op)) {
+ switch (FROM_32(pAni[zzz].op)) {
case ANI_END: // end of animation script
case ANI_JUMP: // do animation jump
return true;
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp
index a3e21a8227..ed15bfef2a 100644
--- a/engines/tinsel/bg.cpp
+++ b/engines/tinsel/bg.cpp
@@ -124,28 +124,28 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
pReel = (const FREEL *)param;
// Get the MULTI_INIT structure
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(pReel->mobj));
// Initialize and insert the object, and initialize its script.
g_pBG[0] = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), g_pBG[0]);
- InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_LE_32(pReel->script), g_BGspeed);
+ InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_32(pReel->script), g_BGspeed);
g_bgReels = 1;
} else {
/*** At start of scene ***/
pFilm = (const FILM *)LockMem(g_hBackground);
- g_bgReels = FROM_LE_32(pFilm->numreels);
+ g_bgReels = FROM_32(pFilm->numreels);
int i;
for (i = 0; i < g_bgReels; i++) {
// Get the MULTI_INIT structure
- pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pFilm->reels[i].mobj));
+ pmi = (PMULTI_INIT) LockMem(FROM_32(pFilm->reels[i].mobj));
// Initialize and insert the object, and initialize its script.
g_pBG[i] = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), g_pBG[i]);
MultiSetZPosition(g_pBG[i], 0);
- InitStepAnimScript(&g_thisAnim[i], g_pBG[i], FROM_LE_32(pFilm->reels[i].script), g_BGspeed);
+ InitStepAnimScript(&g_thisAnim[i], g_pBG[i], FROM_32(pFilm->reels[i].script), g_BGspeed);
if (i > 0)
g_pBG[i-1]->pSlave = g_pBG[i];
@@ -170,11 +170,11 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
// New background during scene
if (!TinselV2) {
pReel = (const FREEL *)param;
- InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_LE_32(pReel->script), g_BGspeed);
+ InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_32(pReel->script), g_BGspeed);
StepAnimScript(&g_thisAnim[0]);
} else {
pFilm = (const FILM *)LockMem(g_hBackground);
- assert(g_bgReels == (int32)FROM_LE_32(pFilm->numreels));
+ assert(g_bgReels == (int32)FROM_32(pFilm->numreels));
// Just re-initialize the scripts.
for (int i = 0; i < g_bgReels; i++) {
@@ -198,7 +198,7 @@ static void BGotherProcess(CORO_PARAM, const void *param) {
CORO_END_CONTEXT(_ctx);
const FREEL *pReel = (const FREEL *)param;
- const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj));
+ const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_32(pReel->mobj));
CORO_BEGIN_CODE(_ctx);
@@ -206,7 +206,7 @@ static void BGotherProcess(CORO_PARAM, const void *param) {
_ctx->pObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), _ctx->pObj);
- InitStepAnimScript(&_ctx->anim, g_pBG[0], FROM_LE_32(pReel->script), g_BGspeed);
+ InitStepAnimScript(&_ctx->anim, g_pBG[0], FROM_32(pReel->script), g_BGspeed);
while (StepAnimScript(&_ctx->anim) != ScriptFinished)
CORO_SLEEP(1);
@@ -249,16 +249,16 @@ void StartupBackground(CORO_PARAM, SCNHANDLE hFilm) {
pim = GetImageFromFilm(hFilm, 0, NULL, NULL, &pfilm);
- SetBackPal(FROM_LE_32(pim->hImgPal));
+ SetBackPal(FROM_32(pim->hImgPal));
// Extract the film speed
- g_BGspeed = ONE_SECOND / FROM_LE_32(pfilm->frate);
+ g_BGspeed = ONE_SECOND / FROM_32(pfilm->frate);
// Start display process for each reel in the film
CoroScheduler.createProcess(PID_REEL, BGmainProcess, &pfilm->reels[0], sizeof(FREEL));
if (TinselV0) {
- for (uint i = 1; i < FROM_LE_32(pfilm->numreels); ++i)
+ for (uint i = 1; i < FROM_32(pfilm->numreels); ++i)
CoroScheduler.createProcess(PID_REEL, BGotherProcess, &pfilm->reels[i], sizeof(FREEL));
}
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index 438fd52a81..106e1542d5 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -529,9 +529,9 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) {
if (cmd & CD_PRINT) {
PRINT_CMD *pCmd = (PRINT_CMD *)(bigBuffer + commandOffset);
- MovieText(Common::nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
- (int16)READ_LE_UINT16(&pCmd->x),
- (int16)READ_LE_UINT16(&pCmd->y),
+ MovieText(Common::nullContext, (int16)READ_16(&pCmd->stringId),
+ (int16)READ_16(&pCmd->x),
+ (int16)READ_16(&pCmd->y),
pCmd->fontId,
NULL,
pCmd->duration);
@@ -542,9 +542,9 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) {
TALK_CMD *pCmd = (TALK_CMD *)(bigBuffer + commandOffset);
talkColor = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b);
- MovieText(Common::nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
- (int16)READ_LE_UINT16(&pCmd->x),
- (int16)READ_LE_UINT16(&pCmd->y),
+ MovieText(Common::nullContext, (int16)READ_16(&pCmd->stringId),
+ (int16)READ_16(&pCmd->x),
+ (int16)READ_16(&pCmd->y),
0,
&talkColor,
pCmd->duration);
@@ -622,7 +622,7 @@ int BMVPlayer::FollowingPacket(int thisPacket, bool bReallyImportant) {
if (nextReadSlot*SLOT_SIZE >= thisPacket && thisPacket+3 >= nextReadSlot*SLOT_SIZE)
return thisPacket + 3;
}
- length = (int32)READ_LE_UINT32(bigBuffer + thisPacket + 1);
+ length = (int32)READ_32(bigBuffer + thisPacket + 1);
length &= 0x00ffffff;
return thisPacket + length + 4;
}
@@ -886,7 +886,7 @@ bool BMVPlayer::DoBMVFrame() {
return true;
default:
- length = (int32)READ_LE_UINT32(data + 1);
+ length = (int32)READ_32(data + 1);
length &= 0x00ffffff;
graphOffset = nextUseOffset + 4; // Skip command byte and length
@@ -922,7 +922,7 @@ bool BMVPlayer::DoBMVFrame() {
}
if (*data & CD_XSCR) {
- xscr = (int16)READ_LE_UINT16(bigBuffer + graphOffset);
+ xscr = (int16)READ_16(bigBuffer + graphOffset);
graphOffset += sz_XSCR_pkt; // Skip scroll offset
length -= sz_XSCR_pkt;
} else if (*data & BIT0)
diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp
index bf901c03b6..a83e7cd9ca 100644
--- a/engines/tinsel/cursor.cpp
+++ b/engines/tinsel/cursor.cpp
@@ -125,7 +125,7 @@ static void InitCurTrailObj(int i, int x, int y) {
pim = GetImageFromFilm(g_hCursorFilm, i+1, &pfr, &pmi, &pfilm);// Get pointer to image
assert(BgPal()); // No background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
// Initialize and insert the object, set its Z-pos, and hide it
g_ntrailData[i].trailObj = MultiInitObject(pmi);
@@ -134,7 +134,7 @@ static void InitCurTrailObj(int i, int x, int y) {
MultiSetAniXY(g_ntrailData[i].trailObj, x, y);
// Initialize the animation script
- InitStepAnimScript(&g_ntrailData[i].trailAnim, g_ntrailData[i].trailObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_ntrailData[i].trailAnim, g_ntrailData[i].trailObj, FROM_32(pfr->script), ONE_SECOND / FROM_32(pfilm->frate));
StepAnimScript(&g_ntrailData[i].trailAnim);
}
@@ -237,7 +237,7 @@ void RestoreMainCursor() {
if (g_McurObj != NULL) {
pfilm = (const FILM *)LockMem(g_hCursorFilm);
- InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_LE_32(pfilm->reels->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_32(pfilm->reels->script), ONE_SECOND / FROM_32(pfilm->frate));
StepAnimScript(&g_McurAnim);
}
g_bHiddenCursor = false;
@@ -324,14 +324,14 @@ IMAGE *GetImageFromReel(const FREEL *pfr, const MULTI_INIT **ppmi) {
const MULTI_INIT *pmi;
const FRAME *pFrame;
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pfr->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(pfr->mobj));
if (ppmi)
*ppmi = pmi;
- pFrame = (const FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame));
+ pFrame = (const FRAME *)LockMem(FROM_32(pmi->hMulFrame));
// get pointer to image
- return (IMAGE *)LockMem(READ_LE_UINT32(pFrame));
+ return (IMAGE *)LockMem(READ_32(pFrame));
}
/**
@@ -379,18 +379,18 @@ void SetAuxCursor(SCNHANDLE hFilm) {
pim = GetImageFromFilm(hFilm, 0, &pfr, &pmi, &pfilm);// Get pointer to image
assert(BgPal()); // no background palette
- pim->hImgPal = TO_LE_32(BgPal()); // Poke in the background palette
+ pim->hImgPal = TO_32(BgPal()); // Poke in the background palette
- g_ACoX = (short)(FROM_LE_16(pim->imgWidth)/2 - ((int16) FROM_LE_16(pim->anioffX)));
- g_ACoY = (short)((FROM_LE_16(pim->imgHeight) & ~C16_FLAG_MASK)/2 -
- ((int16) FROM_LE_16(pim->anioffY)));
+ g_ACoX = (short)(FROM_16(pim->imgWidth)/2 - ((int16) FROM_16(pim->anioffX)));
+ g_ACoY = (short)((FROM_16(pim->imgHeight) & ~C16_FLAG_MASK)/2 -
+ ((int16) FROM_16(pim->anioffY)));
// Initialize and insert the auxillary cursor object
g_AcurObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), g_AcurObj);
// Initialize the animation and set its position
- InitStepAnimScript(&g_AcurAnim, g_AcurObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_AcurAnim, g_AcurObj, FROM_32(pfr->script), ONE_SECOND / FROM_32(pfilm->frate));
MultiSetAniXY(g_AcurObj, x - g_ACoX, y - g_ACoY);
MultiSetZPosition(g_AcurObj, Z_ACURSOR);
@@ -481,14 +481,14 @@ static void InitCurObj() {
if (TinselV2) {
pFilm = (const FILM *)LockMem(g_hCursorFilm);
pfr = (const FREEL *)&pFilm->reels[0];
- pmi = (MULTI_INIT *)LockMem(FROM_LE_32(pfr->mobj));
+ pmi = (MULTI_INIT *)LockMem(FROM_32(pfr->mobj));
PokeInPalette(pmi);
} else {
assert(BgPal()); // no background palette
pim = GetImageFromFilm(g_hCursorFilm, 0, &pfr, &pmi, &pFilm);// Get pointer to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
g_AcurObj = NULL; // No auxillary cursor
}
@@ -496,7 +496,7 @@ static void InitCurObj() {
g_McurObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), g_McurObj);
- InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pFilm->frate));
+ InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_32(pfr->script), ONE_SECOND / FROM_32(pFilm->frate));
}
/**
@@ -620,7 +620,7 @@ void DwInitCursor(SCNHANDLE bfilm) {
g_hCursorFilm = bfilm;
pfilm = (const FILM *)LockMem(g_hCursorFilm);
- g_numTrails = FROM_LE_32(pfilm->numreels) - 1;
+ g_numTrails = FROM_32(pfilm->numreels) - 1;
assert(g_numTrails <= MAX_TRAILERS);
}
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 56ee2ea752..d0c99f7830 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -234,8 +234,8 @@ enum PARTS_INDEX {
#define NM_RS_R_INSET 4
#define NM_RS_THICKNESS 5
#define NM_MOVE_AREA_B_Y 30
-#define NM_SLIDE_INSET (TinselV2 ? 18 : 15) // X offset (from right) of left of scroll region
-#define NM_SLIDE_THICKNESS (TinselV2 ? 13 : 4) // thickness of scroll region
+#define NM_SLIDE_INSET (TinselV2 ? 18 : 9) // X offset (from right) of left of scroll region
+#define NM_SLIDE_THICKNESS (TinselV2 ? 13 : 7) // thickness of scroll region
#define NM_UP_ARROW_TOP 34 // Y offset of top of up arrow
#define NM_UP_ARROW_BOTTOM 49 // Y offset of bottom of up arrow
#define NM_DN_ARROW_TOP 22 // Y offset (from bottom) of top of down arrow
@@ -1143,7 +1143,7 @@ static void FirstScene(int first) {
// Fill in the rest
for (i = 0; i < NUM_RGROUP_BOXES && i + first < g_numScenes; i++) {
cd.box[i].textMethod = TM_STRINGNUM;
- cd.box[i].ixText = FROM_LE_32(g_pHopper[i + first].hSceneDesc);
+ cd.box[i].ixText = FROM_32(g_pHopper[i + first].hSceneDesc);
}
// Blank out the spare ones (if any)
while (i < NUM_RGROUP_BOXES) {
@@ -1166,10 +1166,10 @@ static void SetChosenScene() {
static void FirstEntry(int first) {
int i;
- g_InvD[INV_MENU].hInvTitle = FROM_LE_32(g_pChosenScene->hSceneDesc);
+ g_InvD[INV_MENU].hInvTitle = FROM_32(g_pChosenScene->hSceneDesc);
// get number of entrances
- g_numEntries = FROM_LE_32(g_pChosenScene->numEntries);
+ g_numEntries = FROM_32(g_pChosenScene->numEntries);
// Force first to a sensible value
if (first > g_numEntries-NUM_RGROUP_BOXES)
@@ -1179,7 +1179,7 @@ static void FirstEntry(int first) {
for (i = 0; i < NUM_RGROUP_BOXES && i < g_numEntries; i++) {
cd.box[i].textMethod = TM_STRINGNUM;
- cd.box[i].ixText = FROM_LE_32(g_pEntries[FROM_LE_32(g_pChosenScene->entryIndex) + i + first].hDesc);
+ cd.box[i].ixText = FROM_32(g_pEntries[FROM_32(g_pChosenScene->entryIndex) + i + first].hDesc);
}
// Blank out the spare ones (if any)
while (i < NUM_RGROUP_BOXES) {
@@ -1191,17 +1191,17 @@ static void FirstEntry(int first) {
}
static void HopAction() {
- PHOPENTRY pEntry = g_pEntries + FROM_LE_32(g_pChosenScene->entryIndex) + cd.selBox + cd.extraBase;
+ PHOPENTRY pEntry = g_pEntries + FROM_32(g_pChosenScene->entryIndex) + cd.selBox + cd.extraBase;
- uint32 hScene = FROM_LE_32(g_pChosenScene->hScene);
- uint32 eNumber = FROM_LE_32(pEntry->eNumber);
+ uint32 hScene = FROM_32(g_pChosenScene->hScene);
+ uint32 eNumber = FROM_32(pEntry->eNumber);
debugC(DEBUG_BASIC, kTinselDebugAnimations, "Scene hopper chose scene %xh,%d\n", hScene, eNumber);
- if (FROM_LE_32(pEntry->flags) & fCall) {
+ if (FROM_32(pEntry->flags) & fCall) {
SaveScene(Common::nullContext);
NewScene(Common::nullContext, g_pChosenScene->hScene, pEntry->eNumber, TRANS_FADE);
}
- else if (FROM_LE_32(pEntry->flags) & fHook)
+ else if (FROM_32(pEntry->flags) & fHook)
HookScene(hScene, eNumber, TRANS_FADE);
else
NewScene(Common::nullContext, hScene, eNumber, TRANS_CUT);
@@ -2568,7 +2568,7 @@ static OBJECT *AddInvObject(int num, const FREEL **pfreel, const FILM **pfilm) {
pim = GetImageFromFilm(invObj->hIconFilm, 0, pfreel, &pmi, pfilm);
// Poke in the background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
// Set up the multi-object
pPlayObj = MultiInitObject(pmi);
@@ -2609,7 +2609,7 @@ static void FillInInventory() {
MultiSetAniXY(g_iconArray[n], g_InvD[g_ino].inventoryX + xpos , g_InvD[g_ino].inventoryY + ypos);
MultiSetZPosition(g_iconArray[n], Z_INV_ICONS);
- InitStepAnimScript(&g_iconAnims[n], g_iconArray[n], FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_iconAnims[n], g_iconArray[n], FROM_32(pfr->script), ONE_SECOND / FROM_32(pfilm->frate));
n++;
}
@@ -2697,17 +2697,17 @@ static OBJECT *AddObject(const FREEL *pfreel, int num) {
pim = GetImageFromReel(pfreel, &pmi);
// Poke in the background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
// Horrible bodge involving global variables to save
// width and/or height of some window frame components
if (num == g_TL) {
- g_TLwidth = FROM_LE_16(pim->imgWidth);
- g_TLheight = FROM_LE_16(pim->imgHeight) & ~C16_FLAG_MASK;
+ g_TLwidth = FROM_16(pim->imgWidth);
+ g_TLheight = FROM_16(pim->imgHeight) & ~C16_FLAG_MASK;
} else if (num == g_TR) {
- g_TRwidth = FROM_LE_16(pim->imgWidth);
+ g_TRwidth = FROM_16(pim->imgWidth);
} else if (num == g_BL) {
- g_BLheight = FROM_LE_16(pim->imgHeight) & ~C16_FLAG_MASK;
+ g_BLheight = FROM_16(pim->imgHeight) & ~C16_FLAG_MASK;
}
// Set up and insert the multi-object
@@ -2723,7 +2723,7 @@ static OBJECT *AddObject(const FREEL *pfreel, int num) {
static void AddSlider(OBJECT **slide, const FILM *pfilm) {
g_SlideObject = *slide = AddObject(&pfilm->reels[IX_SLIDE], -1);
- MultiSetAniXY(*slide, MultiRightmost(g_RectObject) + (TinselV2 ? NM_SLX : -M_SXOFF + 2) - 1,
+ MultiSetAniXY(*slide, MultiRightmost(g_RectObject) + (TinselV2 ? NM_SLX : -M_SXOFF + 2),
g_InvD[g_ino].inventoryY + g_sliderYpos);
MultiSetZPosition(*slide, Z_INV_MFRAME);
}
@@ -3318,7 +3318,7 @@ static void ConstructInventory(InventoryType filling) {
}
}
} else if (g_InvD[g_ino].NoofItems > g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons) {
- g_sliderYmin = g_TLheight - (TinselV2 ? 2 : 1);
+ g_sliderYmin = g_TLheight - (TinselV2 ? 1 : 2);
g_sliderYmax = g_TLheight + eV + (TinselV2 ? 12 : 10);
AddSlider(&retObj[n++], pfilm);
}
@@ -3406,9 +3406,9 @@ static void AlterCursor(int num) {
pim = GetImageFromFilm(g_hWinParts, num, &pfreel);
// Poke in the background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
- SetTempCursor(FROM_LE_32(pfreel->script));
+ SetTempCursor(FROM_32(pfreel->script));
}
enum InvCursorFN {IC_AREA, IC_DROP};
@@ -4861,50 +4861,101 @@ static void InvDragEnd() {
g_Xchange = g_Ychange = 0; // Probably no need, but does no harm!
}
-static void MenuPageDown() {
+static bool MenuDown(int lines) {
if (cd.box == loadBox || cd.box == saveBox) {
- if (cd.extraBase < MAX_SAVED_FILES-NUM_RGROUP_BOXES) {
- FirstFile(cd.extraBase+(NUM_RGROUP_BOXES - 1));
+ if (cd.extraBase < MAX_SAVED_FILES - NUM_RGROUP_BOXES) {
+ FirstFile(cd.extraBase + lines);
AddBoxes(true);
- cd.selBox = NUM_RGROUP_BOXES - 1;
- Select(cd.selBox, true);
+ return true;
}
} else if (cd.box == hopperBox1) {
if (cd.extraBase < g_numScenes - NUM_RGROUP_BOXES) {
- FirstScene(cd.extraBase + (NUM_RGROUP_BOXES - 1));
+ FirstScene(cd.extraBase + lines);
AddBoxes(true);
- if (cd.selBox)
- cd.selBox = NUM_RGROUP_BOXES - 1;
- Select(cd.selBox, true);
+ return true;
}
} else if (cd.box == hopperBox2) {
if (cd.extraBase < g_numEntries - NUM_RGROUP_BOXES) {
- FirstEntry(cd.extraBase+(NUM_RGROUP_BOXES - 1));
+ FirstEntry(cd.extraBase + lines);
AddBoxes(true);
- if (cd.selBox)
- cd.selBox = NUM_RGROUP_BOXES - 1;
- Select(cd.selBox, true);
+ return true;
}
}
+ return false;
}
-static void MenuPageUp() {
+static bool MenuUp(int lines) {
if (cd.extraBase > 0) {
if (cd.box == loadBox || cd.box == saveBox)
- FirstFile(cd.extraBase-(NUM_RGROUP_BOXES - 1));
+ FirstFile(cd.extraBase - lines);
else if (cd.box == hopperBox1)
- FirstScene(cd.extraBase-(NUM_RGROUP_BOXES - 1));
+ FirstScene(cd.extraBase - lines);
else if (cd.box == hopperBox2)
- FirstEntry(cd.extraBase-(NUM_RGROUP_BOXES - 1));
+ FirstEntry(cd.extraBase - lines);
else
- return;
+ return false;
AddBoxes(true);
+ return true;
+ }
+ return false;
+}
+
+static void MenuRollDown() {
+ if (MenuDown(1)) {
+ if (cd.selBox > 0)
+ cd.selBox--;
+ Select(cd.selBox, true);
+ }
+}
+
+static void MenuRollUp() {
+ if (MenuUp(1)) {
+ if (cd.selBox < NUM_RGROUP_BOXES - 1)
+ cd.selBox++;
+ Select(cd.selBox, true);
+ }
+}
+
+static void MenuPageDown() {
+ if (MenuDown(NUM_RGROUP_BOXES - 1)) {
+ cd.selBox = NUM_RGROUP_BOXES - 1;
+ Select(cd.selBox, true);
+ }
+}
+
+static void MenuPageUp() {
+ if (MenuUp(NUM_RGROUP_BOXES - 1)) {
cd.selBox = 0;
Select(cd.selBox, true);
}
}
+static void InventoryDown() {
+ // This code is a copy of the IB_SLIDE_DOWN case in InvWalkTo
+ // TODO: So share this duplicate code
+ if (g_InvD[g_ino].NoofVicons == 1)
+ if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
+ g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
+ for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++) {
+ if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
+ g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
+ }
+ g_ItemsChanged = true;
+}
+
+static void InventoryUp() {
+ // This code is a copy of the I_SLIDE_UP case in InvWalkTo
+ // TODO: So share this duplicate code
+ if (g_InvD[g_ino].NoofVicons == 1)
+ g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
+ for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++)
+ g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
+ if (g_InvD[g_ino].FirstDisp < 0)
+ g_InvD[g_ino].FirstDisp = 0;
+ g_ItemsChanged = true;
+}
+
/**************************************************************************/
/************** Incoming events - further processing **********************/
/**************************************************************************/
@@ -5399,42 +5450,47 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
case PLR_PGDN:
if (g_ino == INV_MENU) {
- // Only act if load or save screen
+ // Load or Save screen
MenuPageDown();
} else {
- // This code is a copy of the IB_SLIDE_DOWN case in InvWalkTo
- // TODO: So share this duplicate code
- if (g_InvD[g_ino].NoofVicons == 1)
- if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
- g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
- for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++) {
- if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
- g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
- }
- g_ItemsChanged = true;
+ // Inventory window
+ InventoryDown();
}
break;
case PLR_PGUP:
if (g_ino == INV_MENU) {
- // Only act if load or save screen
+ // Load or Save screen
MenuPageUp();
} else {
- // This code is a copy of the I_SLIDE_UP case in InvWalkTo
- // TODO: So share this duplicate code
- if (g_InvD[g_ino].NoofVicons == 1)
- g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
- for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++)
- g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
- if (g_InvD[g_ino].FirstDisp < 0)
- g_InvD[g_ino].FirstDisp = 0;
- g_ItemsChanged = true;
+ // Inventory window
+ InventoryUp();
+ }
+ break;
+
+ case PLR_WHEEL_DOWN:
+ if (g_ino == INV_MENU) {
+ // Load or Save screen
+ MenuRollDown();
+ } else {
+ // Inventory window
+ InventoryDown();
+ }
+ break;
+
+ case PLR_WHEEL_UP:
+ if (g_ino == INV_MENU) {
+ // Load or Save screen
+ MenuRollUp();
+ } else {
+ // Inventory window
+ InventoryUp();
}
break;
case PLR_HOME:
if (g_ino == INV_MENU) {
- // Only act if load or save screen
+ // Load or Save screen
if (cd.box == loadBox || cd.box == saveBox)
FirstFile(0);
else if (cd.box == hopperBox1)
@@ -5448,6 +5504,7 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
cd.selBox = 0;
Select(cd.selBox, true);
} else {
+ // Inventory window
g_InvD[g_ino].FirstDisp = 0;
g_ItemsChanged = true;
}
@@ -5455,6 +5512,7 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
case PLR_END:
if (g_ino == INV_MENU) {
+ // Load or Save screen
if (cd.box == loadBox || cd.box == saveBox)
FirstFile(MAX_SAVED_FILES); // Will get reduced to appropriate value
else if (cd.box == hopperBox1)
@@ -5468,6 +5526,7 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
cd.selBox = 0;
Select(cd.selBox, true);
} else {
+ // Inventory window
g_InvD[g_ino].FirstDisp = g_InvD[g_ino].NoofItems - g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons;
if (g_InvD[g_ino].FirstDisp < 0)
g_InvD[g_ino].FirstDisp = 0;
@@ -5560,21 +5619,6 @@ extern void RegisterIcons(void *cptr, int num) {
memmove(destP, srcP, 12);
destP->attribute = 0;
}
- } else if (TinselV1Mac) {
- // Macintosh version has BE encoded resources, so the values need to be byte swapped
- MEM_NODE *node = MemoryAllocFixed(g_numObjects * sizeof(INV_OBJECT));
- assert(node);
- g_invObjects = (INV_OBJECT *)MemoryDeref(node);
- assert(g_invObjects);
- INV_OBJECT *srcP = (INV_OBJECT *)cptr;
- INV_OBJECT *destP = (INV_OBJECT *)g_invObjects;
-
- for (int i = 0; i < num; ++i, ++destP, ++srcP) {
- destP->id = FROM_BE_32(srcP->id);
- destP->hIconFilm = FROM_BE_32(srcP->hIconFilm);
- destP->hScript = FROM_BE_32(srcP->hScript);
- destP->attribute = FROM_BE_32(srcP->attribute);
- }
} else if (TinselV2) {
if (g_invFilms == NULL) {
// First time - allocate memory
@@ -5613,7 +5657,7 @@ extern void setInvWinParts(SCNHANDLE hf) {
#ifdef DEBUG
pfilm = (const FILM *)LockMem(hf);
- assert(FROM_LE_32(pfilm->numreels) >= (uint32)(TinselV2 ? T2_HOPEDFORREELS : T1_HOPEDFORREELS)); // not as many reels as expected
+ assert(FROM_32(pfilm->numreels) >= (uint32)(TinselV2 ? T2_HOPEDFORREELS : T1_HOPEDFORREELS)); // not as many reels as expected
#endif
}
@@ -5630,7 +5674,7 @@ extern void setFlagFilms(SCNHANDLE hf) {
#ifdef DEBUG
pfilm = (const FILM *)LockMem(hf);
- assert(FROM_LE_32(pfilm->numreels) >= HOPEDFORFREELS); // not as many reels as expected
+ assert(FROM_32(pfilm->numreels) >= HOPEDFORFREELS); // not as many reels as expected
#endif
}
diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp
index 1aa4d34227..61d3903f1a 100644
--- a/engines/tinsel/events.cpp
+++ b/engines/tinsel/events.cpp
@@ -389,7 +389,8 @@ void PlayerEvent(PLR_EVENT pEvent, const Common::Point &coOrds) {
"PLR_PROV_WALKTO", "PLR_WALKTO", "PLR_LOOK", "PLR_ACTION", "PLR_ESCAPE",
"PLR_MENU", "PLR_QUIT", "PLR_PGUP", "PLR_PGDN", "PLR_HOME", "PLR_END",
"PLR_DRAG1_START", "PLR_DRAG1_END", "PLR_DRAG2_START", "PLR_DRAG2_END",
- "PLR_JUMP", "PLR_NOEVENT"};
+ "PLR_JUMP", "PLR_NOEVENT", "PLR_SAVE", "PLR_LOAD", "PLR_WHEEL_UP",
+ "PLR_WHEEL_DOWN"};
debugC(DEBUG_BASIC, kTinselDebugActions, "%s - (%d,%d)",
actionList[pEvent], coOrds.x, coOrds.y);
static uint32 lastRealAction = 0; // FIXME: Avoid non-const global vars
diff --git a/engines/tinsel/events.h b/engines/tinsel/events.h
index cdf5ae2ae4..51669e4680 100644
--- a/engines/tinsel/events.h
+++ b/engines/tinsel/events.h
@@ -65,6 +65,8 @@ enum PLR_EVENT {
PLR_NOEVENT = 16,
PLR_SAVE = 17,
PLR_LOAD = 18,
+ PLR_WHEEL_UP = 19,
+ PLR_WHEEL_DOWN = 20,
// Aliases used for DW1 actions
PLR_SLEFT = PLR_WALKTO,
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index c1574ff963..e9517103a9 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -106,7 +106,7 @@ static void FadeProcess(CORO_PARAM, const void *param) {
FadingPalette(pFade->pPalQ, true);
// get pointer to palette - reduce pointer indirection a bit
- _ctx->pPalette = (PALETTE *)LockMem(pFade->pPalQ->hPal);
+ _ctx->pPalette = (PALETTE *)LockMem(FROM_32(pFade->pPalQ->hPal));
for (_ctx->pColMult = pFade->pColorMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) {
// go through all multipliers in table - until a negative entry
@@ -117,10 +117,10 @@ static void FadeProcess(CORO_PARAM, const void *param) {
pFade->pPalQ->numColors, (uint32) *_ctx->pColMult);
else
FadePalette(_ctx->fadeRGB, _ctx->pPalette->palRGB,
- FROM_LE_32(_ctx->pPalette->numColors), (uint32) *_ctx->pColMult);
+ FROM_32(_ctx->pPalette->numColors), (uint32) *_ctx->pColMult);
// send new palette to video DAC
- UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColors), _ctx->fadeRGB);
+ UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_32(_ctx->pPalette->numColors), _ctx->fadeRGB);
// allow time for video DAC to be updated
CORO_SLEEP(1);
diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp
index 54aa7cc15f..3dba56468b 100644
--- a/engines/tinsel/font.cpp
+++ b/engines/tinsel/font.cpp
@@ -102,16 +102,16 @@ void FettleFontPal(SCNHANDLE fontPal) {
assert(g_hTalkFont); // Talk font not declared
pFont = (const FONT *)LockMem(g_hTagFont);
- pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0
+ pImg = (IMAGE *)LockMem(FROM_32(pFont->fontInit.hObjImg)); // get image for char 0
if (!TinselV2)
- pImg->hImgPal = TO_LE_32(fontPal);
+ pImg->hImgPal = TO_32(fontPal);
else
pImg->hImgPal = 0;
pFont = (const FONT *)LockMem(g_hTalkFont);
- pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0
+ pImg = (IMAGE *)LockMem(FROM_32(pFont->fontInit.hObjImg)); // get image for char 0
if (!TinselV2)
- pImg->hImgPal = TO_LE_32(fontPal);
+ pImg->hImgPal = TO_32(fontPal);
else
pImg->hImgPal = 0;
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index 9b06b1a501..5f200b5e2f 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -73,7 +73,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
while (remainingBlocks) { // Repeat until all blocks are decompressed
if (!controlBits) {
- controlData = READ_LE_UINT16(srcIdx);
+ controlData = READ_16(srcIdx);
srcIdx += 2;
// If bit 15 of controlData is enabled, compression data is type 1.
@@ -92,7 +92,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
// If there is compression, we need to fetch an index
// to be treated as "base" for compression.
if (compressionType != 0) {
- controlData = READ_LE_UINT16(srcIdx);
+ controlData = READ_16(srcIdx);
srcIdx += 2;
baseIndex = controlData;
}
@@ -114,7 +114,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
switch (compressionType) {
case 0: // No compression, plain copy of indexes
while (decremTiles) {
- WRITE_LE_UINT16(dstIdx, READ_LE_UINT16(srcIdx));
+ WRITE_LE_UINT16(dstIdx, READ_16(srcIdx));
srcIdx += 2;
dstIdx += 2;
decremTiles--;
@@ -272,7 +272,7 @@ static void PsxDrawTiles(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
assert(boxBounds.bottom >= boxBounds.top);
assert(boxBounds.right >= boxBounds.left);
- int16 indexVal = READ_LE_UINT16(srcP);
+ int16 indexVal = READ_16(srcP);
srcP += sizeof(uint16);
// Draw a 4x4 block based on the opcode as in index into the block list
@@ -381,7 +381,7 @@ static void WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool applyCl
assert(boxBounds.bottom >= boxBounds.top);
assert(boxBounds.right >= boxBounds.left);
- int16 indexVal = READ_LE_UINT16(srcP);
+ int16 indexVal = READ_16(srcP);
srcP += sizeof(uint16);
if (indexVal >= 0) {
@@ -763,8 +763,8 @@ void DrawObject(DRAWOBJECT *pObj) {
byte *p = (byte *)LockMem(pObj->hBits & HANDLEMASK);
srcPtr = p + (pObj->hBits & OFFSETMASK);
- pObj->charBase = (char *)p + READ_LE_UINT32(p + 0x10);
- pObj->transOffset = READ_LE_UINT32(p + 0x14);
+ pObj->charBase = (char *)p + READ_32(p + 0x10);
+ pObj->transOffset = READ_32(p + 0x14);
// Decompress block indexes for Discworld PSX
if (TinselV1PSX) {
@@ -793,7 +793,7 @@ void DrawObject(DRAWOBJECT *pObj) {
psxPaletteMapper(pObj->pPal, srcPtr + sizeof(uint16), psxMapperTable);
psxFourBitClut = true;
- psxSkipBytes = READ_LE_UINT32(p + sizeof(uint32) * 5) << 4; // Fetch number of bytes we have to skip
+ psxSkipBytes = READ_32(p + sizeof(uint32) * 5) << 4; // Fetch number of bytes we have to skip
switch (indexType) {
case 0xDD: // Normal uncompressed indexes
psxRLEindex = false;
@@ -822,120 +822,59 @@ void DrawObject(DRAWOBJECT *pObj) {
// Handle various draw types
uint8 typeId = pObj->flags & 0xff;
+ int packType = pObj->flags >> 14; // TinselV2
- if (TinselV2) {
- // Tinsel v2 decoders
- // Initial switch statement for the different bit packing types
- int packType = pObj->flags >> 14;
-
- if (packType == 0) {
- // No color packing
- switch (typeId) {
- case 0x01:
- case 0x11:
- case 0x41:
- case 0x51:
- case 0x81:
- case 0xC1:
- t2WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40, (typeId & 0x10) != 0);
- break;
- case 0x02:
- case 0x42:
- // This renderer called 'RlWrtAll', but is the same as t2WrtNonZero
- t2WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40, false);
- break;
- case 0x04:
- case 0x44:
- // WrtConst with/without clipping
- WrtConst(pObj, destPtr, typeId == 0x44);
- break;
- case 0x08:
- case 0x48:
- WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
- break;
- case 0x84:
- case 0xC4:
- // WrtTrans with/without clipping
- WrtTrans(pObj, destPtr, typeId == 0xC4);
- break;
- default:
- error("Unknown drawing type %d", typeId);
- }
- } else {
- // 1 = 16 from 240
- // 2 = 16 from 224
- // 3 = variable color
- if (packType == 1) pObj->baseCol = 0xF0;
- else if (packType == 2) pObj->baseCol = 0xE0;
-
- PackedWrtNonZero(pObj, srcPtr, destPtr, (pObj->flags & DMA_CLIP) != 0,
- (pObj->flags & DMA_FLIPH), packType);
- }
+ if (TinselV2 && packType != 0) {
+ // Color packing for TinselV2
+
+ if (packType == 1)
+ pObj->baseCol = 0xF0; // 16 from 240
+ else if (packType == 2)
+ pObj->baseCol = 0xE0; // 16 from 224
+ // 3 = variable color
- } else if (TinselV1PSX) {
- // Tinsel v1 decoders, PSX specific variants
+ PackedWrtNonZero(pObj, srcPtr, destPtr, (pObj->flags & DMA_CLIP) != 0,
+ (pObj->flags & DMA_FLIPH), packType);
+ } else {
switch (typeId) {
- case 0x01:
- case 0x41:
- PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, true);
- break;
- case 0x08:
- case 0x48:
- PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, false);
- break;
- case 0x84:
- case 0xC4:
- // WrtTrans with/without clipping
- WrtTrans(pObj, destPtr, typeId == 0xC4);
- break;
- case 0x04:
- case 0x44:
- // WrtConst with/without clipping
- WrtConst(pObj, destPtr, typeId == 0x44);
+ case 0x01: // all versions, draw sprite without clipping
+ case 0x41: // all versions, draw sprite with clipping
+ case 0x02: // TinselV2, draw sprite without clipping
+ case 0x11: // TinselV2, draw sprite without clipping, flipped horizontally
+ case 0x42: // TinselV2, draw sprite with clipping
+ case 0x51: // TinselV2, draw sprite with clipping, flipped horizontally
+ case 0x81: // TinselV2, draw sprite with clipping
+ case 0xC1: // TinselV2, draw sprite with clipping
+ assert(TinselV2 || (typeId == 0x01 || typeId == 0x41));
+
+ if (TinselV2)
+ t2WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40, (typeId & 0x10) != 0);
+ else if (TinselV1PSX)
+ PsxDrawTiles(pObj, srcPtr, destPtr, typeId == 0x41, psxFourBitClut, psxSkipBytes, psxMapperTable, true);
+ else if (TinselV1Mac)
+ {} // TODO
+ else if (TinselV1)
+ WrtNonZero(pObj, srcPtr, destPtr, typeId == 0x41);
+ else if (TinselV0)
+ t0WrtNonZero(pObj, srcPtr, destPtr, typeId == 0x41);
break;
- default:
- error("Unknown drawing type %d", typeId);
- }
- } else if (TinselV1) {
- // Tinsel v1 decoders
- switch (typeId) {
- case 0x01:
- case 0x08:
- case 0x41:
- case 0x48:
- WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
+ case 0x08: // draw background without clipping
+ case 0x48: // draw background with clipping
+ if (TinselV2 || TinselV1Mac || TinselV0)
+ WrtAll(pObj, srcPtr, destPtr, typeId == 0x48);
+ else if (TinselV1PSX)
+ PsxDrawTiles(pObj, srcPtr, destPtr, typeId == 0x48, psxFourBitClut, psxSkipBytes, psxMapperTable, false);
+ else if (TinselV1)
+ WrtNonZero(pObj, srcPtr, destPtr, typeId == 0x48);
break;
-
- case 0x04:
- case 0x44:
- // WrtConst with/without clipping
+ case 0x04: // fill with constant color without clipping
+ case 0x44: // fill with constant color with clipping
WrtConst(pObj, destPtr, typeId == 0x44);
break;
-
- case 0x84:
- case 0xC4:
- // WrtTrans with/without clipping
+ case 0x84: // draw transparent surface without clipping
+ case 0xC4: // draw transparent surface with clipping
WrtTrans(pObj, destPtr, typeId == 0xC4);
break;
-
- default:
- error("Unknown drawing type %d", typeId);
- }
- } else {
- // Tinsel v0 decoders
- switch (typeId) {
- case 0x01:
- case 0x41:
- t0WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
- break;
- case 0x08:
- case 0x48:
- WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
- break;
- case 0x84:
- case 0xC4:
- WrtTrans(pObj, destPtr, (typeId & 0x40) != 0);
- break;
default:
error("Unknown drawing type %d", typeId);
}
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp
index 14d588dcec..3921414b01 100644
--- a/engines/tinsel/handle.cpp
+++ b/engines/tinsel/handle.cpp
@@ -30,6 +30,7 @@
#include "tinsel/dw.h"
#include "tinsel/handle.h"
#include "tinsel/heapmem.h" // heap memory manager
+#include "tinsel/scn.h" // for the DW1 Mac resource handler
#include "tinsel/timers.h" // for DwGetCurrentTime()
#include "tinsel/tinsel.h"
#include "tinsel/scene.h"
@@ -85,7 +86,6 @@ static char g_szCdPlayFile[100];
static void LoadFile(MEMHANDLE *pH); // load a memory block as a file
-
/**
* Loads the graphics handle table index file and preloads all the
* permanent graphics etc.
@@ -300,7 +300,7 @@ void LoadFile(MEMHANDLE *pH) {
// discardable - unlock the memory
MemoryUnlock(pH->_node);
-
+
// set the loaded flag
pH->filesize |= fLoaded;
@@ -322,6 +322,7 @@ void LoadFile(MEMHANDLE *pH) {
*/
byte *LockMem(SCNHANDLE offset) {
uint32 handle = offset >> SCNHANDLE_SHIFT; // calc memory handle to use
+ //debug("Locking offset of type %d (%x), offset %d, handle %d", (offset & HANDLEMASK) >> SCNHANDLE_SHIFT, (offset & HANDLEMASK) >> SCNHANDLE_SHIFT, offset & OFFSETMASK, handle);
MEMHANDLE *pH; // points to table entry
// range check the memory handle
diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp
index c48fefdd22..37769a7819 100644
--- a/engines/tinsel/multiobj.cpp
+++ b/engines/tinsel/multiobj.cpp
@@ -40,22 +40,22 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) {
OBJECT *pFirst, *pObj; // object pointers
FRAME *pFrame; // list of images for the multi-part object
- if (FROM_LE_32(pInitTbl->hMulFrame)) {
+ if (FROM_32(pInitTbl->hMulFrame)) {
// we have a frame handle
- pFrame = (FRAME *)LockMem(FROM_LE_32(pInitTbl->hMulFrame));
+ pFrame = (FRAME *)LockMem(FROM_32(pInitTbl->hMulFrame));
- obj_init.hObjImg = READ_LE_UINT32(pFrame); // first objects shape
+ obj_init.hObjImg = READ_32(pFrame); // first objects shape
} else { // this must be a animation list for a NULL object
pFrame = NULL;
obj_init.hObjImg = 0; // first objects shape
}
// init the object init table
- obj_init.objFlags = (int)FROM_LE_32(pInitTbl->mulFlags); // all objects have same flags
- obj_init.objID = (int)FROM_LE_32(pInitTbl->mulID); // all objects have same ID
- obj_init.objX = (int)FROM_LE_32(pInitTbl->mulX); // all objects have same X ani pos
- obj_init.objY = (int)FROM_LE_32(pInitTbl->mulY); // all objects have same Y ani pos
- obj_init.objZ = (int)FROM_LE_32(pInitTbl->mulZ); // all objects have same Z pos
+ obj_init.objFlags = (int)FROM_32(pInitTbl->mulFlags); // all objects have same flags
+ obj_init.objID = (int)FROM_32(pInitTbl->mulID); // all objects have same ID
+ obj_init.objX = (int)FROM_32(pInitTbl->mulX); // all objects have same X ani pos
+ obj_init.objY = (int)FROM_32(pInitTbl->mulY); // all objects have same Y ani pos
+ obj_init.objZ = (int)FROM_32(pInitTbl->mulZ); // all objects have same Z pos
// create and init the first object
pObj = pFirst = InitObject(&obj_init);
@@ -65,9 +65,9 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) {
pFrame++;
- while (READ_LE_UINT32(pFrame) != 0) {
+ while (READ_32(pFrame) != 0) {
// set next objects shape
- obj_init.hObjImg = READ_LE_UINT32(pFrame);
+ obj_init.hObjImg = READ_32(pFrame);
// create next object and link to previous
pObj = pObj->pSlave = InitObject(&obj_init);
@@ -378,9 +378,9 @@ void MultiReshape(OBJECT *pMultiObj) {
// update previous
pMultiObj->hMirror = hFrame;
- while (READ_LE_UINT32(pFrame) != 0 && pMultiObj != NULL) {
+ while (READ_32(pFrame) != 0 && pMultiObj != NULL) {
// a normal image - update the current object with this image
- AnimateObject(pMultiObj, READ_LE_UINT32(pFrame));
+ AnimateObject(pMultiObj, READ_32(pFrame));
// move to next image for this frame
pFrame++;
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index b3bfbcc5dc..dab2a897fc 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -135,6 +135,10 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) {
if (ConfMan.hasKey("mute"))
mute = ConfMan.getBool("mute");
+ // The Macintosh version of DW1 uses raw PCM for music
+ if (TinselV1Mac)
+ return _vm->_sound->playDW1MacMusic(dwFileOffset);
+
SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume);
// the index and length of the last tune loaded
@@ -281,6 +285,11 @@ void OpenMidiFiles() {
if (TinselV0 || TinselV2)
return;
+ // The Macintosh version of DW1 does not use MIDI for music.
+ // It uses PCM music instead, which is quite big to be preloaded here.
+ if (TinselV1Mac)
+ return;
+
if (g_midiBuffer.pDat)
// already allocated
return;
@@ -784,8 +793,8 @@ bool PCMMusicPlayer::getNextChunk() {
// Set parameters for this chunk of music
id = _scriptNum;
while (id--)
- script = scriptBuffer + READ_LE_UINT32(script);
- snum = FROM_LE_32(script[_scriptIndex++]);
+ script = scriptBuffer + READ_32(script);
+ snum = FROM_32(script[_scriptIndex++]);
if (snum == MUSIC_JUMP || snum == MUSIC_END) {
// Let usual code sort it out!
@@ -797,11 +806,11 @@ bool PCMMusicPlayer::getNextChunk() {
musicSegments = (MusicSegment *) LockMem(_hSegment);
- assert(FROM_LE_32(musicSegments[snum].numChannels) == 1);
- assert(FROM_LE_32(musicSegments[snum].bitsPerSample) == 16);
+ assert(FROM_32(musicSegments[snum].numChannels) == 1);
+ assert(FROM_32(musicSegments[snum].bitsPerSample) == 16);
- sampleOffset = FROM_LE_32(musicSegments[snum].sampleOffset);
- sampleLength = FROM_LE_32(musicSegments[snum].sampleLength);
+ sampleOffset = FROM_32(musicSegments[snum].sampleOffset);
+ sampleLength = FROM_32(musicSegments[snum].sampleLength);
sampleCLength = (((sampleLength + 63) & ~63)*33)/64;
if (!file.open(_filename))
@@ -839,14 +848,14 @@ bool PCMMusicPlayer::getNextChunk() {
id = _scriptNum;
while (id--)
- script = scriptBuffer + READ_LE_UINT32(script);
- snum = FROM_LE_32(script[_scriptIndex]);
+ script = scriptBuffer + READ_32(script);
+ snum = FROM_32(script[_scriptIndex]);
if (snum == MUSIC_END) {
_state = S_END2;
} else {
if (snum == MUSIC_JUMP)
- _scriptIndex = FROM_LE_32(script[_scriptIndex+1]);
+ _scriptIndex = FROM_32(script[_scriptIndex+1]);
_state = _forcePlay ? S_NEW : S_NEXT;
_forcePlay = false;
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index cbe5b0a88f..cbf1c86649 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -302,23 +302,23 @@ void GetAniOffset(SCNHANDLE hImg, int flags, int *pAniX, int *pAniY) {
const IMAGE *pImg = (const IMAGE *)LockMem(hImg);
// set ani X
- *pAniX = (int16) FROM_LE_16(pImg->anioffX);
+ *pAniX = (int16) FROM_16(pImg->anioffX);
// set ani Y
- *pAniY = (int16) FROM_LE_16(pImg->anioffY);
+ *pAniY = (int16) FROM_16(pImg->anioffY);
if (flags & DMA_FLIPH) {
// we are flipped horizontally
// set ani X = -ani X + width - 1
- *pAniX = -*pAniX + FROM_LE_16(pImg->imgWidth) - 1;
+ *pAniX = -*pAniX + FROM_16(pImg->imgWidth) - 1;
}
if (flags & DMA_FLIPV) {
// we are flipped vertically
// set ani Y = -ani Y + height - 1
- *pAniY = -*pAniY + (FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK) - 1;
+ *pAniY = -*pAniY + (FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK) - 1;
}
} else
// null image
@@ -385,13 +385,13 @@ OBJECT *InitObject(const OBJ_INIT *pInitTbl) {
pObj->pPal = pPalQ;
// set objects size
- pObj->width = FROM_LE_16(pImg->imgWidth);
- pObj->height = FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK;
+ pObj->width = FROM_16(pImg->imgWidth);
+ pObj->height = FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK;
pObj->flags &= ~C16_FLAG_MASK;
- pObj->flags |= FROM_LE_16(pImg->imgHeight) & C16_FLAG_MASK;
+ pObj->flags |= FROM_16(pImg->imgHeight) & C16_FLAG_MASK;
// set objects bitmap definition
- pObj->hBits = FROM_LE_32(pImg->hImgBits);
+ pObj->hBits = FROM_32(pImg->hImgBits);
// get animation offset of object
GetAniOffset(pObj->hImg, pInitTbl->objFlags, &aniX, &aniY);
@@ -442,13 +442,13 @@ void AnimateObjectFlags(OBJECT *pAniObj, int newflags, SCNHANDLE hNewImg) {
const IMAGE *pNewImg = (IMAGE *)LockMem(hNewImg);
// setup new shape
- pAniObj->width = FROM_LE_16(pNewImg->imgWidth);
- pAniObj->height = FROM_LE_16(pNewImg->imgHeight) & ~C16_FLAG_MASK;
+ pAniObj->width = FROM_16(pNewImg->imgWidth);
+ pAniObj->height = FROM_16(pNewImg->imgHeight) & ~C16_FLAG_MASK;
newflags &= ~C16_FLAG_MASK;
- newflags |= FROM_LE_16(pNewImg->imgHeight) & C16_FLAG_MASK;
+ newflags |= FROM_16(pNewImg->imgHeight) & C16_FLAG_MASK;
// set objects bitmap definition
- pAniObj->hBits = FROM_LE_32(pNewImg->hImgBits);
+ pAniObj->hBits = FROM_32(pNewImg->hImgBits);
} else { // null image
pAniObj->width = 0;
pAniObj->height = 0;
@@ -494,7 +494,7 @@ OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) {
OBJECT *pRect = InitObject(&rectObj);
// allocate a palette for this object
- pPalQ = AllocPalette(hPal);
+ pPalQ = AllocPalette(FROM_32(hPal));
// make sure palette allocated
assert(pPalQ != NULL);
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index e6c9467fab..04018172c0 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -102,7 +102,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) {
memset(mapperTable, 0, 16);
for (int j = 1; j < 16; j++) {
- clutEntry = READ_LE_UINT16(psxClut + (sizeof(uint16) * j));
+ clutEntry = READ_16(psxClut + (sizeof(uint16) * j));
if (clutEntry) {
if (clutEntry == 0x7EC0) { // This is an already known value, used by the in-game text
mapperTable[j] = 232;
@@ -110,7 +110,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) {
}
// Check for correspondent color
- for (uint i = 0; (i < FROM_LE_32(pal->numColors)) && !colorFound; i++) {
+ for (uint i = 0; (i < FROM_32(pal->numColors)) && !colorFound; i++) {
// get R G B values in the same way as psx format converters
uint16 psxEquivalent = TINSEL_PSX_RGB(TINSEL_GetRValue(pal->palRGB[i]) >> 3, TINSEL_GetGValue(pal->palRGB[i]) >> 3, TINSEL_GetBValue(pal->palRGB[i]) >> 3);
@@ -152,7 +152,7 @@ void PalettesToVideoDAC() {
// we are using a palette handle
// get hardware palette pointer
- pPalette = (const PALETTE *)LockMem(pDACtail->pal.hRGBarray);
+ pPalette = (const PALETTE *)LockMem(FROM_32(pDACtail->pal.hRGBarray));
// get RGB pointer
pColors = pPalette->palRGB;
@@ -170,6 +170,12 @@ void PalettesToVideoDAC() {
pal[i * 3 + 2] = TINSEL_GetBValue(pColors[i]);
}
+ // In DW1 Mac, color 254 should be black, like in the PC version.
+ // We fix it here.
+ if (TinselV1Mac) {
+ pal[254 * 3 + 0] = pal[254 * 3 + 1] = pal[254 * 3 + 2] = 0;
+ }
+
// update the system palette
g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColors);
@@ -298,7 +304,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
PALETTE *pNewPal;
// get pointer to new palette
- pNewPal = (PALETTE *)LockMem(hNewPal);
+ pNewPal = (PALETTE *)LockMem(FROM_32(hNewPal));
// search all structs in palette allocator - see if palette already allocated
for (p = g_palAllocData; p < g_palAllocData + NUM_PALETTES; p++) {
@@ -318,7 +324,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
p->objCount = 1; // init number of objects using palette
p->posInDAC = iDAC; // set palettes start pos in video DAC
p->hPal = hNewPal; // set hardware palette data
- p->numColors = FROM_LE_32(pNewPal->numColors); // set number of colors in palette
+ p->numColors = FROM_32(pNewPal->numColors); // set number of colors in palette
if (TinselV2)
// Copy all the colors
@@ -430,24 +436,24 @@ void SwapPalette(PALQ *pPalQ, SCNHANDLE hNewPal) {
// validate palette Q pointer
assert(pPalQ >= g_palAllocData && pPalQ <= g_palAllocData + NUM_PALETTES - 1);
- if (pPalQ->numColors >= (int)FROM_LE_32(pNewPal->numColors)) {
+ if (pPalQ->numColors >= (int)FROM_32(pNewPal->numColors)) {
// new palette will fit the slot
// install new palette
pPalQ->hPal = hNewPal;
if (TinselV2) {
- pPalQ->numColors = FROM_LE_32(pNewPal->numColors);
+ pPalQ->numColors = FROM_32(pNewPal->numColors);
// Copy all the colors
- memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColors) * sizeof(COLORREF));
+ memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_32(pNewPal->numColors) * sizeof(COLORREF));
if (!pPalQ->bFading)
// Q the change to the video DAC
- UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), pPalQ->palRGB);
+ UpdateDACqueue(pPalQ->posInDAC, FROM_32(pNewPal->numColors), pPalQ->palRGB);
} else {
// Q the change to the video DAC
- UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), hNewPal);
+ UpdateDACqueueHandle(pPalQ->posInDAC, FROM_32(pNewPal->numColors), hNewPal);
}
} else {
// # colors are different - will have to update all following palette entries
@@ -546,7 +552,7 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) {
// leave background color alone
g_transPalette[0] = 0;
- for (uint i = 0; i < FROM_LE_32(pPal->numColors); i++) {
+ for (uint i = 0; i < FROM_32(pPal->numColors); i++) {
// get the RGB color model values
uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
@@ -574,7 +580,7 @@ void CreateGhostPalette(SCNHANDLE hPalette) {
// leave background color alone
g_ghostPalette[0] = 0;
- for (i = 0; i < (int)FROM_LE_32(pPal->numColors); i++) {
+ for (i = 0; i < (int)FROM_32(pPal->numColors); i++) {
// get the RGB color model values
uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index af58a7ffbd..49a78ae236 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -30,11 +30,11 @@ namespace Tinsel {
typedef uint32 COLORREF;
-#define TINSEL_RGB(r,g,b) ((COLORREF)TO_LE_32(((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<16)))
+#define TINSEL_RGB(r,g,b) ((COLORREF)TO_32(((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<16)))
-#define TINSEL_GetRValue(rgb) ((uint8)(FROM_LE_32(rgb)))
-#define TINSEL_GetGValue(rgb) ((uint8)(((uint16)(FROM_LE_32(rgb)))>>8))
-#define TINSEL_GetBValue(rgb) ((uint8)((FROM_LE_32(rgb))>>16))
+#define TINSEL_GetRValue(rgb) ((uint8)(FROM_32(rgb)))
+#define TINSEL_GetGValue(rgb) ((uint8)(((uint16)(FROM_32(rgb)))>>8))
+#define TINSEL_GetBValue(rgb) ((uint8)((FROM_32(rgb))>>16))
#define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index 04bc2856ca..7e439e83a9 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -420,7 +420,7 @@ void RegisterGlobals(int num) {
g_numGlobals = num;
g_hMasterScript = !TinselV2 ? 0 :
- READ_LE_UINT32(FindChunk(MASTER_SCNHANDLE, CHUNK_MASTER_SCRIPT));
+ READ_32(FindChunk(MASTER_SCNHANDLE, CHUNK_MASTER_SCRIPT));
// Allocate RAM for pGlobals and make sure it's allocated
g_pGlobals = (int32 *)calloc(g_numGlobals, sizeof(int32));
diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp
index 9e0baa749e..e202278953 100644
--- a/engines/tinsel/play.cpp
+++ b/engines/tinsel/play.cpp
@@ -81,9 +81,9 @@ static void PokeInPalette(SCNHANDLE hMulFrame) {
pFrame = (const FRAME *)LockMem(hMulFrame);
// get pointer to image
- pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image
+ pim = (IMAGE *)LockMem(READ_32(pFrame)); // handle to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
}
}
@@ -96,12 +96,12 @@ void PokeInPalette(const MULTI_INIT *pmi) {
// Could be an empty column
if (pmi->hMulFrame) {
- pFrame = (FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame));
+ pFrame = (FRAME *)LockMem(FROM_32(pmi->hMulFrame));
// get pointer to image
- pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image
+ pim = (IMAGE *)LockMem(READ_32(pFrame)); // handle to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
}
}
@@ -234,8 +234,8 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
PMULTI_INIT pmi; // MULTI_INIT structure
pReel = GetReel(hFilm, actorCol - 1);
- pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pReel->mobj));
- _ctx->reelActor = (int32)FROM_LE_32(pmi->mulID);
+ pmi = (PMULTI_INIT) LockMem(FROM_32(pReel->mobj));
+ _ctx->reelActor = (int32)FROM_32(pmi->mulID);
} else
_ctx->reelActor = 0;
@@ -251,27 +251,27 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
pFilm = (FILM *)LockMem(hFilm);
pReel = &pFilm->reels[column];
- pAni = (ANI_SCRIPT *)LockMem(FROM_LE_32(pReel->script));
+ pAni = (ANI_SCRIPT *)LockMem(FROM_32(pReel->script));
if (_ctx->speed == -1) {
- _ctx->speed = (ONE_SECOND/FROM_LE_32(pFilm->frate));
+ _ctx->speed = (ONE_SECOND/FROM_32(pFilm->frate));
// Restored reel
for (;;) {
- if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_END)
+ if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_END)
break;
- else if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_JUMP) {
+ else if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_JUMP) {
_ctx->frameNumber++;
- _ctx->frameNumber += FROM_LE_32(pAni[_ctx->frameNumber].op);
+ _ctx->frameNumber += FROM_32(pAni[_ctx->frameNumber].op);
break;
}
// Could check for the other stuff here
// but they really dont happen
// OH YES THEY DO
- else if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTX
- || FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTY) {
+ else if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTX
+ || FROM_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTY) {
_ctx->frameNumber += 2;
- } else if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTXY) {
+ } else if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTXY) {
_ctx->frameNumber += 3;
} else {
// ANI_STOP, ANI_HIDE, ANI_HFLIP,
@@ -281,7 +281,7 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
}
}
- switch (FROM_LE_32(pAni[_ctx->frameNumber].op)) {
+ switch (FROM_32(pAni[_ctx->frameNumber].op)) {
case ANI_END:
// Stop this sample if repeating
if (_ctx->sampleNumber && _ctx->bLooped)
@@ -292,9 +292,9 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
case ANI_JUMP:
_ctx->frameNumber++;
- assert((int32)FROM_LE_32(pAni[_ctx->frameNumber].op) < 0);
+ assert((int32)FROM_32(pAni[_ctx->frameNumber].op) < 0);
- _ctx->frameNumber += FROM_LE_32(pAni[_ctx->frameNumber].op);
+ _ctx->frameNumber += FROM_32(pAni[_ctx->frameNumber].op);
assert(_ctx->frameNumber >= 0);
continue;
@@ -329,15 +329,15 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
if (_ctx->sampleNumber)
_vm->_sound->stopSpecSample(_ctx->sampleNumber, 0);
- _ctx->sampleNumber = FROM_LE_32(pAni[_ctx->frameNumber++].op);
+ _ctx->sampleNumber = FROM_32(pAni[_ctx->frameNumber++].op);
if (_ctx->sampleNumber > 0)
_ctx->bLooped = false;
else {
_ctx->sampleNumber = ~_ctx->sampleNumber;
_ctx->bLooped = true;
}
- x = (short)(FROM_LE_32(pAni[_ctx->frameNumber].op) >> 16);
- y = (short)(FROM_LE_32(pAni[_ctx->frameNumber].op) & 0xffff);
+ x = (short)(FROM_32(pAni[_ctx->frameNumber].op) >> 16);
+ y = (short)(FROM_32(pAni[_ctx->frameNumber].op) & 0xffff);
if (x == 0)
x = -1;
@@ -451,10 +451,10 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) {
_ctx->pfreel = &pfilm->reels[ppi->column];
// Get the MULTI_INIT structure
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(_ctx->pfreel->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(_ctx->pfreel->mobj));
// Save actor's ID
- _ctx->reelActor = (int32)FROM_LE_32(pmi->mulID);
+ _ctx->reelActor = (int32)FROM_32(pmi->mulID);
/**** New (experimental? bit 5/1/95 ****/
if (!TinselV0 && !actorAlive(_ctx->reelActor))
@@ -488,7 +488,7 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) {
return;
// Poke in the background palette
- PokeInPalette(FROM_LE_32(pmi->hMulFrame));
+ PokeInPalette(FROM_32(pmi->hMulFrame));
// Set up and insert the multi-object
_ctx->pPlayObj = MultiInitObject(pmi);
@@ -534,7 +534,7 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) {
if (ppi->actorid == 0 && !actorAlive(_ctx->reelActor))
_ctx->lifeNoMatter = true;
- InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_LE_32(_ctx->pfreel->script), ppi->speed);
+ InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_32(_ctx->pfreel->script), ppi->speed);
// If first column, set Z position as per
// Otherwise, column 0's + column number
@@ -706,16 +706,16 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// Get the reel and MULTI_INIT structure
_ctx->pFreel = GetReel(hFilm, column);
- _ctx->pmi = (MULTI_INIT *)LockMem(FROM_LE_32(_ctx->pFreel->mobj));
+ _ctx->pmi = (MULTI_INIT *)LockMem(FROM_32(_ctx->pFreel->mobj));
- if ((int32)FROM_LE_32(_ctx->pmi->mulID) == -2) {
+ if ((int32)FROM_32(_ctx->pmi->mulID) == -2) {
CORO_INVOKE_ARGS(SoundReel, (CORO_SUBCTX, hFilm, column, speed, myescEvent,
- FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATEDACTOR));
+ FROM_32(_ctx->pmi->otherFlags) & OTH_RELATEDACTOR));
return;
}
// Save actor's ID
- _ctx->reelActor = FROM_LE_32(_ctx->pmi->mulID);
+ _ctx->reelActor = FROM_32(_ctx->pmi->mulID);
UpdateActorEsc(_ctx->reelActor, myescEvent);
@@ -759,8 +759,8 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// Set ghost bit if wanted
if (ActorIsGhost(_ctx->reelActor)) {
- assert(FROM_LE_32(_ctx->pmi->mulFlags) == DMA_WNZ || FROM_LE_32(_ctx->pmi->mulFlags) == (DMA_WNZ | DMA_GHOST));
- _ctx->pmi->mulFlags = TO_LE_32(FROM_LE_32(_ctx->pmi->mulFlags) | DMA_GHOST);
+ assert(FROM_32(_ctx->pmi->mulFlags) == DMA_WNZ || FROM_32(_ctx->pmi->mulFlags) == (DMA_WNZ | DMA_GHOST));
+ _ctx->pmi->mulFlags = TO_32(FROM_32(_ctx->pmi->mulFlags) | DMA_GHOST);
}
// Set up and insert the multi-object
@@ -793,10 +793,10 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
/*
* Sort out x and y
*/
- assert( ((FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE) && !(FROM_LE_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE))
- || ((FROM_LE_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE) && !(FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE)) );
+ assert( ((FROM_32(_ctx->pmi->otherFlags) & OTH_RELATIVE) && !(FROM_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE))
+ || ((FROM_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE) && !(FROM_32(_ctx->pmi->otherFlags) & OTH_RELATIVE)) );
- _ctx->bRelative = FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE;
+ _ctx->bRelative = FROM_32(_ctx->pmi->otherFlags) & OTH_RELATIVE;
if (_ctx->bRelative) {
// Use actor's position. If (x, y) specified, move the actor.
@@ -808,7 +808,7 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
x = y = 0; // Use (0,0) if no specified
// Add embedded co-ords
- MultiSetAniXY(_ctx->pPlayObj, x + FROM_LE_32(_ctx->pmi->mulX), y + FROM_LE_32(_ctx->pmi->mulY));
+ MultiSetAniXY(_ctx->pPlayObj, x + FROM_32(_ctx->pmi->mulX), y + FROM_32(_ctx->pmi->mulY));
/*
* Sort out z
@@ -824,10 +824,10 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// N.B. It HAS been ensured that the first column gets here first
- if ((int32)FROM_LE_32(_ctx->pmi->mulZ) != -1) {
+ if ((int32)FROM_32(_ctx->pmi->mulZ) != -1) {
// Z override in script
- baseZfact = FROM_LE_32(_ctx->pmi->mulZ);
+ baseZfact = FROM_32(_ctx->pmi->mulZ);
baseZposn = (baseZfact << ZSHIFT) + MultiLowest(_ctx->pPlayObj);
if (bTop)
baseZposn += Z_TOPPLAY;
@@ -850,7 +850,7 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
* another reel starts up for this actor,
* or the actor gets killed.
*/
- InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_LE_32(_ctx->pFreel->script), speed);
+ InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_32(_ctx->pFreel->script), speed);
if (bRestore || (ActorEsc(_ctx->reelActor) == true &&
ActorEev(_ctx->reelActor) != GetEscEvents())) {
@@ -952,10 +952,10 @@ void NewestFilm(SCNHANDLE film, const FREEL *reel) {
const MULTI_INIT *pmi; // MULTI_INIT structure
// Get the MULTI_INIT structure
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(reel->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(reel->mobj));
- if (!TinselV2 || ((int32)FROM_LE_32(pmi->mulID) != -2))
- SetActorLatestFilm((int32)FROM_LE_32(pmi->mulID), film);
+ if (!TinselV2 || ((int32)FROM_32(pmi->mulID) != -2))
+ SetActorLatestFilm((int32)FROM_32(pmi->mulID), film);
}
// *******************************************************
@@ -988,7 +988,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay
ppi.y = y;
ppi.z = 0;
ppi.bRestore = false;
- ppi.speed = (ONE_SECOND / FROM_LE_32(pFilm->frate));
+ ppi.speed = (ONE_SECOND / FROM_32(pFilm->frate));
ppi.actorid = actorid;
ppi.splay = splay;
ppi.bTop = bTop;
@@ -997,7 +997,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay
ppi.myescEvent = myescEvent;
// Start display process for each reel in the film
- for (int i = FROM_LE_32(pFilm->numreels) - 1; i >= 0; i--) {
+ for (int i = FROM_32(pFilm->numreels) - 1; i >= 0; i--) {
NewestFilm(hFilm, &pFilm->reels[i]);
ppi.column = i;
@@ -1049,7 +1049,7 @@ void PlayFilmc(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool spla
_ctx->ppi.y = y;
_ctx->ppi.z = 0;
_ctx->ppi.bRestore = false;
- _ctx->ppi.speed = (ONE_SECOND / FROM_LE_32(pFilm->frate));
+ _ctx->ppi.speed = (ONE_SECOND / FROM_32(pFilm->frate));
_ctx->ppi.actorid = actorid;
_ctx->ppi.splay = splay;
_ctx->ppi.bTop = bTop;
@@ -1059,7 +1059,7 @@ void PlayFilmc(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool spla
// Start display process for each secondary reel in the film in Tinsel 1,
// or all of them in Tinsel 2
- for (int i = FROM_LE_32(pFilm->numreels) - 1; i >= (TinselV2 ? 0 : 1); i--) {
+ for (int i = FROM_32(pFilm->numreels) - 1; i >= (TinselV2 ? 0 : 1); i--) {
NewestFilm(hFilm, &pFilm->reels[i]);
_ctx->ppi.column = i;
@@ -1109,7 +1109,7 @@ void RestoreActorReels(SCNHANDLE hFilm, short reelnum, short z, int x, int y) {
ppi.x = x;
ppi.y = y;
ppi.z = z;
- ppi.speed = (ONE_SECOND / FROM_LE_32(pfilm->frate));
+ ppi.speed = (ONE_SECOND / FROM_32(pfilm->frate));
ppi.actorid = 0;
ppi.splay = false;
ppi.bTop = false;
@@ -1147,15 +1147,15 @@ void RestoreActorReels(SCNHANDLE hFilm, int actor, int x, int y) {
ppi.x = (short)x;
ppi.y = (short)y;
ppi.bRestore = true;
- ppi.speed = (short)(ONE_SECOND/FROM_LE_32(pFilm->frate));
+ ppi.speed = (short)(ONE_SECOND/FROM_32(pFilm->frate));
ppi.bTop = false;
ppi.myescEvent = 0;
// Search backwards for now as later column will be the one
- for (i = (int)FROM_LE_32(pFilm->numreels) - 1; i >= 0; i--) {
+ for (i = (int)FROM_32(pFilm->numreels) - 1; i >= 0; i--) {
pFreel = &pFilm->reels[i];
- pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pFreel->mobj));
- if ((int32)FROM_LE_32(pmi->mulID) == actor) {
+ pmi = (PMULTI_INIT) LockMem(FROM_32(pFreel->mobj));
+ if ((int32)FROM_32(pmi->mulID) == actor) {
ppi.column = (short)i;
NewestFilm(hFilm, &pFilm->reels[i]);
@@ -1173,8 +1173,8 @@ void RestoreActorReels(SCNHANDLE hFilm, int actor, int x, int y) {
int ExtractActor(SCNHANDLE hFilm) {
const FILM *pFilm = (const FILM *)LockMem(hFilm);
const FREEL *pReel = &pFilm->reels[0];
- const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj));
- return (int)FROM_LE_32(pmi->mulID);
+ const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_32(pReel->mobj));
+ return (int)FROM_32(pmi->mulID);
}
} // End of namespace Tinsel
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index d8c1cef0b6..8a984c78f9 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -154,13 +154,13 @@ public:
void setIndex(int index);
- POLY_TYPE getType() const { return (POLY_TYPE)FROM_LE_32(type); }
- int getNodecount() const { return (int)FROM_LE_32(nodecount); }
- int getNodeX(int i) const { return (int)FROM_LE_32(nlistx[i]); }
- int getNodeY(int i) const { return (int)FROM_LE_32(nlisty[i]); }
+ POLY_TYPE getType() const { return (POLY_TYPE)FROM_32(type); }
+ int getNodecount() const { return (int)FROM_32(nodecount); }
+ int getNodeX(int i) const { return (int)FROM_32(nlistx[i]); }
+ int getNodeY(int i) const { return (int)FROM_32(nlisty[i]); }
// get Inter-node line structure
- const LINEINFO *getLineinfo(int i) const { return ((const LINEINFO *)(_pStart + (int)FROM_LE_32(plinelist))) + i; }
+ const LINEINFO *getLineinfo(int i) const { return ((const LINEINFO *)(_pStart + (int)FROM_32(plinelist))) + i; }
protected:
POLY_TYPE type; ///< type of polygon
@@ -230,8 +230,8 @@ void Poly::nextPoly() {
const byte *pRecord = _pData;
int typeVal = nextLong(_pData);
- if ((FROM_LE_32(typeVal) == 5) && TinselV2)
- typeVal = TO_LE_32(6);
+ if ((FROM_32(typeVal) == 5) && TinselV2)
+ typeVal = TO_32(6);
type = (POLY_TYPE)typeVal;
for (int i = 0; i < 4; ++i)
@@ -275,8 +275,8 @@ void Poly::nextPoly() {
pnodelisty = nextLong(_pData);
plinelist = nextLong(_pData);
- nlistx = (const int32 *)(_pStart + (int)FROM_LE_32(pnodelistx));
- nlisty = (const int32 *)(_pStart + (int)FROM_LE_32(pnodelisty));
+ nlistx = (const int32 *)(_pStart + (int)FROM_32(pnodelistx));
+ nlisty = (const int32 *)(_pStart + (int)FROM_32(pnodelisty));
if (TinselV0)
// Skip to the last 4 bytes of the record for the hScript value
@@ -591,16 +591,16 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
for (int i = 0; i < ptp.getNodecount() - 1; i++) {
const LINEINFO *line = ptp.getLineinfo(i);
- const int32 a = (int)FROM_LE_32(line->a);
- const int32 b = (int)FROM_LE_32(line->b);
- const int32 c = (int)FROM_LE_32(line->c);
+ const int32 a = (int)FROM_32(line->a);
+ const int32 b = (int)FROM_32(line->b);
+ const int32 c = (int)FROM_32(line->c);
#if 1
// TODO: If the comments of the LINEINFO struct are correct, then it contains mostly
// duplicate data, probably in an effort to safe CPU cycles. Even on the slowest devices
// we support, calculating a product of two ints is not an issue.
// So we can just load & endian convert a,b,c, then replace stuff like
- // (int)FROM_LE_32(line->ab)
+ // (int)FROM_32(line->ab)
// by simply a*b, which makes it easier to understand what the code does, too.
// Just in case there is some bugged data, I leave this code here for verifying it.
// Let's leave it in for some time.
@@ -608,14 +608,14 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
// One bad thing: We use sqrt to compute a square root. Might not be a good idea,
// speed wise. Maybe we should take Vicent's fp_sqroot. But that's a problem for later.
- int32 a2 = (int)FROM_LE_32(line->a2); ///< a squared
- int32 b2 = (int)FROM_LE_32(line->b2); ///< b squared
- int32 a2pb2 = (int)FROM_LE_32(line->a2pb2); ///< a squared + b squared
- int32 ra2pb2 = (int)FROM_LE_32(line->ra2pb2); ///< root(a squared + b squared)
+ int32 a2 = (int)FROM_32(line->a2); ///< a squared
+ int32 b2 = (int)FROM_32(line->b2); ///< b squared
+ int32 a2pb2 = (int)FROM_32(line->a2pb2); ///< a squared + b squared
+ int32 ra2pb2 = (int)FROM_32(line->ra2pb2); ///< root(a squared + b squared)
- int32 ab = (int)FROM_LE_32(line->ab);
- int32 ac = (int)FROM_LE_32(line->ac);
- int32 bc = (int)FROM_LE_32(line->bc);
+ int32 ab = (int)FROM_32(line->ab);
+ int32 ac = (int)FROM_32(line->ac);
+ int32 bc = (int)FROM_32(line->bc);
assert(a*a == a2);
assert(b*b == b2);
@@ -676,9 +676,9 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
// A point on a line is nearest
const LINEINFO *line = ptp.getLineinfo(nearestL);
- const int32 a = (int)FROM_LE_32(line->a);
- const int32 b = (int)FROM_LE_32(line->b);
- const int32 c = (int)FROM_LE_32(line->c);
+ const int32 a = (int)FROM_32(line->a);
+ const int32 b = (int)FROM_32(line->b);
+ const int32 c = (int)FROM_32(line->c);
dropX = ((b*b * h) - (a*b * k) - a*c) / (a*a + b*b);
dropY = ((a*a * k) - (a*b * h) - b*c) / (a*a + b*b);
*x = dropX;
@@ -994,15 +994,15 @@ int GetScale(HPOLYGON hPath, int y) {
Poly ptp(LockMem(pHandle), Polys[hPath]->pIndex);
// Path is of a constant scale?
- if (FROM_LE_32(ptp.scale2) == 0)
- return FROM_LE_32(ptp.scale1);
+ if (FROM_32(ptp.scale2) == 0)
+ return FROM_32(ptp.scale1);
- assert(FROM_LE_32(ptp.scale1) >= FROM_LE_32(ptp.scale2));
+ assert(FROM_32(ptp.scale1) >= FROM_32(ptp.scale2));
- zones = FROM_LE_32(ptp.scale1) - FROM_LE_32(ptp.scale2) + 1;
+ zones = FROM_32(ptp.scale1) - FROM_32(ptp.scale2) + 1;
zlen = (Polys[hPath]->pbottom - Polys[hPath]->ptop) / zones;
- scale = FROM_LE_32(ptp.scale1);
+ scale = FROM_32(ptp.scale1);
top = Polys[hPath]->ptop;
do {
@@ -1011,7 +1011,7 @@ int GetScale(HPOLYGON hPath, int y) {
return scale;
} while (--scale);
- return FROM_LE_32(ptp.scale2);
+ return FROM_32(ptp.scale2);
}
/**
@@ -1033,15 +1033,15 @@ int GetBrightness(HPOLYGON hPath, int y) {
Poly ptp(LockMem(pHandle), Polys[hPath]->pIndex);
// Path is of a constant brightness?
- if (FROM_LE_32(ptp.bright1) == FROM_LE_32(ptp.bright2))
- return FROM_LE_32(ptp.bright1);
+ if (FROM_32(ptp.bright1) == FROM_32(ptp.bright2))
+ return FROM_32(ptp.bright1);
- assert(FROM_LE_32(ptp.bright1) >= FROM_LE_32(ptp.bright2));
+ assert(FROM_32(ptp.bright1) >= FROM_32(ptp.bright2));
- zones = FROM_LE_32(ptp.bright1) - FROM_LE_32(ptp.bright2) + 1;
+ zones = FROM_32(ptp.bright1) - FROM_32(ptp.bright2) + 1;
zlen = (Polys[hPath]->pbottom - Polys[hPath]->ptop) / zones;
- brightness = FROM_LE_32(ptp.bright1);
+ brightness = FROM_32(ptp.bright1);
top = Polys[hPath]->ptop;
do {
@@ -1050,7 +1050,7 @@ int GetBrightness(HPOLYGON hPath, int y) {
return brightness;
} while (--brightness);
- return FROM_LE_32(ptp.bright2);
+ return FROM_32(ptp.bright2);
}
@@ -1079,9 +1079,9 @@ void GetTagTag(HPOLYGON hp, SCNHANDLE *hTagText, int *tagx, int *tagy) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- *tagx = (int)FROM_LE_32(ptp.tagx) + (TinselV2 ? volatileStuff[hp].xoff : 0);
- *tagy = (int)FROM_LE_32(ptp.tagy) + (TinselV2 ? volatileStuff[hp].yoff : 0);
- *hTagText = FROM_LE_32(ptp.hTagtext);
+ *tagx = (int)FROM_32(ptp.tagx) + (TinselV2 ? volatileStuff[hp].xoff : 0);
+ *tagy = (int)FROM_32(ptp.tagy) + (TinselV2 ? volatileStuff[hp].yoff : 0);
+ *hTagText = FROM_32(ptp.hTagtext);
}
/**
@@ -1092,7 +1092,7 @@ SCNHANDLE GetPolyFilm(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return FROM_LE_32(ptp.hFilm);
+ return FROM_32(ptp.hFilm);
}
/**
@@ -1103,7 +1103,7 @@ SCNHANDLE GetPolyScript(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return FROM_LE_32(ptp.hScript);
+ return FROM_32(ptp.hScript);
}
REEL GetPolyReelType(HPOLYGON hp) {
@@ -1115,7 +1115,7 @@ REEL GetPolyReelType(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return (REEL)FROM_LE_32(ptp.reel);
+ return (REEL)FROM_32(ptp.reel);
}
int32 GetPolyZfactor(HPOLYGON hp) {
@@ -1124,7 +1124,7 @@ int32 GetPolyZfactor(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return (int)FROM_LE_32(ptp.zFactor);
+ return (int)FROM_32(ptp.zFactor);
}
int numNodes(HPOLYGON hp) {
@@ -1319,11 +1319,11 @@ static bool MatchingLevels(PPOLYGON p1, PPOLYGON p2) {
Poly pp1(pps, p1->pIndex); // This polygon 1
Poly pp2(pps, p2->pIndex); // This polygon 2
- assert((int32)FROM_LE_32(pp1.level1) <= (int32)FROM_LE_32(pp1.level2));
- assert((int32)FROM_LE_32(pp2.level1) <= (int32)FROM_LE_32(pp2.level2));
+ assert((int32)FROM_32(pp1.level1) <= (int32)FROM_32(pp1.level2));
+ assert((int32)FROM_32(pp2.level1) <= (int32)FROM_32(pp2.level2));
- for (int pl = (int32)FROM_LE_32(pp1.level1); pl <= (int32)FROM_LE_32(pp1.level2); pl++) {
- if (pl >= (int32)FROM_LE_32(pp2.level1) && pl <= (int32)FROM_LE_32(pp2.level2))
+ for (int pl = (int32)FROM_32(pp1.level1); pl <= (int32)FROM_32(pp1.level2); pl++) {
+ if (pl >= (int32)FROM_32(pp2.level1) && pl <= (int32)FROM_32(pp2.level2))
return true;
}
@@ -1604,17 +1604,17 @@ static PPOLYGON CommonInits(PTYPE polyType, int pno, const Poly &ptp, bool bRest
p->pIndex = pno;
for (i = 0; i < 4; i++) { // Polygon definition
- p->cx[i] = (short)FROM_LE_32(ptp.x[i]);
- p->cy[i] = (short)FROM_LE_32(ptp.y[i]);
+ p->cx[i] = (short)FROM_32(ptp.x[i]);
+ p->cy[i] = (short)FROM_32(ptp.y[i]);
}
if (!bRestart) {
hp = PolygonIndex(p);
- volatileStuff[hp].xoff = (short)FROM_LE_32(ptp.xoff);
- volatileStuff[hp].yoff = (short)FROM_LE_32(ptp.yoff);
+ volatileStuff[hp].xoff = (short)FROM_32(ptp.xoff);
+ volatileStuff[hp].yoff = (short)FROM_32(ptp.yoff);
}
- p->polyID = FROM_LE_32(ptp.id); // Identifier
+ p->polyID = FROM_32(ptp.id); // Identifier
FiddlyBit(p);
@@ -1731,7 +1731,7 @@ static void InitEffect(const Poly &ptp, int pno, bool bRestart) {
static void InitRefer(const Poly &ptp, int pno, bool bRestart) {
PPOLYGON p = CommonInits(REFER, pno, ptp, bRestart);
- p->subtype = FROM_LE_32(ptp.reftype); // Refer type
+ p->subtype = FROM_32(ptp.reftype); // Refer type
}
@@ -1990,8 +1990,8 @@ void GetPolyNode(HPOLYGON hp, int *pNodeX, int *pNodeY) {
*pNodeX = 480;
*pNodeY = 408;
} else {
- *pNodeX = FROM_LE_32(ptp.nodex);
- *pNodeY = FROM_LE_32(ptp.nodey);
+ *pNodeX = FROM_32(ptp.nodex);
+ *pNodeY = FROM_32(ptp.nodey);
}
if (TinselV2) {
diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp
index ba8f47f9cf..3e6334f583 100644
--- a/engines/tinsel/rince.cpp
+++ b/engines/tinsel/rince.cpp
@@ -550,7 +550,7 @@ void AlterMover(PMOVER pMover, SCNHANDLE film, AR_FUNCTION fn) {
pfilm = (const FILM *)LockMem(film);
assert(pfilm != NULL);
- InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_LE_32(pfilm->reels[0].script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_32(pfilm->reels[0].script), ONE_SECOND / FROM_32(pfilm->frate));
if (!TinselV2)
pMover->stepCount = 0;
@@ -643,7 +643,7 @@ void SetMoverWalkReel(PMOVER pMover, DIRECTION reel, int scale, bool force) {
pfilm = (const FILM *)LockMem(whichReel);
assert(pfilm != NULL); // no film
- InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_LE_32(pfilm->reels[0].script), 1);
+ InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_32(pfilm->reels[0].script), 1);
// Synchronised walking reels
assert(pMover->stepCount >= 0);
@@ -704,14 +704,14 @@ static void MoverProcessHelper(int X, int Y, int id, PMOVER pMover) {
InitialPathChecks(pMover, X, Y);
pfilm = (const FILM *)LockMem(pMover->walkReels[0][FORWARD]);
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pfilm->reels[0].mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(pfilm->reels[0].mobj));
//---
- pFrame = (const FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame));
+ pFrame = (const FRAME *)LockMem(FROM_32(pmi->hMulFrame));
// get pointer to image
- pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim = (IMAGE *)LockMem(READ_32(pFrame)); // handle to image
+ pim->hImgPal = TO_32(BgPal());
//---
pMover->actorObj = MultiInitObject(pmi);
@@ -722,7 +722,7 @@ static void MoverProcessHelper(int X, int Y, int id, PMOVER pMover) {
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), pMover->actorObj);
storeActorReel(id, NULL, 0, pMover->actorObj, 0, 0, 0);
- InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_LE_32(pfilm->reels[0].script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_32(pfilm->reels[0].script), ONE_SECOND / FROM_32(pfilm->frate));
pMover->stepCount = 0;
MultiSetAniXY(pMover->actorObj, pMover->objX, pMover->objY);
@@ -802,7 +802,7 @@ void T2MoverProcess(CORO_PARAM, const void *param) {
InitialPathChecks(pMover, rpos->X, rpos->Y);
pFilm = (FILM *)LockMem(pMover->walkReels[i][FORWARD]); // Any old reel
- pmi = (PMULTI_INIT)LockMem(FROM_LE_32(pFilm->reels[0].mobj));
+ pmi = (PMULTI_INIT)LockMem(FROM_32(pFilm->reels[0].mobj));
// Poke in the background palette
PokeInPalette(pmi);
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index c5444517f1..986d54f59f 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -86,8 +86,8 @@ struct SCENE_STRUC {
SCNHANDLE hTaggedActor; // handle to table of tagged actors
int32 numProcess; // number of processes in this scene
SCNHANDLE hProcess; // handle to table of processes
- SCNHANDLE hMusicScript; // handle to music script data
- SCNHANDLE hMusicSegment;// handle to music segments
+ SCNHANDLE hMusicScript; // handle to music script data - Tinsel 2 only
+ SCNHANDLE hMusicSegment;// handle to music segments - Tinsel 2 only
} PACKED_STRUCT;
/** entrance structure - one per entrance */
@@ -130,15 +130,15 @@ const SCENE_STRUC *GetSceneStruc(const byte *pStruc) {
const byte *p = pStruc;
memset(&g_tempStruc, 0, sizeof(SCENE_STRUC));
- g_tempStruc.numEntrance = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.numPoly = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.numTaggedActor = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.defRefer = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hSceneScript = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hEntrance = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hPoly = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hTaggedActor = READ_UINT32(p); p += sizeof(uint32);
-
+ g_tempStruc.numEntrance = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+ g_tempStruc.numPoly = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+ g_tempStruc.numTaggedActor = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+ g_tempStruc.defRefer = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+ g_tempStruc.hSceneScript = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+ g_tempStruc.hEntrance = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+ g_tempStruc.hPoly = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+ g_tempStruc.hTaggedActor = FROM_LE_32(READ_32(p)); p += sizeof(uint32);
+
return &g_tempStruc;
}
@@ -167,7 +167,7 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) {
assert(_ctx->pInit->hTinselCode); // Must have some code to run
_ctx->pic = InitInterpretContext(GS_SCENE,
- READ_LE_UINT32(&_ctx->pInit->hTinselCode),
+ _ctx->pInit->hTinselCode,
TinselV2 ? _ctx->pInit->event : NOEVENT,
NOPOLY, // No polygon
0, // No actor
@@ -209,7 +209,7 @@ void SendSceneTinselProcess(TINSEL_EVENT event) {
*/
static void LoadScene(SCNHANDLE scene, int entry) {
- uint i;
+ int32 i;
TP_INIT init;
const SCENE_STRUC *ss;
const ENTRANCE_STRUC *es;
@@ -223,7 +223,7 @@ static void LoadScene(SCNHANDLE scene, int entry) {
// CdPlay() stuff
byte *cptr = FindChunk(scene, CHUNK_CDPLAY_FILENUM);
assert(cptr);
- i = READ_LE_UINT32(cptr);
+ i = READ_32(cptr);
assert(i < 512);
cptr = FindChunk(scene, CHUNK_CDPLAY_FILENAME);
assert(cptr);
@@ -238,18 +238,17 @@ static void LoadScene(SCNHANDLE scene, int entry) {
// Music stuff
char *cptr = (char *)FindChunk(scene, CHUNK_MUSIC_FILENAME);
assert(cptr);
- _vm->_pcmMusic->setMusicSceneDetails(FROM_LE_32(ss->hMusicScript),
- FROM_LE_32(ss->hMusicSegment), cptr);
+ _vm->_pcmMusic->setMusicSceneDetails(ss->hMusicScript, ss->hMusicSegment, cptr);
}
if (entry == NO_ENTRY_NUM) {
// Restoring scene
// Initialize all the polygons for this scene
- InitPolygons(FROM_LE_32(ss->hPoly), FROM_LE_32(ss->numPoly), true);
+ InitPolygons(ss->hPoly, ss->numPoly, true);
// Initialize the actors for this scene
- StartTaggedActors(FROM_LE_32(ss->hTaggedActor), FROM_LE_32(ss->numTaggedActor), false);
+ StartTaggedActors(ss->hTaggedActor, ss->numTaggedActor, false);
if (TinselV2)
// Returning from cutscene
@@ -259,18 +258,18 @@ static void LoadScene(SCNHANDLE scene, int entry) {
// Genuine new scene
// Initialize all the polygons for this scene
- InitPolygons(FROM_LE_32(ss->hPoly), FROM_LE_32(ss->numPoly), false);
+ InitPolygons(ss->hPoly, ss->numPoly, false);
// Initialize the actors for this scene
- StartTaggedActors(FROM_LE_32(ss->hTaggedActor), FROM_LE_32(ss->numTaggedActor), true);
+ StartTaggedActors(ss->hTaggedActor, ss->numTaggedActor, true);
// Run the appropriate entrance code (if any)
- es = (const ENTRANCE_STRUC *)LockMem(FROM_LE_32(ss->hEntrance));
- for (i = 0; i < FROM_LE_32(ss->numEntrance); i++) {
- if (FROM_LE_32(es->eNumber) == (uint)entry) {
+ es = (const ENTRANCE_STRUC *)LockMem(ss->hEntrance);
+ for (i = 0; i < ss->numEntrance; i++) {
+ if (FROM_32(es->eNumber) == (uint)entry) {
if (es->hScript) {
init.event = STARTUP;
- init.hTinselCode = es->hScript;
+ init.hTinselCode = FROM_32(es->hScript);
CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init));
}
@@ -285,7 +284,7 @@ static void LoadScene(SCNHANDLE scene, int entry) {
}
- if (i == FROM_LE_32(ss->numEntrance))
+ if (i == ss->numEntrance)
error("Non-existant scene entry number");
if (ss->hSceneScript) {
@@ -297,10 +296,10 @@ static void LoadScene(SCNHANDLE scene, int entry) {
}
// Default refer type
- SetDefaultRefer(FROM_LE_32(ss->defRefer));
+ SetDefaultRefer(ss->defRefer);
// Scene's processes
- SceneProcesses(FROM_LE_32(ss->numProcess), FROM_LE_32(ss->hProcess));
+ SceneProcesses(ss->numProcess, ss->hProcess);
}
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index 4bf356ba36..a73b4b9b97 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -109,7 +109,7 @@ void RestoreSceneProcess(INT_CONTEXT *pic) {
pStruc = (PROCESS_STRUC *)LockMem(g_hSceneProcess);
for (i = 0; i < g_numSceneProcess; i++) {
- if (FROM_LE_32(pStruc[i].hProcessCode) == pic->hCode) {
+ if (FROM_32(pStruc[i].hProcessCode) == pic->hCode) {
CoroScheduler.createProcess(PID_PROCESS + i, RestoredProcessProcess,
&pic, sizeof(pic));
break;
@@ -137,11 +137,11 @@ void SceneProcessEvent(CORO_PARAM, uint32 procID, TINSEL_EVENT event, bool bWait
_ctx->pStruc = (PROCESS_STRUC *)LockMem(g_hSceneProcess);
for (i = 0; i < g_numSceneProcess; i++) {
- if (FROM_LE_32(_ctx->pStruc[i].processId) == procID) {
+ if (FROM_32(_ctx->pStruc[i].processId) == procID) {
assert(_ctx->pStruc[i].hProcessCode); // Must have some code to run
_ctx->pic = InitInterpretContext(GS_PROCESS,
- FROM_LE_32(_ctx->pStruc[i].hProcessCode),
+ FROM_32(_ctx->pStruc[i].hProcessCode),
event,
NOPOLY, // No polygon
0, // No actor
@@ -176,7 +176,7 @@ void KillSceneProcess(uint32 procID) {
pStruc = (PROCESS_STRUC *) LockMem(g_hSceneProcess);
for (i = 0; i < g_numSceneProcess; i++) {
- if (FROM_LE_32(pStruc[i].processId) == procID) {
+ if (FROM_32(pStruc[i].processId) == procID) {
CoroScheduler.killMatchingProcess(PID_PROCESS + i, -1);
break;
}
@@ -293,8 +293,8 @@ void GlobalProcesses(uint32 numProcess, byte *pProcess) {
byte *p = pProcess;
for (uint i = 0; i < numProcess; ++i, p += 8) {
- g_pGlobalProcess[i].processId = READ_LE_UINT32(p);
- g_pGlobalProcess[i].hProcessCode = READ_LE_UINT32(p + 4);
+ g_pGlobalProcess[i].processId = READ_32(p);
+ g_pGlobalProcess[i].hProcessCode = READ_32(p + 4);
}
}
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index e052302cfd..03aa3767c4 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -74,7 +74,7 @@ SoundManager::~SoundManager() {
*/
// playSample for DiscWorld 1
bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
- // Floppy version has no sample file
+ // Floppy version has no sample file.
if (!_vm->isCD())
return false;
@@ -102,7 +102,7 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
// read the length of the sample
- uint32 sampleLen = _sampleStream.readUint32();
+ uint32 sampleLen = _sampleStream.readUint32LE();
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
@@ -177,6 +177,48 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
return true;
}
+bool SoundManager::playDW1MacMusic(int dwFileOffset) {
+ Common::File s;
+
+ if (!s.open("midi.dat"))
+ error(CANNOT_FIND_FILE, "midi.dat");
+
+ s.seek(dwFileOffset);
+ uint32 length = s.readUint32BE();
+
+ // TODO: It's a bad idea to load the music track in a buffer.
+ // We should use a SubReadStream instead, and keep midi.dat open.
+ // However, the track lengths aren't that big (about 1-4MB),
+ // so this shouldn't be a major issue.
+ byte *soundData = (byte *)malloc(length);
+ assert(soundData);
+
+ // read all of the sample
+ if (s.read(soundData, length) != length)
+ error(FILE_IS_CORRUPT, "midi.dat");
+
+ Common::SeekableReadStream *memStream = new Common::MemoryReadStream(soundData, length);
+
+ Audio::SoundHandle *handle = &_channels[kChannelDW1MacMusic].handle;
+ //_channels[kChannelDW1MacMusic].sampleNum = dwFileOffset;
+
+ // Stop any previously playing music track
+ _vm->_mixer->stopHandle(*handle);
+
+ // FIXME: Should set this in a different place ;)
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, _vm->_config->_musicVolume);
+
+ // TODO: Compression support (MP3/OGG/FLAC) for midi.dat in DW1 Mac
+ Audio::RewindableAudioStream *musicStream = Audio::makeRawStream(memStream, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+
+ if (musicStream)
+ _vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, handle, Audio::makeLoopingAudioStream(musicStream, 0));
+
+ s.close();
+
+ return true;
+}
+
// playSample for DiscWorld 2
bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int priority,
Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
@@ -257,7 +299,7 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
// read the length of the sample
- uint32 sampleLen = _sampleStream.readUint32();
+ uint32 sampleLen = _sampleStream.readUint32LE();
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
@@ -270,12 +312,12 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
// Skipping
for (int32 i = 0; i < sub; i++) {
- sampleLen = _sampleStream.readUint32();
+ sampleLen = _sampleStream.readUint32LE();
_sampleStream.skip(sampleLen);
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
}
- sampleLen = _sampleStream.readUint32();
+ sampleLen = _sampleStream.readUint32LE();
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
}
@@ -369,7 +411,6 @@ bool SoundManager::offscreenChecks(int x, int &y) {
}
int8 SoundManager::getPan(int x) {
-
if (x == -1)
return 0;
@@ -416,14 +457,13 @@ bool SoundManager::sampleExists(int id) {
/**
* Returns true if a sample is currently playing.
*/
-bool SoundManager::sampleIsPlaying(int id) {
+bool SoundManager::sampleIsPlaying() {
if (!TinselV2)
return _vm->_mixer->isSoundHandleActive(_channels[kChannelTinsel1].handle);
for (int i = 0; i < kNumChannels; i++)
- if (_channels[i].sampleNum == id)
- if (_vm->_mixer->isSoundHandleActive(_channels[i].handle))
- return true;
+ if (_vm->_mixer->isSoundHandleActive(_channels[i].handle))
+ return true;
return false;
}
@@ -432,8 +472,6 @@ bool SoundManager::sampleIsPlaying(int id) {
* Stops any currently playing sample.
*/
void SoundManager::stopAllSamples() {
- // stop currently playing sample
-
if (!TinselV2) {
_vm->_mixer->stopHandle(_channels[kChannelTinsel1].handle);
return;
@@ -466,12 +504,21 @@ void SoundManager::setSFXVolumes(uint8 volume) {
_vm->_mixer->setChannelVolume(_channels[i].handle, volume);
}
+void SoundManager::showSoundError(const char *errorMsg, const char *soundFile) {
+ Common::String msg;
+ msg = Common::String::format(errorMsg, soundFile);
+ GUI::MessageDialog dialog(msg, "OK");
+ dialog.runModal();
+
+ error("%s", msg.c_str());
+}
+
/**
* Opens and inits all sound sample files.
*/
void SoundManager::openSampleFiles() {
// Floppy and demo versions have no sample files, except for the Discworld 2 demo
- if (!_vm->isCD() || TinselV0)
+ if (!_vm->isCD())
return;
TinselFile f;
@@ -480,42 +527,26 @@ void SoundManager::openSampleFiles() {
// already allocated
return;
- // open sample index file in binary mode
+ // Open sample index (*.idx) in binary mode
if (f.open(_vm->getSampleIndex(g_sampleLanguage))) {
- // get length of index file
- f.seek(0, SEEK_END); // move to end of file
- _sampleIndexLen = f.pos(); // get file pointer
- f.seek(0, SEEK_SET); // back to beginning
-
+ uint32 fileSize = f.size();
+ _sampleIndex = (uint32 *)malloc(fileSize);
if (_sampleIndex == NULL) {
- // allocate a buffer for the indices
- _sampleIndex = (uint32 *)malloc(_sampleIndexLen);
-
- // make sure memory allocated
- if (_sampleIndex == NULL) {
- // disable samples if cannot alloc buffer for indices
- // TODO: Disabled sound if we can't load the sample index?
- return;
- }
+ showSoundError(NO_MEM, _vm->getSampleIndex(g_sampleLanguage));
+ return;
}
- // load data
- if (f.read(_sampleIndex, _sampleIndexLen) != (uint32)_sampleIndexLen)
- // file must be corrupt if we get to here
- error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
+ _sampleIndexLen = fileSize / 4; // total sample of indices (DWORDs)
- // close the file
- f.close();
-
- // convert file size to size in DWORDs
- _sampleIndexLen /= sizeof(uint32);
-
-#ifdef SCUMM_BIG_ENDIAN
- // Convert all ids from LE to native format
+ // Load data
for (int i = 0; i < _sampleIndexLen; ++i) {
- _sampleIndex[i] = SWAP_BYTES_32(_sampleIndex[i]);
+ _sampleIndex[i] = f.readUint32LE();
+ if (f.err()) {
+ showSoundError(FILE_READ_ERROR, _vm->getSampleIndex(g_sampleLanguage));
+ }
}
-#endif
+
+ f.close();
// Detect format of soundfile by looking at 1st sample-index
switch (TO_BE_32(_sampleIndex[0])) {
@@ -523,48 +554,31 @@ void SoundManager::openSampleFiles() {
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected MP3 sound-data");
_soundMode = kMP3Mode;
break;
-
case MKTAG('O','G','G',' '):
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected OGG sound-data");
_soundMode = kVorbisMode;
break;
-
case MKTAG('F','L','A','C'):
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected FLAC sound-data");
_soundMode = kFLACMode;
break;
-
default:
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected original sound-data");
break;
}
- // Normally the 1st sample-index points to nothing at all
+
+ // Normally the 1st sample index points to nothing at all. We use it to
+ // determine if the game's sample files have been compressed, thus restore
+ // it here
_sampleIndex[0] = 0;
} else {
- char buf[50];
- sprintf(buf, CANNOT_FIND_FILE, _vm->getSampleIndex(g_sampleLanguage));
- GUI::MessageDialog dialog(buf, "OK");
- dialog.runModal();
-
- error(CANNOT_FIND_FILE, _vm->getSampleIndex(g_sampleLanguage));
+ showSoundError(FILE_READ_ERROR, _vm->getSampleIndex(g_sampleLanguage));
}
- // open sample file in binary mode
+ // Open sample file (*.smp) in binary mode
if (!_sampleStream.open(_vm->getSampleFile(g_sampleLanguage))) {
- char buf[50];
- sprintf(buf, CANNOT_FIND_FILE, _vm->getSampleFile(g_sampleLanguage));
- GUI::MessageDialog dialog(buf, "OK");
- dialog.runModal();
-
- error(CANNOT_FIND_FILE, _vm->getSampleFile(g_sampleLanguage));
+ showSoundError(FILE_READ_ERROR, _vm->getSampleFile(g_sampleLanguage));
}
-
-/*
- // gen length of the largest sample
- sampleBuffer.size = _sampleStream.readUint32LE();
- if (_sampleStream.eos() || _sampleStream.err())
- error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
-*/
}
void SoundManager::closeSampleStream() {
diff --git a/engines/tinsel/sound.h b/engines/tinsel/sound.h
index d7083b3b21..8510c1618f 100644
--- a/engines/tinsel/sound.h
+++ b/engines/tinsel/sound.h
@@ -51,7 +51,8 @@ protected:
enum {
kChannelTalk = 0,
kChannelTinsel1 = 0, // Always using this channel for DW1
- kChannelSFX = 1
+ kChannelSFX = 1,
+ kChannelDW1MacMusic = 2
};
static const int kNumChannels = kChannelSFX + kNumSFX;
@@ -108,6 +109,7 @@ public:
bool playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle = 0);
bool playSample(int id, int sub, bool bLooped, int x, int y, int priority,
Audio::Mixer::SoundType type, Audio::SoundHandle *handle = 0);
+ bool playDW1MacMusic(int dwFileOffset);
void stopAllSamples(); // Stops any currently playing sample
void stopSpecSample(int id, int sub = 0); // Stops a specific sample
@@ -115,11 +117,13 @@ public:
void setSFXVolumes(uint8 volume);
bool sampleExists(int id);
- bool sampleIsPlaying(int id = -1);
+ bool sampleIsPlaying();
- // TODO: Internal method, make this protected?
void openSampleFiles();
void closeSampleStream();
+
+private:
+ void showSoundError(const char *errorMsg, const char *soundFile);
};
} // End of namespace Tinsel
diff --git a/engines/tinsel/strres.cpp b/engines/tinsel/strres.cpp
index 5a29a4d2cd..19a1ee94d6 100644
--- a/engines/tinsel/strres.cpp
+++ b/engines/tinsel/strres.cpp
@@ -165,15 +165,15 @@ static byte *FindStringBase(int id) {
// skip to the correct chunk
while (chunkSkip-- != 0) {
// make sure chunk id is correct
- assert(READ_LE_UINT32(pText + index) == CHUNK_STRING || READ_LE_UINT32(pText + index) == CHUNK_MBSTRING);
+ assert(READ_32(pText + index) == CHUNK_STRING || READ_32(pText + index) == CHUNK_MBSTRING);
- if (READ_LE_UINT32(pText + index + sizeof(uint32)) == 0) {
+ if (READ_32(pText + index + sizeof(uint32)) == 0) {
// string does not exist
return NULL;
}
// get index to next chunk
- index = READ_LE_UINT32(pText + index + sizeof(uint32));
+ index = READ_32(pText + index + sizeof(uint32));
}
// skip over chunk id and offset
diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp
index 5eb092d00d..150eb2bdde 100644
--- a/engines/tinsel/text.cpp
+++ b/engines/tinsel/text.cpp
@@ -46,24 +46,24 @@ int StringLengthPix(char *szStr, const FONT *pFont) {
if (c & 0x80)
c = ((c & ~0x80) << 8) + *++szStr;
}
- hImg = FROM_LE_32(pFont->fontDef[c]);
+ hImg = FROM_32(pFont->fontDef[c]);
if (hImg) {
// there is a IMAGE for this character
const IMAGE *pChar = (const IMAGE *)LockMem(hImg);
// add width of font bitmap
- strLen += FROM_LE_16(pChar->imgWidth);
+ strLen += FROM_16(pChar->imgWidth);
} else
// use width of space character
- strLen += FROM_LE_32(pFont->spaceSize);
+ strLen += FROM_32(pFont->spaceSize);
// finally add the inter-character spacing
- strLen += FROM_LE_32(pFont->xSpacing);
+ strLen += FROM_32(pFont->xSpacing);
}
// return length of line in pixels - minus inter-char spacing for last character
- strLen -= FROM_LE_32(pFont->xSpacing);
+ strLen -= FROM_32(pFont->xSpacing);
return (strLen > 0) ? strLen : 0;
}
@@ -125,10 +125,10 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
// get image for capital W
assert(pFont->fontDef[(int)'W']);
- pImg = (const IMAGE *)LockMem(FROM_LE_32(pFont->fontDef[(int)'W']));
+ pImg = (const IMAGE *)LockMem(FROM_32(pFont->fontDef[(int)'W']));
// get height of capital W for offset to next line
- yOffset = FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK;
+ yOffset = FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK;
while (*szStr) {
// x justify the text according to the mode flags
@@ -140,24 +140,24 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
if (c & 0x80)
c = ((c & ~0x80) << 8) + *++szStr;
}
- hImg = FROM_LE_32(pFont->fontDef[c]);
+ hImg = FROM_32(pFont->fontDef[c]);
if (hImg == 0) {
// no image for this character
// add font spacing for a space character
- xJustify += FROM_LE_32(pFont->spaceSize);
+ xJustify += FROM_32(pFont->spaceSize);
} else { // printable character
int aniX, aniY; // char image animation offsets
OBJ_INIT oi;
- oi.hObjImg = FROM_LE_32(pFont->fontInit.hObjImg);
- oi.objFlags = FROM_LE_32(pFont->fontInit.objFlags);
- oi.objID = FROM_LE_32(pFont->fontInit.objID);
- oi.objX = FROM_LE_32(pFont->fontInit.objX);
- oi.objY = FROM_LE_32(pFont->fontInit.objY);
- oi.objZ = FROM_LE_32(pFont->fontInit.objZ);
+ oi.hObjImg = FROM_32(pFont->fontInit.hObjImg);
+ oi.objFlags = FROM_32(pFont->fontInit.objFlags);
+ oi.objID = FROM_32(pFont->fontInit.objID);
+ oi.objX = FROM_32(pFont->fontInit.objX);
+ oi.objY = FROM_32(pFont->fontInit.objY);
+ oi.objZ = FROM_32(pFont->fontInit.objZ);
// allocate and init a character object
if (pFirst == NULL)
@@ -172,9 +172,9 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
// fill in character object
pChar->hImg = hImg; // image def
- pChar->width = FROM_LE_16(pImg->imgWidth); // width of chars bitmap
- pChar->height = FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK; // height of chars bitmap
- pChar->hBits = FROM_LE_32(pImg->hImgBits); // bitmap
+ pChar->width = FROM_16(pImg->imgWidth); // width of chars bitmap
+ pChar->height = FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK; // height of chars bitmap
+ pChar->hBits = FROM_32(pImg->hImgBits); // bitmap
// check for absolute positioning
if (mode & TXT_ABSOLUTE)
@@ -203,8 +203,8 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
CopyObject(pShad, pChar);
// add shadow offsets to characters position
- pShad->xPos += intToFrac(FROM_LE_32(pFont->xShadow));
- pShad->yPos += intToFrac(FROM_LE_32(pFont->yShadow));
+ pShad->xPos += intToFrac(FROM_32(pFont->xShadow));
+ pShad->yPos += intToFrac(FROM_32(pFont->yShadow));
// shadow is behind the character
pShad->zPos--;
@@ -232,18 +232,18 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
pChar = pChar->pSlave;
// add character spacing
- xJustify += FROM_LE_16(pImg->imgWidth);
+ xJustify += FROM_16(pImg->imgWidth);
}
// finally add the inter-character spacing
- xJustify += FROM_LE_32(pFont->xSpacing);
+ xJustify += FROM_32(pFont->xSpacing);
// next character in string
++szStr;
}
// adjust the text y position and add the inter-line spacing
- yPos += yOffset + FROM_LE_32(pFont->ySpacing);
+ yPos += yOffset + FROM_32(pFont->ySpacing);
// check for newline
if (c == LF_CHAR)
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index 058f8eb6fd..6a396b9b01 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -3684,7 +3684,7 @@ static void TranslucentIndex(unsigned index) {
}
/**
- * Play a sample.
+ * Play a sample (DW1 only).
*/
static void TryPlaySample(CORO_PARAM, int sample, bool bComplete, bool escOn, int myEscape) {
CORO_BEGIN_CONTEXT;
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index e09e2c1dcf..944613bcb7 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -430,6 +430,14 @@ static void MouseProcess(CORO_PARAM, const void *) {
ProcessButEvent(PLR_DRAG2_END);
break;
+ case Common::EVENT_WHEELUP:
+ PlayerEvent(PLR_WHEEL_UP, mousePos);
+ break;
+
+ case Common::EVENT_WHEELDOWN:
+ PlayerEvent(PLR_WHEEL_DOWN, mousePos);
+ break;
+
default:
break;
}
@@ -726,17 +734,18 @@ void LoadBasicChunks() {
//convert to native endianness
INV_OBJECT *io = (INV_OBJECT *)cptr;
for (int i = 0; i < numObjects; i++, io++) {
- io->id = FROM_LE_32(io->id);
- io->hIconFilm = FROM_LE_32(io->hIconFilm);
- io->hScript = FROM_LE_32(io->hScript);
- io->attribute = FROM_LE_32(io->attribute);
+ io->id = FROM_32(io->id);
+ io->hIconFilm = FROM_32(io->hIconFilm);
+ io->hScript = FROM_32(io->hScript);
+ io->attribute = FROM_32(io->attribute);
}
#endif
RegisterIcons(cptr, numObjects);
cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_TOTAL_POLY);
- if (cptr != NULL)
+ // Max polygons are 0 in DW1 Mac (both in the demo and the full version)
+ if (cptr != NULL && *cptr != 0)
MaxPolygons(*cptr);
if (TinselV2) {
@@ -1046,6 +1055,8 @@ bool TinselEngine::pollEvent() {
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONDOWN:
case Common::EVENT_RBUTTONUP:
+ case Common::EVENT_WHEELUP:
+ case Common::EVENT_WHEELDOWN:
// Add button to queue for the mouse process
_mouseButtons.push_back(event.type);
break;
@@ -1053,7 +1064,7 @@ bool TinselEngine::pollEvent() {
case Common::EVENT_MOUSEMOVE:
{
// This fragment takes care of Tinsel 2 when it's been compiled with
- // blank areas at the top and bottom of thes creen
+ // blank areas at the top and bottom of the screen
int ySkip = TinselV2 ? (g_system->getHeight() - _vm->screen().h) / 2 : 0;
if ((event.mouse.y >= ySkip) && (event.mouse.y < (g_system->getHeight() - ySkip)))
_mousePos = Common::Point(event.mouse.x, event.mouse.y - ySkip);
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index 123249125e..ec504b69cd 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -78,7 +78,7 @@ enum TinselGameFeatures {
/**
* The following is the ScummVM definitions of the various Tinsel versions:
* TINSEL_V0 - This was an early engine version that was only used in the Discworld 1
- * demo. It is not currently supported.
+ * demo.
* TINSEL_V1 - This was the engine version used by Discworld 1. Note that there were two
* major releases: an earlier version that used *.gra files, and a later one that
* used *.scn files, and contained certain script and engine bugfixes. In ScummVM,
@@ -135,6 +135,9 @@ typedef bool (*KEYFPTR)(const Common::KeyState &);
#define READ_16(v) (TinselV1Mac ? READ_BE_UINT16(v) : READ_LE_UINT16(v))
#define READ_32(v) (TinselV1Mac ? READ_BE_UINT32(v) : READ_LE_UINT32(v))
+#define FROM_16(v) (TinselV1Mac ? FROM_BE_16(v) : FROM_LE_16(v))
+#define FROM_32(v) (TinselV1Mac ? FROM_BE_32(v) : FROM_LE_32(v))
+#define TO_32(v) (TinselV1Mac ? TO_BE_32(v) : TO_LE_32(v))
// Global reference to the TinselEngine object
extern TinselEngine *_vm;
diff --git a/engines/toltecs/microtiles.cpp b/engines/toltecs/microtiles.cpp
index 60e65bdaf3..9181480351 100644
--- a/engines/toltecs/microtiles.cpp
+++ b/engines/toltecs/microtiles.cpp
@@ -119,8 +119,6 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
for (y = 0; y < _tilesH; ++y) {
for (x = 0; x < _tilesW; ++x) {
-
- int start;
int finish = 0;
BoundingBox boundingBox;
@@ -141,8 +139,6 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
// FIXME: Why is the following code in an #if block?
#if 1
- start = i;
-
if (TileX1(boundingBox) == TileSize - 1 && x != _tilesW - 1) { // check if the tile continues
while (!finish) {
++x;
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 23c655e35a..f5c580c8c5 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -154,7 +154,6 @@ void rightToMe(CORO_PARAM, uint32, uint32, uint32, uint32) {
GLOBALS._tony->setPattern(GLOBALS._tony->PAT_STANDRIGHT);
}
-
void tonySetPerorate(CORO_PARAM, uint32 bStatus, uint32, uint32, uint32) {
g_vm->getEngine()->setPerorate(bStatus);
}
@@ -176,7 +175,6 @@ void setAlwaysDisplay(CORO_PARAM, uint32 val, uint32, uint32, uint32) {
GLOBALS._bAlwaysDisplay = (val != 0);
}
-
void setPointer(CORO_PARAM, uint32 dwPointer, uint32, uint32, uint32) {
switch (dwPointer) {
case 1:
@@ -215,7 +213,6 @@ VoiceHeader *searchVoiceHeader(uint32 codehi, uint32 codelo) {
return NULL;
}
-
void sendTonyMessage(CORO_PARAM, uint32 dwMessage, uint32 nX, uint32 nY, uint32) {
CORO_BEGIN_CONTEXT;
RMMessage msg;
@@ -337,7 +334,6 @@ void changeBoxStatus(CORO_PARAM, uint32 nLoc, uint32 nBox, uint32 nStatus, uint3
GLOBALS._boxes->changeBoxStatus(nLoc, nBox, nStatus);
}
-
void custLoadLocation(CORO_PARAM, uint32 nLoc, uint32 tX, uint32 tY, uint32 bUseStartPos) {
CORO_BEGIN_CONTEXT;
uint32 h;
@@ -360,7 +356,6 @@ void custLoadLocation(CORO_PARAM, uint32 nLoc, uint32 tX, uint32 tY, uint32 bUse
CORO_END_CODE;
}
-
void sendFullscreenMsgStart(CORO_PARAM, uint32 nMsg, uint32 nFont, uint32, uint32) {
CORO_BEGIN_CONTEXT;
RMMessage *msg;
@@ -485,7 +480,6 @@ void closeLocation(CORO_PARAM, uint32, uint32, uint32, uint32) {
CORO_END_CODE;
}
-
void changeLocation(CORO_PARAM, uint32 nLoc, uint32 tX, uint32 tY, uint32 bUseStartPos) {
CORO_BEGIN_CONTEXT;
uint32 h;
@@ -639,12 +633,10 @@ void tonyGenericPut2(CORO_PARAM, uint32 nDirection) {
CORO_END_CODE;
}
-
void tonyTakeUp1(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake1(coroParam, 0);
}
-
void tonyTakeMid1(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake1(coroParam, 1);
}
@@ -657,7 +649,6 @@ void tonyTakeUp2(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake2(coroParam, 0);
}
-
void tonyTakeMid2(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake2(coroParam, 1);
}
@@ -690,7 +681,6 @@ void tonyPutDown2(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericPut2(coroParam, 2);
}
-
void tonyOnTheFloor(CORO_PARAM, uint32 dwParte, uint32, uint32, uint32) {
if (dwParte == 0)
GLOBALS._tony->setPattern(GLOBALS._tony->PAT_ONTHEFLOORLEFT);
@@ -1032,7 +1022,6 @@ void tonyScaredEnd(CORO_PARAM, uint32, uint32, uint32, uint32) {
CORO_END_CODE;
}
-
void tonyDisgusted(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
tonySetNumTexts(dwText);
GLOBALS._nTonyNextTalkType = GLOBALS._tony->TALK_DISGUSTED;
@@ -1101,7 +1090,6 @@ void tonyMacbeth(CORO_PARAM, uint32 nPos, uint32, uint32, uint32) {
}
}
-
void enableTony(CORO_PARAM, uint32, uint32, uint32, uint32) {
GLOBALS._tony->show();
}
@@ -1125,7 +1113,6 @@ void waitForPatternEnd(CORO_PARAM, uint32 nItem, uint32, uint32, uint32) {
CORO_END_CODE;
}
-
void setTonyPosition(CORO_PARAM, uint32 nX, uint32 nY, uint32 nLoc, uint32) {
GLOBALS._tony->setPosition(RMPoint(nX, nY), nLoc);
}
@@ -1252,17 +1239,14 @@ void syncScrollLocation(CORO_PARAM, uint32 nX, uint32 nY, uint32 sX, uint32 sY)
_ctx->pt._y += (_ctx->dimy * _ctx->dwCurTime) / _ctx->dwTotalTime;
else
_ctx->pt._y -= (_ctx->dimy * _ctx->dwCurTime) / _ctx->dwTotalTime;
-
}
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, g_vm->_hEndOfFrame, CORO_INFINITE);
GLOBALS._loc->setScrollPosition(_ctx->pt);
GLOBALS._tony->setScrollPosition(_ctx->pt);
-
}
-
// Set the position finale
if (sX) {
if (_ctx->lx > 0)
@@ -1282,7 +1266,6 @@ void syncScrollLocation(CORO_PARAM, uint32 nX, uint32 nY, uint32 sX, uint32 sY)
CORO_END_CODE;
}
-
void changeHotspot(CORO_PARAM, uint32 dwCode, uint32 nX, uint32 nY, uint32) {
int i;
@@ -1304,13 +1287,13 @@ void changeHotspot(CORO_PARAM, uint32 dwCode, uint32 nX, uint32 nY, uint32) {
GLOBALS._loc->getItemFromCode(dwCode)->changeHotspot(RMPoint(nX, nY));
}
-
void autoSave(CORO_PARAM, uint32, uint32, uint32, uint32) {
g_vm->autoSave(coroParam);
}
void abortGame(CORO_PARAM, uint32, uint32, uint32, uint32) {
- error("script called abortGame");
+ debug(1, "script called abortGame");
+ g_vm->quitGame();
}
void shakeScreen(CORO_PARAM, uint32 nScosse, uint32, uint32, uint32) {
@@ -1476,7 +1459,6 @@ void charSendMessage(CORO_PARAM, uint32 nChar, uint32 dwMessage, uint32 bIsBack,
_ctx->voice = NULL;
}
-
GLOBALS._curBackText = NULL;
delete _ctx->text;
}
@@ -1504,7 +1486,6 @@ void changeInventoryStatus(CORO_PARAM, uint32 dwCode, uint32 dwStatus, uint32, u
GLOBALS._inventory->changeItemStatus(dwCode, dwStatus);
}
-
/*
* Master Characters
*/
@@ -1535,7 +1516,6 @@ void mCharResetCode(CORO_PARAM, uint32 nChar, uint32, uint32, uint32) {
GLOBALS._mCharacter[nChar]._item = GLOBALS._loc->getItemFromCode(GLOBALS._mCharacter[nChar]._code);
}
-
void mCharSetPosition(CORO_PARAM, uint32 nChar, uint32 nX, uint32 nY, uint32) {
assert(nChar < 10);
GLOBALS._mCharacter[nChar]._x = nX;
@@ -1879,7 +1859,6 @@ void sendDialogMessage(CORO_PARAM, uint32 nPers, uint32 nMsg, uint32, uint32) {
CORO_END_CODE;
}
-
// @@@@ This cannot be skipped!!!!!!!!!!!!!!!!!!!
void startDialog(CORO_PARAM, uint32 nDialog, uint32 nStartGroup, uint32, uint32) {
@@ -1960,7 +1939,6 @@ void startDialog(CORO_PARAM, uint32 nDialog, uint32 nStartGroup, uint32, uint32)
CORO_END_CODE;
}
-
/*
* Sync between idle and mpal
*/
@@ -2270,7 +2248,6 @@ void doCredits(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint32, uint32) {
_ctx->text[_ctx->i].setPosition(RMPoint(260, 70 + _ctx->i * 26));
}
-
// Set the position
_ctx->text[_ctx->i].setAlwaysDisplay();
_ctx->text[_ctx->i].setForcedTime(dwTime * 1000);
@@ -2521,8 +2498,6 @@ void setupGlobalVars(RMTony *tony, RMPointer *ptr, RMGameBoxes *box, RMLocation
GLOBALS._ambiance[58] = AMBIANCE_WIND;
GLOBALS._ambiance[60] = AMBIANCE_WIND;
-
-
// Create an event for the idle skipping
GLOBALS._hSkipIdle = CoroScheduler.createEvent(true, false);
}
diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp
index 85d9469519..84f05b0d25 100644
--- a/engines/tony/debugger.cpp
+++ b/engines/tony/debugger.cpp
@@ -77,7 +77,6 @@ void DebugChangeScene(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* This command loads up the specified new scene number
*/
diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp
index 8e6d5a64c3..1094950e2c 100644
--- a/engines/tony/detection.cpp
+++ b/engines/tony/detection.cpp
@@ -90,7 +90,7 @@ public:
bool TonyMetaEngine::hasFeature(MetaEngineFeature f) const {
return
- (f == kSupportsListSaves) ||
+ (f == kSupportsListSaves) ||
(f == kSupportsLoadingDuringStartup) ||
(f == kSupportsDeleteSave) ||
(f == kSavesSupportMetaInfo) ||
@@ -186,7 +186,6 @@ SaveStateDescriptor TonyMetaEngine::querySaveMetaInfos(const char *target, int s
return SaveStateDescriptor();
}
-
#if PLUGIN_ENABLED_DYNAMIC(TONY)
REGISTER_PLUGIN_DYNAMIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
#else
diff --git a/engines/tony/detection_tables.h b/engines/tony/detection_tables.h
index ce3ab01a9f..ee137927dc 100644
--- a/engines/tony/detection_tables.h
+++ b/engines/tony/detection_tables.h
@@ -75,6 +75,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough French "Collection Aventure" provided by Strangerke
{
@@ -91,6 +92,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough German "Shoe Box" provided by Strangerke
{
@@ -107,6 +109,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough Italian provided by Fabio Barzagli
{
@@ -123,6 +126,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough Italian provided by Giovanni Bajo
{
@@ -139,6 +143,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough Polish provided by Fabio Barzagli
{
@@ -155,6 +160,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough German "Gamestar" provided in bug #3566035
{
@@ -171,6 +177,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough Czech provided in bug #3565765
{
@@ -188,6 +195,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{ AD_TABLE_END_MARKER }
};
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index fa018b4464..1729052d42 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -81,7 +81,6 @@ void RMFont::unload() {
}
}
-
RMGfxPrimitive *RMFont::makeLetterPrimitive(byte bChar, int &nLength) {
RMFontPrimitive *prim;
@@ -223,7 +222,6 @@ void RMFontDialog::init() {
}
}
-
/***************************************************************************\
* RMFontMacc Methods
\****************************************************************************/
@@ -278,8 +276,6 @@ void RMFontCredits::init() {
}
}
-
-
/***************************************************************************\
* RMFontObj Methods
\****************************************************************************/
@@ -544,7 +540,6 @@ void RMText::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
else if (_aHorType == HRIGHT)
prim->getDst().topLeft() -= RMPoint(_dimx, 0);
-
// Vertically
if (_aVerType == VTOP) {
@@ -627,7 +622,6 @@ void RMTextDialog::writeText(const Common::String &text, RMFontColor *font, int
*time = _time;
}
-
void RMTextDialog::setSkipStatus(bool bEnabled) {
_bSkipStatus = bEnabled;
}
@@ -685,6 +679,7 @@ void RMTextDialog::removeThis(CORO_PARAM, bool &result) {
}
}
}
+
// Erase the background
else if (!(GLOBALS._bCfgDubbing && _hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
if (!_bForceNoTime) {
@@ -805,7 +800,6 @@ void RMTextDialogScrolling::clipOnScreen(RMGfxPrimitive *prim) {
// We must not do anything!
}
-
/****************************************************************************\
* RMTextItemName Methods
\****************************************************************************/
@@ -866,7 +860,6 @@ void RMTextItemName::doFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &
CORO_END_CODE;
}
-
void RMTextItemName::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -952,7 +945,6 @@ void RMDialogChoice::init() {
setPriority(140);
}
-
void RMDialogChoice::close() {
if (_drawedStrings != NULL) {
delete[] _drawedStrings;
@@ -1116,7 +1108,6 @@ void RMDialogChoice::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
CORO_END_CODE;
}
-
void RMDialogChoice::hide(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
int deltay;
@@ -1145,7 +1136,6 @@ void RMDialogChoice::hide(CORO_PARAM) {
CORO_END_CODE;
}
-
void RMDialogChoice::removeThis(CORO_PARAM, bool &result) {
result = _bRemoveFromOT;
}
diff --git a/engines/tony/font.h b/engines/tony/font.h
index 13c1ddf268..9ef50b99ec 100644
--- a/engines/tony/font.h
+++ b/engines/tony/font.h
@@ -104,7 +104,6 @@ public:
int stringLen(char bChar, char bNext = 0);
};
-
class RMFontColor : public virtual RMFont {
private:
byte _fontR, _fontG, _fontB;
@@ -115,7 +114,6 @@ public:
virtual void setBaseColor(byte r, byte g, byte b);
};
-
class RMFontWithTables : public virtual RMFont {
protected:
int _cTable[256];
@@ -136,7 +134,6 @@ public:
virtual ~RMFontWithTables() {}
};
-
class RMFontDialog : public RMFontColor, public RMFontWithTables {
public:
void init();
@@ -175,16 +172,16 @@ private:
public:
enum HorAlign {
- HLEFT,
- HLEFTPAR,
- HCENTER,
- HRIGHT
+ HLEFT,
+ HLEFTPAR,
+ HCENTER,
+ HRIGHT
};
enum VerAlign {
- VTOP,
- VCENTER,
- VBOTTOM
+ VTOP,
+ VCENTER,
+ VBOTTOM
};
private:
@@ -293,7 +290,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Manages the name of a selected item on the screen
*/
@@ -319,7 +315,6 @@ public:
virtual void removeThis(CORO_PARAM, bool &result);
};
-
/**
* Manages the selection of screen items in a box
*/
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 42ace987b4..501a588ff5 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -164,7 +164,6 @@ RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int
_pushRight = new RMOptionButton(RMRect(pt._x + _nSlideSize, pt._y, pt._x + _nSlideSize + 5 + 22, pt._y + 26));
}
-
RMOptionSlide::~RMOptionSlide() {
delete _sliderCenter;
_sliderCenter = NULL;
@@ -973,7 +972,6 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
CORO_BEGIN_CODE(_ctx);
-
// If it is not fully open, do nothing
if (_fadeStep != 6)
return;
@@ -1043,8 +1041,8 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
}
}
-#define KEYPRESS(c) (g_vm->getEngine()->getInput().getAsyncKeyState(c))
-#define PROCESS_CHAR(cod, c) if (KEYPRESS(cod)) { \
+#define KEYPRESS(c) (g_vm->getEngine()->getInput().getAsyncKeyState(c))
+#define PROCESS_CHAR(cod, c) if (KEYPRESS(cod)) { \
_editName[strlen(_editName) + 1] = '\0'; _editName[strlen(_editName)] = c; _ctx->bRefresh = true; }
// State Buttons
@@ -1058,7 +1056,7 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
for (_ctx->i = 0; _ctx->i < 26 && strlen(_editName) < 12; _ctx->i++) {
if (KEYPRESS(Common::KEYCODE_LSHIFT) ||
- KEYPRESS(Common::KEYCODE_RSHIFT)) {
+ KEYPRESS(Common::KEYCODE_RSHIFT)) {
PROCESS_CHAR((Common::KeyCode)((int)'a' + _ctx->i), _ctx->i + 'A');
} else {
PROCESS_CHAR((Common::KeyCode)((int)'a' + _ctx->i), _ctx->i + 'a');
@@ -1222,7 +1220,6 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
CORO_END_CODE;
}
-
void RMOptionScreen::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
int curTime;
@@ -1233,7 +1230,7 @@ void RMOptionScreen::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
_ctx->curTime = g_vm->getTime();
#define FADE_SPEED 20
-#define SYNC (_ctx->curTime - _fadeTime) / 25
+#define SYNC (_ctx->curTime - _fadeTime) / 25
if (_bExit)
return;
@@ -1334,7 +1331,6 @@ void RMOptionScreen::removeThis(CORO_PARAM, bool &result) {
result = false;
}
-
bool RMOptionScreen::loadThumbnailFromSaveState(int nState, byte *lpDestBuf, Common::String &name, byte &diff) {
char namebuf[256];
Common::InSaveFile *f;
diff --git a/engines/tony/game.h b/engines/tony/game.h
index 83a1ddaea1..fdf62a2a5d 100644
--- a/engines/tony/game.h
+++ b/engines/tony/game.h
@@ -324,7 +324,6 @@ public:
static bool loadThumbnailFromSaveState(int numState, byte *lpDestBuf, Common::String &name, byte &diff);
protected:
-
// Initialization and state change
void initState(CORO_PARAM);
void closeState();
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 04ce01b0ed..dc82c78ee5 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -69,7 +69,6 @@ void RMGfxTaskSetPrior::setPriority(int nPrior) {
_nPrior = nPrior;
}
-
/****************************************************************************\
* RMGfxBuffer Methods
\****************************************************************************/
@@ -109,7 +108,6 @@ void RMGfxBuffer::offsetY(int nLines, int nBpp) {
_buf += nLines * getDimx() * nBpp / 8;
}
-
RMGfxBuffer::operator byte *() {
return _buf;
}
@@ -130,7 +128,6 @@ int RMGfxBuffer::getDimy() {
return _dimy;
}
-
/****************************************************************************\
* RMGfxSourceBuffer Methods
\****************************************************************************/
@@ -223,7 +220,6 @@ void RMGfxSourceBuffer::offsetY(int nLines) {
\****************************************************************************/
RMGfxWoodyBuffer::~RMGfxWoodyBuffer() {
-
}
void RMGfxWoodyBuffer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
@@ -242,7 +238,6 @@ void RMGfxWoodyBuffer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitiv
}
RMGfxWoodyBuffer::RMGfxWoodyBuffer() {
-
}
RMGfxWoodyBuffer::RMGfxWoodyBuffer(int dimx, int dimy)
@@ -487,7 +482,6 @@ bool RMGfxTargetBuffer::getTrackDirtyRects() const {
\****************************************************************************/
RMGfxSourceBufferPal::~RMGfxSourceBufferPal() {
-
}
int RMGfxSourceBufferPal::loadPaletteWA(const byte *buf, bool bSwapped) {
@@ -567,7 +561,6 @@ RMGfxSourceBuffer4::RMGfxSourceBuffer4(int dimx, int dimy)
setPriority(0);
}
-
/**
* Returns the number of bits per pixel of the surface
*
@@ -586,11 +579,10 @@ void RMGfxSourceBuffer4::create(int dimx, int dimy) {
\****************************************************************************/
RMGfxSourceBuffer8::~RMGfxSourceBuffer8() {
-
}
void RMGfxSourceBuffer8::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
- int width, height, u, v;
+ int width = 0, height = 0, u = 0, v = 0;
int bufx = bigBuf.getDimx();
uint16 *buf = bigBuf;
byte *raw = _buf;
@@ -659,7 +651,6 @@ RMGfxSourceBuffer8::RMGfxSourceBuffer8(bool bTrasp0) {
_bTrasp0 = bTrasp0;
}
-
/**
* Returns the number of bits per pixel of the surface
*
@@ -677,13 +668,11 @@ void RMGfxSourceBuffer8::create(int dimx, int dimy) {
#define GETGREEN(x) (((x) >> 5) & 0x1F)
#define GETBLUE(x) ((x) & 0x1F)
-
/****************************************************************************\
* RMGfxSourceBuffer8AB Methods
\****************************************************************************/
RMGfxSourceBuffer8AB::~RMGfxSourceBuffer8AB() {
-
}
int RMGfxSourceBuffer8AB::calcTrasp(int fore, int back) {
@@ -703,9 +692,8 @@ int RMGfxSourceBuffer8AB::calcTrasp(int fore, int back) {
return (r << 10) | (g << 5) | b;
}
-
void RMGfxSourceBuffer8AB::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
- int width, height, u, v;
+ int width = 0, height = 0, u = 0, v = 0;
int bufx = bigBuf.getDimx();
uint16 *buf = bigBuf;
byte *raw = _buf;
@@ -765,8 +753,6 @@ void RMGfxSourceBuffer8AB::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrim
bigBuf.addDirtyRect(Common::Rect(dst._x1, dst._y1, dst._x1 + width, dst._y1 + height));
}
-
-
/****************************************************************************\
* RMGfxSourceBuffer8RLE Methods
\****************************************************************************/
@@ -792,7 +778,6 @@ RMGfxSourceBuffer8RLE::~RMGfxSourceBuffer8RLE() {
}
}
-
int RMGfxSourceBuffer8RLE::init(const byte *buf, int dimx, int dimy, bool bLoadPalette) {
return RMGfxSourceBufferPal::init(buf, dimx, dimy, bLoadPalette);
}
@@ -967,7 +952,6 @@ void RMGfxSourceBuffer8RLE::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
}
}
-
/****************************************************************************\
* RMGfxSourceBuffer8RLEByte Methods
\****************************************************************************/
@@ -1050,7 +1034,6 @@ void RMGfxSourceBuffer8RLEByte::rleDecompressLine(uint16 *dst, byte *src, int nS
src += n;
}
-
while (1) {
RLEByteDoTrasp:
// Get the trasp of s**t
@@ -1155,7 +1138,6 @@ void RMGfxSourceBuffer8RLEByte::rleDecompressLineFlipped(uint16 *dst, byte *src,
src += n;
}
-
while (1) {
RLEByteFlippedDoTrasp:
// Get the trasp of s**t
@@ -1212,13 +1194,11 @@ RLEByteFlippedDoCopy2:
}
}
-
/****************************************************************************\
* RMGfxSourceBuffer8RLEWord Methods
\****************************************************************************/
RMGfxSourceBuffer8RLEWord::~RMGfxSourceBuffer8RLEWord() {
-
}
void RMGfxSourceBuffer8RLEWord::rleWriteTrasp(byte *&cur, int rep) {
@@ -1299,7 +1279,6 @@ void RMGfxSourceBuffer8RLEWord::rleDecompressLine(uint16 *dst, byte *src, int nS
src += n;
}
-
while (1) {
RLEWordDoTrasp:
// Get the trasp of s**t
@@ -1321,7 +1300,6 @@ RLEWordDoAlpha:
src += 2;
RLEWordDoAlpha2:
-
if (n > nLength)
n = nLength;
@@ -1360,7 +1338,6 @@ RLEWordDoCopy2:
return;
assert(nLength > 0);
-
}
}
@@ -1416,7 +1393,6 @@ void RMGfxSourceBuffer8RLEWord::rleDecompressLineFlipped(uint16 *dst, byte *src,
src += n;
}
-
while (1) {
RLEWordFlippedDoTrasp:
// Get the trasp of s**t
@@ -1438,7 +1414,6 @@ RLEWordFlippedDoAlpha:
src += 2;
RLEWordFlippedDoAlpha2:
-
if (n > nLength)
n = nLength;
@@ -1485,7 +1460,6 @@ RLEWordFlippedDoCopy2:
\****************************************************************************/
RMGfxSourceBuffer8RLEWordAB::~RMGfxSourceBuffer8RLEWordAB() {
-
}
void RMGfxSourceBuffer8RLEWordAB::rleDecompressLine(uint16 *dst, byte *src, int nStartSkip, int nLength) {
@@ -1545,7 +1519,6 @@ void RMGfxSourceBuffer8RLEWordAB::rleDecompressLine(uint16 *dst, byte *src, int
src += n;
}
-
while (1) {
RLEWordDoTrasp:
// Get the trasp of s**t
@@ -1567,7 +1540,6 @@ RLEWordDoAlpha:
src += 2;
RLEWordDoAlpha2:
-
if (n > nLength)
n = nLength;
@@ -1651,9 +1623,9 @@ void RMGfxSourceBuffer8AA::calculateAA() {
for (int x = 0; x < _dimx; x++) {
if (*src == 0) {
if ((y > 0 && src[-_dimx] != 0) ||
- (y < _dimy - 1 && src[_dimx] != 0) ||
- (x > 0 && src[-1] != 0) ||
- (x < _dimx - 1 && src[1] != 0))
+ (y < _dimy - 1 && src[_dimx] != 0) ||
+ (x > 0 && src[-1] != 0) ||
+ (x < _dimx - 1 && src[1] != 0))
*srcaa = 1;
}
@@ -1668,9 +1640,9 @@ void RMGfxSourceBuffer8AA::calculateAA() {
for (int x = 0; x < _dimx; x++) {
if (*src != 0) {
if ((y > 0 && srcaa[-_dimx] == 1) ||
- (y < _dimy - 1 && srcaa[_dimx] == 1) ||
- (x > 0 && srcaa[-1] == 1) ||
- (x < _dimx - 1 && srcaa[1] == 1))
+ (y < _dimy - 1 && srcaa[_dimx] == 1) ||
+ (x > 0 && srcaa[-1] == 1) ||
+ (x < _dimx - 1 && srcaa[1] == 1))
*srcaa = 2;
}
@@ -1713,7 +1685,6 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
src += READ_LE_UINT16(src);
// Eliminate horizontal clipping
-
if (prim->isFlipped()) {
u = _dimx - (width + u);
x1 = (prim->getDst()._x1 + _dimx - 1) - u;
@@ -1728,9 +1699,8 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
bigBuf.addDirtyRect(Common::Rect(x1, y1, x1 + width, y1 + height));
}
-// width = _dimx;
-// x1 = prim->Dst().x1;
-
+ //width = _dimx;
+ //x1 = prim->Dst().x1;
// Position into the destination buffer
buf = bigBuf;
@@ -1821,8 +1791,6 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
}
}
-
-
void RMGfxSourceBuffer8AA::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -1911,7 +1879,6 @@ void RMGfxSourceBuffer8RLEWordAA::init(Common::ReadStream &ds, int dimx, int dim
}
}
-
/****************************************************************************\
* RMGfxSourceBuffer16 Methods
\****************************************************************************/
@@ -1984,7 +1951,7 @@ void RMGfxSourceBuffer16::prepareImage() {
uint16 *buf = (uint16 *)_buf;
for (int i = 0; i < _dimx * _dimy; i++)
- WRITE_LE_UINT16(&buf[i], FROM_LE_16(buf[i]) & 0x7FFF);
+ buf[i] = FROM_LE_16(buf[i]) & 0x7FFF;
}
RMGfxSourceBuffer16::RMGfxSourceBuffer16(int dimx, int dimy)
@@ -2041,7 +2008,6 @@ void RMGfxBox::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim)
bigBuf.addDirtyRect(rcDst);
}
-
/****************************************************************************\
* RMGfxClearTask Methods
\****************************************************************************/
diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h
index f0deed83ee..1bacf7e5a9 100644
--- a/engines/tony/gfxcore.h
+++ b/engines/tony/gfxcore.h
@@ -52,7 +52,6 @@ class RMGfxSourceBuffer16; // Source
class RMGfxWoodyBuffer; // Source16+Target
class RMGfxClearTask; // Task
-
/**
* Graphics buffer
*/
@@ -126,7 +125,6 @@ public:
virtual RMGfxPrimitive *duplicate();
};
-
/**
* Graphic drawing task
*/
@@ -149,7 +147,6 @@ public:
virtual void unregister();
};
-
/**
* Graphic drawing with priority
*/
@@ -159,7 +156,6 @@ public:
void setPriority(int nPrior);
};
-
/**
* Task that cleans the destination buffer
*/
@@ -172,7 +168,6 @@ public:
virtual void removeThis(CORO_PARAM, bool &result);
};
-
/**
* Task that draws a colored box
*/
@@ -188,7 +183,6 @@ public:
virtual void removeThis(CORO_PARAM, bool &result);
};
-
/**
* Buffer source for the design, which is a task. This is an abstract base.
*/
@@ -210,7 +204,6 @@ public:
virtual int getBpp() = 0;
};
-
/**
* 16-bit color source
*/
@@ -231,7 +224,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Buffer source with palette
*/
@@ -256,7 +248,6 @@ public:
int loadPalette(const byte *buf);
};
-
/**
* Buffer source with a 256 color palette
*/
@@ -276,7 +267,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Buffer source with a 256 color palette, and alpha blending
*/
@@ -289,7 +279,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Buffer source with a 256 color palette, RLE compressed
*/
@@ -370,7 +359,6 @@ public:
virtual ~RMGfxSourceBuffer8RLEWordAB();
};
-
/**
* Buffer source with a 256 color palette, with anti-aliasing
*/
@@ -397,7 +385,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
class RMGfxSourceBuffer8RLEByteAA : public RMGfxSourceBuffer8RLEByte, public RMGfxSourceBuffer8AA {
protected:
void prepareImage();
@@ -426,7 +413,6 @@ public:
virtual ~RMGfxSourceBuffer8RLEWordAA();
};
-
/**
* Source buffer with 16 colors
*/
@@ -442,7 +428,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Destination buffer which manages its own internal list of tasks
*/
@@ -464,7 +449,7 @@ private:
void mergeDirtyRects();
private:
-// OSystem::MutexRef csModifyingOT;
+ //OSystem::MutexRef csModifyingOT;
protected:
OTList *_otlist;
@@ -498,7 +483,6 @@ public:
bool getTrackDirtyRects() const;
};
-
/**
* Ring buffer, which is both source and by destination
*/
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index c81e553770..cb27e20ab1 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -35,7 +35,6 @@
namespace Tony {
-
/****************************************************************************\
* RMGfxEngine Methods
\****************************************************************************/
@@ -261,7 +260,6 @@ SKIPCLICKSINISTRO:
}
}
-
// Right Release
// *************
if (_input.mouseRightReleased()) {
diff --git a/engines/tony/globals.h b/engines/tony/globals.h
index d8d8d3eba5..0ff243b374 100644
--- a/engines/tony/globals.h
+++ b/engines/tony/globals.h
@@ -63,6 +63,7 @@ struct CharacterStruct {
f->writeUint32LE(_endTalkPattern);
f->writeUint32LE(_numTexts);
}
+
void load(Common::InSaveFile *f) {
_code = f->readUint32LE();
f->readUint32LE();
@@ -106,6 +107,7 @@ struct MCharacterStruct {
f->writeUint32LE(_curTalk);
f->writeByte(_bAlwaysBack);
}
+
void load(Common::InSaveFile *f) {
_code = f->readUint32LE();
f->readUint32LE();
@@ -134,6 +136,7 @@ struct ChangedHotspotStruct {
f->writeUint32LE(_nX);
f->writeUint32LE(_nY);
}
+
void load(Common::InSaveFile *f) {
_dwCode = f->readUint32LE();
_nX = f->readUint32LE();
@@ -141,7 +144,6 @@ struct ChangedHotspotStruct {
}
};
-
/**
* Description of a call to a custom function.
*/
@@ -150,7 +152,7 @@ typedef struct {
int _arg1, _arg2, _arg3, _arg4;
} CfCall;
-typedef CfCall *LpCfCall;
+typedef CfCall *LpCfCall;
struct CoroutineMutex {
CoroutineMutex() : _eventId(0), _ownerPid(0), _lockCount(0) { }
@@ -173,20 +175,20 @@ public:
Common::String _nextMusic;
bool _nextLoop;
- int _nextChannel;
- int _nextSync;
- int _curChannel;
- int _flipflop;
+ int _nextChannel;
+ int _nextSync;
+ int _curChannel;
+ int _flipflop;
CharacterStruct _character[16];
MCharacterStruct _mCharacter[10];
ChangedHotspotStruct _changedHotspot[256];
bool _isMChar[16];
bool _bAlwaysDisplay;
RMPoint _saveTonyPos;
- int _saveTonyLoc;
+ int _saveTonyLoc;
RMTextDialog *_curBackText;
bool _bTonyIsSpeaking;
- int _curChangedHotspot;
+ int _curChangedHotspot;
bool _bCfgInvLocked;
bool _bCfgInvNoScroll;
bool _bCfgTimerizedText;
@@ -199,16 +201,16 @@ public:
bool _bCfgDubbing;
bool _bCfgMusic;
bool _bCfgSFX;
- int _nCfgTonySpeed;
- int _nCfgTextSpeed;
- int _nCfgDubbingVolume;
- int _nCfgMusicVolume;
- int _nCfgSFXVolume;
+ int _nCfgTonySpeed;
+ int _nCfgTextSpeed;
+ int _nCfgDubbingVolume;
+ int _nCfgMusicVolume;
+ int _nCfgSFXVolume;
bool _bSkipSfxNoLoop;
bool _bIdleExited;
bool _bNoBullsEye;
- int _curDialog;
- int _curSoundEffect;
+ int _curDialog;
+ int _curSoundEffect;
bool _bFadeOutStop;
RMTony *_tony;
diff --git a/engines/tony/input.cpp b/engines/tony/input.cpp
index b96ccaf842..e84da04d97 100644
--- a/engines/tony/input.cpp
+++ b/engines/tony/input.cpp
@@ -32,20 +32,8 @@
namespace Tony {
RMInput::RMInput() {
- // Setup mouse fields
- _clampMouse = false;
- _mousePos.set(0, 0);
- _leftButton = _rightButton = false;
_leftClickMouse = _leftReleaseMouse = false;
_rightClickMouse = _rightReleaseMouse = false;
-
- Common::fill((byte *)&_event, (byte *)&_event + sizeof(Common::Event), 0);
-
- // Setup keyboard fields
- Common::fill(&_keyDown[0], &_keyDown[350], 0);
-}
-
-RMInput::~RMInput() {
}
void RMInput::poll() {
@@ -59,19 +47,15 @@ void RMInput::poll() {
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONDOWN:
case Common::EVENT_RBUTTONUP:
- _mousePos.set(_event.mouse.x, _event.mouse.y);
+ _mousePos = _event.mouse;
if (_event.type == Common::EVENT_LBUTTONDOWN) {
- _leftButton = true;
_leftClickMouse = true;
} else if (_event.type == Common::EVENT_LBUTTONUP) {
- _leftButton = false;
_leftReleaseMouse = true;
} else if (_event.type == Common::EVENT_RBUTTONDOWN) {
- _rightButton = true;
_rightClickMouse = true;
} else if (_event.type == Common::EVENT_RBUTTONUP) {
- _rightButton = false;
_rightReleaseMouse = true;
} else
continue;
@@ -87,12 +71,17 @@ void RMInput::poll() {
g_vm->_debugger->onFrame();
} else {
// Flag the given key as being down
- _keyDown[(int)_event.kbd.keycode] = true;
+ _keyDown.push_back(_event.kbd.keycode);
}
return;
case Common::EVENT_KEYUP:
- _keyDown[(int)_event.kbd.keycode] = false;
+ for (uint i = 0; i < _keyDown.size(); i++) {
+ if (_keyDown[i] == _event.kbd.keycode) {
+ _keyDown.remove_at(i);
+ break;
+ }
+ }
return;
default:
@@ -101,30 +90,27 @@ void RMInput::poll() {
}
}
-bool RMInput::mouseLeft() {
- return _leftButton;
-}
-
-bool RMInput::mouseRight() {
- return _rightButton;
-}
-
/**
* Return true if a key has been pressed
*/
bool RMInput::getAsyncKeyState(Common::KeyCode kc) {
// The act of testing for a particular key automatically clears the state, to prevent
// the same key being registered in multiple different frames
- bool result = _keyDown[(int)kc];
- _keyDown[(int)kc] = false;
- return result;
+ for (uint i = 0; i < _keyDown.size(); i++) {
+ if (_keyDown[i] == kc) {
+ _keyDown.remove_at(i);
+ return true;
+ }
+ }
+ return false;
}
/**
* Reading of the mouse
*/
RMPoint RMInput::mousePos() {
- return _mousePos;
+ RMPoint p(_mousePos.x, _mousePos.y);
+ return p;
}
/**
@@ -138,10 +124,6 @@ bool RMInput::mouseRightClicked() {
return _rightClickMouse;
}
-bool RMInput::mouseBothClicked() {
- return _leftClickMouse && _rightClickMouse;
-}
-
bool RMInput::mouseLeftReleased() {
return _leftReleaseMouse;
}
@@ -150,8 +132,4 @@ bool RMInput::mouseRightReleased() {
return _rightReleaseMouse;
}
-bool RMInput::mouseBothReleased() {
- return _leftReleaseMouse && _rightReleaseMouse;
-}
-
} // End of namespace Tony
diff --git a/engines/tony/input.h b/engines/tony/input.h
index d07eaefe34..274aa8c491 100644
--- a/engines/tony/input.h
+++ b/engines/tony/input.h
@@ -30,6 +30,9 @@
#define TONY_INPUT_H
#include "common/events.h"
+#include "common/rect.h"
+#include "common/array.h"
+#include "common/keyboard.h"
#include "tony/utils.h"
namespace Tony {
@@ -39,17 +42,14 @@ private:
Common::Event _event;
// Mouse related fields
- RMPoint _mousePos;
- bool _clampMouse;
- bool _leftButton, _rightButton;
+ Common::Point _mousePos;
bool _leftClickMouse, _leftReleaseMouse, _rightClickMouse, _rightReleaseMouse;
// Keyboard related fields
- bool _keyDown[350];
+ Common::Array<Common::KeyCode> _keyDown;
public:
RMInput();
- ~RMInput();
/**
* Polling (must be performed once per frame)
@@ -62,20 +62,12 @@ public:
RMPoint mousePos();
/**
- * Current status of the mouse buttons
- */
- bool mouseLeft();
- bool mouseRight();
-
- /**
* Events of mouse clicks
*/
bool mouseLeftClicked();
bool mouseRightClicked();
- bool mouseBothClicked();
bool mouseLeftReleased();
bool mouseRightReleased();
- bool mouseBothReleased();
/**
* Returns true if the given key is pressed
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index a1f98d88b4..6b023d5990 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -34,7 +34,6 @@
namespace Tony {
-
/****************************************************************************\
* RMInventory Methods
\****************************************************************************/
@@ -71,7 +70,6 @@ bool RMInventory::checkPointInside(const RMPoint &pt) {
return pt._y < 70;
}
-
void RMInventory::init() {
// Create the main buffer
create(RM_SX, 68);
@@ -143,10 +141,9 @@ void RMInventory::init() {
RMMessage msg2(13);
RMMessage msg3(14);
- _hints[0].writeText(msg1[0], 1); // Examine
- _hints[1].writeText(msg2[0], 1); // Take
- _hints[2].writeText(msg3[0], 1); // Use
-
+ _hints[0].writeText(msg1[0], 1); // Examine
+ _hints[1].writeText(msg2[0], 1); // Take
+ _hints[2].writeText(msg3[0], 1); // Use
// Prepare initial inventory
prepare();
@@ -280,7 +277,6 @@ void RMInventory::changeItemStatus(uint32 code, uint32 dwStatus) {
}
}
-
void RMInventory::prepare() {
for (int i = 1; i < RM_SX / 64 - 1; i++) {
if (i - 1 + _curPos < _nInv)
@@ -353,6 +349,7 @@ bool RMInventory::leftClick(const RMPoint &mpos, int &nCombineObj) {
clearOT();
g_system->unlockMutex(_csModifyInterface);
}
+
// Click the left arrow
else if ((_state == OPENED) && _bBlinkingLeft) {
assert(_curPos > 0);
@@ -375,7 +372,6 @@ bool RMInventory::leftClick(const RMPoint &mpos, int &nCombineObj) {
g_system->unlockMutex(_csModifyInterface);
}
-
return false;
}
@@ -458,7 +454,7 @@ bool RMInventory::rightRelease(const RMPoint &mpos, RMTonyAction &curAction) {
return false;
}
-#define INVSPEED 20
+#define INVSPEED 20
void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpos, bool bCanOpen) {
bool bNeedRedraw = false;
@@ -517,7 +513,7 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
GLOBALS._bCfgInvLocked = !GLOBALS._bCfgInvLocked;
}
- if (_bCombining) {//m_state == COMBINING)
+ if (_bCombining) { // m_state == COMBINING)
ptr.setCustomPointer(&_items[_nCombine]._pointer[_items[_nCombine]._status - 1]);
ptr.setSpecialPointer(RMPointer::PTR_CUSTOM);
}
@@ -867,7 +863,7 @@ bool RMInterface::released(const RMPoint &mousepos, RMTonyAction &action) {
action = TA_PERORATE;
break;
- default: // No verb
+ default: // No verb
return false;
}
@@ -902,8 +898,8 @@ void RMInterface::init() {
_hotzone[i].loadPaletteWA(pal);
}
- _hotbbox[0].setRect(126, 123, 159, 208); // Take
- _hotbbox[1].setRect(90, 130, 125, 186); // About
+ _hotbbox[0].setRect(126, 123, 159, 208); // Take
+ _hotbbox[1].setRect(90, 130, 125, 186); // About
_hotbbox[2].setRect(110, 60, 152, 125);
_hotbbox[3].setRect(56, 51, 93, 99);
_hotbbox[4].setRect(51, 105, 82, 172);
@@ -921,11 +917,11 @@ void RMInterface::init() {
RMMessage msg3(15);
RMMessage msg4(16);
- _hints[0].writeText(msg0[0], 1); // Take
- _hints[1].writeText(msg1[0], 1); // Talk
- _hints[2].writeText(msg2[0], 1); // Use
- _hints[3].writeText(msg3[0], 1); // Examine
- _hints[4].writeText(msg4[0], 1); // Show Yourself
+ _hints[0].writeText(msg0[0], 1); // Take
+ _hints[1].writeText(msg1[0], 1); // Talk
+ _hints[2].writeText(msg2[0], 1); // Use
+ _hints[3].writeText(msg3[0], 1); // Examine
+ _hints[4].writeText(msg4[0], 1); // Show Yourself
_bActive = false;
_bPerorate = false;
diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h
index ce94c86c1b..1d660d51cd 100644
--- a/engines/tony/inventory.h
+++ b/engines/tony/inventory.h
@@ -174,7 +174,6 @@ public:
int loadState(byte *state);
};
-
class RMInterface : public RMGfxSourceBuffer8RLEByte {
private:
bool _bActive;
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index 18470aa6fc..5beac842f9 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -37,7 +37,6 @@ namespace Tony {
using namespace ::Tony::MPAL;
-
/****************************************************************************\
* RMPalette Methods
\****************************************************************************/
@@ -65,7 +64,6 @@ void RMPattern::RMSlot::readFromStream(Common::ReadStream &ds, bool bLOX) {
_flag = ds.readByte();
}
-
/****************************************************************************\
* RMPattern Methods
\****************************************************************************/
@@ -329,7 +327,6 @@ RMSprite::~RMSprite() {
}
}
-
/****************************************************************************\
* RMSfx Methods
\****************************************************************************/
@@ -391,8 +388,6 @@ void RMSfx::stop() {
}
}
-
-
/****************************************************************************\
* RMItem Methods
\****************************************************************************/
@@ -553,7 +548,6 @@ void RMItem::readFromStream(Common::SeekableReadStream &ds, bool bLOX) {
_bIsActive = mpalQueryItemIsActive(_mpalCode);
}
-
RMGfxPrimitive *RMItem::newItemPrimitive() {
return new RMGfxPrimitive(this);
}
@@ -648,7 +642,6 @@ void RMItem::removeThis(CORO_PARAM, bool &result) {
result = (_nCurSprite == -1);
}
-
void RMItem::setStatus(int nStatus) {
_bIsActive = (nStatus > 0);
}
@@ -745,7 +738,6 @@ RMItem::~RMItem() {
CoroScheduler.closeEvent(_hEndPattern);
}
-
void RMItem::waitForEndPattern(CORO_PARAM, uint32 hCustomSkip) {
CORO_BEGIN_CONTEXT;
uint32 h[2];
@@ -784,12 +776,10 @@ void RMItem::pauseSound(bool bPause) {
_sfx[i].pause(bPause);
}
-
/****************************************************************************\
* RMWipe Methods
\****************************************************************************/
-
RMWipe::RMWipe() {
_hUnregistered = CoroScheduler.createEvent(false, false);
_hEndOfFade = CoroScheduler.createEvent(false, false);
@@ -799,7 +789,6 @@ RMWipe::RMWipe() {
_bEndFade = false;
_bFading = false;
_nFadeStep = 0;
-
}
RMWipe::~RMWipe() {
@@ -904,10 +893,10 @@ void RMWipe::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
/****************************************************************************/
short RMCharacter::findPath(short source, short destination) {
- static RMBox box[MAXBOXES]; // Matrix of adjacent boxes
- static short nodeCost[MAXBOXES]; // Cost per node
- static short valid[MAXBOXES]; // 0:Invalid 1:Valid 2:Saturated
- static short nextNode[MAXBOXES]; // Next node
+ static RMBox box[MAXBOXES]; // Matrix of adjacent boxes
+ static short nodeCost[MAXBOXES]; // Cost per node
+ static short valid[MAXBOXES]; // 0:Invalid 1:Valid 2:Saturated
+ static short nextNode[MAXBOXES]; // Next node
short minCost, error = 0;
RMBoxLoc *cur;
@@ -936,19 +925,19 @@ short RMCharacter::findPath(short source, short destination) {
// Find the shortest path
while (!finish) {
- minCost = 32000; // Reset the minimum cost
- error = 1; // Possible error
+ minCost = 32000; // Reset the minimum cost
+ error = 1; // Possible error
// 1st cycle: explore possible new nodes
for (int i = 0; i < cur->_numbBox; i++) {
if (valid[i] == 1) {
- error = 0; // Failure de-bunked
+ error = 0; // Failure de-bunked
int j = 0;
while (((box[i]._adj[j]) != 1) && (j < cur->_numbBox))
j++;
if (j >= cur->_numbBox)
- valid[i] = 2; // nodo saturated?
+ valid[i] = 2; // nodo saturated?
else {
nextNode[i] = j;
if (nodeCost[i] + 1 < minCost)
@@ -958,7 +947,7 @@ short RMCharacter::findPath(short source, short destination) {
}
if (error)
- finish = true; // All nodes saturated
+ finish = true; // All nodes saturated
// 2nd cycle: adding new nodes that were found, saturate old nodes
for (int i = 0; i < cur->_numbBox; i++) {
@@ -998,7 +987,6 @@ short RMCharacter::findPath(short source, short destination) {
return !error;
}
-
void RMCharacter::goTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -1068,7 +1056,6 @@ void RMCharacter::goTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
CORO_END_CODE;
}
-
RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint point) {
short steps;
RMPoint newPt, foundPt;
@@ -1082,9 +1069,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._y--; // to avoid error?
+ newPt._y--; // to avoid error?
foundPt = newPt;
}
}
@@ -1097,9 +1084,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._y++; // to avoid error?
+ newPt._y++; // to avoid error?
foundPt = newPt;
}
}
@@ -1112,9 +1099,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._x++; // to avoid error?
+ newPt._x++; // to avoid error?
foundPt = newPt;
}
}
@@ -1127,9 +1114,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._x--; // to avoid error?
+ newPt._x--; // to avoid error?
foundPt = newPt;
}
}
@@ -1140,12 +1127,10 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
return foundPt;
}
-
RMPoint RMCharacter::nearestPoint(const RMPoint &point) {
return searching(1, 1, 1, 1, point);
}
-
short RMCharacter::scanLine(const RMPoint &point) {
int Ldx, Ldy, Lcount;
float Lfx, Lfy, Lslope;
@@ -1175,7 +1160,7 @@ short RMCharacter::scanLine(const RMPoint &point) {
Lstatus = 0;
}
- Lscan = Lstart; // Start scanning
+ Lscan = Lstart; // Start scanning
while (inWhichBox(Lscan) != -1) {
Lcount++;
if (Lstatus) {
@@ -1200,8 +1185,8 @@ short RMCharacter::scanLine(const RMPoint &point) {
* Calculates intersections between the straight line and the closest BBOX
*/
RMPoint RMCharacter::invScanLine(const RMPoint &point) {
- RMPoint lStart = point; // Exchange!
- RMPoint lEnd = _pos; // :-)
+ RMPoint lStart = point; // Exchange!
+ RMPoint lEnd = _pos; // :-)
int lDx = lStart._x - lEnd._x;
int lDy = lStart._y - lEnd._y;
float lFx = lDx;
@@ -1256,7 +1241,6 @@ RMPoint RMCharacter::invScanLine(const RMPoint &point) {
}
}
-
/**
* Returns the HotSpot coordinate closest to the player
*/
@@ -1510,7 +1494,6 @@ inline int RMCharacter::inWhichBox(const RMPoint &pt) {
return _theBoxes->whichBox(_curLocation, pt);
}
-
void RMCharacter::move(CORO_PARAM, RMPoint pt, bool *result) {
CORO_BEGIN_CONTEXT;
RMPoint dest;
@@ -1807,7 +1790,7 @@ bool RMGameBoxes::isInBox(int nLoc, int nBox, const RMPoint &pt) {
RMBoxLoc *cur = getBoxes(nLoc);
if ((pt._x >= cur->_boxes[nBox]._left) && (pt._x <= cur->_boxes[nBox]._right) &&
- (pt._y >= cur->_boxes[nBox]._top) && (pt._y <= cur->_boxes[nBox]._bottom))
+ (pt._y >= cur->_boxes[nBox]._top) && (pt._y <= cur->_boxes[nBox]._bottom))
return true;
else
return false;
@@ -1822,7 +1805,7 @@ int RMGameBoxes::whichBox(int nLoc, const RMPoint &punto) {
for (int i = 0; i < cur->_numbBox; i++) {
if (cur->_boxes[i]._bActive) {
if ((punto._x >= cur->_boxes[i]._left) && (punto._x <= cur->_boxes[i]._right) &&
- (punto._y >= cur->_boxes[i]._top) && (punto._y <= cur->_boxes[i]._bottom))
+ (punto._y >= cur->_boxes[i]._top) && (punto._y <= cur->_boxes[i]._bottom))
return i;
}
}
@@ -1976,7 +1959,7 @@ bool RMLocation::load(Common::SeekableReadStream &ds) {
_buf->init(ds, dimx, dimy, true);
// Check the size of the location
-// assert(dimy!=512);
+ //assert(dimy!=512);
// Number of objects
_nItems = ds.readSint32LE();
@@ -1994,7 +1977,6 @@ bool RMLocation::load(Common::SeekableReadStream &ds) {
return ds.err();
}
-
bool RMLocation::loadLOX(Common::SeekableReadStream &ds) {
// Version
byte ver = ds.readByte();
@@ -2033,7 +2015,6 @@ bool RMLocation::loadLOX(Common::SeekableReadStream &ds) {
return ds.err();
}
-
/**
* Draw method overloaded from RMGfxSourceBUffer8
*/
@@ -2070,7 +2051,6 @@ void RMLocation::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
CORO_END_CODE;
}
-
/**
* Prepare a frame, adding the location to the OT list, and all the items that have changed animation frame.
*/
@@ -2084,7 +2064,6 @@ void RMLocation::doFrame(RMGfxTargetBuffer *bigBuf) {
_items[i].doFrame(bigBuf);
}
-
RMItem *RMLocation::getItemFromCode(uint32 dwCode) {
for (int i = 0; i < _nItems; i++) {
if (_items[i].mpalCode() == (int)dwCode)
diff --git a/engines/tony/loc.h b/engines/tony/loc.h
index 04ba772458..1306316136 100644
--- a/engines/tony/loc.h
+++ b/engines/tony/loc.h
@@ -49,7 +49,6 @@ typedef enum {
CM_65K
} RMColorMode;
-
/****************************************************************************\
* Class declarations
\****************************************************************************/
@@ -65,7 +64,6 @@ public:
void readFromStream(Common::ReadStream &ds);
};
-
/**
* Sound effect of an object
*/
@@ -87,7 +85,6 @@ public:
void readFromStream(Common::ReadStream &ds, bool bLOX = false);
};
-
/**
* Object pattern
*/
@@ -126,8 +123,8 @@ public:
private:
int _speed;
- RMPoint _pos; // Parent coordinates
- RMPoint _curPos; // Parent + child coordinates
+ RMPoint _pos; // Parent coordinates
+ RMPoint _curPos; // Parent + child coordinates
int _bLoop;
int _nSlots;
int _nCurSlot;
@@ -160,7 +157,6 @@ private:
void updateCoord();
};
-
/**
* Sprite (frame) animation of an item
*/
@@ -185,7 +181,6 @@ public:
void readFromStream(Common::SeekableReadStream &ds, bool bLOX = false);
};
-
/**
* Data on an item
*/
@@ -195,7 +190,7 @@ public:
protected:
int _z;
- RMPoint _pos; // Coordinate ancestor
+ RMPoint _pos; // Coordinate ancestor
RMColorMode _cm;
RMPoint _curScroll;
@@ -285,15 +280,14 @@ protected:
virtual RMGfxSourceBuffer *newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
};
-
-#define MAXBOXES 50 // Maximum number of allowed boxes
-#define MAXHOTSPOT 20 // Maximum nimber of allowed hotspots
+#define MAXBOXES 50 // Maximum number of allowed boxes
+#define MAXHOTSPOT 20 // Maximum nimber of allowed hotspots
class RMBox {
public:
struct Hotspot {
- int _hotx, _hoty; // Hotspot coordinates
- int _destination; // Hotspot destination
+ int _hotx, _hoty; // Hotspot coordinates
+ int _destination; // Hotspot destination
};
public:
@@ -309,7 +303,6 @@ public:
void readFromStream(Common::ReadStream &ds);
};
-
class RMBoxLoc {
public:
int _numbBox;
@@ -454,7 +447,6 @@ public:
void setSpeed(int speed);
};
-
class RMWipe : public RMGfxTask {
private:
bool _bFading;
@@ -483,25 +475,24 @@ public:
virtual int priority();
};
-
/**
* Location
*/
class RMLocation : public RMGfxTaskSetPrior {
public:
- Common::String _name; // Name
+ Common::String _name; // Name
private:
- RMColorMode _cmode; // Color mode
- RMGfxSourceBuffer *_buf; // Location picture
+ RMColorMode _cmode; // Color mode
+ RMGfxSourceBuffer *_buf; // Location picture
- int _nItems; // Number of objects
- RMItem *_items; // Objects
+ int _nItems; // Number of objects
+ RMItem *_items; // Objects
- RMPoint _curScroll; // Current scroll position
+ RMPoint _curScroll; // Current scroll position
RMPoint _fixedScroll;
- RMPoint _prevScroll; // Previous scroll position
+ RMPoint _prevScroll; // Previous scroll position
RMPoint _prevFixedScroll;
public:
@@ -552,7 +543,6 @@ public:
void pauseSound(bool bPause);
};
-
/**
* MPAL message, composed of more ASCIIZ
*/
diff --git a/engines/tony/mpal/expr.cpp b/engines/tony/mpal/expr.cpp
index 824cd91651..7dc640ba7c 100644
--- a/engines/tony/mpal/expr.cpp
+++ b/engines/tony/mpal/expr.cpp
@@ -35,7 +35,6 @@ namespace Tony {
namespace MPAL {
-
/**
* Duplicate a mathematical expression.
*
@@ -140,7 +139,6 @@ static void solve(LpExpression one, int num) {
}
}
-
/**
* Calculates the result of a mathematical expression, replacing the current
* value of any variable.
@@ -178,7 +176,6 @@ static int evaluateAndFreeExpression(byte *expr) {
return val;
}
-
/**
* Parses a mathematical expression from the MPC file
*
@@ -249,7 +246,6 @@ const byte *parseExpression(const byte *lpBuf, MpalHandle *h) {
return lpBuf;
}
-
/**
* Calculate the value of a mathamatical expression
*
diff --git a/engines/tony/mpal/expr.h b/engines/tony/mpal/expr.h
index 405624b4fe..256d09bb9b 100644
--- a/engines/tony/mpal/expr.h
+++ b/engines/tony/mpal/expr.h
@@ -70,16 +70,16 @@ namespace MPAL {
* Mathamatical framework to manage operations
*/
typedef struct {
- byte _type; // Object Type (see enum ExprListTypes)
+ byte _type; // Object Type (see enum ExprListTypes)
union {
- int _num; // Identifier (if type == ELT_NUMBER)
- char *_name; // Variable name (if type == ELT_VAR)
- MpalHandle _son; // Handle expressions (if type == ELT_PARENTH)
- byte *_pson; // Handle lockato (if type == ELT_PARENTH2)
+ int _num; // Identifier (if type == ELT_NUMBER)
+ char *_name; // Variable name (if type == ELT_VAR)
+ MpalHandle _son; // Handle expressions (if type == ELT_PARENTH)
+ byte *_pson; // Handle lockato (if type == ELT_PARENTH2)
} _val;
- byte _symbol; // Mathematic symbols (see #define OP_*)
+ byte _symbol; // Mathematic symbols (see #define OP_*)
} Expression;
typedef Expression *LpExpression;
diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp
index 9c45cdf982..4eb84d1406 100644
--- a/engines/tony/mpal/loadmpc.cpp
+++ b/engines/tony/mpal/loadmpc.cpp
@@ -90,7 +90,7 @@ static const byte *ParseScript(const byte *lpBuf, LpMpalScript lpmsScript) {
lpBuf += 4;
break;
- case 2: { // Variable assign
+ case 2: { // Variable assign
int len = *lpBuf;
lpBuf++;
lpmsScript->_command[curCmd]._lpszVarName = (char *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, len + 1);
@@ -216,6 +216,7 @@ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) {
return NULL;
break;
}
+
// Do Choice
case 3:
lpmdDialog->_command[curCmd]._nChoice = READ_LE_UINT16(lpBuf);
@@ -317,7 +318,6 @@ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) {
return lpBuf;
}
-
/**
* Parses an item from the MPC file, and inserts its data into a structure
*
@@ -384,7 +384,7 @@ static const byte *parseItem(const byte *lpBuf, LpMpalItem lpmiItem) {
lpmiItem->_command[curCmd]._type = *lpBuf;
lpBuf++;
switch (lpmiItem->_command[curCmd]._type) {
- case 1: // Call custom function
+ case 1: // Call custom function
lpmiItem->_command[curCmd]._nCf = READ_LE_UINT16(lpBuf);
lpBuf += 2;
lpmiItem->_command[curCmd]._arg1 = (int32)READ_LE_UINT32(lpBuf);
@@ -397,7 +397,7 @@ static const byte *parseItem(const byte *lpBuf, LpMpalItem lpmiItem) {
lpBuf += 4;
break;
- case 2: // Variable assign
+ case 2: // Variable assign
len = *lpBuf;
lpBuf++;
lpmiItem->_command[curCmd]._lpszVarName = (char *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, len + 1);
@@ -498,7 +498,6 @@ static const byte *ParseLocation(const byte *lpBuf, LpMpalLocation lpmlLocation)
return lpBuf;
}
-
/****************************************************************************\
* Exported functions
\****************************************************************************/
@@ -539,7 +538,7 @@ bool parseMpc(const byte *lpBuf) {
GLOBALS._lpmvVars->_dwVal = READ_LE_UINT32(lpBuf);
lpBuf += 4;
- lpBuf++; // Skip 'ext'
+ lpBuf++; // Skip 'ext'
GLOBALS._lpmvVars++;
}
diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp
index 3d0751a5ca..a04a769528 100644
--- a/engines/tony/mpal/lzo.cpp
+++ b/engines/tony/mpal/lzo.cpp
@@ -69,440 +69,440 @@ namespace Tony {
namespace MPAL {
-#define pd(a, b) ((uint32) ((a) - (b)))
+#define pd(a, b) ((uint32) ((a) - (b)))
-#define TEST_IP (ip < ip_end)
-#define TEST_OP 1
-#define NEED_IP(x) ((void) 0)
-#define NEED_OP(x) ((void) 0)
-#define TEST_LB(m_pos) ((void) 0)
+#define TEST_IP (ip < ip_end)
+#define TEST_OP 1
+#define NEED_IP(x) ((void) 0)
+#define NEED_OP(x) ((void) 0)
+#define TEST_LB(m_pos) ((void) 0)
-#define M2_MAX_OFFSET 0x0800
+#define M2_MAX_OFFSET 0x0800
#define LZO1X
/**
* Decompresses an LZO compressed resource
*/
int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len) {
- register byte *op;
- register const byte *ip;
- register uint32 t = 0;
+ register byte *op;
+ register const byte *ip;
+ register uint32 t = 0;
#if defined(COPY_DICT)
- uint32 m_off;
- const byte *dict_end;
+ uint32 m_off;
+ const byte *dict_end;
#else
- register const byte *m_pos;
+ register const byte *m_pos;
#endif
- const byte * const ip_end = in + in_len;
+ const byte * const ip_end = in + in_len;
#if defined(HAVE_ANY_OP)
- byte * const op_end = out + *out_len;
+ byte * const op_end = out + *out_len;
#endif
#if defined(LZO1Z)
- uint32 last_m_off = 0;
+ uint32 last_m_off = 0;
#endif
#if defined(COPY_DICT)
- if (dict)
- {
- if (dict_len > M4_MAX_OFFSET)
- {
- dict += dict_len - M4_MAX_OFFSET;
- dict_len = M4_MAX_OFFSET;
- }
- dict_end = dict + dict_len;
- }
- else
- {
- dict_len = 0;
- dict_end = NULL;
- }
-#endif
-
- *out_len = 0;
-
- op = out;
- ip = in;
-
- if (*ip > 17)
- {
- t = *ip++ - 17;
- if (t < 4)
- goto match_next;
- assert(t > 0); NEED_OP(t); NEED_IP(t+1);
- do *op++ = *ip++; while (--t > 0);
- goto first_literal_run;
- }
-
- while (TEST_IP && TEST_OP)
- {
- t = *ip++;
- if (t >= 16)
- goto match;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 15 + *ip++;
- }
- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4);
+ if (dict)
+ {
+ if (dict_len > M4_MAX_OFFSET)
+ {
+ dict += dict_len - M4_MAX_OFFSET;
+ dict_len = M4_MAX_OFFSET;
+ }
+ dict_end = dict + dict_len;
+ }
+ else
+ {
+ dict_len = 0;
+ dict_end = NULL;
+ }
+#endif
+
+ *out_len = 0;
+
+ op = out;
+ ip = in;
+
+ if (*ip > 17)
+ {
+ t = *ip++ - 17;
+ if (t < 4)
+ goto match_next;
+ assert(t > 0); NEED_OP(t); NEED_IP(t+1);
+ do *op++ = *ip++; while (--t > 0);
+ goto first_literal_run;
+ }
+
+ while (TEST_IP && TEST_OP)
+ {
+ t = *ip++;
+ if (t >= 16)
+ goto match;
+ if (t == 0)
+ {
+ NEED_IP(1);
+ while (*ip == 0)
+ {
+ t += 255;
+ ip++;
+ NEED_IP(1);
+ }
+ t += 15 + *ip++;
+ }
+ assert(t > 0); NEED_OP(t+3); NEED_IP(t+4);
#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4)
- t += 3;
- if (t >= 8) do
- {
- UA_COPY64(op, ip);
- op += 8; ip += 8; t -= 8;
- } while (t >= 8);
- if (t >= 4)
- {
- UA_COPY32(op, ip);
- op += 4; ip += 4; t -= 4;
- }
- if (t > 0)
- {
- *op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
- }
+ t += 3;
+ if (t >= 8) do
+ {
+ UA_COPY64(op, ip);
+ op += 8; ip += 8; t -= 8;
+ } while (t >= 8);
+ if (t >= 4)
+ {
+ UA_COPY32(op, ip);
+ op += 4; ip += 4; t -= 4;
+ }
+ if (t > 0)
+ {
+ *op++ = *ip++;
+ if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
+ }
#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
#if !defined(LZO_UNALIGNED_OK_4)
- if (PTR_ALIGNED2_4(op, ip))
- {
-#endif
- UA_COPY32(op, ip);
- op += 4; ip += 4;
- if (--t > 0)
- {
- if (t >= 4)
- {
- do {
- UA_COPY32(op, ip);
- op += 4; ip += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *ip++; while (--t > 0);
- }
- else
- do *op++ = *ip++; while (--t > 0);
- }
+ if (PTR_ALIGNED2_4(op, ip))
+ {
+#endif
+ UA_COPY32(op, ip);
+ op += 4; ip += 4;
+ if (--t > 0)
+ {
+ if (t >= 4)
+ {
+ do {
+ UA_COPY32(op, ip);
+ op += 4; ip += 4; t -= 4;
+ } while (t >= 4);
+ if (t > 0) do *op++ = *ip++; while (--t > 0);
+ }
+ else
+ do *op++ = *ip++; while (--t > 0);
+ }
#if !defined(LZO_UNALIGNED_OK_4)
- }
- else
+ }
+ else
#endif
#endif
#if !defined(LZO_UNALIGNED_OK_4) && !defined(LZO_UNALIGNED_OK_8)
- {
- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++;
- do *op++ = *ip++; while (--t > 0);
- }
+ {
+ *op++ = *ip++; *op++ = *ip++; *op++ = *ip++;
+ do *op++ = *ip++; while (--t > 0);
+ }
#endif
first_literal_run:
- t = *ip++;
- if (t >= 16)
- goto match;
+ t = *ip++;
+ if (t >= 16)
+ goto match;
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
+ m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
+ last_m_off = m_off;
#else
- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2);
+ m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2);
#endif
- NEED_OP(3);
- t = 3; COPY_DICT(t, m_off)
+ NEED_OP(3);
+ t = 3; COPY_DICT(t, m_off)
#else
#if defined(LZO1Z)
- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
+ t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
+ m_pos = op - t;
+ last_m_off = t;
#else
- m_pos = op - (1 + M2_MAX_OFFSET);
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
+ m_pos = op - (1 + M2_MAX_OFFSET);
+ m_pos -= t >> 2;
+ m_pos -= *ip++ << 2;
#endif
- TEST_LB(m_pos); NEED_OP(3);
- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos;
+ TEST_LB(m_pos); NEED_OP(3);
+ *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos;
#endif
- goto match_done;
+ goto match_done;
- do {
+ do {
match:
- if (t >= 64)
- {
+ if (t >= 64)
+ {
#if defined(COPY_DICT)
#if defined(LZO1X)
- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3);
- t = (t >> 5) - 1;
+ m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3);
+ t = (t >> 5) - 1;
#elif defined(LZO1Y)
- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2);
- t = (t >> 4) - 3;
+ m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2);
+ t = (t >> 4) - 3;
#elif defined(LZO1Z)
- m_off = t & 0x1f;
- if (m_off >= 0x1c)
- m_off = last_m_off;
- else
- {
- m_off = 1 + (m_off << 6) + (*ip++ >> 2);
- last_m_off = m_off;
- }
- t = (t >> 5) - 1;
+ m_off = t & 0x1f;
+ if (m_off >= 0x1c)
+ m_off = last_m_off;
+ else
+ {
+ m_off = 1 + (m_off << 6) + (*ip++ >> 2);
+ last_m_off = m_off;
+ }
+ t = (t >> 5) - 1;
#endif
#else
#if defined(LZO1X)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 7;
- m_pos -= *ip++ << 3;
- t = (t >> 5) - 1;
+ m_pos = op - 1;
+ m_pos -= (t >> 2) & 7;
+ m_pos -= *ip++ << 3;
+ t = (t >> 5) - 1;
#elif defined(LZO1Y)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 3;
- m_pos -= *ip++ << 2;
- t = (t >> 4) - 3;
+ m_pos = op - 1;
+ m_pos -= (t >> 2) & 3;
+ m_pos -= *ip++ << 2;
+ t = (t >> 4) - 3;
#elif defined(LZO1Z)
- {
- uint32 off = t & 0x1f;
- m_pos = op;
- if (off >= 0x1c)
- {
- assert(last_m_off > 0);
- m_pos -= last_m_off;
- }
- else
- {
- off = 1 + (off << 6) + (*ip++ >> 2);
- m_pos -= off;
- last_m_off = off;
- }
- }
- t = (t >> 5) - 1;
-#endif
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
- goto copy_match;
-#endif
- }
- else if (t >= 32)
- {
- t &= 31;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 31 + *ip++;
- }
+ {
+ uint32 off = t & 0x1f;
+ m_pos = op;
+ if (off >= 0x1c)
+ {
+ assert(last_m_off > 0);
+ m_pos -= last_m_off;
+ }
+ else
+ {
+ off = 1 + (off << 6) + (*ip++ >> 2);
+ m_pos -= off;
+ last_m_off = off;
+ }
+ }
+ t = (t >> 5) - 1;
+#endif
+ TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
+ goto copy_match;
+#endif
+ }
+ else if (t >= 32)
+ {
+ t &= 31;
+ if (t == 0)
+ {
+ NEED_IP(1);
+ while (*ip == 0)
+ {
+ t += 255;
+ ip++;
+ NEED_IP(1);
+ }
+ t += 31 + *ip++;
+ }
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- last_m_off = m_off;
+ m_off = 1 + (ip[0] << 6) + (ip[1] >> 2);
+ last_m_off = m_off;
#else
- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6);
+ m_off = 1 + (ip[0] >> 2) + (ip[1] << 6);
#endif
#else
#if defined(LZO1Z)
- {
- uint32 off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- m_pos = op - off;
- last_m_off = off;
- }
+ {
+ uint32 off = 1 + (ip[0] << 6) + (ip[1] >> 2);
+ m_pos = op - off;
+ last_m_off = off;
+ }
#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos = op - 1;
- m_pos -= UA_GET16(ip) >> 2;
+ m_pos = op - 1;
+ m_pos -= UA_GET16(ip) >> 2;
#else
- m_pos = op - 1;
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
+ m_pos = op - 1;
+ m_pos -= (ip[0] >> 2) + (ip[1] << 6);
#endif
#endif
- ip += 2;
- }
- else if (t >= 16)
- {
+ ip += 2;
+ }
+ else if (t >= 16)
+ {
#if defined(COPY_DICT)
- m_off = (t & 8) << 11;
+ m_off = (t & 8) << 11;
#else
- m_pos = op;
- m_pos -= (t & 8) << 11;
-#endif
- t &= 7;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 7 + *ip++;
- }
+ m_pos = op;
+ m_pos -= (t & 8) << 11;
+#endif
+ t &= 7;
+ if (t == 0)
+ {
+ NEED_IP(1);
+ while (*ip == 0)
+ {
+ t += 255;
+ ip++;
+ NEED_IP(1);
+ }
+ t += 7 + *ip++;
+ }
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off += (ip[0] << 6) + (ip[1] >> 2);
+ m_off += (ip[0] << 6) + (ip[1] >> 2);
#else
- m_off += (ip[0] >> 2) + (ip[1] << 6);
+ m_off += (ip[0] >> 2) + (ip[1] << 6);
#endif
- ip += 2;
- if (m_off == 0)
- goto eof_found;
- m_off += 0x4000;
+ ip += 2;
+ if (m_off == 0)
+ goto eof_found;
+ m_off += 0x4000;
#if defined(LZO1Z)
- last_m_off = m_off;
+ last_m_off = m_off;
#endif
#else
#if defined(LZO1Z)
- m_pos -= (ip[0] << 6) + (ip[1] >> 2);
+ m_pos -= (ip[0] << 6) + (ip[1] >> 2);
#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos -= UA_GET16(ip) >> 2;
+ m_pos -= UA_GET16(ip) >> 2;
#else
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
+ m_pos -= (ip[0] >> 2) + (ip[1] << 6);
#endif
- ip += 2;
- if (m_pos == op)
- goto eof_found;
- m_pos -= 0x4000;
+ ip += 2;
+ if (m_pos == op)
+ goto eof_found;
+ m_pos -= 0x4000;
#if defined(LZO1Z)
- last_m_off = pd((const byte *)op, m_pos);
+ last_m_off = pd((const byte *)op, m_pos);
#endif
#endif
- }
- else
- {
+ }
+ else
+ {
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off = 1 + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
+ m_off = 1 + (t << 6) + (*ip++ >> 2);
+ last_m_off = m_off;
#else
- m_off = 1 + (t >> 2) + (*ip++ << 2);
+ m_off = 1 + (t >> 2) + (*ip++ << 2);
#endif
- NEED_OP(2);
- t = 2; COPY_DICT(t, m_off)
+ NEED_OP(2);
+ t = 2; COPY_DICT(t, m_off)
#else
#if defined(LZO1Z)
- t = 1 + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
+ t = 1 + (t << 6) + (*ip++ >> 2);
+ m_pos = op - t;
+ last_m_off = t;
#else
- m_pos = op - 1;
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
+ m_pos = op - 1;
+ m_pos -= t >> 2;
+ m_pos -= *ip++ << 2;
#endif
- TEST_LB(m_pos); NEED_OP(2);
- *op++ = *m_pos++; *op++ = *m_pos;
+ TEST_LB(m_pos); NEED_OP(2);
+ *op++ = *m_pos++; *op++ = *m_pos;
#endif
- goto match_done;
- }
+ goto match_done;
+ }
#if defined(COPY_DICT)
- NEED_OP(t+3-1);
- t += 3-1; COPY_DICT(t, m_off)
+ NEED_OP(t+3-1);
+ t += 3-1; COPY_DICT(t, m_off)
#else
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
+ TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4)
- if (op - m_pos >= 8)
- {
- t += (3 - 1);
- if (t >= 8) do
- {
- UA_COPY64(op, m_pos);
- op += 8; m_pos += 8; t -= 8;
- } while (t >= 8);
- if (t >= 4)
- {
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4;
- }
- if (t > 0)
- {
- *op++ = m_pos[0];
- if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } }
- }
- }
- else
+ if (op - m_pos >= 8)
+ {
+ t += (3 - 1);
+ if (t >= 8) do
+ {
+ UA_COPY64(op, m_pos);
+ op += 8; m_pos += 8; t -= 8;
+ } while (t >= 8);
+ if (t >= 4)
+ {
+ UA_COPY32(op, m_pos);
+ op += 4; m_pos += 4; t -= 4;
+ }
+ if (t > 0)
+ {
+ *op++ = m_pos[0];
+ if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } }
+ }
+ }
+ else
#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
#if !defined(LZO_UNALIGNED_OK_4)
- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op, m_pos))
- {
- assert((op - m_pos) >= 4);
+ if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op, m_pos))
+ {
+ assert((op - m_pos) >= 4);
#else
- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4)
- {
-#endif
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4 - (3 - 1);
- do {
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *m_pos++; while (--t > 0);
- }
- else
-#endif
- {
+ if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4)
+ {
+#endif
+ UA_COPY32(op, m_pos);
+ op += 4; m_pos += 4; t -= 4 - (3 - 1);
+ do {
+ UA_COPY32(op, m_pos);
+ op += 4; m_pos += 4; t -= 4;
+ } while (t >= 4);
+ if (t > 0) do *op++ = *m_pos++; while (--t > 0);
+ }
+ else
+#endif
+ {
copy_match:
- *op++ = *m_pos++; *op++ = *m_pos++;
- do *op++ = *m_pos++; while (--t > 0);
- }
+ *op++ = *m_pos++; *op++ = *m_pos++;
+ do *op++ = *m_pos++; while (--t > 0);
+ }
#endif
match_done:
#if defined(LZO1Z)
- t = ip[-1] & 3;
+ t = ip[-1] & 3;
#else
- t = ip[-2] & 3;
+ t = ip[-2] & 3;
#endif
- if (t == 0)
- break;
+ if (t == 0)
+ break;
match_next:
- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
+ assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
#if 0
- do *op++ = *ip++; while (--t > 0);
+ do *op++ = *ip++; while (--t > 0);
#else
- *op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
+ *op++ = *ip++;
+ if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
#endif
- t = *ip++;
- } while (TEST_IP && TEST_OP);
- }
+ t = *ip++;
+ } while (TEST_IP && TEST_OP);
+ }
#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP)
- *out_len = pd(op, out);
- return LZO_E_EOF_NOT_FOUND;
+ *out_len = pd(op, out);
+ return LZO_E_EOF_NOT_FOUND;
#endif
eof_found:
- assert(t == 1);
- *out_len = pd(op, out);
- return (ip == ip_end ? LZO_E_OK :
- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
+ assert(t == 1);
+ *out_len = pd(op, out);
+ return (ip == ip_end ? LZO_E_OK :
+ (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
#if defined(HAVE_NEED_IP)
input_overrun:
- *out_len = pd(op, out);
- return LZO_E_INPUT_OVERRUN;
+ *out_len = pd(op, out);
+ return LZO_E_INPUT_OVERRUN;
#endif
#if defined(HAVE_NEED_OP)
output_overrun:
- *out_len = pd(op, out);
- return LZO_E_OUTPUT_OVERRUN;
+ *out_len = pd(op, out);
+ return LZO_E_OUTPUT_OVERRUN;
#endif
#if defined(LZO_TEST_OVERRUN_LOOKBEHIND)
lookbehind_overrun:
- *out_len = pd(op, out);
- return LZO_E_LOOKBEHIND_OVERRUN;
+ *out_len = pd(op, out);
+ return LZO_E_LOOKBEHIND_OVERRUN;
#endif
}
diff --git a/engines/tony/mpal/memory.cpp b/engines/tony/mpal/memory.cpp
index dfbf16e789..9737fe0abf 100644
--- a/engines/tony/mpal/memory.cpp
+++ b/engines/tony/mpal/memory.cpp
@@ -121,7 +121,6 @@ void MemoryManager::unlockItem(MpalHandle handle) {
--item->_lockCount;
}
-
} // end of namespace MPAL
} // end of namespace Tony
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp
index 8d83363c24..1a24c5a576 100644
--- a/engines/tony/mpal/mpal.cpp
+++ b/engines/tony/mpal/mpal.cpp
@@ -196,7 +196,6 @@ static int locGetOrderFromNum(uint32 nLoc) {
return -1;
}
-
/**
* Find the index of a message within the messages array
* @param nMsg Message number to search for
@@ -233,7 +232,6 @@ static int itemGetOrderFromNum(uint32 nItem) {
return -1;
}
-
/**
* Find the index of a script within the scripts array
* @param nScript Script number to search for
@@ -252,7 +250,6 @@ static int scriptGetOrderFromNum(uint32 nScript) {
return -1;
}
-
/**
* Find the index of a dialog within the dialogs array
* @param nDialog Dialog number to search for
@@ -271,7 +268,6 @@ static int dialogGetOrderFromNum(uint32 nDialog) {
return -1;
}
-
/**
* Duplicates a message
* @param nMsgOrd Index of the message inside the messages array
@@ -302,7 +298,6 @@ static char *DuplicateMessage(uint32 nMsgOrd) {
return clonemsg;
}
-
/**
* Duplicate a sentence of a dialog
* @param nDlgOrd Index of the dialog in the dialogs array
@@ -340,7 +335,6 @@ static char *duplicateDialogPeriod(uint32 nPeriod) {
return NULL;
}
-
/**
* Load a resource from the MPR file
*
@@ -461,16 +455,16 @@ static LpItem getItemData(uint32 nOrdItem) {
dat = (char *)globalLock(hDat);
if (dat[0] == 'D' && dat[1] == 'A' && dat[2] == 'T') {
- int i = dat[3]; // For version 1.0!!
+ int i = dat[3]; // For version 1.0!!
dat += 4;
- if (i >= 0x10) { // From 1.0, there's a destination point for each object
+ if (i >= 0x10) { // From 1.0, there's a destination point for each object
ret->_destX = (int16)READ_LE_UINT16(dat);
ret->_destY = (int16)READ_LE_UINT16(dat + 2);
dat += 4;
}
- if (i >= 0x11) { // From 1.1, there's animation speed
+ if (i >= 0x11) { // From 1.1, there's animation speed
ret->_speed = READ_LE_UINT16(dat);
dat += 2;
} else
@@ -511,7 +505,7 @@ static LpItem getItemData(uint32 nOrdItem) {
for (int i = 1; i < ret->_numpattern; i++) {
for (int j = 0; j < patlength[i]; j++)
ret->_pattern[i][j] = dat[j];
- ret->_pattern[i][(int)patlength[i]] = 255; // Terminate pattern
+ ret->_pattern[i][(int)patlength[i]] = 255; // Terminate pattern
dat += patlength[i];
}
@@ -538,7 +532,6 @@ static LpItem getItemData(uint32 nOrdItem) {
return ret;
}
-
/**
* Thread that calls a custom function. It is used in scripts, so that each script
* function is executed without delaying the others.
@@ -562,7 +555,6 @@ void CustomThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Main process for running a script.
*
@@ -587,7 +579,7 @@ void ScriptThread(CORO_PARAM, const void *param) {
_ctx->dwStartTime = g_vm->getTime();
_ctx->numHandles = 0;
-// debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Moments: %u\n", s->_nMoments);
+ //debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Moments: %u\n", s->_nMoments);
for (_ctx->i = 0; _ctx->i < s->_nMoments; _ctx->i++) {
// Sleep for the required time
if (s->_moment[_ctx->i]._dwTime == -1) {
@@ -596,7 +588,7 @@ void ScriptThread(CORO_PARAM, const void *param) {
} else {
_ctx->dwCurTime = g_vm->getTime();
if (_ctx->dwCurTime < _ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime * 100)) {
- // debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Sleeping %lums\n",_ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime*100) - _ctx->dwCurTime);
+ //debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Sleeping %lums\n",_ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime*100) - _ctx->dwCurTime);
CORO_INVOKE_1(CoroScheduler.sleep, _ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime * 100) - _ctx->dwCurTime);
}
}
@@ -655,7 +647,6 @@ void ScriptThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Thread that performs an action on an item. the thread always executes the action,
* so it should create a new item in which the action is the one required.
@@ -752,11 +743,9 @@ void ShutUpActionThread(CORO_PARAM, const void *param) {
CORO_INVOKE_1(g_vm->loadState, _ctx->slotNumber);
}
-
CORO_END_CODE;
}
-
/**
* Polls one location (starting point of a process)
*
@@ -764,14 +753,14 @@ void ShutUpActionThread(CORO_PARAM, const void *param) {
*/
void LocationPollThread(CORO_PARAM, const void *param) {
typedef struct {
- uint32 _nItem, _nAction;
+ uint32 _nItem, _nAction;
- uint16 _wTime;
- byte _perc;
+ uint16 _wTime;
+ byte _perc;
MpalHandle _when;
- byte _nCmds;
- uint16 _cmdNum[MAX_COMMANDS_PER_ACTION];
- uint32 _dwLastTime;
+ byte _nCmds;
+ uint16 _cmdNum[MAX_COMMANDS_PER_ACTION];
+ uint32 _dwLastTime;
} MYACTION;
typedef struct {
@@ -862,7 +851,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
return;
}
-
// We have established that there is at least one item that contains idle actions.
// Now we created the mirrored copies of the idle actions.
_ctx->myActions = (MYACTION *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, _ctx->nIdleActions * sizeof(MYACTION));
@@ -905,7 +893,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
// We don't need the item list anymore
globalDestroy(_ctx->il);
-
// Here's the main loop
while (1) {
// Searching for idle actions requiring time to execute
@@ -944,7 +931,7 @@ void LocationPollThread(CORO_PARAM, const void *param) {
if (_ctx->curTime >= _ctx->myActions[_ctx->k]._dwLastTime + _ctx->myActions[_ctx->k]._wTime) {
_ctx->myActions[_ctx->k]._dwLastTime += _ctx->myActions[_ctx->k]._wTime;
- // It's time to check to see if fortune is on the side of the idle action
+ // It's time to check to see if fortune is on the side of the idle action
byte randomVal = (byte)g_vm->_randomSource.getRandomNumber(99);
if (randomVal < _ctx->myActions[_ctx->k]._perc) {
// Check if there is an action running on the item
@@ -1016,7 +1003,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
}
}
-
// Set idle skip on
CORO_INVOKE_4(GLOBALS._lplpFunctions[200], 0, 0, 0, 0);
@@ -1038,7 +1024,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Wait for the end of the dialog execution thread, and then restore global
* variables indicating that the dialogue has finished.
@@ -1071,7 +1056,6 @@ void ShutUpDialogThread(CORO_PARAM, const void *param) {
void doChoice(CORO_PARAM, uint32 nChoice);
-
/**
* Executes a group of the current dialog. Can 'be the Starting point of a process.
* @parm nGroup Number of the group to perform
@@ -1149,7 +1133,6 @@ void GroupThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Make a choice in the current dialog.
*
@@ -1247,7 +1230,6 @@ void doChoice(CORO_PARAM, uint32 nChoice) {
CORO_END_CODE;
}
-
/**
* Perform an action on a certain item.
*
@@ -1353,7 +1335,6 @@ static uint32 doDialog(uint32 nDlgOrd, uint32 nGroup) {
return h;
}
-
/**
* Takes note of the selection chosen by the user, and warns the process that was running
* the box that it can continue.
@@ -1379,7 +1360,6 @@ bool doSelection(uint32 i, uint32 dwData) {
return true;
}
-
/**
* @defgroup Exported functions
*/
@@ -1502,6 +1482,8 @@ bool mpalInit(const char *lpszMpcFileName, const char *lpszMprFileName,
lzo1x_decompress((const byte *)cmpbuf, dwSizeComp, (byte *)GLOBALS._lpResources, (uint32 *)&nBytesRead);
if (nBytesRead != (uint32)GLOBALS._nResources * 8)
return false;
+ for (int i = 0; i < 2*GLOBALS._nResources; ++i)
+ GLOBALS._lpResources[i] = FROM_LE_32(GLOBALS._lpResources[i]);
globalDestroy(cmpbuf);
@@ -1884,7 +1866,6 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
return hRet;
}
-
/**
* This is a general function to communicate with the library, to request information
* about what is in the .MPC file
@@ -2005,7 +1986,6 @@ bool mpalStartIdlePoll(int nLoc) {
return false;
}
-
/**
* Stop processing the idle actions of the items on one location.
*
@@ -2063,7 +2043,6 @@ void mpalSaveState(byte *buf) {
unlockVar();
}
-
/**
* Load a save state from a buffer.
*
diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h
index 5e1b02b3fc..779bdd6188 100644
--- a/engines/tony/mpal/mpal.h
+++ b/engines/tony/mpal/mpal.h
@@ -26,7 +26,6 @@
* Copyright (c) 1997-2003 Nayma Software
*/
-
/****************************************************************************\
* General Introduction
\****************************************************************************/
@@ -56,7 +55,6 @@
*
*/
-
/****************************************************************************\
* Custom Functions
\****************************************************************************/
@@ -96,11 +94,11 @@ namespace MPAL {
\****************************************************************************/
// OK value for the error codes
-#define OK 0
+#define OK 0
-#define MAXFRAMES 400 // frame animation of an object
-#define MAXPATTERN 40 // pattern of animation of an object
-#define MAXPOLLINGLOCATIONS 64
+#define MAXFRAMES 400 // frame animation of an object
+#define MAXPATTERN 40 // pattern of animation of an object
+#define MAXPOLLINGLOCATIONS 64
#define GETARG(type) va_arg(v, type)
@@ -108,8 +106,8 @@ namespace MPAL {
* Macro for use with queries that may refer to X and Y co-ordinates
*/
enum QueryCoordinates {
- MPQ_X,
- MPQ_Y
+ MPQ_X,
+ MPQ_Y
};
/**
@@ -117,55 +115,54 @@ enum QueryCoordinates {
* that can do at the library
*/
enum QueryTypes {
- // General Query
- MPQ_VERSION = 10,
-
- MPQ_GLOBAL_VAR = 50,
- MPQ_RESOURCE,
- MPQ_MESSAGE,
-
- // Query on leases
- MPQ_LOCATION_IMAGE = 100,
- MPQ_LOCATION_SIZE,
-
- // Queries about items
- MPQ_ITEM_LIST = 200,
- MPQ_ITEM_DATA,
- MPQ_ITEM_PATTERN,
- MPQ_ITEM_NAME,
+ // General Query
+ MPQ_VERSION = 10,
+
+ MPQ_GLOBAL_VAR = 50,
+ MPQ_RESOURCE,
+ MPQ_MESSAGE,
+
+ // Query on leases
+ MPQ_LOCATION_IMAGE = 100,
+ MPQ_LOCATION_SIZE,
+
+ // Queries about items
+ MPQ_ITEM_LIST = 200,
+ MPQ_ITEM_DATA,
+ MPQ_ITEM_PATTERN,
+ MPQ_ITEM_NAME,
MPQ_ITEM_IS_ACTIVE,
- // Query dialog
- MPQ_DIALOG_PERIOD = 300,
- MPQ_DIALOG_WAITFORCHOICE,
- MPQ_DIALOG_SELECTLIST,
- MPQ_DIALOG_SELECTION,
+ // Query dialog
+ MPQ_DIALOG_PERIOD = 300,
+ MPQ_DIALOG_WAITFORCHOICE,
+ MPQ_DIALOG_SELECTLIST,
+ MPQ_DIALOG_SELECTION,
- // Query execution
- MPQ_DO_ACTION = 400,
- MPQ_DO_DIALOG
+ // Query execution
+ MPQ_DO_ACTION = 400,
+ MPQ_DO_DIALOG
};
/**
* Framework to manage the animation of an item
*/
typedef struct {
- char *_frames[MAXFRAMES];
- Common::Rect _frameslocations[MAXFRAMES];
- Common::Rect _bbox[MAXFRAMES];
- short _pattern[MAXPATTERN][MAXFRAMES];
- short _speed;
- char _numframe;
- char _numpattern;
- char _curframe;
- char _curpattern;
- short _destX, _destY;
- signed char _destZ;
- short _objectID;
+ char *_frames[MAXFRAMES];
+ Common::Rect _frameslocations[MAXFRAMES];
+ Common::Rect _bbox[MAXFRAMES];
+ short _pattern[MAXPATTERN][MAXFRAMES];
+ short _speed;
+ char _numframe;
+ char _numpattern;
+ char _curframe;
+ char _curpattern;
+ short _destX, _destY;
+ signed char _destZ;
+ short _objectID;
} Item;
typedef Item *LpItem;
-
/**
* Define a custom function, to use the language MPAL to perform various controls as a result of an action
*/
@@ -206,7 +203,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryGlobalVar(lpszVarName) \
mpalQueryDWORD(MPQ_GLOBAL_VAR, (const char *)(lpszVarName))
-
/**
* Provides access to a resource inside the .MPC file
*
@@ -216,7 +212,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryResource(dwResId) \
mpalQueryHANDLE(MPQ_RESOURCE, (uint32)(dwResId))
-
/**
* Returns a message.
*
@@ -228,7 +223,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryMessage(nMsg) \
(char *)mpalQueryHANDLE(MPQ_MESSAGE, (uint32)(nMsg))
-
/**
* Provides a location image
* @return Returns a picture handle
@@ -236,7 +230,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryLocationImage(nLoc) \
mpalQueryHANDLE(MPQ_LOCATION_IMAGE, (uint32)(nLoc))
-
/**
* Request the x or y size of a location in pixels
*
@@ -247,7 +240,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryLocationSize(nLoc, dwCoord) \
mpalQueryDWORD(MPQ_LOCATION_SIZE, (uint32)(nLoc), (uint32)(dwCoord))
-
/**
* Provides the list of objects in a location.
*
@@ -258,7 +250,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemList(nLoc) \
(uint32 *)mpalQueryHANDLE(MPQ_ITEM_LIST, (uint32)(nLoc))
-
/**
* Provides information on an item
*
@@ -268,7 +259,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemData(nItem) \
(LpItem)mpalQueryHANDLE(MPQ_ITEM_DATA, (uint32)(nItem))
-
/**
* Provides the current pattern of an item
*
@@ -279,7 +269,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemPattern(nItem) \
mpalQueryDWORD(MPQ_ITEM_PATTERN, (uint32)(nItem))
-
/**
* Returns true if an item is active
*
@@ -289,7 +278,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemIsActive(nItem) \
(bool)mpalQueryDWORD(MPQ_ITEM_IS_ACTIVE, (uint32)(nItem))
-
/**
* Returns the name of an item
*
@@ -302,7 +290,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemName(nItem, lpszName) \
mpalQueryHANDLE(MPQ_ITEM_NAME, (uint32)(nItem), (char *)(lpszName))
-
/**
* Returns a sentence of dialog.
*
@@ -316,7 +303,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryDialogPeriod(nPeriod) \
(char *)mpalQueryHANDLE(MPQ_DIALOG_PERIOD, (uint32)(nPeriod))
-
/**
* Wait until the moment in which the need is signaled to make a choice by the user.
* @returns Number of choice to be made, or -1 if the dialogue is finished.
@@ -393,7 +379,7 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
* @returns TRUE if all OK, FALSE on failure
*/
bool mpalInit(const char *lpszFileName, const char *lpszMprFileName,
- LPLPCUSTOMFUNCTION lplpcfArray, Common::String *lpcfStrings);
+ LPLPCUSTOMFUNCTION lplpcfArray, Common::String *lpcfStrings);
/**
* Frees resources allocated by the MPAL subsystem
@@ -476,7 +462,6 @@ bool mpalStartIdlePoll(int nLoc);
*/
void mpalEndIdlePoll(CORO_PARAM, int nLoc, bool *result);
-
/**
* Load a save state from a buffer.
*
diff --git a/engines/tony/mpal/mpaldll.h b/engines/tony/mpal/mpaldll.h
index 8897096f51..92ddf8fc5a 100644
--- a/engines/tony/mpal/mpaldll.h
+++ b/engines/tony/mpal/mpaldll.h
@@ -73,7 +73,7 @@ namespace MPAL {
* MPAL global variables
*/
struct MpalVar {
- uint32 _dwVal; // Variable value
+ uint32 _dwVal; // Variable value
char _lpszVarName[33]; // Variable name
} PACKED_STRUCT;
typedef MpalVar *LpMpalVar;
@@ -82,8 +82,8 @@ typedef MpalVar *LpMpalVar;
* MPAL Messages
*/
struct MpalMsg {
- MpalHandle _hText; // Handle to the message text
- uint16 _wNum; // Message number
+ MpalHandle _hText; // Handle to the message text
+ uint16 _wNum; // Message number
} PACKED_STRUCT;
typedef MpalMsg *LpMpalMsg;
@@ -91,9 +91,9 @@ typedef MpalMsg *LpMpalMsg;
* MPAL Locations
*/
struct MpalLocation {
- uint32 _nObj; // Location number
- uint32 _dwXlen, _dwYlen; // Dimensions
- uint32 _dwPicRes; // Resource that contains the image
+ uint32 _nObj; // Location number
+ uint32 _dwXlen, _dwYlen; // Dimensions
+ uint32 _dwPicRes; // Resource that contains the image
} PACKED_STRUCT;
typedef MpalLocation *LpMpalLocation;
@@ -110,34 +110,33 @@ struct Command {
* #3 -> Making a choice (DIALOG)
*
*/
- byte _type; // Type of control
+ byte _type; // Type of control
union {
- int32 _nCf; // Custom function call [#1]
- char *_lpszVarName; // Variable name [#2]
- int32 _nChoice; // Number of choice you make [#3]
+ int32 _nCf; // Custom function call [#1]
+ char *_lpszVarName; // Variable name [#2]
+ int32 _nChoice; // Number of choice you make [#3]
};
union {
- int32 _arg1; // Argument for custom function [#1]
- MpalHandle _expr; // Expression to assign to a variable [#2]
+ int32 _arg1; // Argument for custom function [#1]
+ MpalHandle _expr; // Expression to assign to a variable [#2]
};
- int32 _arg2, _arg3, _arg4; // Arguments for custom function [#1]
+ int32 _arg2, _arg3, _arg4; // Arguments for custom function [#1]
} PACKED_STRUCT;
-
/**
* MPAL dialog
*/
struct MpalDialog {
- uint32 _nObj; // Dialog number
+ uint32 _nObj; // Dialog number
struct Command _command[MAX_COMMANDS_PER_DIALOG];
struct {
uint16 _num;
- byte _nCmds;
+ byte _nCmds;
uint16 _cmdNum[MAX_COMMANDS_PER_GROUP];
} _group[MAX_GROUPS_PER_DIALOG];
@@ -152,7 +151,7 @@ struct MpalDialog {
uint32 _dwData;
uint16 _wPlayGroup[MAX_PLAYGROUPS_PER_SELECT];
- // Bit 0=endchoice Bit 1=enddialog
+ // Bit 0=endchoice Bit 1=enddialog
byte _attr;
// Modified at run-time: 0 if the select is currently disabled,
@@ -172,23 +171,22 @@ typedef MpalDialog *LpMpalDialog;
* MPAL Item
*/
struct ItemAction {
- byte _num; // Action number
- uint16 _wTime; // If idle, the time which must pass
- byte _perc; // Percentage of the idle run
- MpalHandle _when; // Expression to compute. If != 0, then
- // action can be done
- uint16 _wParm; // Parameter for action
-
- byte _nCmds; // Number of commands to be executed
- uint32 _cmdNum[MAX_COMMANDS_PER_ACTION]; // Commands to execute
+ byte _num; // Action number
+ uint16 _wTime; // If idle, the time which must pass
+ byte _perc; // Percentage of the idle run
+ MpalHandle _when; // Expression to compute. If != 0, then action can be done
+ uint16 _wParm; // Parameter for action
+
+ byte _nCmds; // Number of commands to be executed
+ uint32 _cmdNum[MAX_COMMANDS_PER_ACTION]; // Commands to execute
} PACKED_STRUCT;
struct MpalItem {
- uint32 _nObj; // Item number
+ uint32 _nObj; // Item number
byte _lpszDescribe[MAX_DESCRIBE_SIZE]; // Name
- byte _nActions; // Number of managed actions
- uint32 _dwRes; // Resource that contains frames and patterns
+ byte _nActions; // Number of managed actions
+ uint32 _dwRes; // Resource that contains frames and patterns
struct Command _command[MAX_COMMANDS_PER_ITEM];
@@ -209,14 +207,14 @@ struct MpalScript {
struct Command _command[MAX_COMMANDS_PER_SCRIPT];
struct {
- int32 _dwTime;
- byte _nCmds;
+ int32 _dwTime;
+ byte _nCmds;
uint32 _cmdNum[MAX_COMMANDS_PER_MOMENT];
} _moment[MAX_MOMENTS_PER_SCRIPT];
} PACKED_STRUCT;
-typedef MpalScript *LpMpalScript;
+typedef MpalScript *LpMpalScript;
#include "common/pack-end.h"
@@ -235,7 +233,6 @@ typedef MpalScript *LpMpalScript;
*/
extern int32 varGetValue(const char *lpszVarName);
-
/**
* Sets the value of a MPAL global variable
* @param lpszVarName Name of the variable
diff --git a/engines/tony/mpal/mpalutils.h b/engines/tony/mpal/mpalutils.h
index d92bb6f9a2..f351f22196 100644
--- a/engines/tony/mpal/mpalutils.h
+++ b/engines/tony/mpal/mpalutils.h
@@ -38,19 +38,19 @@ namespace MPAL {
class RMRes {
protected:
MpalHandle _h;
- byte *_buf;
+ byte *_buf;
public:
RMRes(uint32 resID);
- virtual ~RMRes();
+ virtual ~RMRes();
- // Attributes
+ // Attributes
unsigned int size();
- const byte *dataPointer();
+ const byte *dataPointer();
bool isValid();
- // Casting for access to data
- operator const byte*();
+ // Casting for access to data
+ operator const byte*();
Common::SeekableReadStream *getReadStream();
};
diff --git a/engines/tony/resid.h b/engines/tony/resid.h
index f4d2c9a4fa..0d601b7dd6 100644
--- a/engines/tony/resid.h
+++ b/engines/tony/resid.h
@@ -30,7 +30,6 @@
#ifndef TONY_RESID_H
#define TONY_RESID_H
-
#define RES_I_INTERFACE 10300
#define RES_I_INTERPAL 10301
#define RES_I_INTERPPAL 10302
@@ -40,16 +39,16 @@
#define RES_I_INTERP4 10306
#define RES_I_INTERP5 10307
-#define RES_I_DLGTEXT 10350
+#define RES_I_DLGTEXT 10350
#define RES_I_DLGTEXTLINE 10351
-#define RES_I_DLGTEXTPAL 10352
+#define RES_I_DLGTEXTPAL 10352
#define RES_I_MINIINTER 10360
-#define RES_P_PAL 10410
-#define RES_P_GO 10400
+#define RES_P_PAL 10410
+#define RES_P_GO 10400
#define RES_P_TAKE 10401
-#define RES_P_USE 10402
+#define RES_P_USE 10402
#define RES_P_EXAM 10403
#define RES_P_TALK 10404
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index 8697d7ce29..90ae241db0 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -45,8 +45,8 @@ namespace Tony {
* to the linear scale used by the mixer.
*/
static int remapVolume(int volume) {
- double dsvol = (double)(63 - volume) * -10000.0 / 63.0;
- return (int)((double)Audio::Mixer::kMaxChannelVolume * pow(10.0, dsvol / 2000.0) + 0.5);
+ double dsvol = (double)(63 - volume) * -10000.0 / 63.0;
+ return (int)((double)Audio::Mixer::kMaxChannelVolume * pow(10.0, dsvol / 2000.0) + 0.5);
}
/****************************************************************************\
@@ -75,7 +75,6 @@ bool FPSound::init() {
* Destroy the object and free the memory
*
*/
-
FPSound::~FPSound() {
}
@@ -86,7 +85,6 @@ FPSound::~FPSound() {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSound::createStream(FPStream **streamPtr) {
(*streamPtr) = new FPStream(_soundSupported);
@@ -100,7 +98,6 @@ bool FPSound::createStream(FPStream **streamPtr) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSound::createSfx(FPSfx **sfxPtr) {
(*sfxPtr) = new FPSfx(_soundSupported);
@@ -112,7 +109,6 @@ bool FPSound::createSfx(FPSfx **sfxPtr) {
*
* @param volume Volume to set (0-63)
*/
-
void FPSound::setMasterVolume(int volume) {
if (!_soundSupported)
return;
@@ -128,7 +124,6 @@ void FPSound::setMasterVolume(int volume) {
*
* @param volumePtr Variable that will contain the volume (0-63)
*/
-
void FPSound::getMasterVolume(int *volumePtr) {
if (!_soundSupported)
return;
@@ -143,7 +138,6 @@ void FPSound::getMasterVolume(int *volumePtr) {
* create it using FPSound::CreateSfx()
*
*/
-
FPSfx::FPSfx(bool soundOn) {
_soundSupported = soundOn;
_fileLoaded = false;
@@ -164,7 +158,6 @@ FPSfx::FPSfx(bool soundOn) {
* currently played, and free the memory it uses.
*
*/
-
FPSfx::~FPSfx() {
if (!_soundSupported)
return;
@@ -189,7 +182,6 @@ FPSfx::~FPSfx() {
* FPSound::CreateStream().
* Object pointers are no longer valid after this call.
*/
-
void FPSfx::release() {
delete this;
}
@@ -231,7 +223,6 @@ bool FPSfx::loadVoiceFromVDB(Common::File &vdbFP) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::loadFile(const char *fileName, uint32 codec) {
if (!_soundSupported)
return true;
@@ -272,7 +263,6 @@ bool FPSfx::loadFile(const char *fileName, uint32 codec) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::play() {
stop(); // sanity check
@@ -307,7 +297,6 @@ bool FPSfx::play() {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::stop() {
if (_fileLoaded) {
g_system->getMixer()->stopHandle(_handle);
@@ -326,7 +315,6 @@ bool FPSfx::stop() {
* playing. Any changes made during the play will have
* no effect until the sfx is stopped then played again.
*/
-
void FPSfx::setLoop(bool loop) {
_loop = loop;
}
@@ -335,7 +323,6 @@ void FPSfx::setLoop(bool loop) {
* Pauses a Sfx.
*
*/
-
void FPSfx::setPause(bool pause) {
if (_fileLoaded) {
if (g_system->getMixer()->isSoundHandleActive(_handle) && (pause ^ _paused))
@@ -351,7 +338,6 @@ void FPSfx::setPause(bool pause) {
* @param volume Volume to be set (0-63)
*
*/
-
void FPSfx::setVolume(int volume) {
if (volume > 63)
volume = 63;
@@ -389,7 +375,6 @@ void FPSfx::setVolume(int volume) {
* @param volumePtr Will contain the current Sfx volume
*
*/
-
void FPSfx::getVolume(int *volumePtr) {
if (g_system->getMixer()->isSoundHandleActive(_handle))
*volumePtr = _lastVolume;
@@ -400,7 +385,6 @@ void FPSfx::getVolume(int *volumePtr) {
/**
* Returns true if the underlying sound has ended
*/
-
bool FPSfx::endOfBuffer() const {
return !g_system->getMixer()->isSoundHandleActive(_handle) && (!_rewindableStream || _rewindableStream->endOfData());
}
@@ -456,7 +440,6 @@ FPStream::FPStream(bool soundOn) {
*
* @remarks It calls CloseFile() if needed.
*/
-
FPStream::~FPStream() {
if (!_soundSupported)
return;
@@ -599,7 +582,6 @@ bool FPStream::play() {
* @returns True is everything is OK, False otherwise
*
*/
-
bool FPStream::stop() {
if (!_soundSupported)
return true;
@@ -666,7 +648,6 @@ void FPStream::setPause(bool pause) {
* @param volume Volume to be set (0-63)
*
*/
-
void FPStream::setVolume(int volume) {
if (volume > 63)
volume = 63;
@@ -694,7 +675,6 @@ void FPStream::setVolume(int volume) {
* @param volumePtr Variable that will contain the current volume
*
*/
-
void FPStream::getVolume(int *volumePtr) {
if (g_system->getMixer()->isSoundHandleActive(_handle))
*volumePtr = _lastVolume;
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 86740c6fe5..43a2f639d9 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -732,6 +732,7 @@ uint32 TonyEngine::getTime() {
bool TonyEngine::canLoadGameStateCurrently() {
return GLOBALS._gfxEngine != NULL && GLOBALS._gfxEngine->canLoadSave();
}
+
bool TonyEngine::canSaveGameStateCurrently() {
return GLOBALS._gfxEngine != NULL && GLOBALS._gfxEngine->canLoadSave();
}
diff --git a/engines/tony/tony.h b/engines/tony/tony.h
index 332b122923..750673061d 100644
--- a/engines/tony/tony.h
+++ b/engines/tony/tony.h
@@ -69,7 +69,7 @@ enum {
struct TonyGameDescription;
-#define MAX_SFX_CHANNELS 32
+#define MAX_SFX_CHANNELS 32
#define TONY_DAT_VER_MAJ 0
#define TONY_DAT_VER_MIN 3
diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp
index c7fa1e4a7b..46c018728e 100644
--- a/engines/tony/tonychar.cpp
+++ b/engines/tony/tonychar.cpp
@@ -120,7 +120,7 @@ void RMTony::init() {
void RMTony::close() {
// Deallocation of missing item
-// _shadow.destroy();
+ //_shadow.destroy();
}
void RMTony::doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
@@ -165,7 +165,6 @@ void RMTony::hide(bool bShowShadow) {
_bShowShadow = bShowShadow;
}
-
void RMTony::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -231,7 +230,6 @@ void RMTony::moveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction,
CORO_END_CODE;
}
-
void RMTony::executeAction(int nAction, int nActionItem, int nParm) {
uint32 pid;
@@ -281,7 +279,6 @@ void RMTony::executeAction(int nAction, int nActionItem, int nParm) {
}
}
-
void RMTony::stopNoAction(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -332,7 +329,6 @@ void RMTony::stop(CORO_PARAM) {
CORO_END_CODE;
}
-
int RMTony::getCurPattern() {
int nPatt = RMCharacter::getCurPattern();
@@ -394,7 +390,6 @@ void RMTony::setPattern(int nPatt, bool bPlayP0) {
RMCharacter::setPattern(nPatt, bPlayP0);
}
-
void RMTony::take(int nWhere, int nPart) {
if (nPart == 0) {
switch (getCurPattern()) {
@@ -469,7 +464,6 @@ void RMTony::take(int nWhere, int nPart) {
}
}
-
void RMTony::put(int nWhere, int nPart) {
if (nPart == 0) {
switch (getCurPattern()) {
@@ -543,7 +537,6 @@ void RMTony::put(int nWhere, int nPart) {
}
}
-
bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat, int &bodyStartPat,
int &headLoopPat, int &bodyLoopPat) {
assert(!_bIsTalking);
@@ -1132,7 +1125,6 @@ void RMTony::startTalk(CORO_PARAM, CharacterTalkType nTalkType) {
CORO_END_CODE;
}
-
bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic) {
bodyEndPat = 0;
headEndPat = 0;
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index c9c450424f..61497a8066 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -35,7 +35,6 @@
namespace Tony {
-
/****************************************************************************\
* RMWindow Methods
\****************************************************************************/
@@ -111,7 +110,7 @@ void RMWindow::repaint() {
*/
void RMWindow::wipeEffect(Common::Rect &rcBoundEllipse) {
if ((rcBoundEllipse.left == 0) && (rcBoundEllipse.top == 0) &&
- (rcBoundEllipse.right == RM_SX) && (rcBoundEllipse.bottom == RM_SY)) {
+ (rcBoundEllipse.right == RM_SX) && (rcBoundEllipse.bottom == RM_SY)) {
// Full screen clear wanted, so use shortcut method
g_system->fillScreen(0);
} else {
diff --git a/engines/tony/window.h b/engines/tony/window.h
index 2e8769707f..3874652f64 100644
--- a/engines/tony/window.h
+++ b/engines/tony/window.h
@@ -46,7 +46,6 @@ public:
void grabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL);
};
-
class RMWindow {
private:
void plotSplices(const byte *lpBuf, const Common::Point &center, int x, int y);
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index c58e2f1a33..46429ebbc2 100644
--- a/engines/touche/menu.cpp
+++ b/engines/touche/menu.cpp
@@ -103,7 +103,7 @@ struct MenuData {
void addCharToDescription(int slot, char chr) {
char *description = saveLoadDescriptionsTable[slot];
int descriptionLen = strlen(description);
- if (descriptionLen < 32 && isprint(static_cast<unsigned char>(chr))) {
+ if (descriptionLen < 32 && Common::isPrint(chr)) {
description[descriptionLen] = chr;
description[descriptionLen + 1] = 0;
}
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index 475db47315..a1e9da3477 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -32,7 +32,7 @@
namespace TsAGE {
enum EventType {EVENT_NONE = 0, EVENT_BUTTON_DOWN = 1, EVENT_BUTTON_UP = 2, EVENT_KEYPRESS = 4,
- EVENT_MOUSE_MOVE = 8};
+ EVENT_MOUSE_MOVE = 8, EVENT_UNK27 = 27};
enum ButtonShiftFlags {BTNSHIFT_LEFT = 0, BTNSHIFT_RIGHT = 3, BTNSHIFT_MIDDLE = 4};
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 4c98fcf00a..3b7d283e44 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -61,14 +61,10 @@ void Scene50::postInit(SceneObjectList *OwnerList) {
}
void Scene50::process(Event &event) {
- if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == 27)) {
+ if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == EVENT_UNK27)) {
event.handled = true;
- warning("TODO: incomplete Scene50::process()");
- // CursorType _oldCursorId = _cursorId;
g_globals->_events.setCursor(CURSOR_ARROW);
- // _cursorManager.sub_1D474(2, 0);
- // sub_5566A(1);
- // _cursorManager._fieldE = _oldCursorId;
+ HelpDialog::show();
R2_GLOBALS._sceneManager.changeScene(100);
}
}
diff --git a/engines/wintermute/ad/ad_actor.cpp b/engines/wintermute/ad/ad_actor.cpp
index d175855d1e..74fb4a5ae2 100644
--- a/engines/wintermute/ad/ad_actor.cpp
+++ b/engines/wintermute/ad/ad_actor.cpp
@@ -963,16 +963,16 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
return STATUS_OK;
}
AdObject *obj = (AdObject *)val->getNative();
- if (!obj || obj->_type != OBJECT_ENTITY) {
+ if (!obj || obj->getType() != OBJECT_ENTITY) {
script->runtimeError("actor.%s method accepts an entity refrence only", name);
stack->pushNULL();
return STATUS_OK;
}
AdEntity *ent = (AdEntity *)obj;
- if (ent->_walkToX == 0 && ent->_walkToY == 0) {
+ if (ent->getWalkToX() == 0 && ent->getWalkToY() == 0) {
goTo(ent->_posX, ent->_posY);
} else {
- goTo(ent->_walkToX, ent->_walkToY, ent->_walkToDir);
+ goTo(ent->getWalkToX(), ent->getWalkToY(), ent->getWalkToDir());
}
if (strcmp(name, "GoToObjectAsync") != 0) {
script->waitForExclusive(this);
diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp
index 9af7e034ca..2c331de964 100644
--- a/engines/wintermute/ad/ad_entity.cpp
+++ b/engines/wintermute/ad/ad_entity.cpp
@@ -82,6 +82,21 @@ AdEntity::~AdEntity() {
_item = NULL;
}
+int32 AdEntity::getWalkToX() const {
+ return _walkToX;
+}
+
+int32 AdEntity::getWalkToY() const {
+ return _walkToY;
+}
+
+TDirection AdEntity::getWalkToDir() const {
+ return _walkToDir;
+}
+
+const char *AdEntity::getItemName() const {
+ return _item;
+}
//////////////////////////////////////////////////////////////////////////
bool AdEntity::loadFile(const char *filename) {
diff --git a/engines/wintermute/ad/ad_entity.h b/engines/wintermute/ad/ad_entity.h
index 415987e50a..94921aaa27 100644
--- a/engines/wintermute/ad/ad_entity.h
+++ b/engines/wintermute/ad/ad_entity.h
@@ -37,11 +37,7 @@ class AdEntity : public AdTalkHolder {
public:
VideoTheoraPlayer *_theora;
bool setSprite(const char *filename);
- int _walkToX;
- int _walkToY;
- TDirection _walkToDir;
void setItem(const char *itemName);
- char *_item;
DECLARE_PERSISTENT(AdEntity, AdTalkHolder)
void updatePosition();
virtual int getHeight();
@@ -53,14 +49,23 @@ public:
virtual ~AdEntity();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- TEntityType _subtype;
+
+ int32 getWalkToX() const;
+ int32 getWalkToY() const;
+ TDirection getWalkToDir() const;
+ const char* getItemName() const;
// scripting interface
virtual ScValue *scGetProperty(const Common::String &name);
virtual bool scSetProperty(const char *name, ScValue *value);
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
virtual const char *scToString();
-
+private:
+ int32 _walkToX;
+ int32 _walkToY;
+ TDirection _walkToDir;
+ char *_item;
+ TEntityType _subtype;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 4481b774c1..29e932a586 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -542,7 +542,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
res->_responseType = RESPONSE_ONCE_GAME;
}
- _responseBox->_responses.add(res);
+ _responseBox->addResponse(res);
}
} else {
script->runtimeError("Game.AddResponse: response box is not defined");
@@ -584,15 +584,15 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
if (_responseBox) {
_responseBox->weedResponses();
- if (_responseBox->_responses.size() == 0) {
+ if (_responseBox->getNumResponses() == 0) {
stack->pushNULL();
return STATUS_OK;
}
- if (_responseBox->_responses.size() == 1 && autoSelectLast) {
- stack->pushInt(_responseBox->_responses[0]->_iD);
- _responseBox->handleResponse(_responseBox->_responses[0]);
+ if (_responseBox->getNumResponses() == 1 && autoSelectLast) {
+ stack->pushInt(_responseBox->getIdForResponseNum(0));
+ _responseBox->handleResponseNum(0);
_responseBox->clearResponses();
return STATUS_OK;
}
@@ -617,7 +617,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->correctParams(0);
if (_responseBox) {
_responseBox->weedResponses();
- stack->pushInt(_responseBox->_responses.size());
+ stack->pushInt(_responseBox->getNumResponses());
} else {
script->runtimeError("Game.GetNumResponses: response box is not defined");
stack->pushNULL();
@@ -754,8 +754,8 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetResponsesWindow") == 0 || strcmp(name, "GetResponseWindow") == 0) {
stack->correctParams(0);
- if (_responseBox && _responseBox->_window) {
- stack->pushNative(_responseBox->_window, true);
+ if (_responseBox && _responseBox->getResponseWindow()) {
+ stack->pushNative(_responseBox->getResponseWindow(), true);
} else {
stack->pushNULL();
}
@@ -983,10 +983,10 @@ ScValue *AdGame::scGetProperty(const Common::String &name) {
// LastResponse (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "LastResponse") {
- if (!_responseBox || !_responseBox->_lastResponseText) {
+ if (!_responseBox || !_responseBox->getLastResponseText()) {
_scValue->setString("");
} else {
- _scValue->setString(_responseBox->_lastResponseText);
+ _scValue->setString(_responseBox->getLastResponseText());
}
return _scValue;
}
@@ -995,10 +995,10 @@ ScValue *AdGame::scGetProperty(const Common::String &name) {
// LastResponseOrig (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "LastResponseOrig") {
- if (!_responseBox || !_responseBox->_lastResponseTextOrig) {
+ if (!_responseBox || !_responseBox->getLastResponseTextOrig()) {
_scValue->setString("");
} else {
- _scValue->setString(_responseBox->_lastResponseTextOrig);
+ _scValue->setString(_responseBox->getLastResponseTextOrig());
}
return _scValue;
}
@@ -1599,7 +1599,7 @@ AdSceneState *AdGame::getSceneState(const char *filename, bool saving) {
}
for (uint32 i = 0; i < _sceneStates.size(); i++) {
- if (scumm_stricmp(_sceneStates[i]->_filename, filenameCor) == 0) {
+ if (scumm_stricmp(_sceneStates[i]->getFilename(), filenameCor) == 0) {
delete[] filenameCor;
return _sceneStates[i];
}
diff --git a/engines/wintermute/ad/ad_object.cpp b/engines/wintermute/ad/ad_object.cpp
index 7b91daab2e..a940b33805 100644
--- a/engines/wintermute/ad/ad_object.cpp
+++ b/engines/wintermute/ad/ad_object.cpp
@@ -878,6 +878,9 @@ int AdObject::getHeight() {
}
}
+TObjectType AdObject::getType() const {
+ return _type;
+}
//////////////////////////////////////////////////////////////////////////
void AdObject::talk(const char *text, const char *sound, uint32 duration, const char *stances, TTextAlign Align) {
diff --git a/engines/wintermute/ad/ad_object.h b/engines/wintermute/ad/ad_object.h
index d1a20908e1..2a437c7e09 100644
--- a/engines/wintermute/ad/ad_object.h
+++ b/engines/wintermute/ad/ad_object.h
@@ -46,25 +46,15 @@ class PartEmitter;
class AdObject : public BaseObject {
public:
- PartEmitter *_partEmitter;
virtual PartEmitter *createParticleEmitter(bool followParent = false, int offsetX = 0, int offsetY = 0);
virtual bool updatePartEmitter();
- bool _partFollowParent;
- int _partOffsetX;
- int _partOffsetY;
bool invalidateCurrRegions();
- bool _subtitlesModRelative;
- bool _subtitlesModXCenter;
- int _subtitlesModX;
- int _subtitlesModY;
- int _subtitlesWidth;
AdRegion *_stickRegion;
bool _sceneIndependent;
- bool _ignoreItems;
+
bool updateBlockRegion();
- bool _forcedTalkAnimUsed;
- char *_forcedTalkAnimName;
+
virtual bool getExtendedFlag(const char *flagName);
virtual bool resetSoundPan();
virtual bool updateSounds();
@@ -72,51 +62,65 @@ public:
DECLARE_PERSISTENT(AdObject, BaseObject)
virtual void talk(const char *text, const char *sound = NULL, uint32 duration = 0, const char *stances = NULL, TTextAlign align = TAL_CENTER);
virtual int getHeight();
- AdSentence *_sentence;
+
bool setFont(const char *filename);
virtual bool update();
virtual bool display();
+
bool _drawn;
bool _active;
virtual bool playAnim(const char *filename);
- BaseSprite *_animSprite;
- BaseSprite *_currentSprite;
- TObjectState _state;
- TObjectState _nextState;
- TObjectType _type;
+
+ TObjectType getType() const;
AdObject(BaseGame *inGame);
virtual ~AdObject();
- BaseFont *_font;
- BaseSprite *_tempSprite2;
- BaseRegion *_blockRegion;
- AdWaypointGroup *_wptGroup;
+
BaseRegion *_currentBlockRegion;
AdWaypointGroup *_currentWptGroup;
AdInventory *getInventory();
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
-
virtual bool afterMove();
- AdRegion *_currentRegions[MAX_NUM_REGIONS];
// scripting interface
virtual ScValue *scGetProperty(const Common::String &name);
virtual bool scSetProperty(const char *name, ScValue *value);
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
virtual const char *scToString();
-
- BaseArray<AdObject *> _attachmentsPre;
- BaseArray<AdObject *> _attachmentsPost;
-
bool updateSpriteAttachments();
bool displaySpriteAttachments(bool preDisplay);
+
+protected:
+ PartEmitter *_partEmitter;
+ bool _ignoreItems;
+ bool _forcedTalkAnimUsed;
+ char *_forcedTalkAnimName;
+ BaseSprite *_animSprite;
+ BaseSprite *_currentSprite;
+ AdSentence *_sentence;
+ TObjectState _state;
+ TObjectState _nextState;
+ TObjectType _type;
+ BaseFont *_font;
+ BaseSprite *_tempSprite2;
+ BaseRegion *_blockRegion;
+ AdWaypointGroup *_wptGroup;
AdObject *_registerAlias;
+ bool getScale(float *scaleX, float *scaleY);
private:
+ bool _partFollowParent;
+ int _partOffsetX;
+ int _partOffsetY;
+ bool _subtitlesModRelative;
+ bool _subtitlesModXCenter;
+ int _subtitlesModX;
+ int _subtitlesModY;
+ int _subtitlesWidth;
+ AdRegion *_currentRegions[MAX_NUM_REGIONS];
+ BaseArray<AdObject *> _attachmentsPre;
+ BaseArray<AdObject *> _attachmentsPost;
bool displaySpriteAttachment(AdObject *attachment);
AdInventory *_inventory;
-
-protected:
- bool getScale(float *scaleX, float *scaleY);
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_region.cpp b/engines/wintermute/ad/ad_region.cpp
index c9f1553c9a..daf0c89606 100644
--- a/engines/wintermute/ad/ad_region.cpp
+++ b/engines/wintermute/ad/ad_region.cpp
@@ -51,6 +51,21 @@ AdRegion::AdRegion(BaseGame *inGame) : BaseRegion(inGame) {
AdRegion::~AdRegion() {
}
+uint32 AdRegion::getAlpha() const {
+ return _alpha;
+}
+
+float AdRegion::getZoom() const {
+ return _zoom;
+}
+
+bool AdRegion::isBlocked() const {
+ return _blocked;
+}
+
+bool AdRegion::hasDecoration() const {
+ return _decoration;
+}
//////////////////////////////////////////////////////////////////////////
bool AdRegion::loadFile(const char *filename) {
diff --git a/engines/wintermute/ad/ad_region.h b/engines/wintermute/ad/ad_region.h
index 6112900361..960dde5f15 100644
--- a/engines/wintermute/ad/ad_region.h
+++ b/engines/wintermute/ad/ad_region.h
@@ -36,21 +36,27 @@ namespace Wintermute {
class AdRegion : public BaseRegion {
public:
DECLARE_PERSISTENT(AdRegion, BaseRegion)
- uint32 _alpha;
- float _zoom;
- bool _blocked;
- bool _decoration;
+
AdRegion(BaseGame *inGame);
virtual ~AdRegion();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ bool hasDecoration() const;
+ bool isBlocked() const;
+ uint32 getAlpha() const;
+ float getZoom() const;
// scripting interface
virtual ScValue *scGetProperty(const Common::String &name);
virtual bool scSetProperty(const char *name, ScValue *value);
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
virtual const char *scToString();
+private:
+ uint32 _alpha;
+ float _zoom;
+ bool _blocked;
+ bool _decoration;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_response.h b/engines/wintermute/ad/ad_response.h
index 0ba88cf2e8..2119067d3e 100644
--- a/engines/wintermute/ad/ad_response.h
+++ b/engines/wintermute/ad/ad_response.h
@@ -43,7 +43,7 @@ public:
bool setIconHover(const char *filename);
bool setIconPressed(const char *filename);
void setText(const char *text);
- int _iD;
+ int32 _iD;
BaseSprite *_icon;
BaseSprite *_iconHover;
BaseSprite *_iconPressed;
diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp
index fb31aa0bb8..45fd33d222 100644
--- a/engines/wintermute/ad/ad_response_box.cpp
+++ b/engines/wintermute/ad/ad_response_box.cpp
@@ -96,6 +96,9 @@ AdResponseBox::~AdResponseBox() {
_waitingScript = NULL;
}
+uint32 AdResponseBox::getNumResponses() const {
+ return _responses.size();
+}
//////////////////////////////////////////////////////////////////////////
void AdResponseBox::clearResponses() {
@@ -627,6 +630,30 @@ void AdResponseBox::setLastResponseText(const char *text, const char *textOrig)
BaseUtils::setString(&_lastResponseTextOrig, textOrig);
}
+const char *AdResponseBox::getLastResponseText() const {
+ return _lastResponseText;
+}
+
+const char *AdResponseBox::getLastResponseTextOrig() const {
+ return _lastResponseTextOrig;
+}
+
+UIWindow *AdResponseBox::getResponseWindow() {
+ return _window;
+}
+
+void AdResponseBox::addResponse(AdResponse *response) {
+ _responses.add(response);
+}
+
+int32 AdResponseBox::getIdForResponseNum(uint32 num) const {
+ assert(num < _responses.size());
+ return _responses[num]->_iD;
+}
+
+bool AdResponseBox::handleResponseNum(uint32 num) {
+ return handleResponse(_responses[num]);
+}
//////////////////////////////////////////////////////////////////////////
bool AdResponseBox::handleResponse(AdResponse *response) {
diff --git a/engines/wintermute/ad/ad_response_box.h b/engines/wintermute/ad/ad_response_box.h
index 35f8cb6347..3b180062b6 100644
--- a/engines/wintermute/ad/ad_response_box.h
+++ b/engines/wintermute/ad/ad_response_box.h
@@ -44,10 +44,14 @@ public:
BaseObject *getPrevAccessObject(BaseObject *CurrObject);
bool getObjects(BaseArray<UIObject *> &objects, bool interactiveOnly);
+ void addResponse(AdResponse* response);
bool handleResponse(AdResponse *response);
+ bool handleResponseNum(uint32 num);
+ int32 getIdForResponseNum(uint32 num) const;
void setLastResponseText(const char *text, const char *textOrig);
- char *_lastResponseText;
- char *_lastResponseTextOrig;
+ const char *getLastResponseText() const;
+ const char *getLastResponseTextOrig() const;
+
DECLARE_PERSISTENT(AdResponseBox, BaseObject)
ScScript *_waitingScript;
virtual bool listen(BaseScriptHolder *param1, uint32 param2);
@@ -59,27 +63,35 @@ public:
bool weedResponses();
bool display();
- int _spacing;
- int _scrollOffset;
- BaseFont *_fontHover;
- BaseFont *_font;
+
bool createButtons();
bool invalidateButtons();
void clearButtons();
void clearResponses();
AdResponseBox(BaseGame *inGame);
virtual ~AdResponseBox();
- BaseArray<AdResponse *> _responses;
- BaseArray<UIButton *> _respButtons;
- UIWindow *_window;
- UIWindow *_shieldWindow;
+
+ bool loadFile(const char *filename);
+ bool loadBuffer(byte *buffer, bool complete = true);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+
+ UIWindow *getResponseWindow();
+ uint32 getNumResponses() const;
+private:
+ int _spacing;
+ int _scrollOffset;
+ BaseFont *_fontHover;
+ BaseFont *_font;
bool _horizontal;
Rect32 _responseArea;
int _verticalAlign;
TTextAlign _align;
- bool loadFile(const char *filename);
- bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ BaseArray<UIButton *> _respButtons;
+ BaseArray<AdResponse *> _responses;
+ UIWindow *_shieldWindow;
+ char *_lastResponseText;
+ char *_lastResponseTextOrig;
+ UIWindow *_window;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_scale_level.cpp b/engines/wintermute/ad/ad_scale_level.cpp
index 4e9293d875..cfec8d7cb9 100644
--- a/engines/wintermute/ad/ad_scale_level.cpp
+++ b/engines/wintermute/ad/ad_scale_level.cpp
@@ -48,6 +48,9 @@ AdScaleLevel::~AdScaleLevel() {
}
+float AdScaleLevel::getScale() const {
+ return _scale;
+}
//////////////////////////////////////////////////////////////////////////
bool AdScaleLevel::loadFile(const char *filename) {
diff --git a/engines/wintermute/ad/ad_scale_level.h b/engines/wintermute/ad/ad_scale_level.h
index 628a385eb4..5c206423cf 100644
--- a/engines/wintermute/ad/ad_scale_level.h
+++ b/engines/wintermute/ad/ad_scale_level.h
@@ -37,12 +37,14 @@ namespace Wintermute {
class AdScaleLevel : public BaseObject {
public:
DECLARE_PERSISTENT(AdScaleLevel, BaseObject)
- float _scale;
AdScaleLevel(BaseGame *inGame);
virtual ~AdScaleLevel();
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
+ float getScale() const;
+private:
+ float _scale;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp
index 8e9beca0c0..a985c517e2 100644
--- a/engines/wintermute/ad/ad_scene.cpp
+++ b/engines/wintermute/ad/ad_scene.cpp
@@ -287,9 +287,9 @@ float AdScene::getZoomAt(int x, int y) {
if (_mainLayer) {
for (int i = _mainLayer->_nodes.size() - 1; i >= 0; i--) {
AdSceneNode *node = _mainLayer->_nodes[i];
- if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->_blocked && node->_region->pointInRegion(x, y)) {
- if (node->_region->_zoom != 0) {
- ret = node->_region->_zoom;
+ if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->isBlocked() && node->_region->pointInRegion(x, y)) {
+ if (node->_region->getZoom() != 0) {
+ ret = node->_region->getZoom();
found = true;
break;
}
@@ -320,9 +320,9 @@ uint32 AdScene::getAlphaAt(int x, int y, bool colorCheck) {
if (_mainLayer) {
for (int i = _mainLayer->_nodes.size() - 1; i >= 0; i--) {
AdSceneNode *node = _mainLayer->_nodes[i];
- if (node->_type == OBJECT_REGION && node->_region->_active && (colorCheck || !node->_region->_blocked) && node->_region->pointInRegion(x, y)) {
- if (!node->_region->_blocked) {
- ret = node->_region->_alpha;
+ if (node->_type == OBJECT_REGION && node->_region->_active && (colorCheck || !node->_region->isBlocked()) && node->_region->pointInRegion(x, y)) {
+ if (!node->_region->isBlocked()) {
+ ret = node->_region->getAlpha();
}
break;
}
@@ -365,8 +365,8 @@ bool AdScene::isBlockedAt(int x, int y, bool checkFreeObjects, BaseObject *reque
break;
}
*/
- if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->_decoration && node->_region->pointInRegion(x, y)) {
- if (node->_region->_blocked) {
+ if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->hasDecoration() && node->_region->pointInRegion(x, y)) {
+ if (node->_region->isBlocked()) {
ret = true;
break;
} else {
@@ -405,8 +405,8 @@ bool AdScene::isWalkableAt(int x, int y, bool checkFreeObjects, BaseObject *requ
if (_mainLayer) {
for (uint32 i = 0; i < _mainLayer->_nodes.size(); i++) {
AdSceneNode *node = _mainLayer->_nodes[i];
- if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->_decoration && node->_region->pointInRegion(x, y)) {
- if (node->_region->_blocked) {
+ if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->hasDecoration() && node->_region->pointInRegion(x, y)) {
+ if (node->_region->isBlocked()) {
ret = false;
break;
} else {
@@ -1045,10 +1045,10 @@ bool AdScene::traverseNodes(bool doUpdate) {
break;
case OBJECT_REGION: {
- if (node->_region->_blocked) {
+ if (node->_region->isBlocked()) {
break;
}
- if (node->_region->_decoration) {
+ if (node->_region->hasDecoration()) {
break;
}
@@ -1140,14 +1140,14 @@ bool AdScene::updateFreeObjects() {
//////////////////////////////////////////////////////////////////////////
bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
AdGame *adGame = (AdGame *)_gameRef;
- BaseArray<AdObject *> objects;
+ Common::Array<AdObject *> objects;
AdObject *obj;
// global objects
for (uint32 i = 0; i < adGame->_objects.size(); i++) {
obj = adGame->_objects[i];
if (obj->_active && !obj->_drawn && (obj->_stickRegion == region || region == NULL || (obj->_stickRegion == NULL && region->pointInRegion(obj->_posX, obj->_posY)))) {
- objects.add(obj);
+ objects.push_back(obj);
}
}
@@ -1155,7 +1155,7 @@ bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
for (uint32 i = 0; i < _objects.size(); i++) {
obj = _objects[i];
if (obj->_active && !obj->_editorOnly && !obj->_drawn && (obj->_stickRegion == region || region == NULL || (obj->_stickRegion == NULL && region->pointInRegion(obj->_posX, obj->_posY)))) {
- objects.add(obj);
+ objects.push_back(obj);
}
}
@@ -1195,16 +1195,11 @@ bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
}
//////////////////////////////////////////////////////////////////////////
-int AdScene::compareObjs(const void *obj1, const void *obj2) {
- const AdObject *object1 = *(const AdObject *const *)obj1;
- const AdObject *object2 = *(const AdObject *const *)obj2;
-
- if (object1->_posY < object2->_posY) {
- return -1;
- } else if (object1->_posY > object2->_posY) {
- return 1;
+bool AdScene::compareObjs(const AdObject *obj1, const AdObject *obj2) {
+ if (obj1->_posY < obj2->_posY) {
+ return true;
} else {
- return 0;
+ return false;
}
}
@@ -1541,7 +1536,7 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
for (int i = _mainLayer->_nodes.size() - 1; i >= 0; i--) {
AdSceneNode *node = _mainLayer->_nodes[i];
if (node->_type == OBJECT_REGION && node->_region->_active && node->_region->pointInRegion(x, y)) {
- if (node->_region->_decoration && !includeDecors) {
+ if (node->_region->hasDecoration() && !includeDecors) {
continue;
}
@@ -2202,7 +2197,7 @@ bool AdScene::saveAsText(BaseDynamicBuffer *buffer, int indent) {
// free entities
buffer->putTextIndent(indent + 2, "; ----- free entities\n");
for (uint32 i = 0; i < _objects.size(); i++) {
- if (_objects[i]->_type == OBJECT_ENTITY) {
+ if (_objects[i]->getType() == OBJECT_ENTITY) {
_objects[i]->saveAsText(buffer, indent + 2);
}
@@ -2282,11 +2277,11 @@ float AdScene::getScaleAt(int Y) {
}
int delta_y = next->_posY - prev->_posY;
- float delta_scale = next->_scale - prev->_scale;
+ float delta_scale = next->getScale() - prev->getScale();
Y -= prev->_posY;
float percent = (float)Y / ((float)delta_y / 100.0f);
- return prev->_scale + delta_scale / 100 * percent;
+ return prev->getScale() + delta_scale / 100 * percent;
}
@@ -2638,7 +2633,7 @@ BaseObject *AdScene::getNodeByName(const char *name) {
// free entities
for (uint32 i = 0; i < _objects.size(); i++) {
- if (_objects[i]->_type == OBJECT_ENTITY && !scumm_stricmp(name, _objects[i]->getName())) {
+ if (_objects[i]->getType() == OBJECT_ENTITY && !scumm_stricmp(name, _objects[i]->getName())) {
return _objects[i];
}
}
@@ -2722,7 +2717,7 @@ bool AdScene::persistState(bool saving) {
if (!_objects[i]->_saveState) {
continue;
}
- if (_objects[i]->_type == OBJECT_ENTITY) {
+ if (_objects[i]->getType() == OBJECT_ENTITY) {
nodeState = state->getNodeState(_objects[i]->getName(), saving);
if (nodeState) {
nodeState->transferEntity((AdEntity *)_objects[i], _persistentStateSprites, saving);
@@ -2785,7 +2780,7 @@ bool AdScene::handleItemAssociations(const char *itemName, bool show) {
if (layer->_nodes[j]->_type == OBJECT_ENTITY) {
AdEntity *ent = layer->_nodes[j]->_entity;
- if (ent->_item && strcmp(ent->_item, itemName) == 0) {
+ if (ent->getItemName() && strcmp(ent->getItemName(), itemName) == 0) {
ent->_active = show;
}
}
@@ -2793,9 +2788,9 @@ bool AdScene::handleItemAssociations(const char *itemName, bool show) {
}
for (uint32 i = 0; i < _objects.size(); i++) {
- if (_objects[i]->_type == OBJECT_ENTITY) {
+ if (_objects[i]->getType() == OBJECT_ENTITY) {
AdEntity *ent = (AdEntity *)_objects[i];
- if (ent->_item && strcmp(ent->_item, itemName) == 0) {
+ if (ent->getItemName() && strcmp(ent->getItemName(), itemName) == 0) {
ent->_active = show;
}
}
diff --git a/engines/wintermute/ad/ad_scene.h b/engines/wintermute/ad/ad_scene.h
index 3b482403b5..230cb77f5b 100644
--- a/engines/wintermute/ad/ad_scene.h
+++ b/engines/wintermute/ad/ad_scene.h
@@ -80,7 +80,7 @@ public:
DECLARE_PERSISTENT(AdScene, BaseObject)
bool displayRegionContent(AdRegion *region = NULL, bool display3DOnly = false);
bool displayRegionContentOld(AdRegion *region = NULL);
- static int compareObjs(const void *obj1, const void *obj2);
+ static bool compareObjs(const AdObject *obj1, const AdObject *obj2);
bool updateFreeObjects();
bool traverseNodes(bool update = false);
diff --git a/engines/wintermute/ad/ad_scene_state.cpp b/engines/wintermute/ad/ad_scene_state.cpp
index 6b34f1af53..e6dd08a5fe 100644
--- a/engines/wintermute/ad/ad_scene_state.cpp
+++ b/engines/wintermute/ad/ad_scene_state.cpp
@@ -72,6 +72,9 @@ void AdSceneState::setFilename(const char *filename) {
}
}
+const char *AdSceneState::getFilename() const {
+ return _filename;
+}
//////////////////////////////////////////////////////////////////////////
AdNodeState *AdSceneState::getNodeState(const char *name, bool saving) {
diff --git a/engines/wintermute/ad/ad_scene_state.h b/engines/wintermute/ad/ad_scene_state.h
index 2b25393c5a..600aa4b581 100644
--- a/engines/wintermute/ad/ad_scene_state.h
+++ b/engines/wintermute/ad/ad_scene_state.h
@@ -39,9 +39,11 @@ class AdSceneState : public BaseClass {
public:
AdNodeState *getNodeState(const char *name, bool saving);
void setFilename(const char *filename);
+ const char *getFilename() const;
DECLARE_PERSISTENT(AdSceneState, BaseClass)
AdSceneState(BaseGame *inGame);
virtual ~AdSceneState();
+private:
char *_filename;
BaseArray<AdNodeState *> _nodeStates;
};
diff --git a/engines/wintermute/ad/ad_waypoint_group.h b/engines/wintermute/ad/ad_waypoint_group.h
index 13d6bbadd7..7e427313e6 100644
--- a/engines/wintermute/ad/ad_waypoint_group.h
+++ b/engines/wintermute/ad/ad_waypoint_group.h
@@ -35,22 +35,25 @@ namespace Wintermute {
class BasePoint;
class AdWaypointGroup : public BaseObject {
public:
- float _lastMimicScale;
- int _lastMimicX;
- int _lastMimicY;
void cleanup();
bool mimic(AdWaypointGroup *wpt, float scale = 100.0f, int x = 0, int y = 0);
DECLARE_PERSISTENT(AdWaypointGroup, BaseObject)
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
- bool _active;
AdWaypointGroup(BaseGame *inGame);
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
virtual ~AdWaypointGroup();
+
+ bool _active;
BaseArray<BasePoint *> _points;
- int _editorSelectedPoint;
+
virtual ScValue *scGetProperty(const Common::String &name);
virtual bool scSetProperty(const char *name, ScValue *value);
+private:
+ int _editorSelectedPoint;
+ float _lastMimicScale;
+ int _lastMimicX;
+ int _lastMimicY;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_dynamic_buffer.cpp b/engines/wintermute/base/base_dynamic_buffer.cpp
index fc48e93c2b..dc14a4e052 100644
--- a/engines/wintermute/base/base_dynamic_buffer.cpp
+++ b/engines/wintermute/base/base_dynamic_buffer.cpp
@@ -65,7 +65,7 @@ void BaseDynamicBuffer::cleanup() {
//////////////////////////////////////////////////////////////////////////
-uint32 BaseDynamicBuffer::getSize() {
+uint32 BaseDynamicBuffer::getSize() const {
return _size;
}
diff --git a/engines/wintermute/base/base_dynamic_buffer.h b/engines/wintermute/base/base_dynamic_buffer.h
index 2d1a7fbe48..ad78ebad00 100644
--- a/engines/wintermute/base/base_dynamic_buffer.h
+++ b/engines/wintermute/base/base_dynamic_buffer.h
@@ -43,7 +43,7 @@ public:
void putString(const char *val);
bool getBytes(byte *buffer, uint32 size);
bool putBytes(const byte *buffer, uint32 size);
- uint32 getSize();
+ uint32 getSize() const;
bool init(uint32 initSize = 0);
void cleanup();
BaseDynamicBuffer(BaseGame *inGame, uint32 initSize = 1000, uint32 growBy = 1000);
diff --git a/engines/wintermute/base/base_fader.cpp b/engines/wintermute/base/base_fader.cpp
index 985718fcab..8f74d71caf 100644
--- a/engines/wintermute/base/base_fader.cpp
+++ b/engines/wintermute/base/base_fader.cpp
@@ -164,7 +164,7 @@ bool BaseFader::fadeOut(uint32 targetColor, uint32 duration, bool system) {
//////////////////////////////////////////////////////////////////////////
-uint32 BaseFader::getCurrentColor() {
+uint32 BaseFader::getCurrentColor() const {
return BYTETORGBA(_red, _green, _blue, _currentAlpha);
}
diff --git a/engines/wintermute/base/base_fader.h b/engines/wintermute/base/base_fader.h
index 116c8c963d..845ce2f244 100644
--- a/engines/wintermute/base/base_fader.h
+++ b/engines/wintermute/base/base_fader.h
@@ -36,7 +36,7 @@ namespace Wintermute {
class BaseFader : public BaseObject {
public:
- uint32 getCurrentColor();
+ uint32 getCurrentColor() const;
bool fadeOut(uint32 targetColor, uint32 duration, bool system = false);
bool fadeIn(uint32 sourceColor, uint32 duration, bool system = false);
bool deactivate();
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index b6886b7a33..7402bc6f30 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -29,17 +29,16 @@
#include "engines/wintermute/dcgf.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_game_music.h"
#include "engines/wintermute/base/base_fader.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/font/base_font.h"
#include "engines/wintermute/base/font/base_font_storage.h"
#include "engines/wintermute/base/gfx/base_image.h"
-#include "engines/wintermute/base/gfx/base_surface.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/base_keyboard_state.h"
#include "engines/wintermute/base/base_parser.h"
#include "engines/wintermute/base/base_quick_msg.h"
-#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/base/sound/base_sound_manager.h"
#include "engines/wintermute/base/base_sprite.h"
#include "engines/wintermute/base/base_sub_frame.h"
@@ -54,7 +53,7 @@
#include "engines/wintermute/base/scriptables/script_engine.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
#include "engines/wintermute/base/scriptables/script.h"
-#include "engines/wintermute/base/scriptables/script_ext_math.h"
+#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/video/video_player.h"
#include "engines/wintermute/video/video_theora_player.h"
#include "engines/wintermute/utils/utils.h"
@@ -147,10 +146,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_stringTable = new BaseStringTable(this);
- for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- _music[i] = NULL;
- _musicStartTime[i] = 0;
- }
+ _musicSystem = new BaseGameMusic(this);
_settingsResWidth = 800;
_settingsResHeight = 600;
@@ -198,18 +194,9 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_thumbnailWidth = _thumbnailHeight = 0;
_richSavedGames = false;
- _savedGameExt = NULL;
- BaseUtils::setString(&_savedGameExt, "dsv");
-
- _musicCrossfadeRunning = false;
- _musicCrossfadeStartTime = 0;
- _musicCrossfadeLength = 0;
- _musicCrossfadeChannel1 = -1;
- _musicCrossfadeChannel2 = -1;
- _musicCrossfadeSwap = false;
-
- _localSaveDir = NULL;
- BaseUtils::setString(&_localSaveDir, "saves");
+ _savedGameExt = "dsv";
+ _localSaveDir = "saves";
+
_saveDirChecked = false;
_loadingIcon = NULL;
@@ -224,7 +211,6 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_lastCursor = NULL;
-
BasePlatform::setRectEmpty(&_mouseLockRect);
_suppressScriptErrors = false;
@@ -268,9 +254,7 @@ BaseGame::~BaseGame() {
cleanup();
- delete[] _localSaveDir;
delete[] _settingsGameFile;
- delete[] _savedGameExt;
delete _cachedThumbnail;
@@ -287,10 +271,9 @@ BaseGame::~BaseGame() {
delete _renderer;
delete _stringTable;
+ delete _musicSystem;
- _localSaveDir = NULL;
_settingsGameFile = NULL;
- _savedGameExt = NULL;
_cachedThumbnail = NULL;
@@ -306,6 +289,7 @@ BaseGame::~BaseGame() {
_renderer = NULL;
_stringTable = NULL;
+ _musicSystem = NULL;
DEBUG_DebugDisable();
debugC(kWintermuteDebugLog, "--- shutting down normally ---\n");
@@ -320,11 +304,7 @@ bool BaseGame::cleanup() {
_engineLogCallback = NULL;
_engineLogCallbackData = NULL;
- for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- delete _music[i];
- _music[i] = NULL;
- _musicStartTime[i] = 0;
- }
+ _musicSystem->cleanup();
unregisterObject(_fader);
_fader = NULL;
@@ -405,7 +385,7 @@ bool BaseGame::initialize1() {
break;
}
- _mathClass = new SXMath(this);
+ _mathClass = makeSXMath(this);
if (_mathClass == NULL) {
break;
}
@@ -552,7 +532,7 @@ bool BaseGame::initLoop() {
_currentTime = g_system->getMillis();
_renderer->initLoop();
- updateMusicCrossfade();
+ _musicSystem->updateMusicCrossfade();
_surfaceStorage->initLoop();
_fontStorage->initLoop();
@@ -918,7 +898,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
break;
case TOKEN_LOCAL_SAVE_DIR:
- BaseUtils::setString(&_localSaveDir, (char *)params);
+ _localSaveDir = (char *)params;
break;
case TOKEN_COMPAT_KILL_METHOD_THREADS:
@@ -1097,272 +1077,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
return STATUS_OK;
}
- //////////////////////////////////////////////////////////////////////////
- // PlayMusic / PlayMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "PlayMusic") == 0 || strcmp(name, "PlayMusicChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "PlayMusic") == 0) {
- stack->correctParams(3);
- } else {
- stack->correctParams(4);
- channel = stack->pop()->getInt();
- }
-
- const char *filename = stack->pop()->getString();
- ScValue *valLooping = stack->pop();
- bool looping = valLooping->isNULL() ? true : valLooping->getBool();
-
- ScValue *valLoopStart = stack->pop();
- uint32 loopStart = (uint32)(valLoopStart->isNULL() ? 0 : valLoopStart->getInt());
-
-
- if (DID_FAIL(playMusic(channel, filename, looping, loopStart))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StopMusic / StopMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "StopMusic") == 0 || strcmp(name, "StopMusicChannel") == 0) {
- int channel = 0;
-
- if (strcmp(name, "StopMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (DID_FAIL(stopMusic(channel))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // PauseMusic / PauseMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "PauseMusic") == 0 || strcmp(name, "PauseMusicChannel") == 0) {
- int channel = 0;
-
- if (strcmp(name, "PauseMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (DID_FAIL(pauseMusic(channel))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ResumeMusic / ResumeMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "ResumeMusic") == 0 || strcmp(name, "ResumeMusicChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "ResumeMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (DID_FAIL(resumeMusic(channel))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetMusic / GetMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetMusic") == 0 || strcmp(name, "GetMusicChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "GetMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS) {
- stack->pushNULL();
- } else {
- if (!_music[channel] || !_music[channel]->getFilename()) {
- stack->pushNULL();
- } else {
- stack->pushString(_music[channel]->getFilename());
- }
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // SetMusicPosition / SetMusicChannelPosition
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "SetMusicPosition") == 0 || strcmp(name, "SetMusicChannelPosition") == 0 || strcmp(name, "SetMusicPositionChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "SetMusicPosition") == 0) {
- stack->correctParams(1);
- } else {
- stack->correctParams(2);
- channel = stack->pop()->getInt();
- }
-
- uint32 time = stack->pop()->getInt();
-
- if (DID_FAIL(setMusicStartTime(channel, time))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
-
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetMusicPosition / GetMusicChannelPosition
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetMusicPosition") == 0 || strcmp(name, "GetMusicChannelPosition") == 0) {
- int channel = 0;
- if (strcmp(name, "GetMusicPosition") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushInt(0);
- } else {
- stack->pushInt(_music[channel]->getPositionTime());
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // IsMusicPlaying / IsMusicChannelPlaying
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "IsMusicPlaying") == 0 || strcmp(name, "IsMusicChannelPlaying") == 0) {
- int channel = 0;
- if (strcmp(name, "IsMusicPlaying") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushBool(false);
- } else {
- stack->pushBool(_music[channel]->isPlaying());
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // SetMusicVolume / SetMusicChannelVolume
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "SetMusicVolume") == 0 || strcmp(name, "SetMusicChannelVolume") == 0) {
- int channel = 0;
- if (strcmp(name, "SetMusicVolume") == 0) {
- stack->correctParams(1);
- } else {
- stack->correctParams(2);
- channel = stack->pop()->getInt();
- }
-
- int volume = stack->pop()->getInt();
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushBool(false);
- } else {
- if (DID_FAIL(_music[channel]->setVolumePercent(volume))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetMusicVolume / GetMusicChannelVolume
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetMusicVolume") == 0 || strcmp(name, "GetMusicChannelVolume") == 0) {
- int channel = 0;
- if (strcmp(name, "GetMusicVolume") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushInt(0);
- } else {
- stack->pushInt(_music[channel]->getVolumePercent());
- }
-
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MusicCrossfade
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "MusicCrossfade") == 0) {
- stack->correctParams(4);
- int channel1 = stack->pop()->getInt(0);
- int channel2 = stack->pop()->getInt(0);
- uint32 fadeLength = (uint32)stack->pop()->getInt(0);
- bool swap = stack->pop()->getBool(true);
-
- if (_musicCrossfadeRunning) {
- script->runtimeError("Game.MusicCrossfade: Music crossfade is already in progress.");
- stack->pushBool(false);
- return STATUS_OK;
- }
-
- _musicCrossfadeStartTime = _liveTimer;
- _musicCrossfadeChannel1 = channel1;
- _musicCrossfadeChannel2 = channel2;
- _musicCrossfadeLength = fadeLength;
- _musicCrossfadeSwap = swap;
-
- _musicCrossfadeRunning = true;
-
- stack->pushBool(true);
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetSoundLength
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetSoundLength") == 0) {
- stack->correctParams(1);
-
- int length = 0;
- const char *filename = stack->pop()->getString();
-
- BaseSound *sound = new BaseSound(_gameRef);
- if (sound && DID_SUCCEED(sound->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
- length = sound->getLength();
- delete sound;
- sound = NULL;
- }
- stack->pushInt(length);
+ else if (_musicSystem->scCallMethod(script, stack, thisStack, name) == STATUS_OK) {
return STATUS_OK;
}
@@ -3345,99 +3060,6 @@ bool BaseGame::displayWindows(bool inGame) {
return STATUS_OK;
}
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::playMusic(int channel, const char *filename, bool looping, uint32 loopStart) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- delete _music[channel];
- _music[channel] = NULL;
-
- _music[channel] = new BaseSound(_gameRef);
- if (_music[channel] && DID_SUCCEED(_music[channel]->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
- if (_musicStartTime[channel]) {
- _music[channel]->setPositionTime(_musicStartTime[channel]);
- _musicStartTime[channel] = 0;
- }
- if (loopStart) {
- _music[channel]->setLoopStart(loopStart);
- }
- return _music[channel]->play(looping);
- } else {
- delete _music[channel];
- _music[channel] = NULL;
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::stopMusic(int channel) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- if (_music[channel]) {
- _music[channel]->stop();
- delete _music[channel];
- _music[channel] = NULL;
- return STATUS_OK;
- } else {
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::pauseMusic(int channel) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- if (_music[channel]) {
- return _music[channel]->pause();
- } else {
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::resumeMusic(int channel) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- if (_music[channel]) {
- return _music[channel]->resume();
- } else {
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::setMusicStartTime(int channel, uint32 time) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- _musicStartTime[channel] = time;
- if (_music[channel] && _music[channel]->isPlaying()) {
- return _music[channel]->setPositionTime(time);
- } else {
- return STATUS_OK;
- }
-}
-
-
//////////////////////////////////////////////////////////////////////////
bool BaseGame::loadSettings(const char *filename) {
TOKEN_TABLE_START(commands)
@@ -3539,7 +3161,7 @@ bool BaseGame::loadSettings(const char *filename) {
break;
case TOKEN_SAVED_GAME_EXT:
- BaseUtils::setString(&_savedGameExt, (char *)params);
+ _savedGameExt = (char *)params;
break;
case TOKEN_GUID:
@@ -3584,10 +3206,7 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_keyboardState));
persistMgr->transfer(TMEMBER(_lastTime));
persistMgr->transfer(TMEMBER(_mainObject));
- for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- persistMgr->transfer(TMEMBER(_music[i]));
- persistMgr->transfer(TMEMBER(_musicStartTime[i]));
- }
+ _musicSystem->persistChannels(persistMgr);
persistMgr->transfer(TMEMBER(_offsetX));
persistMgr->transfer(TMEMBER(_offsetY));
@@ -3619,12 +3238,7 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_liveTimerDelta));
persistMgr->transfer(TMEMBER(_liveTimerLast));
- persistMgr->transfer(TMEMBER(_musicCrossfadeRunning));
- persistMgr->transfer(TMEMBER(_musicCrossfadeStartTime));
- persistMgr->transfer(TMEMBER(_musicCrossfadeLength));
- persistMgr->transfer(TMEMBER(_musicCrossfadeChannel1));
- persistMgr->transfer(TMEMBER(_musicCrossfadeChannel2));
- persistMgr->transfer(TMEMBER(_musicCrossfadeSwap));
+ _musicSystem->persistCrossfadeSettings(persistMgr);
_renderer->persistSaveLoadImages(persistMgr);
@@ -3730,7 +3344,7 @@ bool BaseGame::handleKeypress(Common::Event *event, bool printable) {
// TODO
if (_focusedWindow) {
- if (!_gameRef->_focusedWindow->handleKeypress(event, _keyboardState->_currentPrintable)) {
+ if (!_gameRef->_focusedWindow->handleKeypress(event, _keyboardState->isCurrentPrintable())) {
/*if (event->type != SDL_TEXTINPUT) {*/
if (_gameRef->_focusedWindow->canHandleEvent("Keypress")) {
_gameRef->_focusedWindow->applyEvent("Keypress");
@@ -3979,69 +3593,6 @@ bool BaseGame::displayContentSimple() {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::updateMusicCrossfade() {
- /* byte globMusicVol = _soundMgr->getVolumePercent(SOUND_MUSIC); */
-
- if (!_musicCrossfadeRunning) {
- return STATUS_OK;
- }
- if (_state == GAME_FROZEN) {
- return STATUS_OK;
- }
-
- if (_musicCrossfadeChannel1 < 0 || _musicCrossfadeChannel1 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel1]) {
- _musicCrossfadeRunning = false;
- return STATUS_OK;
- }
- if (_musicCrossfadeChannel2 < 0 || _musicCrossfadeChannel2 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel2]) {
- _musicCrossfadeRunning = false;
- return STATUS_OK;
- }
-
- if (!_music[_musicCrossfadeChannel1]->isPlaying()) {
- _music[_musicCrossfadeChannel1]->play();
- }
- if (!_music[_musicCrossfadeChannel2]->isPlaying()) {
- _music[_musicCrossfadeChannel2]->play();
- }
-
- uint32 currentTime = _gameRef->_liveTimer - _musicCrossfadeStartTime;
-
- if (currentTime >= _musicCrossfadeLength) {
- _musicCrossfadeRunning = false;
- //_music[_musicCrossfadeChannel2]->setVolume(GlobMusicVol);
- _music[_musicCrossfadeChannel2]->setVolumePercent(100);
-
- _music[_musicCrossfadeChannel1]->stop();
- //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol);
- _music[_musicCrossfadeChannel1]->setVolumePercent(100);
-
-
- if (_musicCrossfadeSwap) {
- // swap channels
- BaseSound *dummy = _music[_musicCrossfadeChannel1];
- int dummyInt = _musicStartTime[_musicCrossfadeChannel1];
-
- _music[_musicCrossfadeChannel1] = _music[_musicCrossfadeChannel2];
- _musicStartTime[_musicCrossfadeChannel1] = _musicStartTime[_musicCrossfadeChannel2];
-
- _music[_musicCrossfadeChannel2] = dummy;
- _musicStartTime[_musicCrossfadeChannel2] = dummyInt;
- }
- } else {
- //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol - (float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
- //_music[_musicCrossfadeChannel2]->setVolume((float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
- _music[_musicCrossfadeChannel1]->setVolumePercent((int)(100.0f - (float)currentTime / (float)_musicCrossfadeLength * 100.0f));
- _music[_musicCrossfadeChannel2]->setVolumePercent((int)((float)currentTime / (float)_musicCrossfadeLength * 100.0f));
-
- //_gameRef->QuickMessageForm("%d %d", _music[_musicCrossfadeChannel1]->GetVolume(), _music[_musicCrossfadeChannel2]->GetVolume());
- }
-
- return STATUS_OK;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
bool BaseGame::resetContent() {
_scEngine->clearGlobals();
//_timer = 0;
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h
index 0f764b3d03..75cf3fd832 100644
--- a/engines/wintermute/base/base_game.h
+++ b/engines/wintermute/base/base_game.h
@@ -46,6 +46,7 @@ class BaseFileManager;
class BaseTransitionMgr;
class ScEngine;
class BaseFontStorage;
+class BaseGameMusic;
class BaseStringTable;
class BaseQuickMsg;
class UIWindow;
@@ -59,8 +60,6 @@ class BaseKeyboardState;
class VideoPlayer;
class VideoTheoraPlayer;
-#define NUM_MUSIC_CHANNELS 5
-
class BaseGame: public BaseObject {
public:
DECLARE_PERSISTENT(BaseGame, BaseObject)
@@ -138,7 +137,7 @@ public:
BaseRenderer *_renderer;
BaseSoundMgr *_soundMgr;
ScEngine *_scEngine;
- SXMath *_mathClass;
+ BaseScriptable *_mathClass;
BaseSurfaceStorage *_surfaceStorage;
BaseFontStorage *_fontStorage;
BaseGame(const Common::String &gameId);
@@ -274,10 +273,11 @@ private:
virtual bool invalidateDeviceObjects();
virtual bool restoreDeviceObjects();
- char *_localSaveDir;
+ // TODO: This can probably be removed completely:
bool _saveDirChecked;
bool _richSavedGames;
- char *_savedGameExt;
+ Common::String _localSaveDir;
+ Common::String _savedGameExt;
bool _reportTextureFormat;
@@ -292,31 +292,17 @@ private:
void *_engineLogCallbackData;
bool _videoSubtitles;
- uint32 _musicStartTime[NUM_MUSIC_CHANNELS];
bool _compressedSavegames;
bool _personalizedSave;
void setWindowTitle();
- bool resumeMusic(int channel);
- bool setMusicStartTime(int channel, uint32 time);
- bool pauseMusic(int channel);
- bool stopMusic(int channel);
- bool playMusic(int channel, const char *filename, bool looping = true, uint32 loopStart = 0);
- BaseSound *_music[NUM_MUSIC_CHANNELS];
- bool _musicCrossfadeRunning;
- bool _musicCrossfadeSwap;
- uint32 _musicCrossfadeStartTime;
- uint32 _musicCrossfadeLength;
- int _musicCrossfadeChannel1;
- int _musicCrossfadeChannel2;
-
BaseSprite *_cursorNoninteractive;
BaseKeyboardState *_keyboardState;
uint32 _fps;
- bool updateMusicCrossfade();
+ BaseGameMusic *_musicSystem;
bool isVideoPlaying();
bool stopVideo();
diff --git a/engines/wintermute/base/base_game_music.cpp b/engines/wintermute/base/base_game_music.cpp
new file mode 100644
index 0000000000..365fa6e212
--- /dev/null
+++ b/engines/wintermute/base/base_game_music.cpp
@@ -0,0 +1,506 @@
+/* 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.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#include "engines/wintermute/base/base_game_music.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_persistence_manager.h"
+#include "engines/wintermute/base/scriptables/script_stack.h"
+#include "engines/wintermute/base/scriptables/script_value.h"
+#include "engines/wintermute/base/scriptables/script.h"
+#include "engines/wintermute/base/sound/base_sound.h"
+
+namespace Wintermute {
+
+BaseGameMusic::BaseGameMusic(BaseGame *gameRef) : _gameRef(gameRef) {
+ for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
+ _music[i] = NULL;
+ _musicStartTime[i] = 0;
+ }
+
+ _musicCrossfadeRunning = false;
+ _musicCrossfadeStartTime = 0;
+ _musicCrossfadeLength = 0;
+ _musicCrossfadeChannel1 = -1;
+ _musicCrossfadeChannel2 = -1;
+ _musicCrossfadeSwap = false;
+}
+
+void BaseGameMusic::cleanup() {
+ for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
+ delete _music[i];
+ _music[i] = NULL;
+ _musicStartTime[i] = 0;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::playMusic(int channel, const char *filename, bool looping, uint32 loopStart) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ delete _music[channel];
+ _music[channel] = NULL;
+
+ _music[channel] = new BaseSound(_gameRef);
+ if (_music[channel] && DID_SUCCEED(_music[channel]->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
+ if (_musicStartTime[channel]) {
+ _music[channel]->setPositionTime(_musicStartTime[channel]);
+ _musicStartTime[channel] = 0;
+ }
+ if (loopStart) {
+ _music[channel]->setLoopStart(loopStart);
+ }
+ return _music[channel]->play(looping);
+ } else {
+ delete _music[channel];
+ _music[channel] = NULL;
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::stopMusic(int channel) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ if (_music[channel]) {
+ _music[channel]->stop();
+ delete _music[channel];
+ _music[channel] = NULL;
+ return STATUS_OK;
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::pauseMusic(int channel) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ if (_music[channel]) {
+ return _music[channel]->pause();
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::resumeMusic(int channel) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ if (_music[channel]) {
+ return _music[channel]->resume();
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::setMusicStartTime(int channel, uint32 time) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ _musicStartTime[channel] = time;
+ if (_music[channel] && _music[channel]->isPlaying()) {
+ return _music[channel]->setPositionTime(time);
+ } else {
+ return STATUS_OK;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::updateMusicCrossfade() {
+ /* byte globMusicVol = _soundMgr->getVolumePercent(SOUND_MUSIC); */
+
+ if (!_musicCrossfadeRunning) {
+ return STATUS_OK;
+ }
+ if (_gameRef->_state == GAME_FROZEN) {
+ return STATUS_OK;
+ }
+
+ if (_musicCrossfadeChannel1 < 0 || _musicCrossfadeChannel1 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel1]) {
+ _musicCrossfadeRunning = false;
+ return STATUS_OK;
+ }
+ if (_musicCrossfadeChannel2 < 0 || _musicCrossfadeChannel2 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel2]) {
+ _musicCrossfadeRunning = false;
+ return STATUS_OK;
+ }
+
+ if (!_music[_musicCrossfadeChannel1]->isPlaying()) {
+ _music[_musicCrossfadeChannel1]->play();
+ }
+ if (!_music[_musicCrossfadeChannel2]->isPlaying()) {
+ _music[_musicCrossfadeChannel2]->play();
+ }
+
+ uint32 currentTime = _gameRef->_liveTimer - _musicCrossfadeStartTime;
+
+ if (currentTime >= _musicCrossfadeLength) {
+ _musicCrossfadeRunning = false;
+ //_music[_musicCrossfadeChannel2]->setVolume(GlobMusicVol);
+ _music[_musicCrossfadeChannel2]->setVolumePercent(100);
+
+ _music[_musicCrossfadeChannel1]->stop();
+ //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol);
+ _music[_musicCrossfadeChannel1]->setVolumePercent(100);
+
+
+ if (_musicCrossfadeSwap) {
+ // swap channels
+ BaseSound *dummy = _music[_musicCrossfadeChannel1];
+ int dummyInt = _musicStartTime[_musicCrossfadeChannel1];
+
+ _music[_musicCrossfadeChannel1] = _music[_musicCrossfadeChannel2];
+ _musicStartTime[_musicCrossfadeChannel1] = _musicStartTime[_musicCrossfadeChannel2];
+
+ _music[_musicCrossfadeChannel2] = dummy;
+ _musicStartTime[_musicCrossfadeChannel2] = dummyInt;
+ }
+ } else {
+ //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol - (float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
+ //_music[_musicCrossfadeChannel2]->setVolume((float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
+ _music[_musicCrossfadeChannel1]->setVolumePercent((int)(100.0f - (float)currentTime / (float)_musicCrossfadeLength * 100.0f));
+ _music[_musicCrossfadeChannel2]->setVolumePercent((int)((float)currentTime / (float)_musicCrossfadeLength * 100.0f));
+
+ //_gameRef->QuickMessageForm("%d %d", _music[_musicCrossfadeChannel1]->GetVolume(), _music[_musicCrossfadeChannel2]->GetVolume());
+ }
+
+ return STATUS_OK;
+}
+
+bool BaseGameMusic::persistChannels(BasePersistenceManager *persistMgr) {
+ for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
+ persistMgr->transfer(TMEMBER(_music[i]));
+ persistMgr->transfer(TMEMBER(_musicStartTime[i]));
+ }
+ return true;
+}
+
+bool BaseGameMusic::persistCrossfadeSettings(BasePersistenceManager *persistMgr) {
+ persistMgr->transfer(TMEMBER(_musicCrossfadeRunning));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeStartTime));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeLength));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeChannel1));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeChannel2));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeSwap));
+ return true;
+}
+
+bool BaseGameMusic::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) {
+ //////////////////////////////////////////////////////////////////////////
+ // PlayMusic / PlayMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ if (strcmp(name, "PlayMusic") == 0 || strcmp(name, "PlayMusicChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "PlayMusic") == 0) {
+ stack->correctParams(3);
+ } else {
+ stack->correctParams(4);
+ channel = stack->pop()->getInt();
+ }
+
+ const char *filename = stack->pop()->getString();
+ ScValue *valLooping = stack->pop();
+ bool looping = valLooping->isNULL() ? true : valLooping->getBool();
+
+ ScValue *valLoopStart = stack->pop();
+ uint32 loopStart = (uint32)(valLoopStart->isNULL() ? 0 : valLoopStart->getInt());
+
+
+ if (DID_FAIL(playMusic(channel, filename, looping, loopStart))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // StopMusic / StopMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "StopMusic") == 0 || strcmp(name, "StopMusicChannel") == 0) {
+ int channel = 0;
+
+ if (strcmp(name, "StopMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (DID_FAIL(stopMusic(channel))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // PauseMusic / PauseMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "PauseMusic") == 0 || strcmp(name, "PauseMusicChannel") == 0) {
+ int channel = 0;
+
+ if (strcmp(name, "PauseMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (DID_FAIL(pauseMusic(channel))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // ResumeMusic / ResumeMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "ResumeMusic") == 0 || strcmp(name, "ResumeMusicChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "ResumeMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (DID_FAIL(resumeMusic(channel))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetMusic / GetMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetMusic") == 0 || strcmp(name, "GetMusicChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "GetMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS) {
+ stack->pushNULL();
+ } else {
+ if (!_music[channel] || !_music[channel]->getFilename()) {
+ stack->pushNULL();
+ } else {
+ stack->pushString(_music[channel]->getFilename());
+ }
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // SetMusicPosition / SetMusicChannelPosition
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "SetMusicPosition") == 0 || strcmp(name, "SetMusicChannelPosition") == 0 || strcmp(name, "SetMusicPositionChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "SetMusicPosition") == 0) {
+ stack->correctParams(1);
+ } else {
+ stack->correctParams(2);
+ channel = stack->pop()->getInt();
+ }
+
+ uint32 time = stack->pop()->getInt();
+
+ if (DID_FAIL(setMusicStartTime(channel, time))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetMusicPosition / GetMusicChannelPosition
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetMusicPosition") == 0 || strcmp(name, "GetMusicChannelPosition") == 0) {
+ int channel = 0;
+ if (strcmp(name, "GetMusicPosition") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushInt(0);
+ } else {
+ stack->pushInt(_music[channel]->getPositionTime());
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // IsMusicPlaying / IsMusicChannelPlaying
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "IsMusicPlaying") == 0 || strcmp(name, "IsMusicChannelPlaying") == 0) {
+ int channel = 0;
+ if (strcmp(name, "IsMusicPlaying") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(_music[channel]->isPlaying());
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // SetMusicVolume / SetMusicChannelVolume
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "SetMusicVolume") == 0 || strcmp(name, "SetMusicChannelVolume") == 0) {
+ int channel = 0;
+ if (strcmp(name, "SetMusicVolume") == 0) {
+ stack->correctParams(1);
+ } else {
+ stack->correctParams(2);
+ channel = stack->pop()->getInt();
+ }
+
+ int volume = stack->pop()->getInt();
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushBool(false);
+ } else {
+ if (DID_FAIL(_music[channel]->setVolumePercent(volume))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetMusicVolume / GetMusicChannelVolume
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetMusicVolume") == 0 || strcmp(name, "GetMusicChannelVolume") == 0) {
+ int channel = 0;
+ if (strcmp(name, "GetMusicVolume") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushInt(0);
+ } else {
+ stack->pushInt(_music[channel]->getVolumePercent());
+ }
+
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // MusicCrossfade
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "MusicCrossfade") == 0) {
+ stack->correctParams(4);
+ int channel1 = stack->pop()->getInt(0);
+ int channel2 = stack->pop()->getInt(0);
+ uint32 fadeLength = (uint32)stack->pop()->getInt(0);
+ bool swap = stack->pop()->getBool(true);
+
+ if (_musicCrossfadeRunning) {
+ script->runtimeError("Game.MusicCrossfade: Music crossfade is already in progress.");
+ stack->pushBool(false);
+ return STATUS_OK;
+ }
+
+ _musicCrossfadeStartTime = _gameRef->_liveTimer;
+ _musicCrossfadeChannel1 = channel1;
+ _musicCrossfadeChannel2 = channel2;
+ _musicCrossfadeLength = fadeLength;
+ _musicCrossfadeSwap = swap;
+
+ _musicCrossfadeRunning = true;
+
+ stack->pushBool(true);
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetSoundLength
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetSoundLength") == 0) {
+ stack->correctParams(1);
+
+ int length = 0;
+ const char *filename = stack->pop()->getString();
+
+ BaseSound *sound = new BaseSound(_gameRef);
+ if (sound && DID_SUCCEED(sound->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
+ length = sound->getLength();
+ delete sound;
+ sound = NULL;
+ }
+ stack->pushInt(length);
+ return STATUS_OK;
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_game_music.h b/engines/wintermute/base/base_game_music.h
new file mode 100644
index 0000000000..058a8cadef
--- /dev/null
+++ b/engines/wintermute/base/base_game_music.h
@@ -0,0 +1,73 @@
+/* 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.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_BASE_GAME_MUSIC_H
+#define WINTERMUTE_BASE_GAME_MUSIC_H
+
+#include "common/scummsys.h"
+
+
+namespace Wintermute {
+
+#define NUM_MUSIC_CHANNELS 5
+class BasePersistenceManager;
+class BaseSound;
+class ScStack;
+class ScScript;
+class BaseGame;
+class BaseGameMusic {
+public:
+ BaseGameMusic(BaseGame *gameRef);
+ void cleanup();
+
+ bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
+
+ bool resumeMusic(int channel);
+ bool setMusicStartTime(int channel, uint32 time);
+ bool pauseMusic(int channel);
+ bool stopMusic(int channel);
+ bool playMusic(int channel, const char *filename, bool looping = true, uint32 loopStart = 0);
+ bool updateMusicCrossfade();
+
+ bool persistChannels(BasePersistenceManager *persistMgr);
+ bool persistCrossfadeSettings(BasePersistenceManager *persistMgr);
+private:
+ BaseGame *_gameRef;
+ BaseSound *_music[NUM_MUSIC_CHANNELS];
+ uint32 _musicStartTime[NUM_MUSIC_CHANNELS];
+ bool _musicCrossfadeRunning;
+ bool _musicCrossfadeSwap;
+ uint32 _musicCrossfadeStartTime;
+ uint32 _musicCrossfadeLength;
+ int _musicCrossfadeChannel1;
+ int _musicCrossfadeChannel2;
+};
+
+} // end of namespace Wintermute
+
+#endif
diff --git a/engines/wintermute/base/base_keyboard_state.cpp b/engines/wintermute/base/base_keyboard_state.cpp
index da7baafd2d..072a1bb71b 100644
--- a/engines/wintermute/base/base_keyboard_state.cpp
+++ b/engines/wintermute/base/base_keyboard_state.cpp
@@ -200,9 +200,8 @@ const char *BaseKeyboardState::scToString() {
bool BaseKeyboardState::readKey(Common::Event *event) {
//_currentPrintable = (event->type == SDL_TEXTINPUT); // TODO
_currentCharCode = keyCodeToVKey(event);
- if ((_currentCharCode <= Common::KEYCODE_z && _currentCharCode >= Common::KEYCODE_a) ||
- (_currentCharCode <= Common::KEYCODE_9 && _currentCharCode >= Common::KEYCODE_0) ||
- (_currentCharCode == Common::KEYCODE_SPACE)) {
+ // Verify that this is a printable ISO-8859-character (including the upper charset)
+ if ((_currentCharCode <= 0x7E && _currentCharCode >= 0x20) || (_currentCharCode <= 0xFF && _currentCharCode >= 0xA0)) {
_currentPrintable = true;
} else {
_currentPrintable = false;
@@ -258,6 +257,11 @@ bool BaseKeyboardState::isAltDown() {
}
//////////////////////////////////////////////////////////////////////////
+bool BaseKeyboardState::isCurrentPrintable() const {
+ return _currentPrintable;
+}
+
+//////////////////////////////////////////////////////////////////////////
uint32 BaseKeyboardState::keyCodeToVKey(Common::Event *event) {
if (event->type != Common::EVENT_KEYDOWN) {
return 0;
@@ -267,7 +271,7 @@ uint32 BaseKeyboardState::keyCodeToVKey(Common::Event *event) {
case Common::KEYCODE_KP_ENTER:
return Common::KEYCODE_RETURN;
default:
- return (uint32)event->kbd.keycode;
+ return (uint32)event->kbd.ascii;
}
}
diff --git a/engines/wintermute/base/base_keyboard_state.h b/engines/wintermute/base/base_keyboard_state.h
index dfd0efdec0..b62ece02b7 100644
--- a/engines/wintermute/base/base_keyboard_state.h
+++ b/engines/wintermute/base/base_keyboard_state.h
@@ -39,14 +39,6 @@ namespace Wintermute {
class BaseKeyboardState : public BaseScriptable {
public:
- uint32 _currentKeyData;
- uint32 _currentCharCode;
- bool _currentPrintable;
-
- bool _currentShift;
- bool _currentAlt;
- bool _currentControl;
-
DECLARE_PERSISTENT(BaseKeyboardState, BaseScriptable)
BaseKeyboardState(BaseGame *inGame);
virtual ~BaseKeyboardState();
@@ -57,6 +49,7 @@ public:
static bool isShiftDown();
static bool isControlDown();
static bool isAltDown();
+ bool isCurrentPrintable() const;
// scripting interface
virtual ScValue *scGetProperty(const Common::String &name);
@@ -65,6 +58,14 @@ public:
virtual const char *scToString();
private:
+ bool _currentPrintable;
+ uint32 _currentKeyData;
+ uint32 _currentCharCode;
+
+ bool _currentShift;
+ bool _currentAlt;
+ bool _currentControl;
+
uint8 *_keyStates;
uint32 keyCodeToVKey(Common::Event *event);
Common::KeyCode vKeyToKeyCode(uint32 vkey); //TODO, reimplement using ScummVM-backend
diff --git a/engines/wintermute/base/base_object.h b/engines/wintermute/base/base_object.h
index d7d91a25f6..96fed2b847 100644
--- a/engines/wintermute/base/base_object.h
+++ b/engines/wintermute/base/base_object.h
@@ -110,8 +110,8 @@ public:
bool _movable;
bool _zoomable;
bool _shadowable;
- int _posY;
- int _posX;
+ int32 _posY;
+ int32 _posX;
bool _registrable;
char *_caption[7];
bool _saveState;
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index 4cb67b87e1..bd53ed38e4 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -36,8 +36,10 @@
#include "engines/wintermute/math/vector2.h"
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/base/sound/base_sound.h"
+#include "engines/wintermute/graphics/transparent_surface.h"
#include "engines/wintermute/wintermute.h"
#include "graphics/decoders/bmp.h"
+#include "graphics/scaler.h"
#include "common/memstream.h"
#include "common/str.h"
#include "common/system.h"
@@ -148,9 +150,13 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
Common::MemoryReadStream thumbStream(_thumbnailData, _thumbnailDataSize);
Graphics::BitmapDecoder bmpDecoder;
if (bmpDecoder.loadStream(thumbStream)) {
- Graphics::Surface *surf = new Graphics::Surface;
+ Graphics::Surface *surf = NULL;
surf = bmpDecoder.getSurface()->convertTo(g_system->getOverlayFormat());
- desc.setThumbnail(surf);
+ TransparentSurface *scaleableSurface = new TransparentSurface(*surf, false);
+ Graphics::Surface *scaled = scaleableSurface->scale(kThumbnailWidth, kThumbnailHeight2);
+ desc.setThumbnail(scaled);
+ delete scaleableSurface;
+ delete surf;
}
}
diff --git a/engines/wintermute/base/base_script_holder.cpp b/engines/wintermute/base/base_script_holder.cpp
index c5d5e82f76..abe5501b8d 100644
--- a/engines/wintermute/base/base_script_holder.cpp
+++ b/engines/wintermute/base/base_script_holder.cpp
@@ -342,7 +342,7 @@ bool BaseScriptHolder::removeScript(ScScript *script) {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseScriptHolder::canHandleEvent(const char *EventName) {
+bool BaseScriptHolder::canHandleEvent(const char *EventName) const {
for (uint32 i = 0; i < _scripts.size(); i++) {
if (!_scripts[i]->_thread && _scripts[i]->canHandleEvent(EventName)) {
return true;
@@ -353,7 +353,7 @@ bool BaseScriptHolder::canHandleEvent(const char *EventName) {
//////////////////////////////////////////////////////////////////////////
-bool BaseScriptHolder::canHandleMethod(const char *MethodName) {
+bool BaseScriptHolder::canHandleMethod(const char *MethodName) const {
for (uint32 i = 0; i < _scripts.size(); i++) {
if (!_scripts[i]->_thread && _scripts[i]->canHandleMethod(MethodName)) {
return true;
diff --git a/engines/wintermute/base/base_script_holder.h b/engines/wintermute/base/base_script_holder.h
index 5fd0dbec9c..320f0fb07a 100644
--- a/engines/wintermute/base/base_script_holder.h
+++ b/engines/wintermute/base/base_script_holder.h
@@ -43,8 +43,8 @@ public:
virtual ~BaseScriptHolder();
virtual ScScript *invokeMethodThread(const char *methodName);
virtual void makeFreezable(bool freezable);
- bool canHandleEvent(const char *eventName);
- virtual bool canHandleMethod(const char *eventMethod);
+ bool canHandleEvent(const char *eventName) const;
+ virtual bool canHandleMethod(const char *eventMethod) const;
bool cleanup();
bool removeScript(ScScript *script);
bool addScript(const char *filename);
diff --git a/engines/wintermute/base/base_scriptable.cpp b/engines/wintermute/base/base_scriptable.cpp
index a2dd8b00e7..8c5ef7e45a 100644
--- a/engines/wintermute/base/base_scriptable.cpp
+++ b/engines/wintermute/base/base_scriptable.cpp
@@ -178,7 +178,7 @@ void BaseScriptable::scDebuggerDesc(char *buf, int bufSize) {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseScriptable::canHandleMethod(const char *eventMethod) {
+bool BaseScriptable::canHandleMethod(const char *eventMethod) const {
return false;
}
diff --git a/engines/wintermute/base/base_scriptable.h b/engines/wintermute/base/base_scriptable.h
index fbe14fc299..b0b4e77ed2 100644
--- a/engines/wintermute/base/base_scriptable.h
+++ b/engines/wintermute/base/base_scriptable.h
@@ -48,7 +48,7 @@ public:
virtual ~BaseScriptable();
// high level scripting interface
- virtual bool canHandleMethod(const char *eventMethod);
+ virtual bool canHandleMethod(const char *eventMethod) const;
virtual bool scSetProperty(const char *name, ScValue *value);
virtual ScValue *scGetProperty(const Common::String &name);
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
diff --git a/engines/wintermute/base/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp
index 4e795ca813..2205e3e096 100644
--- a/engines/wintermute/base/base_surface_storage.cpp
+++ b/engines/wintermute/base/base_surface_storage.cpp
@@ -176,32 +176,29 @@ bool BaseSurfaceStorage::sortSurfaces() {
//////////////////////////////////////////////////////////////////////////
-int BaseSurfaceStorage::surfaceSortCB(const void *arg1, const void *arg2) {
- const BaseSurface *s1 = *((const BaseSurface *const *)arg1);
- const BaseSurface *s2 = *((const BaseSurface *const *)arg2);
-
+bool BaseSurfaceStorage::surfaceSortCB(const BaseSurface *s1, const BaseSurface *s2) {
// sort by life time
if (s1->_lifeTime <= 0 && s2->_lifeTime > 0) {
- return 1;
+ return false;
} else if (s1->_lifeTime > 0 && s2->_lifeTime <= 0) {
- return -1;
+ return true;
}
// sort by validity
if (s1->_valid && !s2->_valid) {
- return -1;
+ return true;
} else if (!s1->_valid && s2->_valid) {
- return 1;
+ return false;
}
// sort by time
else if (s1->_lastUsedTime > s2->_lastUsedTime) {
- return 1;
+ return false;
} else if (s1->_lastUsedTime < s2->_lastUsedTime) {
- return -1;
+ return true;
} else {
- return 0;
+ return false;
}
}
diff --git a/engines/wintermute/base/base_surface_storage.h b/engines/wintermute/base/base_surface_storage.h
index aef8ad23f9..61738e69a2 100644
--- a/engines/wintermute/base/base_surface_storage.h
+++ b/engines/wintermute/base/base_surface_storage.h
@@ -39,7 +39,7 @@ public:
uint32 _lastCleanupTime;
bool initLoop();
bool sortSurfaces();
- static int surfaceSortCB(const void *arg1, const void *arg2);
+ static bool surfaceSortCB(const BaseSurface *arg1, const BaseSurface *arg2);
bool cleanup(bool warn = false);
//DECLARE_PERSISTENT(BaseSurfaceStorage, BaseClass);
diff --git a/engines/wintermute/base/base_transition_manager.cpp b/engines/wintermute/base/base_transition_manager.cpp
index 7785f3d5af..6ae51d8e83 100644
--- a/engines/wintermute/base/base_transition_manager.cpp
+++ b/engines/wintermute/base/base_transition_manager.cpp
@@ -51,7 +51,7 @@ BaseTransitionMgr::~BaseTransitionMgr() {
//////////////////////////////////////////////////////////////////////////
-bool BaseTransitionMgr::isReady() {
+bool BaseTransitionMgr::isReady() const {
return (_state == TRANS_MGR_READY);
}
diff --git a/engines/wintermute/base/base_transition_manager.h b/engines/wintermute/base/base_transition_manager.h
index d16a44c88e..edb3045a58 100644
--- a/engines/wintermute/base/base_transition_manager.h
+++ b/engines/wintermute/base/base_transition_manager.h
@@ -41,7 +41,7 @@ public:
bool _preserveInteractive;
bool update();
bool start(TTransitionType type, bool nonInteractive = false);
- bool isReady();
+ bool isReady() const;
TTransMgrState _state;
BaseTransitionMgr(BaseGame *inGame);
virtual ~BaseTransitionMgr();
diff --git a/engines/wintermute/base/base_viewport.cpp b/engines/wintermute/base/base_viewport.cpp
index 7ec995449f..b3c2cfa6c3 100644
--- a/engines/wintermute/base/base_viewport.cpp
+++ b/engines/wintermute/base/base_viewport.cpp
@@ -86,13 +86,13 @@ Rect32 *BaseViewport::getRect() {
//////////////////////////////////////////////////////////////////////////
-int BaseViewport::getWidth() {
+int BaseViewport::getWidth() const {
return _rect.right - _rect.left;
}
//////////////////////////////////////////////////////////////////////////
-int BaseViewport::getHeight() {
+int BaseViewport::getHeight() const {
return _rect.bottom - _rect.top;
}
diff --git a/engines/wintermute/base/base_viewport.h b/engines/wintermute/base/base_viewport.h
index 98ad1c1e14..0182565a67 100644
--- a/engines/wintermute/base/base_viewport.h
+++ b/engines/wintermute/base/base_viewport.h
@@ -36,8 +36,8 @@ namespace Wintermute {
class BaseObject;
class BaseViewport : public BaseClass {
public:
- int getHeight();
- int getWidth();
+ int getHeight() const;
+ int getWidth() const;
Rect32 *getRect();
bool setRect(int left, int top, int right, int bottom, bool noCheck = false);
DECLARE_PERSISTENT(BaseViewport, BaseClass)
diff --git a/engines/wintermute/base/file/base_file.h b/engines/wintermute/base/file/base_file.h
index 82f6ce3554..8eda6d51d9 100644
--- a/engines/wintermute/base/file/base_file.h
+++ b/engines/wintermute/base/file/base_file.h
@@ -45,10 +45,10 @@ protected:
uint32 _pos;
uint32 _size;
public:
- virtual uint32 getSize() {
+ virtual uint32 getSize() const {
return _size;
};
- virtual uint32 getPos() {
+ virtual uint32 getPos() const {
return _pos;
};
virtual bool seek(uint32 pos, int whence = SEEK_SET) = 0;
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index f236329fcd..47506089b4 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -173,25 +173,25 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
BaseRenderer *renderer = _gameRef->_renderer;
// find cached surface, if exists
- int minPriority = INT_MAX;
+ uint32 minUseTime = UINT_MAX;
int minIndex = -1;
BaseSurface *surface = NULL;
int textOffset = 0;
for (int i = 0; i < NUM_CACHED_TEXTS; i++) {
if (_cachedTexts[i] == NULL) {
- minPriority = 0;
+ minUseTime = 0;
minIndex = i;
} else {
if (_cachedTexts[i]->_text == textStr && _cachedTexts[i]->_align == align && _cachedTexts[i]->_width == width && _cachedTexts[i]->_maxHeight == maxHeight && _cachedTexts[i]->_maxLength == maxLength) {
surface = _cachedTexts[i]->_surface;
textOffset = _cachedTexts[i]->_textOffset;
- _cachedTexts[i]->_priority++;
_cachedTexts[i]->_marked = true;
+ _cachedTexts[i]->_lastUsed = g_system->getMillis();
break;
} else {
- if (_cachedTexts[i]->_priority < minPriority) {
- minPriority = _cachedTexts[i]->_priority;
+ if (_cachedTexts[i]->_lastUsed < minUseTime) {
+ minUseTime = _cachedTexts[i]->_lastUsed;
minIndex = i;
}
}
@@ -214,10 +214,10 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
_cachedTexts[minIndex]->_width = width;
_cachedTexts[minIndex]->_maxHeight = maxHeight;
_cachedTexts[minIndex]->_maxLength = maxLength;
- _cachedTexts[minIndex]->_priority = 1;
_cachedTexts[minIndex]->_text = textStr;
_cachedTexts[minIndex]->_textOffset = textOffset;
_cachedTexts[minIndex]->_marked = true;
+ _cachedTexts[minIndex]->_lastUsed = g_system->getMillis();
}
}
diff --git a/engines/wintermute/base/font/base_font_truetype.h b/engines/wintermute/base/font/base_font_truetype.h
index 02dca7439f..2b69d1655d 100644
--- a/engines/wintermute/base/font/base_font_truetype.h
+++ b/engines/wintermute/base/font/base_font_truetype.h
@@ -54,6 +54,7 @@ private:
int _priority;
int _textOffset;
bool _marked;
+ uint32 _lastUsed;
BaseCachedTTFontText() {
//_text = L"";
@@ -61,8 +62,8 @@ private:
_width = _maxHeight = _maxLength = -1;
_align = TAL_LEFT;
_surface = NULL;
- _priority = -1;
_textOffset = 0;
+ _lastUsed = 0;
_marked = false;
}
diff --git a/engines/wintermute/base/gfx/base_renderer.h b/engines/wintermute/base/gfx/base_renderer.h
index 0475824464..9027c66a14 100644
--- a/engines/wintermute/base/gfx/base_renderer.h
+++ b/engines/wintermute/base/gfx/base_renderer.h
@@ -179,7 +179,7 @@ public:
void setIndicator(int width, int height, int x, int y, uint32 color);
void persistSaveLoadImages(BasePersistenceManager *persistMgr);
void initSaveLoad(bool isSaving, bool quickSave = false);
- void endSaveLoad();
+ virtual void endSaveLoad();
void setLoadingScreen(const char *filename, int x, int y);
void setSaveImage(const char *filename, int x, int y);
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 7970a25300..5097d2078f 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -28,6 +28,7 @@
#include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/base/gfx/osystem/base_surface_osystem.h"
+#include "engines/wintermute/base/gfx/osystem/render_ticket.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/math/math_util.h"
@@ -40,56 +41,6 @@
namespace Wintermute {
-RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha) : _owner(owner),
- _srcRect(*srcRect), _dstRect(*dstRect), _drawNum(0), _isValid(true), _wantsDraw(true), _hasAlpha(!disableAlpha) {
- _colorMod = 0;
- _mirror = TransparentSurface::FLIP_NONE;
- if (mirrorX) {
- _mirror |= TransparentSurface::FLIP_V;
- }
- if (mirrorY) {
- _mirror |= TransparentSurface::FLIP_H;
- }
- if (surf) {
- _surface = new Graphics::Surface();
- _surface->create((uint16)srcRect->width(), (uint16)srcRect->height(), surf->format);
- assert(_surface->format.bytesPerPixel == 4);
- // Get a clipped copy of the surface
- for (int i = 0; i < _surface->h; i++) {
- memcpy(_surface->getBasePtr(0, i), surf->getBasePtr(srcRect->left, srcRect->top + i), srcRect->width() * _surface->format.bytesPerPixel);
- }
- // Then scale it if necessary
- if (dstRect->width() != srcRect->width() || dstRect->height() != srcRect->height()) {
- TransparentSurface src(*_surface, false);
- Graphics::Surface *temp = src.scale(dstRect->width(), dstRect->height());
- _surface->free();
- delete _surface;
- _surface = temp;
- }
- } else {
- _surface = NULL;
- }
-}
-
-RenderTicket::~RenderTicket() {
- if (_surface) {
- _surface->free();
- delete _surface;
- }
-}
-
-bool RenderTicket::operator==(RenderTicket &t) {
- if ((t._srcRect != _srcRect) ||
- (t._dstRect != _dstRect) ||
- (t._mirror != _mirror) ||
- (t._owner != _owner) ||
- (t._hasAlpha != _hasAlpha) ||
- (t._colorMod != _colorMod)) {
- return false;
- }
- return true;
-}
-
BaseRenderer *makeOSystemRenderer(BaseGame *inGame) {
return new BaseRenderOSystem(inGame);
}
@@ -100,12 +51,18 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) {
_blankSurface = new Graphics::Surface();
_drawNum = 1;
_needsFlip = true;
+ _spriteBatch = false;
+ _batchNum = 0;
_borderLeft = _borderRight = _borderTop = _borderBottom = 0;
_ratioX = _ratioY = 1.0f;
setAlphaMod(255);
setColorMod(255, 255, 255);
_dirtyRect = NULL;
+ _disableDirtyRects = false;
+ if (ConfMan.hasKey("dirty_rects")) {
+ _disableDirtyRects = !ConfMan.getBool("dirty_rects");
+ }
}
//////////////////////////////////////////////////////////////////////////
@@ -259,14 +216,6 @@ void BaseRenderOSystem::fade(uint16 alpha) {
//////////////////////////////////////////////////////////////////////////
void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect) {
- // This particular warning is rather messy, as this function is called a ton,
- // thus we avoid printing it more than once.
-
- // TODO: Add fading with dirty rects.
- if (!_disableDirtyRects) {
- warning("BaseRenderOSystem::FadeToColor - Breaks when using dirty rects");
- }
-
Common::Rect fillRect;
if (rect) {
@@ -314,15 +263,23 @@ void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::S
if (owner) { // Fade-tickets are owner-less
RenderTicket compare(owner, NULL, srcRect, dstRect, mirrorX, mirrorY, disableAlpha);
+ compare._batchNum = _batchNum;
+ if (_spriteBatch)
+ _batchNum++;
compare._colorMod = _colorMod;
RenderQueueIterator it;
- for (it = _renderQueue.begin(); it != _renderQueue.end(); ++it) {
- if ((*it)->_owner == owner && *(*it) == compare && (*it)->_isValid) {
- (*it)->_colorMod = _colorMod;
+ // Avoid calling end() and operator* every time, when potentially going through
+ // LOTS of tickets.
+ RenderQueueIterator endIterator = _renderQueue.end();
+ RenderTicket *compareTicket = NULL;
+ for (it = _renderQueue.begin(); it != endIterator; ++it) {
+ compareTicket = *it;
+ if (*(compareTicket) == compare && compareTicket->_isValid) {
+ compareTicket->_colorMod = _colorMod;
if (_disableDirtyRects) {
- drawFromSurface(*it, NULL);
+ drawFromSurface(compareTicket, NULL);
} else {
- drawFromTicket(*it);
+ drawFromTicket(compareTicket);
}
return;
}
@@ -421,9 +378,12 @@ void BaseRenderOSystem::addDirtyRect(const Common::Rect &rect) {
void BaseRenderOSystem::drawTickets() {
RenderQueueIterator it = _renderQueue.begin();
// Clean out the old tickets
- int decrement = 0;
+ // Note: We draw invalid tickets too, otherwise we wouldn't be honouring
+ // the draw request they obviously made BEFORE becoming invalid, either way
+ // we have a copy of their data, so their invalidness won't affect us.
+ uint32 decrement = 0;
while (it != _renderQueue.end()) {
- if ((*it)->_wantsDraw == false || (*it)->_isValid == false) {
+ if ((*it)->_wantsDraw == false) {
RenderTicket *ticket = *it;
addDirtyRect((*it)->_dstRect);
it = _renderQueue.erase(it);
@@ -435,6 +395,12 @@ void BaseRenderOSystem::drawTickets() {
}
}
if (!_dirtyRect || _dirtyRect->width() == 0 || _dirtyRect->height() == 0) {
+ it = _renderQueue.begin();
+ while (it != _renderQueue.end()) {
+ RenderTicket *ticket = *it;
+ ticket->_wantsDraw = false;
+ ++it;
+ }
return;
}
// The color-mods are stored in the RenderTickets on add, since we set that state again during
@@ -447,7 +413,7 @@ void BaseRenderOSystem::drawTickets() {
for (it = _renderQueue.begin(); it != _renderQueue.end(); ++it) {
RenderTicket *ticket = *it;
assert(ticket->_drawNum == _drawNum++);
- if (ticket->_isValid && ticket->_dstRect.intersects(*_dirtyRect)) {
+ if (ticket->_dstRect.intersects(*_dirtyRect)) {
// dstClip is the area we want redrawn.
Common::Rect dstClip(ticket->_dstRect);
// reduce it to the dirty rect
@@ -460,7 +426,7 @@ void BaseRenderOSystem::drawTickets() {
dstClip.translate(-offsetX, -offsetY);
_colorMod = ticket->_colorMod;
- drawFromSurface(ticket->getSurface(), &ticket->_srcRect, &pos, &dstClip, ticket->_mirror);
+ drawFromSurface(ticket, &ticket->_srcRect, &pos, &dstClip);
_needsFlip = true;
}
// Some tickets want redraw but don't actually clip the dirty area (typically the ones that shouldnt become clear-color)
@@ -470,6 +436,23 @@ void BaseRenderOSystem::drawTickets() {
// Revert the colorMod-state.
_colorMod = oldColorMod;
+
+ it = _renderQueue.begin();
+ // Clean out the old tickets
+ decrement = 0;
+ while (it != _renderQueue.end()) {
+ if ((*it)->_isValid == false) {
+ RenderTicket *ticket = *it;
+ addDirtyRect((*it)->_dstRect);
+ it = _renderQueue.erase(it);
+ delete ticket;
+ decrement++;
+ } else {
+ (*it)->_drawNum -= decrement;
+ ++it;
+ }
+ }
+
}
// Replacement for SDL2's SDL_RenderCopy
@@ -489,27 +472,16 @@ void BaseRenderOSystem::drawFromSurface(RenderTicket *ticket, Common::Rect *clip
delete clipRect;
}
}
-void BaseRenderOSystem::drawFromSurface(const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect, uint32 mirror) {
- TransparentSurface src(*surf, false);
- bool doDelete = false;
- if (!clipRect) {
- doDelete = true;
- clipRect = new Common::Rect();
- clipRect->setWidth(surf->w);
- clipRect->setHeight(surf->h);
- }
-
- src.blit(*_renderSurface, dstRect->left, dstRect->top, mirror, clipRect, _colorMod, clipRect->width(), clipRect->height());
- if (doDelete) {
- delete clipRect;
- }
+void BaseRenderOSystem::drawFromSurface(RenderTicket *ticket, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect) {
+ ticket->drawToSurface(_renderSurface, srcRect, dstRect, clipRect);
}
//////////////////////////////////////////////////////////////////////////
bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
-
- if (!_disableDirtyRects) {
+ static bool hasWarned = false; // TODO: Fix this, this only avoids spamming warnings for now.
+ if (!_disableDirtyRects && !hasWarned) {
warning("BaseRenderOSystem::DrawLine - doesn't work for dirty rects yet");
+ hasWarned = true;
}
byte r = RGBCOLGetR(color);
@@ -606,4 +578,29 @@ BaseSurface *BaseRenderOSystem::createSurface() {
return new BaseSurfaceOSystem(_gameRef);
}
+void BaseRenderOSystem::endSaveLoad() {
+ BaseRenderer::endSaveLoad();
+
+ // Clear the scale-buffered tickets as we just loaded.
+ RenderQueueIterator it = _renderQueue.begin();
+ while (it != _renderQueue.end()) {
+ RenderTicket *ticket = *it;
+ it = _renderQueue.erase(it);
+ delete ticket;
+ }
+ _drawNum = 1;
+}
+
+bool BaseRenderOSystem::startSpriteBatch() {
+ _spriteBatch = true;
+ _batchNum = 1;
+ return STATUS_OK;
+}
+
+bool BaseRenderOSystem::endSpriteBatch() {
+ _spriteBatch = false;
+ _batchNum = 0;
+ return STATUS_OK;
+}
+
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
index 1e72508cd0..e7f14470f4 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
@@ -36,27 +36,7 @@
namespace Wintermute {
class BaseSurfaceOSystem;
-class RenderTicket {
- Graphics::Surface *_surface;
-public:
- RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false, bool disableAlpha = false);
- RenderTicket() : _isValid(true), _wantsDraw(false), _drawNum(0) {}
- ~RenderTicket();
- const Graphics::Surface *getSurface() { return _surface; }
- Common::Rect _srcRect;
- Common::Rect _dstRect;
- uint32 _mirror;
- bool _hasAlpha;
-
- bool _isValid;
- bool _wantsDraw;
- uint32 _drawNum;
- uint32 _colorMod;
-
- BaseSurfaceOSystem *_owner;
- bool operator==(RenderTicket &a);
-};
-
+class RenderTicket;
class BaseRenderOSystem : public BaseRenderer {
public:
BaseRenderOSystem(BaseGame *inGame);
@@ -97,14 +77,18 @@ public:
float getScaleRatioY() const {
return _ratioY;
}
-
+ virtual bool startSpriteBatch();
+ virtual bool endSpriteBatch();
+ void endSaveLoad();
void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha = false);
BaseSurface *createSurface();
private:
void addDirtyRect(const Common::Rect &rect);
void drawTickets();
+ // Non-dirty-rects:
void drawFromSurface(RenderTicket *ticket, Common::Rect *clipRect);
- void drawFromSurface(const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect, uint32 mirror);
+ // Dirty-rects:
+ void drawFromSurface(RenderTicket *ticket, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect);
typedef Common::List<RenderTicket *>::iterator RenderQueueIterator;
Common::Rect *_dirtyRect;
Common::List<RenderTicket *> _renderQueue;
@@ -119,7 +103,9 @@ private:
int _borderRight;
int _borderBottom;
- static const bool _disableDirtyRects = true;
+ bool _disableDirtyRects;
+ bool _spriteBatch;
+ uint32 _batchNum;
float _ratioX;
float _ratioY;
uint32 _colorMod;
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
new file mode 100644
index 0000000000..8b513f8543
--- /dev/null
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -0,0 +1,103 @@
+/* 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.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#include "engines/wintermute/graphics/transparent_surface.h"
+#include "engines/wintermute/base/gfx/osystem/render_ticket.h"
+
+namespace Wintermute {
+
+RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha) : _owner(owner),
+_srcRect(*srcRect), _dstRect(*dstRect), _drawNum(0), _isValid(true), _wantsDraw(true), _hasAlpha(!disableAlpha) {
+ _colorMod = 0;
+ _batchNum = 0;
+ _mirror = TransparentSurface::FLIP_NONE;
+ if (mirrorX) {
+ _mirror |= TransparentSurface::FLIP_V;
+ }
+ if (mirrorY) {
+ _mirror |= TransparentSurface::FLIP_H;
+ }
+ if (surf) {
+ _surface = new Graphics::Surface();
+ _surface->create((uint16)srcRect->width(), (uint16)srcRect->height(), surf->format);
+ assert(_surface->format.bytesPerPixel == 4);
+ // Get a clipped copy of the surface
+ for (int i = 0; i < _surface->h; i++) {
+ memcpy(_surface->getBasePtr(0, i), surf->getBasePtr(srcRect->left, srcRect->top + i), srcRect->width() * _surface->format.bytesPerPixel);
+ }
+ // Then scale it if necessary
+ if (dstRect->width() != srcRect->width() || dstRect->height() != srcRect->height()) {
+ TransparentSurface src(*_surface, false);
+ Graphics::Surface *temp = src.scale(dstRect->width(), dstRect->height());
+ _surface->free();
+ delete _surface;
+ _surface = temp;
+ }
+ } else {
+ _surface = NULL;
+ }
+}
+
+RenderTicket::~RenderTicket() {
+ if (_surface) {
+ _surface->free();
+ delete _surface;
+ }
+}
+
+bool RenderTicket::operator==(RenderTicket &t) {
+ if ((t._owner != _owner) ||
+ (t._batchNum != t._batchNum) ||
+ (t._hasAlpha != _hasAlpha) ||
+ (t._mirror != _mirror) ||
+ (t._colorMod != _colorMod) ||
+ (t._dstRect != _dstRect) ||
+ (t._srcRect != _srcRect)) {
+ return false;
+ }
+ return true;
+}
+
+void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect) {
+ TransparentSurface src(*getSurface(), false);
+ bool doDelete = false;
+ if (!clipRect) {
+ doDelete = true;
+ clipRect = new Common::Rect();
+ clipRect->setWidth(getSurface()->w);
+ clipRect->setHeight(getSurface()->h);
+ }
+
+ src._enableAlphaBlit = _hasAlpha;
+ src.blit(*_targetSurface, dstRect->left, dstRect->top, _mirror, clipRect, _colorMod, clipRect->width(), clipRect->height());
+ if (doDelete) {
+ delete clipRect;
+ }
+}
+
+} // end of namespace Wintermute
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.h b/engines/wintermute/base/gfx/osystem/render_ticket.h
new file mode 100644
index 0000000000..242822c868
--- /dev/null
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.h
@@ -0,0 +1,63 @@
+/* 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.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_RENDER_TICKET_H
+#define WINTERMUTE_RENDER_TICKET_H
+
+#include "graphics/surface.h"
+#include "common/rect.h"
+
+namespace Wintermute {
+
+class BaseSurfaceOSystem;
+class RenderTicket {
+ Graphics::Surface *_surface;
+public:
+ RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false, bool disableAlpha = false);
+ RenderTicket() : _isValid(true), _wantsDraw(false), _drawNum(0) {}
+ ~RenderTicket();
+ const Graphics::Surface *getSurface() { return _surface; }
+ void drawToSurface(Graphics::Surface *_targetSurface, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect);
+ Common::Rect _srcRect;
+ Common::Rect _dstRect;
+ uint32 _mirror;
+ uint32 _batchNum;
+ bool _hasAlpha;
+
+ bool _isValid;
+ bool _wantsDraw;
+ uint32 _drawNum;
+ uint32 _colorMod;
+
+ BaseSurfaceOSystem *_owner;
+ bool operator==(RenderTicket &a);
+};
+
+} // end of namespace Wintermute
+
+#endif
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp
index bab4d4609e..e1bc659fdd 100644
--- a/engines/wintermute/base/particles/part_emitter.cpp
+++ b/engines/wintermute/base/particles/part_emitter.cpp
@@ -373,16 +373,13 @@ bool PartEmitter::sortParticlesByZ() {
}
//////////////////////////////////////////////////////////////////////////
-int PartEmitter::compareZ(const void *obj1, const void *obj2) {
- const PartParticle *p1 = *(const PartParticle *const *)obj1;
- const PartParticle *p2 = *(const PartParticle *const *)obj2;
-
+bool PartEmitter::compareZ(const PartParticle *p1, const PartParticle *p2) {
if (p1->_posZ < p2->_posZ) {
- return -1;
+ return true;
} else if (p1->_posZ > p2->_posZ) {
- return 1;
+ return false;
} else {
- return 0;
+ return false;
}
}
diff --git a/engines/wintermute/base/particles/part_emitter.h b/engines/wintermute/base/particles/part_emitter.h
index f2c8f139f1..3aa55e1ac8 100644
--- a/engines/wintermute/base/particles/part_emitter.h
+++ b/engines/wintermute/base/particles/part_emitter.h
@@ -127,7 +127,7 @@ private:
BaseScriptHolder *_owner;
PartForce *addForceByName(const Common::String &name);
- int static compareZ(const void *obj1, const void *obj2);
+ bool static compareZ(const PartParticle *p1, const PartParticle *p2);
bool initParticle(PartParticle *particle, uint32 currentTime, uint32 timerDelta);
bool updateInternal(uint32 currentTime, uint32 timerDelta);
uint32 _lastGenTime;
diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp
index 9469bd46a7..54d0a9cdc7 100644
--- a/engines/wintermute/base/scriptables/script.cpp
+++ b/engines/wintermute/base/scriptables/script.cpp
@@ -1108,7 +1108,7 @@ uint32 ScScript::getFuncPos(const Common::String &name) {
//////////////////////////////////////////////////////////////////////////
-uint32 ScScript::getMethodPos(const Common::String &name) {
+uint32 ScScript::getMethodPos(const Common::String &name) const {
for (uint32 i = 0; i < _numMethods; i++) {
if (name == _methods[i].name) {
return _methods[i].pos;
@@ -1332,7 +1332,7 @@ ScScript *ScScript::invokeEventHandler(const Common::String &eventName, bool unb
//////////////////////////////////////////////////////////////////////////
-uint32 ScScript::getEventPos(const Common::String &name) {
+uint32 ScScript::getEventPos(const Common::String &name) const {
for (int i = _numEvents - 1; i >= 0; i--) {
if (scumm_stricmp(name.c_str(), _events[i].name) == 0) {
return _events[i].pos;
@@ -1343,13 +1343,13 @@ uint32 ScScript::getEventPos(const Common::String &name) {
//////////////////////////////////////////////////////////////////////////
-bool ScScript::canHandleEvent(const Common::String &eventName) {
+bool ScScript::canHandleEvent(const Common::String &eventName) const {
return getEventPos(eventName) != 0;
}
//////////////////////////////////////////////////////////////////////////
-bool ScScript::canHandleMethod(const Common::String &methodName) {
+bool ScScript::canHandleMethod(const Common::String &methodName) const {
return getMethodPos(methodName) != 0;
}
diff --git a/engines/wintermute/base/scriptables/script.h b/engines/wintermute/base/scriptables/script.h
index 0616bce58a..428eb9a17e 100644
--- a/engines/wintermute/base/scriptables/script.h
+++ b/engines/wintermute/base/scriptables/script.h
@@ -57,8 +57,8 @@ public:
bool _freezable;
bool resume();
bool pause();
- bool canHandleEvent(const Common::String &eventName);
- bool canHandleMethod(const Common::String &methodName);
+ bool canHandleEvent(const Common::String &eventName) const;
+ bool canHandleMethod(const Common::String &methodName) const;
bool createThread(ScScript *original, uint32 initIP, const Common::String &eventName);
bool createMethodThread(ScScript *original, const Common::String &methodName);
ScScript *invokeEventHandler(const Common::String &eventName, bool unbreakable = false);
@@ -78,8 +78,8 @@ public:
TScriptState _origState;
ScValue *getVar(char *name);
uint32 getFuncPos(const Common::String &name);
- uint32 getEventPos(const Common::String &name);
- uint32 getMethodPos(const Common::String &name);
+ uint32 getEventPos(const Common::String &name) const;
+ uint32 getMethodPos(const Common::String &name) const;
typedef struct {
uint32 magic;
uint32 version;
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp
index 3d1863946e..e8be0f0bd5 100644
--- a/engines/wintermute/base/scriptables/script_engine.cpp
+++ b/engines/wintermute/base/scriptables/script_engine.cpp
@@ -30,7 +30,6 @@
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/base/scriptables/script.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
-#include "engines/wintermute/base/scriptables/script_ext_math.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_file_manager.h"
diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h
index 4f8a962591..0c843108ac 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -84,6 +84,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Chivalry is Not Dead (Version from deirdrakai.com)
+ {
+ "chivalry",
+ "",
+ AD_ENTRY1s("data.dcp", "ae6d91b9517f4d2851a8ad94c96951c8", 7278302),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Dead City (English)
{
"deadcity",
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk
index 7b5b1b1a3a..2bd71f1b6b 100644
--- a/engines/wintermute/module.mk
+++ b/engines/wintermute/module.mk
@@ -53,6 +53,7 @@ MODULE_OBJS := \
base/gfx/base_surface.o \
base/gfx/osystem/base_surface_osystem.o \
base/gfx/osystem/base_render_osystem.o \
+ base/gfx/osystem/render_ticket.o \
base/particles/part_particle.o \
base/particles/part_emitter.o \
base/particles/part_force.o \
@@ -67,6 +68,7 @@ MODULE_OBJS := \
base/base_file_manager.o \
base/base_frame.o \
base/base_game.o \
+ base/base_game_music.o \
base/base_keyboard_state.o \
base/base_named_object.o \
base/base_object.o \
diff --git a/engines/wintermute/ui/ui_tiled_image.h b/engines/wintermute/ui/ui_tiled_image.h
index c413e7f129..edea84f346 100644
--- a/engines/wintermute/ui/ui_tiled_image.h
+++ b/engines/wintermute/ui/ui_tiled_image.h
@@ -46,6 +46,7 @@ public:
bool display(int x, int y, int width, int height);
UITiledImage(BaseGame *inGame = NULL);
virtual ~UITiledImage();
+private:
BaseSubFrame *_image;
Rect32 _upLeft;
Rect32 _upMiddle;
diff --git a/gui/browser.h b/gui/browser.h
index e5cc12ad8e..5cf091fbf4 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -48,6 +48,7 @@ public:
protected:
#ifdef MACOSX
const void *_titleRef;
+ const void *_chooseRef;
#else
ListWidget *_fileList;
StaticTextWidget *_currentPath;
diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm
index b8aa7c50ee..ecd60915f8 100644
--- a/gui/browser_osx.mm
+++ b/gui/browser_osx.mm
@@ -28,20 +28,39 @@
#include "common/config-manager.h"
#include "common/system.h"
#include "common/algorithm.h"
+#include "common/translation.h"
#include <AppKit/NSOpenPanel.h>
#include <Foundation/NSString.h>
+#include <Foundation/NSURL.h>
namespace GUI {
BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
: Dialog("Browser") {
- _titleRef = CFStringCreateWithCString(0, title, CFStringGetSystemEncoding());
+
+ // remember whether this is a file browser or a directory browser.
_isDirBrowser = dirBrowser;
+
+ // Get current encoding
+#ifdef USE_TRANSLATION
+ CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII);
+ CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
+ CFRelease(encStr);
+#else
+ CFStringEncoding stringEncoding = kCFStringEncodingASCII;
+#endif
+
+ // Convert title to NSString
+ _titleRef = CFStringCreateWithCString(0, title, stringEncoding);
+
+ // Convert button text to NSString
+ _chooseRef = CFStringCreateWithCString(0, _("Choose"), stringEncoding);
}
BrowserDialog::~BrowserDialog() {
CFRelease(_titleRef);
+ CFRelease(_chooseRef);
}
int BrowserDialog::runModal() {
@@ -58,16 +77,20 @@ int BrowserDialog::runModal() {
// Temporarily show the real mouse
CGDisplayShowCursor(kCGDirectMainDisplay);
-
- NSOpenPanel * panel = [NSOpenPanel openPanel];
- [panel setCanChooseDirectories:YES];
- if ([panel runModalForTypes:nil] == NSOKButton) {
- const char *filename = [[panel filename] UTF8String];
- _choice = Common::FSNode(filename);
- choiceMade = true;
+ NSOpenPanel *panel = [NSOpenPanel openPanel];
+ [panel setCanChooseFiles:!_isDirBrowser];
+ [panel setCanChooseDirectories:_isDirBrowser];
+ [panel setTitle:(NSString *)_titleRef];
+ [panel setPrompt:(NSString *)_chooseRef];
+ if ([panel runModal] == NSOKButton) {
+ NSURL *url = [panel URL];
+ if ([url isFileURL]) {
+ const char *filename = [[url path] UTF8String];
+ _choice = Common::FSNode(filename);
+ choiceMade = true;
+ }
}
-
// If we were in fullscreen mode, switch back
if (wasFullscreen) {
g_system->beginGFXTransaction();
diff --git a/gui/credits.h b/gui/credits.h
index 37c5a7bd95..f63f54a6fb 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -475,6 +475,9 @@ static const char *credits[] = {
"C1""Basque",
"C0""Mikel Iturbe Urretxa",
"",
+"C1""Belarusian",
+"C0""Ivan Lukyanov",
+"",
"C1""Catalan",
"C0""Jordi Vilalta Prat",
"",
@@ -484,6 +487,9 @@ static const char *credits[] = {
"C1""Danish",
"C0""Steffen Nyeland",
"",
+"C1""Finnish",
+"C0""Toni Saarela",
+"",
"C1""French",
"C0""Thierry Crozat",
"",
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index 7b51dec980..704e9caca0 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 13784ddf7f..95d39c4f24 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -284,7 +284,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) {
bool dirty = false;
int oldSelectedItem = _selectedItem;
- if (!_editMode && state.keycode <= Common::KEYCODE_z && isprint((unsigned char)state.ascii)) {
+ if (!_editMode && state.keycode <= Common::KEYCODE_z && Common::isPrint(state.ascii)) {
// Quick selection mode: Go to first list item starting with this key
// (or a substring accumulated from the last couple key presses).
// Only works in a useful fashion if the list entries are sorted.
diff --git a/po/be_BY.po b/po/be_BY.po
new file mode 100644
index 0000000000..9539588ba6
--- /dev/null
+++ b/po/be_BY.po
@@ -0,0 +1,3140 @@
+# Belarusian translation for ScummVM.
+# Copyright (C) 2010-2012 ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# Ivan Lukyanov <greencis@mail.ru>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.6.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
+"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"PO-Revision-Date: 2012-12-12 22:02+0300\n"
+"Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n"
+"Language-Team: Ivan Lukyanov <greencis@mail.ru>\n"
+"Language: Belarusian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-5\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n"
+"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: gui/about.cpp:91
+#, c-format
+msgid "(built on %s)"
+msgstr "(сабраны %s)"
+
+#: gui/about.cpp:98
+msgid "Features compiled in:"
+msgstr "Уключаныя ў білд опцыі:"
+
+#: gui/about.cpp:107
+msgid "Available engines:"
+msgstr "Даступныя рухавічкі:"
+
+#: gui/browser.cpp:66
+msgid "Go up"
+msgstr "Уверх"
+
+#: gui/browser.cpp:66 gui/browser.cpp:68
+msgid "Go to previous directory level"
+msgstr "Перайсці на дырэкторыю ўзроўнем вышэй"
+
+#: gui/browser.cpp:68
+msgctxt "lowres"
+msgid "Go up"
+msgstr "Уверх"
+
+#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/themebrowser.cpp:54 engines/engine.cpp:442
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:213
+msgid "Cancel"
+msgstr "Адмена"
+
+#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+msgid "Choose"
+msgstr "Абраць"
+
+#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125
+#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165
+#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209
+#: backends/keymapper/remap-dialog.cpp:52
+msgid "Close"
+msgstr "Закрыць"
+
+#: gui/gui-manager.cpp:118
+msgid "Mouse click"
+msgstr "Клік мышшу"
+
+#: gui/gui-manager.cpp:122 base/main.cpp:300
+msgid "Display keyboard"
+msgstr "Паказаць клавіятуру"
+
+#: gui/gui-manager.cpp:126 base/main.cpp:304
+msgid "Remap keys"
+msgstr "Перапрызначыць клавішы"
+
+#: gui/gui-manager.cpp:129 base/main.cpp:307
+msgid "Toggle FullScreen"
+msgstr "Пераключэнне на ўвесь экран"
+
+#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
+msgid "Choose an action to map"
+msgstr "Абярыце дзеянне для прызначэння"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "Прызначыць"
+
+#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
+#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
+#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
+#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
+#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: backends/platform/wince/CELauncherDialog.cpp:54
+msgid "OK"
+msgstr "OK"
+
+#: gui/KeysDialog.cpp:49
+msgid "Select an action and click 'Map'"
+msgstr "Абярыце дзеянне і клікніце 'Прызначыць'"
+
+#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
+#, c-format
+msgid "Associated key : %s"
+msgstr "Прызначаная клавіша : %s"
+
+#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
+#, c-format
+msgid "Associated key : none"
+msgstr "Прызначаная клавіша : няма"
+
+#: gui/KeysDialog.cpp:90
+msgid "Please select an action"
+msgstr "Калі ласка, абярыце дзеянне"
+
+#: gui/KeysDialog.cpp:106
+msgid "Press the key to associate"
+msgstr "Націсніце клавішу для прызначэння"
+
+#: gui/launcher.cpp:187
+msgid "Game"
+msgstr "Гульня"
+
+#: gui/launcher.cpp:191
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194
+msgid ""
+"Short game identifier used for referring to savegames and running the game "
+"from the command line"
+msgstr ""
+"Кароткі ідэнтыфікатар, выкарыстоўваны для імёнаў захаванняў гульняў і для "
+"запуску з каманднага радка"
+
+#: gui/launcher.cpp:193
+msgctxt "lowres"
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:198
+msgid "Name:"
+msgstr "Назва:"
+
+#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201
+msgid "Full title of the game"
+msgstr "Поўная назва гульні"
+
+#: gui/launcher.cpp:200
+msgctxt "lowres"
+msgid "Name:"
+msgstr "Назв:"
+
+#: gui/launcher.cpp:204
+msgid "Language:"
+msgstr "Мова:"
+
+#: gui/launcher.cpp:204 gui/launcher.cpp:205
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"Мова гульні. Змена гэтай налады не ператворыць ангельскую гульню ў рускую"
+
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
+#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: audio/null.cpp:40
+msgid "<default>"
+msgstr "<па змаўчанні>"
+
+#: gui/launcher.cpp:216
+msgid "Platform:"
+msgstr "Платформа:"
+
+#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219
+msgid "Platform the game was originally designed for"
+msgstr "Платформа, для якой гульня была першапачаткова распрацавана"
+
+#: gui/launcher.cpp:218
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "Платформа:"
+
+#: gui/launcher.cpp:231
+msgid "Engine"
+msgstr "Рухавічок"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+msgid "Graphics"
+msgstr "Графіка"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+msgid "GFX"
+msgstr "Грф"
+
+#: gui/launcher.cpp:242
+msgid "Override global graphic settings"
+msgstr "Перакрыць глабальныя налады графікі"
+
+#: gui/launcher.cpp:244
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "Перакрыць глабальныя налады графікі"
+
+#: gui/launcher.cpp:251 gui/options.cpp:1085
+msgid "Audio"
+msgstr "Аўдыё"
+
+#: gui/launcher.cpp:254
+msgid "Override global audio settings"
+msgstr "Перакрыць глабальныя налады аўдыё"
+
+#: gui/launcher.cpp:256
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "Перакрыць глабальныя налады аўдыё"
+
+#: gui/launcher.cpp:265 gui/options.cpp:1090
+msgid "Volume"
+msgstr "Гучнасць"
+
+#: gui/launcher.cpp:267 gui/options.cpp:1092
+msgctxt "lowres"
+msgid "Volume"
+msgstr "Гучн"
+
+#: gui/launcher.cpp:270
+msgid "Override global volume settings"
+msgstr "Перакрыць глабальныя налады гучнасці"
+
+#: gui/launcher.cpp:272
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "Перакрыць глабальныя налады гучнасці"
+
+#: gui/launcher.cpp:280 gui/options.cpp:1100
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/launcher.cpp:283
+msgid "Override global MIDI settings"
+msgstr "Перакрыць глабальныя налады MIDI"
+
+#: gui/launcher.cpp:285
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "Перакрыць глабальныя налады MIDI"
+
+#: gui/launcher.cpp:294 gui/options.cpp:1106
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/launcher.cpp:297
+msgid "Override global MT-32 settings"
+msgstr "Перакрыць глабальныя налады MT-32"
+
+#: gui/launcher.cpp:299
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "Перакрыць глабальныя налады MT-32"
+
+#: gui/launcher.cpp:308 gui/options.cpp:1113
+msgid "Paths"
+msgstr "Шляхі"
+
+#: gui/launcher.cpp:310 gui/options.cpp:1115
+msgctxt "lowres"
+msgid "Paths"
+msgstr "Шляхі"
+
+#: gui/launcher.cpp:317
+msgid "Game Path:"
+msgstr "Шлях да гульні:"
+
+#: gui/launcher.cpp:319
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "Дзе гульня:"
+
+#: gui/launcher.cpp:324 gui/options.cpp:1139
+msgid "Extra Path:"
+msgstr "Дад. шлях:"
+
+#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327
+msgid "Specifies path to additional data used the game"
+msgstr "Паказвае шлях да дадатковых файлаў, дадзеных для гульні"
+
+#: gui/launcher.cpp:326 gui/options.cpp:1141
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "Дад. шлях:"
+
+#: gui/launcher.cpp:333 gui/options.cpp:1123
+msgid "Save Path:"
+msgstr "Захаванні гульняў:"
+
+#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
+#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+msgid "Specifies where your savegames are put"
+msgstr "Паказвае шлях да захаванняў гульні"
+
+#: gui/launcher.cpp:335 gui/options.cpp:1125
+msgctxt "lowres"
+msgid "Save Path:"
+msgstr "Шлях зах:"
+
+#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
+#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
+#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
+#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
+#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
+#: gui/options.cpp:1423
+msgctxt "path"
+msgid "None"
+msgstr "Не зададзены"
+
+#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
+#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: backends/platform/wii/options.cpp:56
+msgid "Default"
+msgstr "Па змаўчанні"
+
+#: gui/launcher.cpp:504 gui/options.cpp:1417
+msgid "Select SoundFont"
+msgstr "Абярыце SoundFont"
+
+#: gui/launcher.cpp:523 gui/launcher.cpp:677
+msgid "Select directory with game data"
+msgstr "Абярыце дырэкторыю з файламі гульні"
+
+#: gui/launcher.cpp:541
+msgid "Select additional game directory"
+msgstr "Абярыце дадатковую дырэкторыю гульні"
+
+#: gui/launcher.cpp:553
+msgid "Select directory for saved games"
+msgstr "Абярыце дырэкторыю для захаванняў"
+
+#: gui/launcher.cpp:580
+msgid "This game ID is already taken. Please choose another one."
+msgstr "Гэты ID гульні ўжо выкарыстоўваецца. Калі ласка, абярыце іншы."
+
+#: gui/launcher.cpp:621 engines/dialogs.cpp:110
+msgid "~Q~uit"
+msgstr "~В~ыхад"
+
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+msgid "Quit ScummVM"
+msgstr "Завяршыць ScummVM"
+
+#: gui/launcher.cpp:622
+msgid "A~b~out..."
+msgstr "Пра п~р~аграму..."
+
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+msgid "About ScummVM"
+msgstr "Пра праграму ScummVM"
+
+#: gui/launcher.cpp:623
+msgid "~O~ptions..."
+msgstr "~Н~алады..."
+
+#: gui/launcher.cpp:623
+msgid "Change global ScummVM options"
+msgstr "Змяніць глабальныя налады ScummVM"
+
+#: gui/launcher.cpp:625
+msgid "~S~tart"
+msgstr "П~у~ск"
+
+#: gui/launcher.cpp:625
+msgid "Start selected game"
+msgstr "Запусціць абраную гульню"
+
+#: gui/launcher.cpp:628
+msgid "~L~oad..."
+msgstr "~З~агрузіць..."
+
+#: gui/launcher.cpp:628
+msgid "Load savegame for selected game"
+msgstr "Загрузіць захаванне для абранай гульні"
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:1120
+msgid "~A~dd Game..."
+msgstr "~Д~адаць гульню..."
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:640
+msgid "Hold Shift for Mass Add"
+msgstr "Утрымлівайце клавішу Shift для таго, каб дадаць некалькі гульняў"
+
+#: gui/launcher.cpp:635
+msgid "~E~dit Game..."
+msgstr "Н~а~лады гульні..."
+
+#: gui/launcher.cpp:635 gui/launcher.cpp:642
+msgid "Change game options"
+msgstr "Змяніць налады гульні"
+
+#: gui/launcher.cpp:637
+msgid "~R~emove Game"
+msgstr "В~ы~даліць гульню"
+
+#: gui/launcher.cpp:637 gui/launcher.cpp:644
+msgid "Remove game from the list. The game data files stay intact"
+msgstr "Выдаліць гульню са спісу. Не выдаляе гульню з жорсткага дыска"
+
+#: gui/launcher.cpp:640 gui/launcher.cpp:1120
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "~Д~ад. гульню..."
+
+#: gui/launcher.cpp:642
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "Н~а~л. гульні..."
+
+#: gui/launcher.cpp:644
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "В~ы~даліць гульню"
+
+#: gui/launcher.cpp:652
+msgid "Search in game list"
+msgstr "Пошук у спісе гульняў"
+
+#: gui/launcher.cpp:656 gui/launcher.cpp:1167
+msgid "Search:"
+msgstr "Пошук:"
+
+#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
+#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+msgid "Load game:"
+msgstr "Загрузіць гульню:"
+
+#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
+#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
+#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Load"
+msgstr "Загрузіць"
+
+#: gui/launcher.cpp:788
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"Вы сапраўды жадаеце запусціць дэтэктар усіх гульняў? Гэта патэнцыяльна можа "
+"дадаць вялікую колькасць гульняў."
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Yes"
+msgstr "Так"
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "No"
+msgstr "Не"
+
+#: gui/launcher.cpp:837
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "ScummVM не можа адкрыць азначаную дырэкторыю!"
+
+#: gui/launcher.cpp:849
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr "ScummVM не можа знайсці гульню ў азначанай дырэкторыі!"
+
+#: gui/launcher.cpp:863
+msgid "Pick the game:"
+msgstr "Абярыце гульню:"
+
+#: gui/launcher.cpp:937
+msgid "Do you really want to remove this game configuration?"
+msgstr "Вы сапраўды жадаеце выдаліць налады для гэтай гульні?"
+
+#: gui/launcher.cpp:1001
+msgid "This game does not support loading games from the launcher."
+msgstr "Гэтая гульня не падтрымлівае загрузку захаванняў праз галоўнае меню."
+
+#: gui/launcher.cpp:1005
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr "ScummVM не змог знайсці рухавічок для запуску абранай гульні!"
+
+#: gui/launcher.cpp:1119
+msgctxt "lowres"
+msgid "Mass Add..."
+msgstr "Шмат гульняў..."
+
+#: gui/launcher.cpp:1119
+msgid "Mass Add..."
+msgstr "Шмат гульняў..."
+
+#: gui/massadd.cpp:78 gui/massadd.cpp:81
+msgid "... progress ..."
+msgstr "... шукаю ..."
+
+#: gui/massadd.cpp:258
+msgid "Scan complete!"
+msgstr "Пошук скончаны!"
+
+#: gui/massadd.cpp:261
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr "Знойдзена %d новых гульняў, прапушчана %d раней дададзеных гульняў."
+
+#: gui/massadd.cpp:265
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "Прагледжана %d дырэкторый ..."
+
+#: gui/massadd.cpp:268
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr "Знойдзена %d новых гульняў, прапушчана %d раней дададзеных гульняў ..."
+
+#: gui/options.cpp:78
+msgid "Never"
+msgstr "Ніколі"
+
+#: gui/options.cpp:78
+msgid "every 5 mins"
+msgstr "кожныя 5 хвілін"
+
+#: gui/options.cpp:78
+msgid "every 10 mins"
+msgstr "кожныя 10 хвілін"
+
+#: gui/options.cpp:78
+msgid "every 15 mins"
+msgstr "кожныя 15 хвілін"
+
+#: gui/options.cpp:78
+msgid "every 30 mins"
+msgstr "кожныя 30 хвілін"
+
+#: gui/options.cpp:80
+msgid "8 kHz"
+msgstr "8 кГц"
+
+#: gui/options.cpp:80
+msgid "11kHz"
+msgstr "11 кГц"
+
+#: gui/options.cpp:80
+msgid "22 kHz"
+msgstr "22 кГц"
+
+#: gui/options.cpp:80
+msgid "44 kHz"
+msgstr "44 кГц"
+
+#: gui/options.cpp:80
+msgid "48 kHz"
+msgstr "48 кГц"
+
+#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
+#: gui/options.cpp:644 gui/options.cpp:852
+msgctxt "soundfont"
+msgid "None"
+msgstr "Не зададзены"
+
+#: gui/options.cpp:382
+msgid "Failed to apply some of the graphic options changes:"
+msgstr "Не атрымалася ўжыць змены некаторых графічных налад:"
+
+#: gui/options.cpp:394
+msgid "the video mode could not be changed."
+msgstr "відэарэжым не можа быць зменены."
+
+#: gui/options.cpp:400
+msgid "the fullscreen setting could not be changed"
+msgstr "поўнаэкранны рэжым не можа быць зменены"
+
+#: gui/options.cpp:406
+msgid "the aspect ratio setting could not be changed"
+msgstr "рэжым карэктыроўкі суадносін бакоў не можа быць зменены"
+
+#: gui/options.cpp:727
+msgid "Graphics mode:"
+msgstr "Граф. рэжым:"
+
+#: gui/options.cpp:741
+msgid "Render mode:"
+msgstr "Рэжым растру:"
+
+#: gui/options.cpp:741 gui/options.cpp:742
+msgid "Special dithering modes supported by some games"
+msgstr "Спецыяльныя рэжымы рэндэрынгу, падтрымоўваныя некаторымі гульнямі"
+
+#: gui/options.cpp:753
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+msgid "Fullscreen mode"
+msgstr "Поўнаэкранны рэжым"
+
+#: gui/options.cpp:756
+msgid "Aspect ratio correction"
+msgstr "Карэкцыя суадносін бакоў"
+
+#: gui/options.cpp:756
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "Карэктаваць суадносіны бакоў для гульняў з рэзалюцыяй 320x200"
+
+#: gui/options.cpp:764
+msgid "Preferred Device:"
+msgstr "Упадабанае:"
+
+#: gui/options.cpp:764
+msgid "Music Device:"
+msgstr "Гукавая прылада:"
+
+#: gui/options.cpp:764 gui/options.cpp:766
+msgid "Specifies preferred sound device or sound card emulator"
+msgstr "Зазначае ўпадабаную гукавую прыладу ці эмулятар гукавой карты"
+
+#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+msgid "Specifies output sound device or sound card emulator"
+msgstr "Зазначае выходную гукавую прыладу ці эмулятар гукавой карты"
+
+#: gui/options.cpp:766
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr "Упадабанае:"
+
+#: gui/options.cpp:766
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr "Гук. прылада:"
+
+#: gui/options.cpp:793
+msgid "AdLib emulator:"
+msgstr "Эмулятар AdLib:"
+
+#: gui/options.cpp:793 gui/options.cpp:794
+msgid "AdLib is used for music in many games"
+msgstr "Гукавая карта AdLib выкарыстоўваецца многімі гульнямі"
+
+#: gui/options.cpp:804
+msgid "Output rate:"
+msgstr "Чашчыня гуку:"
+
+#: gui/options.cpp:804 gui/options.cpp:805
+msgid ""
+"Higher value specifies better sound quality but may be not supported by your "
+"soundcard"
+msgstr ""
+"Большыя значэнні задаюць лепшую якасць гуку, аднак яны могуць не "
+"падтрымлівацца вашай гукавой картай"
+
+#: gui/options.cpp:815
+msgid "GM Device:"
+msgstr "Прылада GM:"
+
+#: gui/options.cpp:815
+msgid "Specifies default sound device for General MIDI output"
+msgstr "Зазначае выходную гукавую прыладу для MIDI"
+
+#: gui/options.cpp:826
+msgid "Don't use General MIDI music"
+msgstr "Не выкарыстоўваць музыку для General MIDI"
+
+#: gui/options.cpp:837 gui/options.cpp:899
+msgid "Use first available device"
+msgstr "Выкарыстоўваць першую даступную прыладу"
+
+#: gui/options.cpp:849
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgstr ""
+"SoundFont'ы падтрымліваюцца некаторымі гукавымі картамі, Fluidsynth ды "
+"Timidity"
+
+#: gui/options.cpp:851
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:857
+msgid "Mixed AdLib/MIDI mode"
+msgstr "Змешаны рэжым AdLib/MIDI"
+
+#: gui/options.cpp:857
+msgid "Use both MIDI and AdLib sound generation"
+msgstr "Выкарыстоўваць і MIDI, і AdLib для генерацыі гуку"
+
+#: gui/options.cpp:860
+msgid "MIDI gain:"
+msgstr "Узмацненне MIDI:"
+
+#: gui/options.cpp:870
+msgid "MT-32 Device:"
+msgstr "Нал. MT-32:"
+
+#: gui/options.cpp:870
+msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
+msgstr ""
+"Паказвае гукавую прыладу па змаўчанні для вываду на Roland MT-32/LAPC1/CM32l/"
+"CM64"
+
+#: gui/options.cpp:875
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr "Сапраўдны Roland MT-32 (забараніць эмуляцыю GM)"
+
+#: gui/options.cpp:875 gui/options.cpp:877
+msgid ""
+"Check if you want to use your real hardware Roland-compatible sound device "
+"connected to your computer"
+msgstr ""
+"Адзначце, калі ў вас падключана Roland-сумяшчальная гукавая прылада і вы "
+"жадаеце яе выкарыстоўваць"
+
+#: gui/options.cpp:877
+msgctxt "lowres"
+msgid "True Roland MT-32 (no GM emulation)"
+msgstr "Сапраўдны Roland MT-32 (забараніць GM)"
+
+#: gui/options.cpp:880
+msgid "Enable Roland GS Mode"
+msgstr "Уключыць рэжым Roland GS"
+
+#: gui/options.cpp:880
+msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
+msgstr ""
+"Выключае супастаўленне General MIDI для гульняў з гукавой дарожкай для "
+"Roland MT-32"
+
+#: gui/options.cpp:889
+msgid "Don't use Roland MT-32 music"
+msgstr "Не выкарыстоўваць музыку для MT-32"
+
+#: gui/options.cpp:916
+msgid "Text and Speech:"
+msgstr "Тэкст і агучка:"
+
+#: gui/options.cpp:920 gui/options.cpp:930
+msgid "Speech"
+msgstr "Агучка"
+
+#: gui/options.cpp:921 gui/options.cpp:931
+msgid "Subtitles"
+msgstr "Субтытры"
+
+#: gui/options.cpp:922
+msgid "Both"
+msgstr "Абое"
+
+#: gui/options.cpp:924
+msgid "Subtitle speed:"
+msgstr "Хуткасць тытраў:"
+
+#: gui/options.cpp:926
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr "Тэкст і агучка:"
+
+#: gui/options.cpp:930
+msgid "Spch"
+msgstr "Агуч"
+
+#: gui/options.cpp:931
+msgid "Subs"
+msgstr "Суб"
+
+#: gui/options.cpp:932
+msgctxt "lowres"
+msgid "Both"
+msgstr "Абое"
+
+#: gui/options.cpp:932
+msgid "Show subtitles and play speech"
+msgstr "Паказваць субтытры і прайграваць гаворку"
+
+#: gui/options.cpp:934
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr "Хуткасць тытраў:"
+
+#: gui/options.cpp:950
+msgid "Music volume:"
+msgstr "Гучн. музыкі:"
+
+#: gui/options.cpp:952
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr "Гучн. музыкі:"
+
+#: gui/options.cpp:959
+msgid "Mute All"
+msgstr "Выкл. усё"
+
+#: gui/options.cpp:962
+msgid "SFX volume:"
+msgstr "Гучнасць SFX:"
+
+#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+msgid "Special sound effects volume"
+msgstr "Гучнасць спецыяльных гукавых эфектаў"
+
+#: gui/options.cpp:964
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr "Гучн. SFX:"
+
+#: gui/options.cpp:972
+msgid "Speech volume:"
+msgstr "Гучн. агучкі:"
+
+#: gui/options.cpp:974
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr "Гучн. агучкі:"
+
+#: gui/options.cpp:1131
+msgid "Theme Path:"
+msgstr "Шлях да тэм:"
+
+#: gui/options.cpp:1133
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr "Дзе тэмы:"
+
+#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+msgid "Specifies path to additional data used by all games or ScummVM"
+msgstr ""
+"Паказвае шлях да дадатковых файлаў дадзеных, выкарыстоўваных усімі гульнямі, "
+"або ScummVM"
+
+#: gui/options.cpp:1148
+msgid "Plugins Path:"
+msgstr "Шлях да плагінаў:"
+
+#: gui/options.cpp:1150
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr "Шлях да плагінаў:"
+
+#: gui/options.cpp:1159
+msgid "Misc"
+msgstr "Рознае"
+
+#: gui/options.cpp:1161
+msgctxt "lowres"
+msgid "Misc"
+msgstr "Рознае"
+
+#: gui/options.cpp:1163
+msgid "Theme:"
+msgstr "Тэма"
+
+#: gui/options.cpp:1167
+msgid "GUI Renderer:"
+msgstr "Малявалка GUI:"
+
+#: gui/options.cpp:1179
+msgid "Autosave:"
+msgstr "Аўтазахаванне:"
+
+#: gui/options.cpp:1181
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr "Аўтазах.:"
+
+#: gui/options.cpp:1189
+msgid "Keys"
+msgstr "Клавішы"
+
+#: gui/options.cpp:1196
+msgid "GUI Language:"
+msgstr "Мова GUI:"
+
+#: gui/options.cpp:1196
+msgid "Language of ScummVM GUI"
+msgstr "Мова графічнага інтэрфейсу ScummVM"
+
+#: gui/options.cpp:1347
+msgid "You have to restart ScummVM before your changes will take effect."
+msgstr "Вы павінны перазапусціць ScummVM, каб ужыць змены."
+
+#: gui/options.cpp:1360
+msgid "Select directory for savegames"
+msgstr "Абярыце дырэкторыю для захаванняў"
+
+#: gui/options.cpp:1367
+msgid "The chosen directory cannot be written to. Please select another one."
+msgstr "Не магу пісаць у абраную дырэкторыю. Калі ласка, азначце іншую."
+
+#: gui/options.cpp:1376
+msgid "Select directory for GUI themes"
+msgstr "Абярыце дырэкторыю для тэм GUI"
+
+#: gui/options.cpp:1386
+msgid "Select directory for extra files"
+msgstr "Абярыце дырэкторыю з дадатковымі файламі"
+
+#: gui/options.cpp:1397
+msgid "Select directory for plugins"
+msgstr "Абярыце дырэкторыю з плагінамі"
+
+#: gui/options.cpp:1450
+msgid ""
+"The theme you selected does not support your current language. If you want "
+"to use this theme you need to switch to another language first."
+msgstr ""
+"Тэма, абраная вамі, не падтрымлівае бягучую мову. Калі вы жадаеце "
+"выкарыстоўваць гэтую тэму, вам неабходна спачатку пераключыцца на іншую мову."
+
+#: gui/saveload-dialog.cpp:158
+msgid "List view"
+msgstr "Выгляд спісу"
+
+#: gui/saveload-dialog.cpp:159
+msgid "Grid view"
+msgstr "Выгляд сеткі"
+
+#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+msgid "No date saved"
+msgstr "Дата не запісана"
+
+#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+msgid "No time saved"
+msgstr "Час не запісаны"
+
+#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+msgid "No playtime saved"
+msgstr "Час гульні не запісаны"
+
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+msgid "Delete"
+msgstr "Выдаліць"
+
+#: gui/saveload-dialog.cpp:266
+msgid "Do you really want to delete this savegame?"
+msgstr "Вы сапраўды жадаеце выдаліць гэта захаванне?"
+
+#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+msgid "Date: "
+msgstr "Дата: "
+
+#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+msgid "Time: "
+msgstr "Час: "
+
+#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+msgid "Playtime: "
+msgstr "Час гульні: "
+
+#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+msgid "Untitled savestate"
+msgstr "Захаванне без імя"
+
+#: gui/saveload-dialog.cpp:517
+msgid "Next"
+msgstr "Наступны"
+
+#: gui/saveload-dialog.cpp:520
+msgid "Prev"
+msgstr "Папярэдні"
+
+#: gui/saveload-dialog.cpp:684
+msgid "New Save"
+msgstr "Новае захаванне"
+
+#: gui/saveload-dialog.cpp:684
+msgid "Create a new save game"
+msgstr "Стварыць новы запіс гульні"
+
+#: gui/saveload-dialog.cpp:789
+msgid "Name: "
+msgstr "Назва: "
+
+#: gui/saveload-dialog.cpp:861
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr "Увядзіце апісанне слота %d:"
+
+#: gui/themebrowser.cpp:44
+msgid "Select a Theme"
+msgstr "Абярыце тэму"
+
+#: gui/ThemeEngine.cpp:337
+msgid "Disabled GFX"
+msgstr "Без графікі"
+
+#: gui/ThemeEngine.cpp:337
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr "Без графікі"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard Renderer (16bpp)"
+msgstr "Стандартны растарызатар (16bpp)"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard (16bpp)"
+msgstr "Стандартны растарызатар (16bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased Renderer (16bpp)"
+msgstr "Растарызатар са згладжваннем (16bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased (16bpp)"
+msgstr "Растарызатар са згладжваннем (16bpp)"
+
+#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332
+msgid "Clear value"
+msgstr "Ачысціць значэнне"
+
+#: base/main.cpp:209
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr "Рухавічок не падтрымлівае ўзровень адладкі '%s'"
+
+#: base/main.cpp:287
+msgid "Menu"
+msgstr "Меню"
+
+#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: backends/platform/wince/CEActionsPocket.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:46
+msgid "Skip"
+msgstr "Прапусціць"
+
+#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr "Паўза"
+
+#: base/main.cpp:296
+msgid "Skip line"
+msgstr "Прапусціць радок"
+
+#: base/main.cpp:467
+msgid "Error running game:"
+msgstr "Памылка запуску гульні:"
+
+#: base/main.cpp:491
+msgid "Could not find any engine capable of running the selected game"
+msgstr "Не магу знайсці рухавічок для запуску абранай гульні"
+
+#: common/error.cpp:38
+msgid "No error"
+msgstr "Няма памылкі"
+
+#: common/error.cpp:40
+msgid "Game data not found"
+msgstr "Няма файлаў гульні"
+
+#: common/error.cpp:42
+msgid "Game id not supported"
+msgstr "Game id не падтрымліваецца"
+
+#: common/error.cpp:44
+msgid "Unsupported color mode"
+msgstr "Непадтрымоўваны рэжым колеру"
+
+#: common/error.cpp:47
+msgid "Read permission denied"
+msgstr "Недастаткова правоў для чытання"
+
+#: common/error.cpp:49
+msgid "Write permission denied"
+msgstr "Недастаткова правоў для запісу"
+
+#: common/error.cpp:52
+msgid "Path does not exist"
+msgstr "Шлях не знойдзены"
+
+#: common/error.cpp:54
+msgid "Path not a directory"
+msgstr "Шлях не з'яўляецца дырэкторыяй"
+
+#: common/error.cpp:56
+msgid "Path not a file"
+msgstr "Шлях не з'яўляецца файлам"
+
+#: common/error.cpp:59
+msgid "Cannot create file"
+msgstr "Не магу стварыць файл"
+
+#: common/error.cpp:61
+msgid "Reading data failed"
+msgstr "Памылка чытання дадзеных"
+
+#: common/error.cpp:63
+msgid "Writing data failed"
+msgstr "Памылка запісу дадзеных"
+
+#: common/error.cpp:66
+msgid "Could not find suitable engine plugin"
+msgstr "Не магу знайсці падыходны плагін для рухавічка"
+
+#: common/error.cpp:68
+msgid "Engine plugin does not support save states"
+msgstr "Рухавічок не падтрымлівае захаванні"
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Перапынена карыстачом"
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr "Невядомая памылка"
+
+#: engines/advancedDetector.cpp:316
+#, c-format
+msgid "The game in '%s' seems to be unknown."
+msgstr "Здаецца, што гульня '%s' яшчэ невядома."
+
+#: engines/advancedDetector.cpp:317
+msgid "Please, report the following data to the ScummVM team along with name"
+msgstr ""
+"Калі ласка, перадайце наступныя дадзеныя камандзе ScummVM разам з назвай"
+
+#: engines/advancedDetector.cpp:319
+msgid "of the game you tried to add and its version/language/etc.:"
+msgstr "гульні, якую вы спрабуеце дадаць, і азначце яе версію, мову і г.д."
+
+#: engines/dialogs.cpp:84
+msgid "~R~esume"
+msgstr "Працяг~н~уць"
+
+#: engines/dialogs.cpp:86
+msgid "~L~oad"
+msgstr "~З~агрузіць"
+
+#: engines/dialogs.cpp:90
+msgid "~S~ave"
+msgstr "~З~апісаць"
+
+#: engines/dialogs.cpp:94
+msgid "~O~ptions"
+msgstr "~О~пцыі"
+
+#: engines/dialogs.cpp:99
+msgid "~H~elp"
+msgstr "~Д~апамога"
+
+#: engines/dialogs.cpp:101
+msgid "~A~bout"
+msgstr "Пра пра~г~раму"
+
+#: engines/dialogs.cpp:104 engines/dialogs.cpp:180
+msgid "~R~eturn to Launcher"
+msgstr "~В~ыйсці ў галоўнае меню"
+
+#: engines/dialogs.cpp:106 engines/dialogs.cpp:182
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr "~У~ галоўнае меню"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+msgid "Save game:"
+msgstr "Захаваць гульню:"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742
+#: backends/platform/symbian/src/SymbianActions.cpp:44
+#: backends/platform/wince/CEActionsPocket.cpp:43
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Save"
+msgstr "Захаваць"
+
+#: engines/dialogs.cpp:144
+msgid ""
+"Sorry, this engine does not currently provide in-game help. Please consult "
+"the README for basic information, and for instructions on how to obtain "
+"further assistance."
+msgstr ""
+"Прабачце, але гэты рухавічок пакуль не падае дапамогі ў гульні. Калі ласка, "
+"звярніцеся ў файл README за базавай інфармацыяй, а таксама інструкцыямі пра "
+"тое, як атрымаць далейшую дапамогу."
+
+#: engines/dialogs.cpp:228
+#, c-format
+msgid ""
+"Gamestate save failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Не атрымалася захаваць гульню (%s)! Калі ласка, звярніцеся ў файл README за "
+"базавай інфармацыяй, а таксама інструкцыямі пра тое, як атрымаць далейшую "
+"дапамогу."
+
+#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
+#: engines/mohawk/dialogs.cpp:174
+msgid "~O~K"
+msgstr "~О~К"
+
+#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
+#: engines/mohawk/dialogs.cpp:175
+msgid "~C~ancel"
+msgstr "~А~дмена"
+
+#: engines/dialogs.cpp:305
+msgid "~K~eys"
+msgstr "~К~лавішы"
+
+#: engines/engine.cpp:235
+msgid "Could not initialize color format."
+msgstr "Не магу ініцыялізаваць фармат колеру."
+
+#: engines/engine.cpp:243
+msgid "Could not switch to video mode: '"
+msgstr "Не атрымалася пераключыць відэарэжым: '"
+
+#: engines/engine.cpp:252
+msgid "Could not apply aspect ratio setting."
+msgstr "Не атрымалася выкарыстаць карэкцыю суадносін бакоў."
+
+#: engines/engine.cpp:257
+msgid "Could not apply fullscreen setting."
+msgstr "Не магу ўжыць поўнаэкранны рэжым."
+
+#: engines/engine.cpp:357
+msgid ""
+"You appear to be playing this game directly\n"
+"from the CD. This is known to cause problems,\n"
+"and it is therefore recommended that you copy\n"
+"the data files to your hard disk instead.\n"
+"See the README file for details."
+msgstr ""
+"Здаецца, вы спрабуеце запусціць гэту гульню прама\n"
+"з CD. Гэта звычайна выклікае праблемы, і таму\n"
+"мы рэкамендуем скапіяваць файлы дадзеных гульні\n"
+"на жорсткі дыск. Падрабязнасці можна знайсці ў\n"
+"файле README."
+
+#: engines/engine.cpp:368
+msgid ""
+"This game has audio tracks in its disk. These\n"
+"tracks need to be ripped from the disk using\n"
+"an appropriate CD audio extracting tool in\n"
+"order to listen to the game's music.\n"
+"See the README file for details."
+msgstr ""
+"Дыск гэтай гульні ўтрымоўвае гукавыя дарожкі. Іх\n"
+"неабходна перапісаць з дыска з дапамогай\n"
+"адпаведнай праграмы для капіявання\n"
+"аўдыёдыскаў, і толькі пасля гэтага ў гульні\n"
+"з'явіцца музыка. Падрабязнасці можна знайсці ў\n"
+"файле README."
+
+#: engines/engine.cpp:426
+#, c-format
+msgid ""
+"Gamestate load failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Не атрымалася прачытаць захаванне гульні (%s)! Калі ласка, звярніцеся ў файл "
+"README за базавай інфармацыяй, а таксама інструкцыямі пра тое, як атрымаць "
+"далейшую дапамогу."
+
+#: engines/engine.cpp:439
+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 saves you make might "
+"not work in future versions of ScummVM."
+msgstr ""
+"ПАПЯРЭДЖАННЕ: Гульня, якую вы збіраецеся запусціць, яшчэ не падтрымліваецца "
+"ScummVM цалкам. Яна, хутчэй за ўсё, не будзе працаваць стабільна, і "
+"захаванні гульняў могуць не працаваць у будучых версіях ScummVM."
+
+#: engines/engine.cpp:442
+msgid "Start anyway"
+msgstr "Усё адно запусціць"
+
+#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:390
+msgid "Use original save/load screens"
+msgstr "Выкарыстоўваць арыгінальныя экраны запісу/чытанні гульні"
+
+#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:391
+msgid "Use the original save/load screens, instead of the ScummVM ones"
+msgstr ""
+"Выкарыстоўваць арыгінальныя экраны запісу і захаванні гульні замест "
+"зробленых у ScummVM"
+
+#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+msgid "Restore game:"
+msgstr "Узнавіць гульню:"
+
+#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+msgid "Restore"
+msgstr "Узнавіць"
+
+#: engines/dreamweb/detection.cpp:57
+msgid "Use bright palette mode"
+msgstr "Выкарыстоўваць рэжым яркай палітры"
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Display graphics using the game's bright palette"
+msgstr "Малюе графіку з выкарыстаннем яркай палітры гульні"
+
+#: engines/sci/detection.cpp:370
+msgid "EGA undithering"
+msgstr "EGA без растру"
+
+#: engines/sci/detection.cpp:371
+msgid "Enable undithering in EGA games"
+msgstr "Уключае рэжым без растравання ў EGA гульнях"
+
+#: engines/sci/detection.cpp:380
+msgid "Prefer digital sound effects"
+msgstr "Аддаваць перавагу лічбавым гукавым эфектам"
+
+#: engines/sci/detection.cpp:381
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr "Аддаваць перавагу лічбавым гукавым эфектам замест сінтэзаваных"
+
+#: engines/sci/detection.cpp:400
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr "Выкарыстоўваць IMF/Yamaha FB-01 для вываду MIDI"
+
+#: engines/sci/detection.cpp:401
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+"Выкарыстоўваць гукавую карту IBM Music Feature ці модуль сінтэзу Yamaha "
+"FB-01 FM для MIDI"
+
+#: engines/sci/detection.cpp:411
+msgid "Use CD audio"
+msgstr "Выкарыстоўваць CD аўдыё"
+
+#: engines/sci/detection.cpp:412
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr ""
+"Выкарыстоўваць гукавыя дарожкі з CD замест музыкі з файлаў гульні (калі "
+"даступна)"
+
+#: engines/sci/detection.cpp:422
+msgid "Use Windows cursors"
+msgstr "Выкарыстоўваць курсоры Windows"
+
+#: engines/sci/detection.cpp:423
+msgid ""
+"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
+msgstr ""
+"Выкарыстоўваць курсоры Windows (меншыя па памеры і аднакаляровыя) замест "
+"курсораў DOS"
+
+#: engines/sci/detection.cpp:433
+msgid "Use silver cursors"
+msgstr "Выкарыстоўваць срэбныя курсоры"
+
+#: engines/sci/detection.cpp:434
+msgid ""
+"Use the alternate set of silver cursors, instead of the normal golden ones"
+msgstr ""
+"Выкарыстоўваць альтэрнатыўны набор срэбных курсораў замест звычайных залатых"
+
+#: engines/scumm/dialogs.cpp:175
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr "Устаўце дыск %c і націсніце клавішу, каб працягнуць."
+
+#: engines/scumm/dialogs.cpp:176
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr "Не атрымалася знайсці %s, (%c%d) Націсніце клавішу."
+
+#: engines/scumm/dialogs.cpp:177
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr "Памылка чытання дыска %c, (%c%d) Націсніце клавішу."
+
+#: engines/scumm/dialogs.cpp:178
+msgid "Game Paused. Press SPACE to Continue."
+msgstr "Гульня спынена. Націсніце прабел, каб працягнуць."
+
+#. I18N: You may specify 'Yes' symbol at the end of the line, like this:
+#. "Moechten Sie wirklich neu starten? (J/N)J"
+#. Will react to J as 'Yes'
+#: engines/scumm/dialogs.cpp:182
+msgid "Are you sure you want to restart? (Y/N)"
+msgstr "Вы ўпэўнены, што жадаеце пачаць ізноў? (Y/N)"
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:184
+msgid "Are you sure you want to quit? (Y/N)"
+msgstr "Вы ўпэўнены, што жадаеце выйсці? (Y/N)"
+
+#: engines/scumm/dialogs.cpp:189
+msgid "Play"
+msgstr "Гуляць"
+
+#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82
+#: engines/scumm/help.cpp:84
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: backends/events/default/default-events.cpp:213
+msgid "Quit"
+msgstr "Выхад"
+
+#: engines/scumm/dialogs.cpp:193
+msgid "Insert save/load game disk"
+msgstr "Устаўце дыск з захаваннямі"
+
+#: engines/scumm/dialogs.cpp:194
+msgid "You must enter a name"
+msgstr "Вы павінны ўвесці імя"
+
+#: engines/scumm/dialogs.cpp:195
+msgid "The game was NOT saved (disk full?)"
+msgstr "Гульня НЕ БЫЛА запісана (дыск поўны?)"
+
+#: engines/scumm/dialogs.cpp:196
+msgid "The game was NOT loaded"
+msgstr "Гульня НЕ БЫЛА загружана"
+
+#: engines/scumm/dialogs.cpp:197
+#, c-format
+msgid "Saving '%s'"
+msgstr "Захоўваю '%s'"
+
+#: engines/scumm/dialogs.cpp:198
+#, c-format
+msgid "Loading '%s'"
+msgstr "Загружаю '%s'"
+
+#: engines/scumm/dialogs.cpp:199
+msgid "Name your SAVE game"
+msgstr "Назавіце захаванне гульні"
+
+#: engines/scumm/dialogs.cpp:200
+msgid "Select a game to LOAD"
+msgstr "Абярыце гульню для загрузкі"
+
+#: engines/scumm/dialogs.cpp:201
+msgid "Game title)"
+msgstr "Назва гульні)"
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:287
+msgid "~P~revious"
+msgstr "~П~апяр"
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:289
+msgid "~N~ext"
+msgstr "~Н~аст"
+
+#: engines/scumm/dialogs.cpp:290
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+msgid "~C~lose"
+msgstr "~З~акрыць"
+
+#: engines/scumm/dialogs.cpp:597
+msgid "Speech Only"
+msgstr "Толькі агучка"
+
+#: engines/scumm/dialogs.cpp:598
+msgid "Speech and Subtitles"
+msgstr "Агучка і субтытры"
+
+#: engines/scumm/dialogs.cpp:599
+msgid "Subtitles Only"
+msgstr "Толькі субтытры"
+
+#: engines/scumm/dialogs.cpp:607
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr "Агучка і тэкст"
+
+#: engines/scumm/dialogs.cpp:653
+msgid "Select a Proficiency Level."
+msgstr "Абярыце ўзровень складанасці."
+
+#: engines/scumm/dialogs.cpp:655
+msgid "Refer to your Loom(TM) manual for help."
+msgstr "За дапамогай звярніцеся да інструкцыі Loom(TM)."
+
+#: engines/scumm/dialogs.cpp:658
+msgid "Standard"
+msgstr "Стандартны"
+
+#: engines/scumm/dialogs.cpp:659
+msgid "Practice"
+msgstr "Практыкант"
+
+#: engines/scumm/dialogs.cpp:660
+msgid "Expert"
+msgstr "Эксперт"
+
+#: engines/scumm/help.cpp:73
+msgid "Common keyboard commands:"
+msgstr "Агульныя клавіятурныя каманды:"
+
+#: engines/scumm/help.cpp:74
+msgid "Save / Load dialog"
+msgstr "Дыялог запісу / чытання"
+
+#: engines/scumm/help.cpp:76
+msgid "Skip line of text"
+msgstr "Прапусціць радок"
+
+#: engines/scumm/help.cpp:77
+msgid "Esc"
+msgstr "Esc"
+
+#: engines/scumm/help.cpp:77
+msgid "Skip cutscene"
+msgstr "Прапусціць застаўку"
+
+#: engines/scumm/help.cpp:78
+msgid "Space"
+msgstr "Прабел"
+
+#: engines/scumm/help.cpp:78
+msgid "Pause game"
+msgstr "Паўза гульні"
+
+#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96
+#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98
+#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Ctrl"
+msgstr "Ctrl"
+
+#: engines/scumm/help.cpp:79
+msgid "Load game state 1-10"
+msgstr "Загрузіць гульню 1-10"
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Alt"
+msgstr "Alt"
+
+#: engines/scumm/help.cpp:80
+msgid "Save game state 1-10"
+msgstr "Захаваць гульню 1-10"
+
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89
+msgid "Enter"
+msgstr "Увод"
+
+#: engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
+msgstr "Пераключыць на ўвесь экран"
+
+#: engines/scumm/help.cpp:87
+msgid "Music volume up / down"
+msgstr "Гучнасць музыкі павялічыць / паменшыць"
+
+#: engines/scumm/help.cpp:88
+msgid "Text speed slower / faster"
+msgstr "Хуткасць тэксту хутчэй / павольней"
+
+#: engines/scumm/help.cpp:89
+msgid "Simulate left mouse button"
+msgstr "Эмуляцыя левай клавішы мышы"
+
+#: engines/scumm/help.cpp:90
+msgid "Tab"
+msgstr "Tab"
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate right mouse button"
+msgstr "Эмуляцыя правай клавішы мышы"
+
+#: engines/scumm/help.cpp:93
+msgid "Special keyboard commands:"
+msgstr "Спецыяльныя клавіятурныя каманды:"
+
+#: engines/scumm/help.cpp:94
+msgid "Show / Hide console"
+msgstr "Паказаць / Прыбраць кансоль"
+
+#: engines/scumm/help.cpp:95
+msgid "Start the debugger"
+msgstr "Запуск адладчыка"
+
+#: engines/scumm/help.cpp:96
+msgid "Show memory consumption"
+msgstr "Паказаць спажыванне памяці"
+
+#: engines/scumm/help.cpp:97
+msgid "Run in fast mode (*)"
+msgstr "Запусціць хуткі рэжым (*)"
+
+#: engines/scumm/help.cpp:98
+msgid "Run in really fast mode (*)"
+msgstr "Запусціць вельмі хуткі рэжым (*)"
+
+#: engines/scumm/help.cpp:99
+msgid "Toggle mouse capture"
+msgstr "Пераключэнне перахопу мышы"
+
+#: engines/scumm/help.cpp:100
+msgid "Switch between graphics filters"
+msgstr "Пераключэнне паміж графічнымі фільтрамі"
+
+#: engines/scumm/help.cpp:101
+msgid "Increase / Decrease scale factor"
+msgstr "Павялічыць/паменшыць маштаб"
+
+#: engines/scumm/help.cpp:102
+msgid "Toggle aspect-ratio correction"
+msgstr "Пераключэнне карэкцыі суадносін бакоў"
+
+#: engines/scumm/help.cpp:107
+msgid "* Note that using ctrl-f and"
+msgstr "* Выкарыстанне ctrl-f і"
+
+#: engines/scumm/help.cpp:108
+msgid " ctrl-g are not recommended"
+msgstr " ctrl-g не рэкамендуецца,"
+
+#: engines/scumm/help.cpp:109
+msgid " since they may cause crashes"
+msgstr " бо яны могуць прывесці да"
+
+#: engines/scumm/help.cpp:110
+msgid " or incorrect game behavior."
+msgstr " няправільнай работы гульні."
+
+#: engines/scumm/help.cpp:114
+msgid "Spinning drafts on the keyboard:"
+msgstr "Змяняныя чарнавікі на клавіятуры:"
+
+#: engines/scumm/help.cpp:116
+msgid "Main game controls:"
+msgstr "Асноўнае кіраванне гульнёй:"
+
+#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136
+#: engines/scumm/help.cpp:161
+msgid "Push"
+msgstr "Пхаць"
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Pull"
+msgstr "Цягнуць"
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197
+#: engines/scumm/help.cpp:207
+msgid "Give"
+msgstr "Даць"
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190
+#: engines/scumm/help.cpp:208
+msgid "Open"
+msgstr "Адкрыць"
+
+#: engines/scumm/help.cpp:126
+msgid "Go to"
+msgstr "Ісці"
+
+#: engines/scumm/help.cpp:127
+msgid "Get"
+msgstr "Узяць"
+
+#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152
+#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224
+#: engines/scumm/help.cpp:250
+msgid "Use"
+msgstr "Выкарыстаць"
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141
+msgid "Read"
+msgstr "Чытаць"
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147
+msgid "New kid"
+msgstr "Новы перс"
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171
+msgid "Turn on"
+msgstr "Уключыць"
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn off"
+msgstr "Выключыць"
+
+#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167
+#: engines/scumm/help.cpp:194
+msgid "Walk to"
+msgstr "Ісці да"
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210
+#: engines/scumm/help.cpp:227
+msgid "Pick up"
+msgstr "Падняць"
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+msgid "What is"
+msgstr "Што такое"
+
+#: engines/scumm/help.cpp:146
+msgid "Unlock"
+msgstr "Адкрыць"
+
+#: engines/scumm/help.cpp:149
+msgid "Put on"
+msgstr "Пакласці"
+
+#: engines/scumm/help.cpp:150
+msgid "Take off"
+msgstr "Падняць"
+
+#: engines/scumm/help.cpp:156
+msgid "Fix"
+msgstr "Выправіць"
+
+#: engines/scumm/help.cpp:158
+msgid "Switch"
+msgstr "Пераключыць"
+
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228
+msgid "Look"
+msgstr "Глядзець"
+
+#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223
+msgid "Talk"
+msgstr "Гаварыць"
+
+#: engines/scumm/help.cpp:174
+msgid "Travel"
+msgstr "Падарожнічаць"
+
+#: engines/scumm/help.cpp:175
+msgid "To Henry / To Indy"
+msgstr "Генры/Інды"
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:179
+msgid "play C minor on distaff"
+msgstr "іграць до мінор на калаўроце"
+
+#: engines/scumm/help.cpp:180
+msgid "play D on distaff"
+msgstr "іграць рэ на калаўроце"
+
+#: engines/scumm/help.cpp:181
+msgid "play E on distaff"
+msgstr "іграць мі на калаўроце"
+
+#: engines/scumm/help.cpp:182
+msgid "play F on distaff"
+msgstr "іграць фа на калаўроце"
+
+#: engines/scumm/help.cpp:183
+msgid "play G on distaff"
+msgstr "іграць соль на калаўроце"
+
+#: engines/scumm/help.cpp:184
+msgid "play A on distaff"
+msgstr "іграць ля на калаўроце"
+
+#: engines/scumm/help.cpp:185
+msgid "play B on distaff"
+msgstr "іграць сі на калаўроце"
+
+#: engines/scumm/help.cpp:186
+msgid "play C major on distaff"
+msgstr "іграць до мажор на калаўроце"
+
+#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214
+msgid "puSh"
+msgstr "пхаць"
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "pull (Yank)"
+msgstr "цягнуць (чапляць)"
+
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212
+#: engines/scumm/help.cpp:248
+msgid "Talk to"
+msgstr "Гаварыць з"
+
+#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211
+msgid "Look at"
+msgstr "Глядзець на"
+
+#: engines/scumm/help.cpp:200
+msgid "turn oN"
+msgstr "уключыць"
+
+#: engines/scumm/help.cpp:201
+msgid "turn oFf"
+msgstr "выключыць"
+
+#: engines/scumm/help.cpp:217
+msgid "KeyUp"
+msgstr "Уверх"
+
+#: engines/scumm/help.cpp:217
+msgid "Highlight prev dialogue"
+msgstr "Падсвятліць папярэдні дыялог"
+
+#: engines/scumm/help.cpp:218
+msgid "KeyDown"
+msgstr "Уніз"
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight next dialogue"
+msgstr "Падсвятліць наступны дыялог"
+
+#: engines/scumm/help.cpp:222
+msgid "Walk"
+msgstr "Ісці"
+
+#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234
+#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249
+msgid "Inventory"
+msgstr "Інвентар"
+
+#: engines/scumm/help.cpp:226
+msgid "Object"
+msgstr "Аб'ект"
+
+#: engines/scumm/help.cpp:229
+msgid "Black and White / Color"
+msgstr "Чорна-белы / Каляровы"
+
+#: engines/scumm/help.cpp:232
+msgid "Eyes"
+msgstr "Вочы"
+
+#: engines/scumm/help.cpp:233
+msgid "Tongue"
+msgstr "Язык"
+
+#: engines/scumm/help.cpp:235
+msgid "Punch"
+msgstr "Удар"
+
+#: engines/scumm/help.cpp:236
+msgid "Kick"
+msgstr "Нагой"
+
+#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247
+msgid "Examine"
+msgstr "Праверыць"
+
+#: engines/scumm/help.cpp:240
+msgid "Regular cursor"
+msgstr "Звычайны курсор"
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:243
+msgid "Comm"
+msgstr "Кам"
+
+#: engines/scumm/help.cpp:246
+msgid "Save / Load / Options"
+msgstr "Загрузіць / Захаваць / Налады"
+
+#: engines/scumm/help.cpp:255
+msgid "Other game controls:"
+msgstr "Астатняе кіраванне гульнёй:"
+
+#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267
+msgid "Inventory:"
+msgstr "Інвентар:"
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274
+msgid "Scroll list up"
+msgstr "Пракруціць спіс уверх"
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list down"
+msgstr "Пракруціць спіс уніз"
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268
+msgid "Upper left item"
+msgstr "Верхні левы прадмет"
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270
+msgid "Lower left item"
+msgstr "Ніжні левы прадмет"
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Upper right item"
+msgstr "Верхні правы прадмет"
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273
+msgid "Lower right item"
+msgstr "Ніжні правы прадмет"
+
+#: engines/scumm/help.cpp:269
+msgid "Middle left item"
+msgstr "Сярэдні левы прадмет"
+
+#: engines/scumm/help.cpp:272
+msgid "Middle right item"
+msgstr "Сярэдні правы прадмет"
+
+#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284
+msgid "Switching characters:"
+msgstr "Змена героя:"
+
+#: engines/scumm/help.cpp:281
+msgid "Second kid"
+msgstr "Другі герой"
+
+#: engines/scumm/help.cpp:282
+msgid "Third kid"
+msgstr "Трэці герой"
+
+#: engines/scumm/help.cpp:294
+msgid "Fighting controls (numpad):"
+msgstr "Кіраванне боем (лічбавыя клавішы)"
+
+#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296
+#: engines/scumm/help.cpp:297
+msgid "Step back"
+msgstr "Крок назад"
+
+#: engines/scumm/help.cpp:298
+msgid "Block high"
+msgstr "Абарона зверху"
+
+#: engines/scumm/help.cpp:299
+msgid "Block middle"
+msgstr "Абарона пасярэдзіне"
+
+#: engines/scumm/help.cpp:300
+msgid "Block low"
+msgstr "Абарона знізу"
+
+#: engines/scumm/help.cpp:301
+msgid "Punch high"
+msgstr "Удар зверху"
+
+#: engines/scumm/help.cpp:302
+msgid "Punch middle"
+msgstr "Удар пасярэдзіне"
+
+#: engines/scumm/help.cpp:303
+msgid "Punch low"
+msgstr "Удар знізу"
+
+#: engines/scumm/help.cpp:306
+msgid "These are for Indy on left."
+msgstr "Гэта калі Інды злева."
+
+#: engines/scumm/help.cpp:307
+msgid "When Indy is on the right,"
+msgstr "Калі Інды справа,"
+
+#: engines/scumm/help.cpp:308
+msgid "7, 4, and 1 are switched with"
+msgstr "7, 4 і 1 змяняюцца з"
+
+#: engines/scumm/help.cpp:309
+msgid "9, 6, and 3, respectively."
+msgstr "9, 6 і 3 адпаведна."
+
+#: engines/scumm/help.cpp:316
+msgid "Biplane controls (numpad):"
+msgstr "Кіраванне самалётам (лічбавыя клавішы)"
+
+#: engines/scumm/help.cpp:317
+msgid "Fly to upper left"
+msgstr "Ляцець налева-ўверх"
+
+#: engines/scumm/help.cpp:318
+msgid "Fly to left"
+msgstr "Ляцець налева"
+
+#: engines/scumm/help.cpp:319
+msgid "Fly to lower left"
+msgstr "Ляцець налева-ўніз"
+
+#: engines/scumm/help.cpp:320
+msgid "Fly upwards"
+msgstr "Ляцець уверх"
+
+#: engines/scumm/help.cpp:321
+msgid "Fly straight"
+msgstr "Ляцець прама"
+
+#: engines/scumm/help.cpp:322
+msgid "Fly down"
+msgstr "Ляцець уніз"
+
+#: engines/scumm/help.cpp:323
+msgid "Fly to upper right"
+msgstr "Ляцець направа-ўверх"
+
+#: engines/scumm/help.cpp:324
+msgid "Fly to right"
+msgstr "Ляцець направа"
+
+#: engines/scumm/help.cpp:325
+msgid "Fly to lower right"
+msgstr "Ляцець направа-ўніз"
+
+#: engines/scumm/scumm.cpp:1773
+#, c-format
+msgid ""
+"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
+"but %s is missing. Using AdLib instead."
+msgstr ""
+"Рэжым \"роднага\" MIDI патрабуе абнаўленне Roland Upgrade ад\n"
+"LucasArts, але не хапае %s. Пераключаюся на AdLib."
+
+#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#, c-format
+msgid ""
+"Failed to save game state to file:\n"
+"\n"
+"%s"
+msgstr ""
+"Не атрымалася запісаць гульню ў файл:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#, c-format
+msgid ""
+"Failed to load game state from file:\n"
+"\n"
+"%s"
+msgstr ""
+"Не атрымалася загрузіць гульню з файла:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#, c-format
+msgid ""
+"Successfully saved game state in file:\n"
+"\n"
+"%s"
+msgstr ""
+"Гульня паспяхова захавана ў файл:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2512
+msgid ""
+"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
+"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
+"directory inside the Tentacle game directory."
+msgstr ""
+"Зараз павінна запусціцца гульня Maniac Mansion. Але ScummVM пакуль гэтага не "
+"ўмее. Каб згуляць, націсніце 'Новая гульня' у стартавым меню ScummVM, а "
+"затым абярыце дырэкторыю Maniac у дырэкторыі з гульнёй Tentacle."
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+msgid "~Z~ip Mode Activated"
+msgstr "Рэжым хуткага пераходу актываваны"
+
+#: engines/mohawk/dialogs.cpp:93
+msgid "~T~ransitions Enabled"
+msgstr "Пераходы актываваны"
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:95
+msgid "~D~rop Page"
+msgstr "Выкінуць старонку"
+
+#: engines/mohawk/dialogs.cpp:99
+msgid "~S~how Map"
+msgstr "Показать карту"
+
+#: engines/mohawk/dialogs.cpp:105
+msgid "~M~ain Menu"
+msgstr "Галоўнае меню"
+
+#: engines/mohawk/dialogs.cpp:172
+msgid "~W~ater Effect Enabled"
+msgstr "Эфекты вады ўключаны"
+
+#: engines/agos/animation.cpp:560
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr "Файл застаўкі '%s' не знойдзены!"
+
+#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287
+#: engines/tinsel/saveload.cpp:532
+msgid "Failed to load game state from file."
+msgstr "Не атрымалася загрузіць захаваную гульню з файла."
+
+#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545
+msgid "Failed to save game state to file."
+msgstr "Не атрымалася захаваць гульню ў файл."
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr "Не атрымалася выдаліць файл."
+
+#: engines/groovie/script.cpp:420
+msgid "Failed to save game"
+msgstr "Не атрымалася захаваць гульню"
+
+#. I18N: Studio audience adds an applause and cheering sounds whenever
+#. Malcolm makes a joke.
+#: engines/kyra/detection.cpp:62
+msgid "Studio audience"
+msgstr "Студыйная аўдыторыя"
+
+#: engines/kyra/detection.cpp:63
+msgid "Enable studio audience"
+msgstr "Уключыць гукі аўдыторыі ў студыі"
+
+#. I18N: This option allows the user to skip text and cutscenes.
+#: engines/kyra/detection.cpp:73
+msgid "Skip support"
+msgstr "Падтрымка пропускаў"
+
+#: engines/kyra/detection.cpp:74
+msgid "Allow text and cutscenes to be skipped"
+msgstr "Уключае магчымасць прапускаць тэксты і застаўкі"
+
+#. I18N: Helium mode makes people sound like they've inhaled Helium.
+#: engines/kyra/detection.cpp:84
+msgid "Helium mode"
+msgstr "Рэжым гелія"
+
+#: engines/kyra/detection.cpp:85
+msgid "Enable helium mode"
+msgstr "Уключыць рэжым гелія"
+
+#. I18N: When enabled, this option makes scrolling smoother when
+#. changing from one screen to another.
+#: engines/kyra/detection.cpp:99
+msgid "Smooth scrolling"
+msgstr "Плыўная прагортка"
+
+#: engines/kyra/detection.cpp:100
+msgid "Enable smooth scrolling when walking"
+msgstr "Уключыць плыўную прагортку падчас хады"
+
+#. I18N: When enabled, this option changes the cursor when it floats to the
+#. edge of the screen to a directional arrow. The player can then click to
+#. walk towards that direction.
+#: engines/kyra/detection.cpp:112
+msgid "Floating cursors"
+msgstr "Плывучыя курсоры"
+
+#: engines/kyra/detection.cpp:113
+msgid "Enable floating cursors"
+msgstr "Уключыць плывучыя курсоры"
+
+#. I18N: HP stands for Hit Points
+#: engines/kyra/detection.cpp:127
+msgid "HP bar graphs"
+msgstr "Палоскі здароўя"
+
+#: engines/kyra/detection.cpp:128
+msgid "Enable hit point bar graphs"
+msgstr "Уключыць адлюстраванне палосак здароўя"
+
+#: engines/kyra/lol.cpp:478
+msgid "Attack 1"
+msgstr "Атака 1"
+
+#: engines/kyra/lol.cpp:479
+msgid "Attack 2"
+msgstr "Атака 2"
+
+#: engines/kyra/lol.cpp:480
+msgid "Attack 3"
+msgstr "Атака 3"
+
+#: engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr "Ісці наперад"
+
+#: engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr "Ісці назад"
+
+#: engines/kyra/lol.cpp:483
+msgid "Slide Left"
+msgstr "Слізгаць налева"
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide Right"
+msgstr "Слізгаць направа"
+
+#: engines/kyra/lol.cpp:485
+msgid "Turn Left"
+msgstr "Паварот налева"
+
+#: engines/kyra/lol.cpp:486
+msgid "Turn Right"
+msgstr "Паварот направа"
+
+#: engines/kyra/lol.cpp:487
+msgid "Rest"
+msgstr "Адпачыць"
+
+#: engines/kyra/lol.cpp:488
+msgid "Options"
+msgstr "Опцыі"
+
+#: engines/kyra/lol.cpp:489
+msgid "Choose Spell"
+msgstr "Абраць загавор"
+
+#: engines/kyra/sound_midi.cpp:475
+msgid ""
+"You appear to be using a General MIDI device,\n"
+"but your game only supports Roland MT32 MIDI.\n"
+"We try to map the Roland MT32 instruments to\n"
+"General MIDI ones. It is still possible that\n"
+"some tracks sound incorrect."
+msgstr ""
+"Здаецца, вы спрабуеце выкарыстоўваць прыладу\n"
+"General MIDI, але гэтая гульня падтрымлівае толькі\n"
+"Roland MT32 MIDI. Мы паспрабуем падабраць General\n"
+"MIDI прылады, падобныя на Roland MT32, але\n"
+"можа так атрымацца, што некаторыя трэкі будуць\n"
+"сыграны няправільна."
+
+#: engines/queen/queen.cpp:59
+msgid "Alternative intro"
+msgstr "Альтэрнатыўны ўступ"
+
+#: engines/queen/queen.cpp:60
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Выкарыстоўваць альтэрнатыўны ўступ (толькі для CD версіі гульні)"
+
+#: engines/sky/compact.cpp:130
+msgid ""
+"Unable to find \"sky.cpt\" file!\n"
+"Please download it from www.scummvm.org"
+msgstr ""
+"Адсутнічае файл sky.cpt!\n"
+"Калі ласка, запампуйце яго з www.scummvm.org"
+
+#: engines/sky/compact.cpp:141
+msgid ""
+"The \"sky.cpt\" file has an incorrect size.\n"
+"Please (re)download it from www.scummvm.org"
+msgstr ""
+"Файл sky.cpt мае няправільны памер.\n"
+"Калі ласка, запампуйце яго нанова з www.scummvm.org"
+
+#: engines/sky/detection.cpp:44
+msgid "Floppy intro"
+msgstr "Уступ з дыскет"
+
+#: engines/sky/detection.cpp:45
+msgid "Use the floppy version's intro (CD version only)"
+msgstr "Выкарыстоўваць уступ з гнуткіх дыскаў (толькі для CD версіі гульні)"
+
+#: engines/sword1/animation.cpp:539
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr "Застаўка PSX '%s' не можа быць прайграна ў рэжыме з палітрай"
+
+#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgstr ""
+"Знойдзены застаўкі ў фармаце DXA, але ScummVM быў сабраны без падтрымкі zlib"
+
+#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+msgid "MPEG2 cutscenes are no longer supported"
+msgstr "Застаўкі ў фармаце MPEG2 больш не падтрымліваюцца"
+
+#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr "Застаўка '%s' не знойдзена"
+
+#: engines/sword1/control.cpp:863
+msgid ""
+"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"ScummVM выявіў у вас захаванні гульні Broken Sword 1 у старым фармаце.\n"
+"Стары фармат больш не падтрымліваецца, і, каб загрузіць захаванні, яны "
+"павінны быць пераведзены ў новы фармат.\n"
+"\n"
+"Націсніце ОК, каб перавесці іх у новы фармат зараз, у адваротным выпадку "
+"гэта паведамленне з'явіцца зноў пры наступным запуску гульні.\n"
+
+#: engines/sword1/control.cpp:1232
+#, c-format
+msgid ""
+"Target new save game already exists!\n"
+"Would you like to keep the old save game (%s) or the new one (%s)?\n"
+msgstr ""
+"Захаванне гульні з такім імем ужо існуе!\n"
+"Вы жадаеце пакінуць старую назву (%s) ці зрабіць новую (%s)?\n"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the old one"
+msgstr "Пакінуць старое"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the new one"
+msgstr "Зрабіць новае"
+
+#: engines/sword1/logic.cpp:1633
+msgid "This is the end of the Broken Sword 1 Demo"
+msgstr "Гэта завяршэнне дэма Broken Sword 1"
+
+#: engines/sword2/animation.cpp:435
+msgid ""
+"PSX cutscenes found but ScummVM has been built without RGB color support"
+msgstr ""
+"Знойдзены застаўкі ў фармаце PSX, але ScummVM быў сабраны без падтрымкі RGB "
+"колераў"
+
+#: engines/sword2/sword2.cpp:79
+msgid "Show object labels"
+msgstr "Паказваць назвы аб'ектаў"
+
+#: engines/sword2/sword2.cpp:80
+msgid "Show labels for objects on mouse hover"
+msgstr "Паказвае назвы аб'ектаў пры навядзенні курсора мышы"
+
+#: engines/teenagent/resources.cpp:68
+msgid ""
+"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+msgstr ""
+"У вас адсутнічае файл 'teenagent.dat'. Запампуйце яго з вэб-сайта ScummVM"
+
+#: engines/teenagent/resources.cpp:89
+msgid ""
+"The teenagent.dat file is compressed and zlib hasn't been included in this "
+"executable. Please decompress it"
+msgstr ""
+"Файл teenagent.dat зжаты, але zlib не ўключана ў гэту праграму. Калі ласка, "
+"распакуйце яго"
+
+#: engines/parallaction/saveload.cpp:133
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+"Не магу захаваць гульню ў пазіцыю %i\n"
+"\n"
+
+#: engines/parallaction/saveload.cpp:204
+msgid "Loading game..."
+msgstr "Загружаю гульню..."
+
+#: engines/parallaction/saveload.cpp:219
+msgid "Saving game..."
+msgstr "Захоўваю гульню..."
+
+#: engines/parallaction/saveload.cpp:272
+msgid ""
+"ScummVM found that you have old savefiles for Nippon Safes that should be "
+"renamed.\n"
+"The old names are no longer supported, so you will not be able to load your "
+"games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked next time.\n"
+msgstr ""
+"ScummVM знайшоў у вас старыя захаванні гульні Nippon Safes, якія неабходна "
+"пераназваць. Старыя назвы больш не падтрымліваюцца, і таму вы не зможаце "
+"загрузіць захаванні, калі не пераназавеце іх.\n"
+"\n"
+"Націсніце ОК, каб пераназваць іх зараз, у адваротным выпадку гэта ж "
+"паведамленне з'явіцца пры наступным запуску гульні.\n"
+
+#: engines/parallaction/saveload.cpp:319
+msgid "ScummVM successfully converted all your savefiles."
+msgstr "ScummVM паспяхова пераўтварыў усе вашы захаванні гульняў."
+
+#: engines/parallaction/saveload.cpp:321
+msgid ""
+"ScummVM printed some warnings in your console window and can't guarantee all "
+"your files have been converted.\n"
+"\n"
+"Please report to the team."
+msgstr ""
+"ScummVM напісаў некалькі папярэджанняў у акно кансолі і не змог пераўтварыць "
+"усе файлы.\n"
+"\n"
+"Калі ласка, паведаміце пра гэта камандзе ScummVM."
+
+#: audio/fmopl.cpp:49
+msgid "MAME OPL emulator"
+msgstr "Эмулятар MAME OPL"
+
+#: audio/fmopl.cpp:51
+msgid "DOSBox OPL emulator"
+msgstr "Эмулятар DOSBox OPL"
+
+#: audio/mididrv.cpp:209
+#, c-format
+msgid ""
+"The selected audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Абраная гукавая прылада '%s' не была знойдзена (магчыма, яна выключана ці не "
+"падключана)."
+
+#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257
+#: audio/mididrv.cpp:272
+msgid "Attempting to fall back to the next available device..."
+msgstr "Спрабую выкарыстаць іншую даступную прыладу..."
+
+#: audio/mididrv.cpp:221
+#, c-format
+msgid ""
+"The selected audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Абраная гукавая прылада '%s' не можа быць скарыстана. Глядзіце файл "
+"пратаколу для больш падрабязнай інфармацыі."
+
+#: audio/mididrv.cpp:257
+#, c-format
+msgid ""
+"The preferred audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Пераважная гукавая прылада '%s' не была знойдзена (магчыма, яна выключана ці "
+"не падключана)."
+
+#: audio/mididrv.cpp:272
+#, c-format
+msgid ""
+"The preferred audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Пераважная гукавая прылада '%s' не можа быць скарыстана. Глядзіце файл "
+"пратаколу для больш падрабязнай інфармацыі."
+
+#: audio/null.h:43
+msgid "No music"
+msgstr "Без музыкі"
+
+#: audio/mods/paula.cpp:189
+msgid "Amiga Audio Emulator"
+msgstr "Эмулятар гуку Amiga"
+
+#: audio/softsynth/adlib.cpp:1593
+msgid "AdLib Emulator"
+msgstr "Эмулятар AdLib"
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr "Эмулятар Apple II GS (адсутнічае)"
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr "Эмулятар гуку C64"
+
+#: audio/softsynth/mt32.cpp:293
+msgid "Initializing MT-32 Emulator"
+msgstr "Наладжваю эмулятар MT-32"
+
+#: audio/softsynth/mt32.cpp:512
+msgid "MT-32 Emulator"
+msgstr "Эмулятар MT-32"
+
+#: audio/softsynth/pcspk.cpp:139
+msgid "PC Speaker Emulator"
+msgstr "Эмулятар PC спікера"
+
+#: audio/softsynth/pcspk.cpp:158
+msgid "IBM PCjr Emulator"
+msgstr "Эмулятар IBM PCjr"
+
+#: backends/keymapper/remap-dialog.cpp:47
+msgid "Keymap:"
+msgstr "Табліца клавіш:"
+
+#: backends/keymapper/remap-dialog.cpp:66
+msgid " (Effective)"
+msgstr " (Дзейсная)"
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Active)"
+msgstr " (Актыўная)"
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Blocked)"
+msgstr " (Заблакавана)"
+
+#: backends/keymapper/remap-dialog.cpp:119
+msgid " (Global)"
+msgstr " (Глабальная)"
+
+#: backends/keymapper/remap-dialog.cpp:127
+msgid " (Game)"
+msgstr " (Гульні)"
+
+#: backends/midi/windows.cpp:164
+msgid "Windows MIDI"
+msgstr "Windows MIDI"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:57
+msgid "ScummVM Main Menu"
+msgstr "Галоўнае меню ScummVM"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:63
+msgid "~L~eft handed mode"
+msgstr "Леварукі рэжым"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:64
+msgid "~I~ndy fight controls"
+msgstr "Кіраванне баямі ў Indy"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:65
+msgid "Show mouse cursor"
+msgstr "Паказваць курсор мышы"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:66
+msgid "Snap to edges"
+msgstr "Прымацаваць да меж"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:68
+msgid "Touch X Offset"
+msgstr "Зрушэнне дотыкаў па восі X"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr "Зрушэнне дотыкаў па восі Y"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:87
+msgid "Use laptop trackpad-style cursor control"
+msgstr "Выкарыстоўваць кіраванне курсорам як на трэкпадзе лэптопаў"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:88
+msgid "Tap for left click, double tap right click"
+msgstr "Тап для левай пстрычкі, падвойны тап для правай пстрычкі"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:90
+msgid "Sensitivity"
+msgstr "Адчувальнасць"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:99
+msgid "Initial top screen scale:"
+msgstr "Пачатковы маштаб верхняга экрана:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:105
+msgid "Main screen scaling:"
+msgstr "Маштаб галоўнага экрана:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:107
+msgid "Hardware scale (fast, but low quality)"
+msgstr "Хардварнае маштабаванне (хутка, але нізкай якасці)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:108
+msgid "Software scale (good quality, but slower)"
+msgstr "Праграмнае маштабаванне (добрая якасць, але марудней)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:109
+msgid "Unscaled (you must scroll left and right)"
+msgstr "Без маштабавання (трэба будзе пракручваць налева і направа)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:111
+msgid "Brightness:"
+msgstr "Яркасць:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:121
+msgid "High quality audio (slower) (reboot)"
+msgstr "Высокая якасць гуку (марудней) (рэбут)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:122
+msgid "Disable power off"
+msgstr "Забараніць выключэнне"
+
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr "Рэжым мышы націснуць-і-цягнуць уключаны."
+
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr "Рэжым мышы націснуць-і-цягнуць выключаны."
+
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr "Рэжым тачпада ўключаны."
+
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr "Рэжым тачпада выключаны."
+
+#: backends/platform/maemo/maemo.cpp:209
+msgid "Click Mode"
+msgstr "Рэжым пстрычкі"
+
+#: backends/platform/maemo/maemo.cpp:215
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+#: backends/platform/bada/form.cpp:281
+msgid "Left Click"
+msgstr "Левая пстрычка"
+
+#: backends/platform/maemo/maemo.cpp:218
+msgid "Middle Click"
+msgstr "Сярэдняя пстрычка"
+
+#: backends/platform/maemo/maemo.cpp:221
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+#: backends/platform/bada/form.cpp:273
+msgid "Right Click"
+msgstr "Правая пстрычка"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+msgid "Hide ScummVM"
+msgstr "Схаваць ScummVM"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+msgid "Hide Others"
+msgstr "Схаваць астатнія"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+msgid "Show All"
+msgstr "Паказаць усё"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:110
+#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+msgid "Window"
+msgstr "Акно"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+msgid "Minimize"
+msgstr "Прыбраць у Dock"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
+msgid "Normal (no scaling)"
+msgstr "Без павелічэння"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr "Без павелічэння"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+msgid "Enabled aspect ratio correction"
+msgstr "Карэкцыя суадносін бакоў уключана"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+msgid "Disabled aspect ratio correction"
+msgstr "Карэкцыя суадносін бакоў выключана"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196
+msgid "Active graphics filter:"
+msgstr "Актыўны графічны фільтр:"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+msgid "Windowed mode"
+msgstr "Аконны рэжым"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:135
+msgid "OpenGL Normal"
+msgstr "OpenGL без павелічэння"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:136
+msgid "OpenGL Conserve"
+msgstr "OpenGL з захаваннем"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:137
+msgid "OpenGL Original"
+msgstr "OpenGL першапачатковы"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:415
+msgid "Current display mode"
+msgstr "Бягучы відэарэжым"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:428
+msgid "Current scale"
+msgstr "Бягучы маштаб"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+msgid "Active filter mode: Linear"
+msgstr "Актыўны рэжым фільтра: Лінейны"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+msgid "Active filter mode: Nearest"
+msgstr "Актыўны рэжым фільтра: Найблізкі"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:38
+#: backends/platform/wince/CEActionsSmartphone.cpp:39
+msgid "Up"
+msgstr "Уверх"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:39
+#: backends/platform/wince/CEActionsSmartphone.cpp:40
+msgid "Down"
+msgstr "Уніз"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:40
+#: backends/platform/wince/CEActionsSmartphone.cpp:41
+msgid "Left"
+msgstr "Налева"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:41
+#: backends/platform/wince/CEActionsSmartphone.cpp:42
+msgid "Right"
+msgstr "Направа"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:46
+#: backends/platform/wince/CEActionsSmartphone.cpp:47
+msgid "Zone"
+msgstr "Зона"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:47
+#: backends/platform/wince/CEActionsPocket.cpp:54
+#: backends/platform/wince/CEActionsSmartphone.cpp:48
+msgid "Multi Function"
+msgstr "Мультыфункцыя"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:48
+msgid "Swap character"
+msgstr "Змяніць героя"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:49
+msgid "Skip text"
+msgstr "Прапусціць тэкст"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:51
+msgid "Fast mode"
+msgstr "Хуткі рэжым"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:53
+msgid "Debugger"
+msgstr "Адладчык"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:54
+msgid "Global menu"
+msgstr "Глабальнае меню"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:55
+msgid "Virtual keyboard"
+msgstr "Віртуальная клавіятура"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:56
+msgid "Key mapper"
+msgstr "Прызначэнне клавіш"
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+msgid "Do you want to quit ?"
+msgstr "Вы сапраўды жадаеце выйсці?"
+
+#: backends/platform/wii/options.cpp:51
+msgid "Video"
+msgstr "Відэа"
+
+#: backends/platform/wii/options.cpp:54
+msgid "Current video mode:"
+msgstr "Бягучы відэарэжым:"
+
+#: backends/platform/wii/options.cpp:56
+msgid "Double-strike"
+msgstr "Двайны ўдар"
+
+#: backends/platform/wii/options.cpp:60
+msgid "Horizontal underscan:"
+msgstr "Гарызантальны underscan:"
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr "Вертыкальны underscan:"
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr "Увод"
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr "Адчувальнасць GC пада:"
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr "Паскарэнне GC пада:"
+
+#: backends/platform/wii/options.cpp:86
+msgid "DVD"
+msgstr "DVD"
+
+#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101
+msgid "Status:"
+msgstr "Стан:"
+
+#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102
+msgid "Unknown"
+msgstr "Невядома"
+
+#: backends/platform/wii/options.cpp:93
+msgid "Mount DVD"
+msgstr "Падключыць DVD"
+
+#: backends/platform/wii/options.cpp:94
+msgid "Unmount DVD"
+msgstr "Адключыць DVD"
+
+#: backends/platform/wii/options.cpp:98
+msgid "SMB"
+msgstr "SMB"
+
+#: backends/platform/wii/options.cpp:106
+msgid "Server:"
+msgstr "Сервер:"
+
+#: backends/platform/wii/options.cpp:110
+msgid "Share:"
+msgstr "Сеткавая тэчка:"
+
+#: backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr "Карыстач:"
+
+#: backends/platform/wii/options.cpp:118
+msgid "Password:"
+msgstr "Пароль:"
+
+#: backends/platform/wii/options.cpp:121
+msgid "Init network"
+msgstr "Ініцыялізацыя сеткі"
+
+#: backends/platform/wii/options.cpp:123
+msgid "Mount SMB"
+msgstr "Падключыць SMB"
+
+#: backends/platform/wii/options.cpp:124
+msgid "Unmount SMB"
+msgstr "Адключыць SMB"
+
+#: backends/platform/wii/options.cpp:143
+msgid "DVD Mounted successfully"
+msgstr "DVD падключаны паспяхова"
+
+#: backends/platform/wii/options.cpp:146
+msgid "Error while mounting the DVD"
+msgstr "Памылка пры падключэнні DVD"
+
+#: backends/platform/wii/options.cpp:148
+msgid "DVD not mounted"
+msgstr "DVD не падключаны"
+
+#: backends/platform/wii/options.cpp:161
+msgid "Network up, share mounted"
+msgstr "Сетка працуе, тэчка падключана"
+
+#: backends/platform/wii/options.cpp:163
+msgid "Network up"
+msgstr "Сетка працуе"
+
+#: backends/platform/wii/options.cpp:166
+msgid ", error while mounting the share"
+msgstr ", памылка пры падключэнні тэчкі"
+
+#: backends/platform/wii/options.cpp:168
+msgid ", share not mounted"
+msgstr ", тэчка не падключана"
+
+#: backends/platform/wii/options.cpp:174
+msgid "Network down"
+msgstr "Сетка выключана"
+
+#: backends/platform/wii/options.cpp:178
+msgid "Initializing network"
+msgstr "Наладжваю сетку"
+
+#: backends/platform/wii/options.cpp:182
+msgid "Timeout while initializing network"
+msgstr "Час падключэння да сеткі мінуў"
+
+#: backends/platform/wii/options.cpp:186
+#, c-format
+msgid "Network not initialized (%d)"
+msgstr "Сетка не наладзілася (%d)"
+
+#: backends/platform/wince/CEActionsPocket.cpp:46
+msgid "Hide Toolbar"
+msgstr "Схаваць панэль інструментаў"
+
+#: backends/platform/wince/CEActionsPocket.cpp:47
+msgid "Show Keyboard"
+msgstr "Паказаць клавіятуру"
+
+#: backends/platform/wince/CEActionsPocket.cpp:48
+msgid "Sound on/off"
+msgstr "Гук укл/выкл"
+
+#: backends/platform/wince/CEActionsPocket.cpp:49
+msgid "Right click"
+msgstr "Правая пстрычка"
+
+#: backends/platform/wince/CEActionsPocket.cpp:50
+msgid "Show/Hide Cursor"
+msgstr "Паказаць/Прыбраць курсор"
+
+#: backends/platform/wince/CEActionsPocket.cpp:51
+msgid "Free look"
+msgstr "Вольны агляд"
+
+#: backends/platform/wince/CEActionsPocket.cpp:52
+msgid "Zoom up"
+msgstr "Павял. маштаб"
+
+#: backends/platform/wince/CEActionsPocket.cpp:53
+msgid "Zoom down"
+msgstr "Паменш. маштаб"
+
+#: backends/platform/wince/CEActionsPocket.cpp:55
+#: backends/platform/wince/CEActionsSmartphone.cpp:49
+msgid "Bind Keys"
+msgstr "Прызначыць клавішы"
+
+#: backends/platform/wince/CEActionsPocket.cpp:56
+msgid "Cursor Up"
+msgstr "Курсор уверх"
+
+#: backends/platform/wince/CEActionsPocket.cpp:57
+msgid "Cursor Down"
+msgstr "Курсор уніз"
+
+#: backends/platform/wince/CEActionsPocket.cpp:58
+msgid "Cursor Left"
+msgstr "Курсор налева"
+
+#: backends/platform/wince/CEActionsPocket.cpp:59
+msgid "Cursor Right"
+msgstr "Курсор направа"
+
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Do you want to load or save the game?"
+msgstr "Вы жадаеце загрузіць або захаваць гульню?"
+
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+msgid " Are you sure you want to quit ? "
+msgstr " Вы ўпэўнены, што жадаеце выйсці? "
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:50
+msgid "Keyboard"
+msgstr "Клавіятура"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:51
+msgid "Rotate"
+msgstr "Павярнуць"
+
+#: backends/platform/wince/CELauncherDialog.cpp:56
+msgid "Using SDL driver "
+msgstr "Выкарыстоўваю драйвер SDL "
+
+#: backends/platform/wince/CELauncherDialog.cpp:60
+msgid "Display "
+msgstr "Паказаць "
+
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Do you want to perform an automatic scan ?"
+msgstr "Вы жадаеце зрабіць аўтаматычны пошук?"
+
+#: backends/platform/wince/wince-sdl.cpp:515
+msgid "Map right click action"
+msgstr "Прызначыць дзеянне па правай пстрычцы"
+
+#: backends/platform/wince/wince-sdl.cpp:519
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+"Вы павінны прызначыць клавішу на дзеянне 'Right Click' для гэтай гульні"
+
+#: backends/platform/wince/wince-sdl.cpp:528
+msgid "Map hide toolbar action"
+msgstr "Прызначыць дзеянне 'схаваць панэль інструментаў'"
+
+#: backends/platform/wince/wince-sdl.cpp:532
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+"Вы павінны прызначыць клавішу на дзеянне 'Hide toolbar' для гэтай гульні"
+
+#: backends/platform/wince/wince-sdl.cpp:541
+msgid "Map Zoom Up action (optional)"
+msgstr "Прызначыць дзеянне Павялічыць Маштаб (неабавязкова)"
+
+#: backends/platform/wince/wince-sdl.cpp:544
+msgid "Map Zoom Down action (optional)"
+msgstr "Прызначыць дзеянне Паменшыць Маштаб (неабавязкова)"
+
+#: backends/platform/wince/wince-sdl.cpp:552
+msgid ""
+"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
+msgstr ""
+"Не забудзьцеся прызначыць клавішу для дзеяння 'Hide Toolbar', каб убачыць "
+"увесь інвентар у гульні"
+
+#: backends/events/default/default-events.cpp:191
+msgid "Do you really want to return to the Launcher?"
+msgstr "Вы сапраўды жадаеце вярнуцца ў галоўнае меню?"
+
+#: backends/events/default/default-events.cpp:191
+msgid "Launcher"
+msgstr "Галоўнае меню"
+
+#: backends/events/default/default-events.cpp:213
+msgid "Do you really want to quit?"
+msgstr "Вы сапраўды жадаеце выйсці?"
+
+#: backends/events/gph/gph-events.cpp:386
+#: backends/events/gph/gph-events.cpp:429
+#: backends/events/openpandora/op-events.cpp:139
+msgid "Touchscreen 'Tap Mode' - Left Click"
+msgstr "Рэжым 'дотыкаў' тачскрына - Левы клік"
+
+#: backends/events/gph/gph-events.cpp:388
+#: backends/events/gph/gph-events.cpp:431
+#: backends/events/openpandora/op-events.cpp:141
+msgid "Touchscreen 'Tap Mode' - Right Click"
+msgstr "Рэжым 'дотыкаў' тачскрына - Правы клік"
+
+#: backends/events/gph/gph-events.cpp:390
+#: backends/events/gph/gph-events.cpp:433
+#: backends/events/openpandora/op-events.cpp:143
+msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
+msgstr "Рэжым 'дотыкаў' тачскрына - Пралёт (без кліку)"
+
+#: backends/events/gph/gph-events.cpp:410
+msgid "Maximum Volume"
+msgstr "Максімальная гучнасць"
+
+#: backends/events/gph/gph-events.cpp:412
+msgid "Increasing Volume"
+msgstr "Павелічэнне гучнасці"
+
+#: backends/events/gph/gph-events.cpp:418
+msgid "Minimal Volume"
+msgstr "Мінімальная гучнасць"
+
+#: backends/events/gph/gph-events.cpp:420
+msgid "Decreasing Volume"
+msgstr "Памяншэнне гучнасці"
+
+#: backends/updates/macosx/macosx-updates.mm:65
+msgid "Check for Updates..."
+msgstr "Правяраю абнаўленні..."
+
+#: backends/platform/bada/form.cpp:269
+msgid "Right Click Once"
+msgstr "Адна правая пстрычка"
+
+#: backends/platform/bada/form.cpp:277
+msgid "Move Only"
+msgstr "Толькі перамясціць"
+
+#: backends/platform/bada/form.cpp:291
+msgid "Escape Key"
+msgstr "Клавіша ESC"
+
+#: backends/platform/bada/form.cpp:296
+msgid "Game Menu"
+msgstr "Меню гульні"
+
+#: backends/platform/bada/form.cpp:301
+msgid "Show Keypad"
+msgstr "Паказаць клавіятуру"
+
+#: backends/platform/bada/form.cpp:309
+msgid "Control Mouse"
+msgstr "Кіраванне мышшу"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Enabled"
+msgstr "Пстрычкі ўключаны"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Disabled"
+msgstr "Пстрычкі выключаны"
+
+#~ msgid "Hercules Green"
+#~ msgstr "Hercules Зелёный"
+
+#~ msgid "Hercules Amber"
+#~ msgstr "Hercules Янтарный"
+
+#~ msgctxt "lowres"
+#~ msgid "Hercules Green"
+#~ msgstr "Hercules Зелёный"
+
+#~ msgctxt "lowres"
+#~ msgid "Hercules Amber"
+#~ msgstr "Hercules Янтарный"
+
+#~ msgid "Save game failed!"
+#~ msgstr "Не удалось сохранить игру!"
+
+#~ msgctxt "lowres"
+#~ msgid "Add Game..."
+#~ msgstr "Доб. игру"
+
+#~ msgid "Add Game..."
+#~ msgstr "Добавить игру..."
+
+#~ msgid "Discovered %d new games."
+#~ msgstr "Найдено %d новых игр."
+
+#~ msgid "Command line argument not processed"
+#~ msgstr "Параметры командной строки не обработаны"
+
+#~ msgid "FM Towns Emulator"
+#~ msgstr "Эмулятор FM Towns"
+
+#~ msgid "Invalid Path"
+#~ msgstr "Неверный путь"
diff --git a/po/ca_ES.po b/po/ca_ES.po
index da2586a2af..2a6aa716cf 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.sf.net\n"
-"POT-Creation-Date: 2012-08-27 15:46+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-08-26 20:32+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@jvprat.com>\n"
"Language-Team: Catalan <scummvm-devel@lists.sf.net>\n"
@@ -44,10 +44,10 @@ msgstr "Amunt"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:847
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -69,15 +69,15 @@ msgstr "Tanca"
msgid "Mouse click"
msgstr "Clic del ratolэ"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostra el teclat"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Assigna les tecles"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Commuta la pantalla completa"
@@ -91,13 +91,13 @@ msgstr "Assigna"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:848 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
@@ -356,7 +356,7 @@ msgstr ""
msgid "~Q~uit"
msgstr "~T~anca"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Surt de ScummVM"
@@ -364,7 +364,7 @@ msgstr "Surt de ScummVM"
msgid "A~b~out..."
msgstr "~Q~uant a..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Quant a ScummVM"
@@ -930,71 +930,71 @@ msgstr ""
"El tema que heu seleccionat no suporta l'idioma actual. Si voleu utilitzar "
"aquest tema primer haureu de canviar a un altre idioma."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Vista de llistat"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Vista de quadrэcula"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "No hi ha data desada"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "No hi ha hora desada"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "No hi ha temps de joc desat"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Suprimeix"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Realment voleu suprimir aquesta partida?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:800
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:806
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:814
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Temps de joc: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Partida sense tэtol"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Segќent"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Anterior"
-#: gui/saveload-dialog.cpp:688
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Nova partida desada"
-#: gui/saveload-dialog.cpp:688
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Crea una nova partida desada"
-#: gui/saveload-dialog.cpp:793
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Nom: "
-#: gui/saveload-dialog.cpp:865
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Entreu la descripciѓ per l'espai %d:"
@@ -1032,35 +1032,35 @@ msgstr "Amb antialias (16bpp)"
msgid "Clear value"
msgstr "Neteja el valor"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "El motor no suporta el nivell de depuraciѓ '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menњ"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Salta"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Salta la lэnia"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Error al executar el joc:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "No s'ha pogut trobar cap motor capaч d'executar el joc seleccionat"
@@ -1291,12 +1291,12 @@ msgid "Start anyway"
msgstr "Inicia de totes maneres"
#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Utilitza les pantalles originals de desat/cрrrega"
#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utilitza les pantalles originals de desat/cрrrega, en lloc de les de ScummVM"
@@ -1317,27 +1317,27 @@ msgstr "Utilitza el mode de paleta brillant"
msgid "Display graphics using the game's bright palette"
msgstr "Mostra els grрfics utilitzant la paleta brillant del joc"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Elimina el tramat d'EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activa l'eliminaciѓ del tramat en els jocs EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Prefereix efectes de so digitals"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Prefereix els efectes de so digitals en lloc dels sintetitzats"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Utilitza IMF/Yamaha FB-01 per la sortida MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1345,31 +1345,31 @@ msgstr ""
"Utilitza una tarja IBM Music Feature o un mђdul sintetitzador Yamaha FB-01 "
"FM per la sortida MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Utilitza l'рudio del CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Utilitza l'рudio del CD en lloc de l'рudio intern del joc, si estр disponible"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Utilitza els cursors de Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Utilitza els cursors de Windows (mщs petits i en blanc i negre) en lloc dels "
"de DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Utilitza cursors platejats"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2023,7 +2023,7 @@ msgstr "Vola a la dreta"
msgid "Fly to lower right"
msgstr "Vola avall i a la dreta"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2032,7 +2032,7 @@ msgstr ""
"El suport de MIDI natiu requereix l'actualitzaciѓ Roland de LucasArts,\n"
"perђ no s'ha trobat %s. S'utilitzarр AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2043,7 +2043,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2054,7 +2054,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2065,7 +2065,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2229,7 +2229,7 @@ msgstr "Opcions"
msgid "Choose Spell"
msgstr "Escull l'encanteri"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2296,7 +2296,7 @@ msgstr "Les escenes MPEG2 ja no estan suportades"
msgid "Cutscene '%s' not found"
msgstr "No s'ha trobat l'escena '%s'"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2314,7 +2314,7 @@ msgstr ""
"Premeu D'Acord per convertir-les ara, en cas contrari se us tornarр a "
"demanar la propera vegada que engegueu el joc.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2323,11 +2323,11 @@ msgstr ""
"La nova partida guardada d'aquest joc ja existeix!\n"
"Voleu conservar la partida guardada antiga (%s) o la nova (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Mantingues el vell"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Mantingues el nou"
@@ -2350,12 +2350,12 @@ msgstr "Mostra les etiquetes dels objectes"
msgid "Show labels for objects on mouse hover"
msgstr "Mostra etiquetes al posar el ratolэ sobre els objectes"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr "Us falta el fitxer 'teenagent.dat'. Obteniu-lo a la pрgina de ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2470,7 +2470,7 @@ msgstr "Sense mњsica"
msgid "Amiga Audio Emulator"
msgstr "Emulador d'рudio Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador d'AdLib"
@@ -2637,24 +2637,24 @@ msgstr "Clic central"
msgid "Right Click"
msgstr "Clic dret"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Amaga ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Oculta els altres"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostra-ho tot"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Finestra"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimitza"
@@ -3036,19 +3036,19 @@ msgstr "Estрs segur de voler sortir?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "'Mode Toc' de pantalla tрctil - Clic esquerre"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "'Mode Toc' de pantalla tрctil - Clic dret"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "'Mode Toc' de pantalla tрctil - Flotant (sense clic)"
@@ -3068,7 +3068,12 @@ msgstr "Volum mэnim"
msgid "Decreasing Volume"
msgstr "Baixant el volum"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "'Mode Toc' de pantalla tрctil - Flotant (sense clic)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Comprova les actualitzacions..."
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 107be45398..4f800906e7 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-08 18:03+0100\n"
"Last-Translator: Zbynьk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: \n"
@@ -48,10 +48,10 @@ msgstr "Jэt nahoru"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -73,15 +73,15 @@ msgstr "Zavјэt"
msgid "Mouse click"
msgstr "Kliknutэ myЙэ"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Zobrazit klсvesnici"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Pјemapovat klсvesy"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Pјepnout celou obrazovku"
@@ -95,15 +95,15 @@ msgstr "Mapovat"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -357,7 +357,7 @@ msgstr "Toto ID hry je uО zabranщ. Vyberte si, prosэm, jinщ."
msgid "~Q~uit"
msgstr "~U~konшit"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Ukonшit ScummVM"
@@ -365,7 +365,7 @@ msgstr "Ukonшit ScummVM"
msgid "A~b~out..."
msgstr "~O~ Programu..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "O ScummVM"
@@ -920,74 +920,74 @@ msgstr ""
"Vzhled, kter§ jste zvolili, nepodporuje VсЙ souшasn§ jazyk. Pokud chcete "
"tento vzhled pouОэt, musэte nejdјэve pјepnout na jin§ jazyk."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "NeuloОena Осdnс data"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Ўсdn§ uloОen§ шas"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ўсdnс uloОenс doba hranэ"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Smazat"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Opravdu chcete tuto uloОenou hru vymazat"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Datum:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Шas:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Doba hranэ:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Bezejmenn§ uloОen§ stav"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "UloОit"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Nelze uloОit hru."
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Jmщno"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1025,35 +1025,35 @@ msgstr "S vyhlazen§mi hranami (16bpp)"
msgid "Clear value"
msgstr "Vyшistit hodnotu"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Jсdro nepodporuje њroveђ ladьnэ '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Pјeskoшit"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pauza"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Pјeskoшit јсdek"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Chyba pјi spuЙtьnэ hry:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Nelze nalщzt Осdnщ jсdro schopnщ vybranou hru spustit"
@@ -1283,13 +1283,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Pјesto spustit"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ mэsto ze ScummVM"
@@ -1309,27 +1309,27 @@ msgstr "PouОэt reОim jasnщ palety"
msgid "Display graphics using the game's bright palette"
msgstr "Zobrazit grafiku pomocэ jasnщ palety hry"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Nerozklсdсnэ EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Povolit nerozklсdсnэ v EGA hrсch"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Upјednostђovat digitсlnэ zvukovщ efekty"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Upјednostђovat digitсlnэ zvukovщ efekty pјed syntetizovan§mi"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "PouОэt IMF/Yamaha FB-01 pro v§stup MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1337,28 +1337,28 @@ msgstr ""
"PouОэt kartu IBM Music Feature nebo modul syntetizсtoru Yamaha FB-01 FM pro "
"v§stup MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "PouОэt zvuky na CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "PouОэt zvuky na CD mэsto ve hјe, pokud je dostupnщ"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "PouОэt kurzory Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "PouОэt kurzory Windows (menЙэ a шernobэlщ) mэsto kurzorљ z DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "PouОэt stјэbrnщ kurzory"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr "PouОэt alternativnэ sadu stјэbrn§ch kurzorљ mэsto standardnэch zlat§ch"
@@ -2010,7 +2010,7 @@ msgstr "Letьt doprava"
msgid "Fly to lower right"
msgstr "Letьt doprava dolљ"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2019,7 +2019,7 @@ msgstr ""
"Pјirozenс podpora MIDI vyОaduje Aktualizaci Roland od LucasArts,\n"
"ale %s chybэ. Mэsto toho je pouОit AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2030,7 +2030,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2041,7 +2041,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2052,7 +2052,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2088,7 +2088,7 @@ msgstr "~H~lavnэ Menu"
msgid "~W~ater Effect Enabled"
msgstr "~E~fekt Vody Zapnut"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Soubor videa '%s' nenalezen'"
@@ -2216,7 +2216,7 @@ msgstr "Volby"
msgid "Choose Spell"
msgstr "Zvolit Kouzlo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2263,25 +2263,25 @@ msgstr "кvod z diskety"
msgid "Use the floppy version's intro (CD version only)"
msgstr "PouОэt verzi њvodu z diskety (Pouze verze CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Proud videa PSX '%s' nemљОe b§t pјehrсn v reОimu palety"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr "Videa DXA nalezena, ale ScummVM byl sestaven bez podpory zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Videa MPGE2 jiО nejsou podporovсna"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Video '%s' nenalezeno"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2299,7 +2299,7 @@ msgstr ""
"Stisknьte OK, abyste je pјevedli teя, jinak budete poОсdсni znovu, pјi "
"spuЙtьnэ tщto hry.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2308,11 +2308,11 @@ msgstr ""
"Novс cэlovс uloОenс hra jiО existuje!\n"
"Chtьli byste ponechat starou uloОenou hru (%s), nebo novou (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Ponechat starou"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Ponechat novou"
@@ -2320,7 +2320,7 @@ msgstr "Ponechat novou"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Toto je konec Dema Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "Videa PSX nalezena, ale ScummVM byl sestaven bez podpory barev RGB"
@@ -2333,12 +2333,12 @@ msgstr "Zobrazit jmenovky objektљ"
msgid "Show labels for objects on mouse hover"
msgstr "Zobrazit jmenovky objektљ pјi najetэ myЙi"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2450,7 +2450,7 @@ msgstr "Bez hudby"
msgid "Amiga Audio Emulator"
msgstr "Emulсtor zvuku Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulсtor"
@@ -2617,24 +2617,24 @@ msgstr "Kliknutэ prostјednэm tlaшэtkem"
msgid "Right Click"
msgstr "Pravщ kliknutэ"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Skr§t ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Skr§t Ostatnэ"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Zobrazit VЙe"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Okno"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimalizovat"
@@ -3018,19 +3018,19 @@ msgstr "Opravdu chcete skonшit?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Levщ Kliknutэ"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Pravщ Kliknutэ"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Najetэ (Bez Kliknutэ)"
@@ -3050,7 +3050,12 @@ msgstr "Minimсlnэ Hlasitost"
msgid "Decreasing Volume"
msgstr "SniОuji Hlasitost"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Najetэ (Bez Kliknutэ)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Zkontrolovat Aktualizace..."
diff --git a/po/da_DA.po b/po/da_DA.po
index b30ef1bf02..002bd4e13c 100644
--- a/po/da_DA.po
+++ b/po/da_DA.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-09 20:27+0100\n"
"Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n"
@@ -46,10 +46,10 @@ msgstr "Gх op"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -71,15 +71,15 @@ msgstr "Luk"
msgid "Mouse click"
msgstr "Muse klik"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Vis tastatur"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Kortlцg taster"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Skift fuldskцrm"
@@ -93,15 +93,15 @@ msgstr "Kortlцg"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -357,7 +357,7 @@ msgstr "Dette spil ID er allerede i brug. Vцlg venligst et andet."
msgid "~Q~uit"
msgstr "~A~fslut"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Slut ScummVM"
@@ -365,7 +365,7 @@ msgstr "Slut ScummVM"
msgid "A~b~out..."
msgstr "~O~m..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -919,74 +919,74 @@ msgstr ""
"Temaet du valgte understјtter ikke dit aktuelle sprog. Hvis du јnsker at "
"bruge dette tema, skal du skifte til et andet sprog fјrst."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ingen dato gemt"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Intet tidspunkt gemt"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ingen spilletid gemt"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Slet"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vil du virkelig slette denne gemmer?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dato:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Spilletid:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Unavngivet gemmetilstand"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Gem"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Mislykkedes at gemme spil"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Navn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1024,35 +1024,35 @@ msgstr "Antialias (16bpp)"
msgid "Clear value"
msgstr "Slet vцrdi"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motor understјtter ikke fejlfindingsniveau '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Spring over"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Spring linje over"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Fejl ved kјrsel af spil:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikke finde nogen motor istand til at afvikle det valgte spil"
@@ -1284,13 +1284,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Start alligevel"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Brug original gem/indlцs skцrme"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Brug de originale gem/indlцs skцrme, istedet for dem fra ScummVM"
@@ -1310,27 +1310,27 @@ msgstr "Brug lys palet tilstand"
msgid "Display graphics using the game's bright palette"
msgstr "Vis grafik ved hjцlp af spillets lyse palette"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA farveforјgelse"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktiver farveforјgelse i EGA spil"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Foretrцk digitale lydeffekter"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Foretrцk digitale lydeffekter i stedet for syntetiserede"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Brug IMF/Yamaha FB-01 til MIDI-udgang"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1338,28 +1338,28 @@ msgstr ""
"Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til "
"MIDI-udgang"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Brug CD lyd"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Brug cd-lyd i stedet for lyd fra spillet, hvis tilgцngelige"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Brug Windows markјr"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Brug Windows-markјrer (mindre og monokrome) i stedet for dem fra DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Brug sјlv markјr"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2012,7 +2012,7 @@ msgstr "Flyv til hјjre"
msgid "Fly to lower right"
msgstr "Flyv nederst til hјjre"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2021,7 +2021,7 @@ msgstr ""
"Indbygget MIDI understјttelse krцver Roland opgradering fra LucasArts,\n"
"men %s mangler. Bruger AdLib i stedet."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2032,7 +2032,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2043,7 +2043,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2054,7 +2054,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2090,7 +2090,7 @@ msgstr "Hoved~m~enu"
msgid "~W~ater Effect Enabled"
msgstr "~V~andeffekter aktiveret"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Filmsekvens fil '%s' ikke fundet!"
@@ -2218,7 +2218,7 @@ msgstr "Indstillinger"
msgid "Choose Spell"
msgstr "Vцlg magi"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2265,26 +2265,26 @@ msgstr "Diskette intro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Brug diskette versionens intro (kun CD version)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX stream filmsekvens '%s' kan ikke afspilles i palette tilstand"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understјttelse"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 filmsekvenser understјttes ikke lцngere"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Filmsekvens '%s' ikke fundet"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2302,7 +2302,7 @@ msgstr ""
"Tryk pх OK for at konvertere dem nu, ellers vil du blive spurgt igen, nцste "
"gang du starter spillet.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2311,11 +2311,11 @@ msgstr ""
"Nyt gemt spil findes allerede!\n"
"Vil du gerne beholde det gamle gemte spil (%s) eller det nye (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Behold den gamle"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Behold den nye"
@@ -2323,7 +2323,7 @@ msgstr "Behold den nye"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Dette er slutningen af Broken Sword 1 demoen"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2337,12 +2337,12 @@ msgstr "Vis labels pх genstande"
msgid "Show labels for objects on mouse hover"
msgstr "Vis labels for genstande musen er henover"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2453,7 +2453,7 @@ msgstr "Ingen musik"
msgid "Amiga Audio Emulator"
msgstr "Amiga lyd emulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib emulator"
@@ -2620,24 +2620,24 @@ msgstr "Miderste klik"
msgid "Right Click"
msgstr "Hјjre klik"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Skjul ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Skjul andre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Vis alle"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Vindue"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimer"
@@ -3020,19 +3020,19 @@ msgstr "Vil du virkelig afslutte?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Tap Mode' - Venstre Klik"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Tap Mode' - Hјjre Klik"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Tap Mode' - Henover (Ingen Klik)"
@@ -3052,7 +3052,12 @@ msgstr "Minimal lydstyrke"
msgid "Decreasing Volume"
msgstr "Sцnker lydstyrke"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Mode' - Henover (Ingen Klik)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Sјg efter opdateringer..."
diff --git a/po/de_DE.po b/po/de_DE.po
index a18bfb7ca6..ae7b48eae0 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-14 22:49+0100\n"
"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n"
"Language-Team: Simon Sawatzki <SimSaw@gmx.de> (Lead), Lothar Serra Mari "
@@ -46,10 +46,10 @@ msgstr "Pfad hoch"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -71,15 +71,15 @@ msgstr "Schlieпen"
msgid "Mouse click"
msgstr "Mausklick"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Tastatur anzeigen"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Tasten neu zuweisen"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Vollbild EIN/AUS"
@@ -93,15 +93,15 @@ msgstr "Zuweisen"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -357,7 +357,7 @@ msgstr "Diese Spielkennung ist schon vergeben. Bitte eine andere wфhlen."
msgid "~Q~uit"
msgstr "~B~eenden"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "ScummVM beenden"
@@ -365,7 +365,7 @@ msgstr "ScummVM beenden"
msgid "A~b~out..."
msgstr "мbe~r~"
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "мber ScummVM"
@@ -936,74 +936,74 @@ msgstr ""
"dieses Thema benutzen wollen, mќssen Sie erst zu einer anderen Sprache "
"wechseln."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Kein Datum gespeichert"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Keine Zeit gespeichert"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Keine Spielzeit gespeichert"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Lіschen"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Diesen Spielstand wirklich lіschen?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Datum: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Zeit: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Spieldauer: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Unbenannt"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Speichern"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Konnte Spielstand nicht speichern."
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Name:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1041,35 +1041,35 @@ msgstr "Kantenglфttung (16bpp)"
msgid "Clear value"
msgstr "Wert lіschen"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Engine unterstќtzt den Debug-Level \"%s\" nicht."
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menќ"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "мberspringen"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Zeile ќberspringen"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Fehler beim Ausfќhren des Spiels:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Konnte keine Spiel-Engine finden, die dieses Spiel starten kann."
@@ -1306,13 +1306,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Trotzdem starten"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Originale Spielstand-Menќs"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Verwendet die originalen Menќs zum Speichern und Laden statt der von ScummVM."
@@ -1333,27 +1333,27 @@ msgstr "Modus fќr helle Palette verwenden"
msgid "Display graphics using the game's bright palette"
msgstr "Zeigt Grafiken ќber helle Spielpalette an."
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Antifehlerdiffusion fќr EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen."
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Digitale Sound-Effekte bevorzugen"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Bevorzugt digitale Sound-Effekte statt synthethisierter."
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "IMF/Yamaha FB-01 fќr MIDI-Ausgabe verwenden"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1361,30 +1361,30 @@ msgstr ""
"Verwendet eine Music-Feature-Karte von IBM oder ein Yamaha-FB-01-FM-"
"Synthetisierungsmodul fќr die MIDI-Ausgabe."
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "CD-Ton verwenden"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Verwendet CD-Ton anstatt des Tons im Spiel, sofern verfќgbar."
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Windows-Mauszeiger verwenden"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Verwendet die Windows-Mauszeiger (kleiner und schwarz-weiп) anstatt der von "
"DOS."
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Silberne Mauszeiger verwenden"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2038,7 +2038,7 @@ msgstr "Nach rechts fliegen"
msgid "Fly to lower right"
msgstr "Nach unten rechts fliegen"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2048,7 +2048,7 @@ msgstr ""
"Roland-Upgrade von LucasArts, aber %s\n"
"fehlt. Stattdessen wird AdLib verwendet."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2059,7 +2059,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2070,7 +2070,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2081,7 +2081,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2118,7 +2118,7 @@ msgstr "Haupt~m~enќ"
msgid "~W~ater Effect Enabled"
msgstr "~W~assereffekt aktiviert"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Zwischensequenz \"%s\" nicht gefunden!"
@@ -2246,7 +2246,7 @@ msgstr "Optionen"
msgid "Choose Spell"
msgstr "Zauberspruch auswфhlen"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2297,28 +2297,28 @@ msgstr "Disketten-Vorspann"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Verwendet den Vorspann der Diskettenversion (nur bei CD-Version)."
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"PSX-Zwischensequenz \"%s\" kann in Palettenmodus nicht wiedergegeben werden."
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"DXA-Zwischensequenzen gefunden, aber ScummVM wurde ohne Zlib-Unterstќtzung "
"erstellt."
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2-Zwischensequenzen werden nicht mehr unterstќtzt."
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Zwischensequenz \"%s\" gefunden"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2336,7 +2336,7 @@ msgstr ""
"Klicken Sie auf OK, um diese jetzt umzuwandeln, sonst werden Sie erneut "
"gefragt, wenn Sie nфchstes Mal dieses Spiel starten.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2345,11 +2345,11 @@ msgstr ""
"Die fќr den neuen Spielstand vorgesehene Datei existiert bereits!\n"
"Mіchten Sie den alten Speicherstand (%s) oder den neuen (%s) behalten?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Den alten behalten"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Den neuen behalten"
@@ -2357,7 +2357,7 @@ msgstr "Den neuen behalten"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Das ist das Ende der Demo von Broken Sword 1 (Baphomets Fluch 1)."
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2372,12 +2372,12 @@ msgstr "Objektnamen zeigen"
msgid "Show labels for objects on mouse hover"
msgstr "Zeigt Objektbeschriftungen bei Mausberќhrung an."
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2490,7 +2490,7 @@ msgstr "Keine Musik"
msgid "Amiga Audio Emulator"
msgstr "Amiga-Audio-Emulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib-Emulator"
@@ -2657,24 +2657,24 @@ msgstr "Mittelklick"
msgid "Right Click"
msgstr "Rechtsklick"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "ScummVM ausblenden"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Andere ausblenden"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Alle einblenden"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Fenster"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Im Dock ablegen"
@@ -3058,19 +3058,19 @@ msgstr "Mіchten Sie wirklich beenden?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Berќhrungsbildschirm-Tipp-Modus - Linksklick"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Berќhrungsbildschirm-Tipp-Modus - Rechtsklick"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Berќhrungsbildschirm-Tipp-Modus - schweben (kein Klick)"
@@ -3090,7 +3090,12 @@ msgstr "Niedrigste Lautstфrke"
msgid "Decreasing Volume"
msgstr "Lautstфrke niedriger"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Berќhrungsbildschirm-Tipp-Modus - schweben (kein Klick)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Suche nach Aktualisierungen..."
diff --git a/po/es_ES.po b/po/es_ES.po
index 9f767dacfa..13bbc16584 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.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-08 18:19+0100\n"
"Last-Translator: Tomсs Maidagan\n"
"Language-Team: \n"
@@ -44,10 +44,10 @@ msgstr "Arriba"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -69,15 +69,15 @@ msgstr "Cerrar"
msgid "Mouse click"
msgstr "Clic de ratѓn"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostrar el teclado"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Activar pantalla completa"
@@ -91,15 +91,15 @@ msgstr "Asignar"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -355,7 +355,7 @@ msgstr "Esta ID ya estс siendo usada. Por favor, elige otra."
msgid "~Q~uit"
msgstr "~S~alir"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Salir de ScummVM"
@@ -363,7 +363,7 @@ msgstr "Salir de ScummVM"
msgid "A~b~out..."
msgstr "Acerca ~d~e"
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Acerca de ScummVM"
@@ -925,74 +925,74 @@ msgstr ""
"El tema seleccionado no es compatible con el idioma actual. Si quieres usar "
"este tema debes cambiar a otro idioma primero."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "No hay fecha guardada"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "No hay hora guardada"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "No hay tiempo guardado"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Borrar"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "ПSeguro que quieres borrar esta partida?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Fecha: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tiempo: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Partida sin nombre"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Guardar"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Fallo al guardar la partida"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Nombre:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1030,35 +1030,35 @@ msgstr "Suavizado (16bpp)"
msgid "Clear value"
msgstr "Eliminar valor"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "El motor no es compatible con el nivel de debug '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menњ"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Saltar"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausar"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Saltar frase"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Error al ejecutar el juego:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "No se ha podido encontrar ningњn motor capaz de ejecutar el juego"
@@ -1290,13 +1290,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Jugar aun asэ"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Usar pantallas de guardar/cargar originales"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utilizar las pantallas de guardar/cargar originales, en vez de las de ScummVM"
@@ -1317,27 +1317,27 @@ msgstr "Usar paleta original"
msgid "Display graphics using the game's bright palette"
msgstr "Utilizar los niveles de brillo originales del juego"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Difuminado EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activar difuminado en los juegos EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Preferir efectos de sonido digitales"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Preferir efectos de sonido digitales en vez de los sintetizados"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Usar IMF/Yamaha FB-01 para la salida MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1345,29 +1345,29 @@ msgstr ""
"Usa una tarjeta IBM Music o un mѓdulo sintetizador Yamaha FB-01 FM para la "
"salida MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Usar CD audio"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Usa CD audio en vez del sonido interno del juego, si estс disponible"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Usar cursores de Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Usar los cursores de Windows (mсs pequeёos y monocromos) en vez de los de DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Usar cursores plateados"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2020,7 +2020,7 @@ msgstr "Volar a la derecha"
msgid "Fly to lower right"
msgstr "Volar abajo y a la derecha"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2029,7 +2029,7 @@ msgstr ""
"El soporte MIDI nativo requiere la actualizaciѓn Roland de LucasArts,\n"
"pero %s no estс disponible. Se usarс AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2040,7 +2040,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2051,7 +2051,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2062,7 +2062,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2098,7 +2098,7 @@ msgstr "~M~enњ principal"
msgid "~W~ater Effect Enabled"
msgstr "Efecto ag~u~a activado"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "No se ha encontrado el vэdeo '%s'"
@@ -2226,7 +2226,7 @@ msgstr "Opciones"
msgid "Choose Spell"
msgstr "Elegir hechizo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2275,26 +2275,26 @@ msgid "Use the floppy version's intro (CD version only)"
msgstr ""
"Usa la introducciѓn de la versiѓn en disquete (solo para la versiѓn CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "El vэdeo de PSX '%s' no se puede reproducir en modo paleta"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Se han encontrado vэdeos DXA, pero se ha compilado ScummVM sin soporte zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Los vэdeos MPEG2 ya no son compatibles"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "No se ha encontrado el vэdeo '%s'"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2312,7 +2312,7 @@ msgstr ""
"Pulsa Aceptar para actualizarlas, si no lo haces este mensaje volverс a "
"aparecer la prѓxima vez.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2321,11 +2321,11 @@ msgstr ""
"ЁLa partida guardada ya existe!\n"
"ПQuieres conservar la partida guardada antigua (%s) o la nueva (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Conservar la antigua"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Conservar la nueva"
@@ -2333,7 +2333,7 @@ msgstr "Conservar la nueva"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Este es el final de la demo de Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2348,12 +2348,12 @@ msgstr "Mostrar etiquetas de objetos"
msgid "Show labels for objects on mouse hover"
msgstr "Muestra las etiquetas de los objetos al pasar el ratѓn"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2466,7 +2466,7 @@ msgstr "Sin mњsica"
msgid "Amiga Audio Emulator"
msgstr "Emulador de Amiga Audio"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador de AdLib"
@@ -2633,24 +2633,24 @@ msgstr "Clic central"
msgid "Right Click"
msgstr "Clic derecho"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ocultar ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ocultar otros"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostrar todo"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Ventana"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizar"
@@ -3033,19 +3033,19 @@ msgstr "ПRealmente quieres salir?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "'Modo toque' de pantalla tсctil - Clic izquierdo"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "'Modo toque' de pantalla tсctil - Clic derecho"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "'Modo toque' de pantalla tсctil - Flotante (sin clic)"
@@ -3065,7 +3065,12 @@ msgstr "Volumen mэnimo"
msgid "Decreasing Volume"
msgstr "Bajando el volumen"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "'Modo toque' de pantalla tсctil - Flotante (sin clic)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Buscar actualizaciones..."
diff --git a/po/eu.po b/po/eu.po
index b0fd177575..4d6c329db3 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.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2011-12-15 14:53+0100\n"
"Last-Translator: Mikel Iturbe Urretxa <mikel@hamahiru.org>\n"
"Language-Team: Librezale <librezale@librezale.org>\n"
@@ -44,10 +44,10 @@ msgstr "Joan gora"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -69,15 +69,15 @@ msgstr "Itxi"
msgid "Mouse click"
msgstr "Sagu-klika"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Teklatua erakutsi"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Teklak esleitu"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Txandakatu pantaila osoa"
@@ -91,15 +91,15 @@ msgstr "Esleitu"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -355,7 +355,7 @@ msgstr "ID hau jada erabilia izaten ari da. Mesedez, aukeratu beste bat."
msgid "~Q~uit"
msgstr "~I~rten"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Irten ScummVM-tik"
@@ -363,7 +363,7 @@ msgstr "Irten ScummVM-tik"
msgid "A~b~out..."
msgstr "Ho~n~i buruz..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "ScummVM-i buruz"
@@ -926,74 +926,74 @@ msgstr ""
"Aukeraturiko gaia ez da zure hizkuntzarekin bateragarria. Gai hau erabili "
"nahi baduzu, aurretik beste hizkuntza batera pasa behar duzu."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ez dago datarik gordeta"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Ez dago ordurik gordeta"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ez dago denborarik gordeta"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Ezabatu"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Ezabatu partida gorde hau?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Ordua"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Denbora:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Titulurik gabeko partida"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Gorde"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Ezin izan da jokoa gorde"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Izena:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1031,35 +1031,35 @@ msgstr "Lausotua (16bpp)"
msgid "Clear value"
msgstr "Balioa kendu:"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoreak ez da '%s' debug mailarekin bateragarria"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menua"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Saltatu"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Gelditu"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Lerroa saltatu"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Jokoa exekutatzean errorea:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Ezin izan da aukeraturiko jokoa exekutatzeko gai den motorerik aurkitu"
@@ -1288,13 +1288,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Jolastu berdin-berdin"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -1315,57 +1315,57 @@ msgstr "Goiko eskuineko objektua"
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA lausotzea"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
#, fuzzy
msgid "Enable undithering in EGA games"
msgstr "EGA lausotzea gaitu joko bateragarrietan"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
#, fuzzy
msgid "Prefer digital sound effects"
msgstr "Soinu efektu berezien bolumena"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
#, fuzzy
msgid "Use silver cursors"
msgstr "Kurtsore normala"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2017,7 +2017,7 @@ msgstr "Eskuinera hegan egin"
msgid "Fly to lower right"
msgstr "Behera eta eskuinera hegan egin"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2026,7 +2026,7 @@ msgstr ""
"MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n"
"baina %s ez dago eskuragarri. AdLib erabiliko da."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2037,7 +2037,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2048,7 +2048,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2059,7 +2059,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2095,7 +2095,7 @@ msgstr "Menu ~n~agusia"
msgid "~W~ater Effect Enabled"
msgstr "~U~r-efektua gaituta"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "'%s' bideo fitxategia ez da aurkitu!"
@@ -2225,7 +2225,7 @@ msgstr "Aukerak"
msgid "Choose Spell"
msgstr "Sorginkeria aukeratu"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
#, fuzzy
msgid ""
"You appear to be using a General MIDI device,\n"
@@ -2272,26 +2272,26 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"DXA bideoak aurkitu dira, baina ScummVM zlib euskarri gabe konpilatu da"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 bideoak ez dira bateragarriak jada"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Ez da '%s' bideoa aurkitu"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2309,7 +2309,7 @@ msgstr ""
"Sakatu Ados orain konbertitzeko, bestela berriz galdetuko dizut jokoa berriz "
"martxan jartzen duzunean.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2318,11 +2318,11 @@ msgstr ""
"Gordetako partida jadanik existitzen da!\n"
"Gordetako partida zaharra (%s) ala berria (%s) mantendu nahi zenuke?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Zaharra mantendu"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Berria mantendu"
@@ -2330,7 +2330,7 @@ msgstr "Berria mantendu"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Hau Broken Sword 1 Demoaren amaiera da"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2345,12 +2345,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2463,7 +2463,7 @@ msgstr "Musikarik ez"
msgid "Amiga Audio Emulator"
msgstr "Amiga Audio emuladorea"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib emuladorea"
@@ -2630,24 +2630,24 @@ msgstr "Erdiko klika"
msgid "Right Click"
msgstr "Eskuin-klika"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "ScummVM ezkutatu"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Besteak ezkutatu"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Denak erakutsi"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Leihoa"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizatu"
@@ -3030,19 +3030,19 @@ msgstr "Benetan irten?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Ukimen-pantailako 'kolpetxo modua' - Ezker klika"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Ukimen-pantailako 'kolpetxo modua' - Eskuin klika"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Ukimen-pantailako 'kolpetxo modua' - Flotatu (klikik ez)"
@@ -3062,7 +3062,12 @@ msgstr "Bolumen minimoa"
msgid "Decreasing Volume"
msgstr "Bolumena jaisten"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Ukimen-pantailako 'kolpetxo modua' - Flotatu (klikik ez)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Eguneraketak bilatzen..."
diff --git a/po/fi_FI.po b/po/fi_FI.po
new file mode 100644
index 0000000000..0cac4d6c79
--- /dev/null
+++ b/po/fi_FI.po
@@ -0,0 +1,3096 @@
+# Finnish translation for ScummVM.
+# Copyright (C) 2012 ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# Toni Saarela <saarela@gmail.com>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.6.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"PO-Revision-Date: 2012-12-01 19:37+0200\n"
+"Last-Translator: Toni Saarela <saarela@gmail.com>\n"
+"Language-Team: Finnish\n"
+"Language: Suomi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: gui/about.cpp:91
+#, c-format
+msgid "(built on %s)"
+msgstr "(kффnnіksen pфivфys: %s)"
+
+#: gui/about.cpp:98
+msgid "Features compiled in:"
+msgstr "Tфhфn versioon kффnnetyt ominaisuudet:"
+
+#: gui/about.cpp:107
+msgid "Available engines:"
+msgstr "Tuetut pelimoottorit:"
+
+#: gui/browser.cpp:66
+msgid "Go up"
+msgstr "Siirry ylіs"
+
+#: gui/browser.cpp:66 gui/browser.cpp:68
+msgid "Go to previous directory level"
+msgstr "Palaa edelliselle hakemistotasolle"
+
+#: gui/browser.cpp:68
+msgctxt "lowres"
+msgid "Go up"
+msgstr "Siirry ylіs"
+
+#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
+#: gui/themebrowser.cpp:54 engines/engine.cpp:442
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
+#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:213
+msgid "Cancel"
+msgstr "Peruuta"
+
+#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+msgid "Choose"
+msgstr "Valitse"
+
+#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125
+#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165
+#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209
+#: backends/keymapper/remap-dialog.cpp:52
+msgid "Close"
+msgstr "Sulje"
+
+#: gui/gui-manager.cpp:118
+msgid "Mouse click"
+msgstr "Hiiren klikkaus"
+
+#: gui/gui-manager.cpp:122 base/main.cpp:301
+msgid "Display keyboard"
+msgstr "Nфytф nфppфimistі"
+
+#: gui/gui-manager.cpp:126 base/main.cpp:305
+msgid "Remap keys"
+msgstr "Mффritф nфppфimet uudelleen"
+
+#: gui/gui-manager.cpp:129 base/main.cpp:308
+msgid "Toggle FullScreen"
+msgstr "Kokoruututilan vaihto"
+
+#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
+msgid "Choose an action to map"
+msgstr "Valitse toiminto"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "Nфppфinkartta"
+
+#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
+#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
+#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: backends/platform/wince/CELauncherDialog.cpp:54
+msgid "OK"
+msgstr "Tallenna"
+
+#: gui/KeysDialog.cpp:49
+msgid "Select an action and click 'Map'"
+msgstr "Valitse toiminto ja klikkaa 'Map'"
+
+#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
+#, c-format
+msgid "Associated key : %s"
+msgstr "Nykyinen nфppфin : %s"
+
+#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
+#, c-format
+msgid "Associated key : none"
+msgstr "Nykyinen nфppфin : ei mikффn"
+
+#: gui/KeysDialog.cpp:90
+msgid "Please select an action"
+msgstr "Valitse toiminto"
+
+#: gui/KeysDialog.cpp:106
+msgid "Press the key to associate"
+msgstr "Paina haluamaasi nappia"
+
+#: gui/launcher.cpp:187
+msgid "Game"
+msgstr "Peli"
+
+#: gui/launcher.cpp:191
+msgid "ID:"
+msgstr "Tunniste:"
+
+#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194
+msgid ""
+"Short game identifier used for referring to savegames and running the game "
+"from the command line"
+msgstr ""
+"Lyhyt pelitunniste, jota kфytetффn kun viitataan pelitallennuksiin ja kun "
+"peli kфynnistetффn komentoriviltф"
+
+#: gui/launcher.cpp:193
+msgctxt "lowres"
+msgid "ID:"
+msgstr "Tunniste:"
+
+#: gui/launcher.cpp:198
+msgid "Name:"
+msgstr "Nimi:"
+
+#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201
+msgid "Full title of the game"
+msgstr "Pelin koko nimi"
+
+#: gui/launcher.cpp:200
+msgctxt "lowres"
+msgid "Name:"
+msgstr "Nimi:"
+
+#: gui/launcher.cpp:204
+msgid "Language:"
+msgstr "Kieli:"
+
+#: gui/launcher.cpp:204 gui/launcher.cpp:205
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"Pelin kieli. Tфmф ei muuta esimerkiksi espanjankielistф versiota pelistф "
+"englanninkieliseksi."
+
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
+#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: audio/null.cpp:40
+msgid "<default>"
+msgstr "<oletus>"
+
+#: gui/launcher.cpp:216
+msgid "Platform:"
+msgstr "Alusta:"
+
+#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219
+msgid "Platform the game was originally designed for"
+msgstr "Alusta jolle peli alunperin suunniteltiin"
+
+#: gui/launcher.cpp:218
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "Alusta:"
+
+#: gui/launcher.cpp:231
+msgid "Engine"
+msgstr "Moottori"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+msgid "Graphics"
+msgstr "Grafiikka"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+msgid "GFX"
+msgstr "GFX"
+
+#: gui/launcher.cpp:242
+msgid "Override global graphic settings"
+msgstr "Ohita globaalit grafiikka-asetukset"
+
+#: gui/launcher.cpp:244
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "Ohita globaalit grafiikka-asetukset"
+
+#: gui/launcher.cpp:251 gui/options.cpp:1085
+msgid "Audio"
+msgstr "Ффni"
+
+#: gui/launcher.cpp:254
+msgid "Override global audio settings"
+msgstr "Ohita globaalit ффniasetukset"
+
+#: gui/launcher.cpp:256
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "Ohita globaalit ффniasetukset"
+
+#: gui/launcher.cpp:265 gui/options.cpp:1090
+msgid "Volume"
+msgstr "Voimakkuus"
+
+#: gui/launcher.cpp:267 gui/options.cpp:1092
+msgctxt "lowres"
+msgid "Volume"
+msgstr "Voimakkuus"
+
+#: gui/launcher.cpp:270
+msgid "Override global volume settings"
+msgstr "Ohita globaalit ффnenvoimakkuusasetukset"
+
+#: gui/launcher.cpp:272
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "Ohita globaalit ффnenvoimakkuusasetukset"
+
+#: gui/launcher.cpp:280 gui/options.cpp:1100
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/launcher.cpp:283
+msgid "Override global MIDI settings"
+msgstr "Ohita globaalit MIDI-asetukset"
+
+#: gui/launcher.cpp:285
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "Ohita globaalit MIDI-asetukset"
+
+#: gui/launcher.cpp:294 gui/options.cpp:1106
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/launcher.cpp:297
+msgid "Override global MT-32 settings"
+msgstr "Ohita globaalit MT-32 asetukset"
+
+#: gui/launcher.cpp:299
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "Ohita globaalit MT-32 asetukset"
+
+#: gui/launcher.cpp:308 gui/options.cpp:1113
+msgid "Paths"
+msgstr "Polut"
+
+#: gui/launcher.cpp:310 gui/options.cpp:1115
+msgctxt "lowres"
+msgid "Paths"
+msgstr "Polut"
+
+#: gui/launcher.cpp:317
+msgid "Game Path:"
+msgstr "Pelin polku:"
+
+#: gui/launcher.cpp:319
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "Pelin polku:"
+
+#: gui/launcher.cpp:324 gui/options.cpp:1139
+msgid "Extra Path:"
+msgstr "Lisфkansio:"
+
+#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327
+msgid "Specifies path to additional data used the game"
+msgstr "Mффrittфф polun lisфtiedostoihin joita peli mahdollisesti kфyttфф"
+
+#: gui/launcher.cpp:326 gui/options.cpp:1141
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "Lisфkansio:"
+
+#: gui/launcher.cpp:333 gui/options.cpp:1123
+msgid "Save Path:"
+msgstr "Tallennuskansio:"
+
+#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
+#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+msgid "Specifies where your savegames are put"
+msgstr "Mффrittфф polun pelitallennuksille"
+
+#: gui/launcher.cpp:335 gui/options.cpp:1125
+msgctxt "lowres"
+msgid "Save Path:"
+msgstr "Tallennuskansio:"
+
+#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
+#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
+#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
+#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
+#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
+#: gui/options.cpp:1423
+msgctxt "path"
+msgid "None"
+msgstr "Ei mффritelty"
+
+#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
+#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: backends/platform/wii/options.cpp:56
+msgid "Default"
+msgstr "Oletus"
+
+#: gui/launcher.cpp:504 gui/options.cpp:1417
+msgid "Select SoundFont"
+msgstr "Valitse ффnifontti"
+
+#: gui/launcher.cpp:523 gui/launcher.cpp:677
+msgid "Select directory with game data"
+msgstr "Valitse pelin kansio"
+
+#: gui/launcher.cpp:541
+msgid "Select additional game directory"
+msgstr "Valitse lisфkansio pelille"
+
+#: gui/launcher.cpp:553
+msgid "Select directory for saved games"
+msgstr "Valitse kansio pelitallennuksille"
+
+#: gui/launcher.cpp:580
+msgid "This game ID is already taken. Please choose another one."
+msgstr "Pelin tunnus on jo kфytіssф. Valitse jokin muu."
+
+#: gui/launcher.cpp:621 engines/dialogs.cpp:110
+msgid "~Q~uit"
+msgstr "~L~opeta"
+
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
+msgid "Quit ScummVM"
+msgstr "Lopeta ScummVM"
+
+#: gui/launcher.cpp:622
+msgid "A~b~out..."
+msgstr "Tietoa..."
+
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
+msgid "About ScummVM"
+msgstr "Tietoa ScummVM:stф"
+
+#: gui/launcher.cpp:623
+msgid "~O~ptions..."
+msgstr "~A~setukset"
+
+#: gui/launcher.cpp:623
+msgid "Change global ScummVM options"
+msgstr "Muuta globaaleja ScummVM:n asetuksia"
+
+#: gui/launcher.cpp:625
+msgid "~S~tart"
+msgstr "~P~elaa"
+
+#: gui/launcher.cpp:625
+msgid "Start selected game"
+msgstr "Pelaa valittua peliф"
+
+#: gui/launcher.cpp:628
+msgid "~L~oad..."
+msgstr "~L~ataa..."
+
+#: gui/launcher.cpp:628
+msgid "Load savegame for selected game"
+msgstr "Lataa pelitallennus valitulle pelille"
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:1120
+msgid "~A~dd Game..."
+msgstr "~L~isфф peli..."
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:640
+msgid "Hold Shift for Mass Add"
+msgstr "Pidф Shift-nфppфintф pohjassa lisфtфksesi useita pelejф kerralla"
+
+#: gui/launcher.cpp:635
+msgid "~E~dit Game..."
+msgstr "Muokkaa peliф..."
+
+#: gui/launcher.cpp:635 gui/launcher.cpp:642
+msgid "Change game options"
+msgstr "Muuta pelin asetuksia"
+
+#: gui/launcher.cpp:637
+msgid "~R~emove Game"
+msgstr "Poista peli"
+
+#: gui/launcher.cpp:637 gui/launcher.cpp:644
+msgid "Remove game from the list. The game data files stay intact"
+msgstr "Poista peli listasta. Pelin tiedostoja ei poisteta levyltф"
+
+#: gui/launcher.cpp:640 gui/launcher.cpp:1120
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "Lisфф peli..."
+
+#: gui/launcher.cpp:642
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "Muokkaa peliф..."
+
+#: gui/launcher.cpp:644
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "Poista peli..."
+
+#: gui/launcher.cpp:652
+msgid "Search in game list"
+msgstr "Etsi peliф listasta"
+
+#: gui/launcher.cpp:656 gui/launcher.cpp:1167
+msgid "Search:"
+msgstr "Etsi:"
+
+#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
+#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+msgid "Load game:"
+msgstr "Lataa peli:"
+
+#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
+#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
+#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Load"
+msgstr "Lataa"
+
+#: gui/launcher.cpp:788
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"Haluatko varmasti lisфtф pelejф alihakemistoineen? Tфmф voi lisфtф suuren "
+"mффrфn pelejф."
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Yes"
+msgstr "Kyllф"
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "No"
+msgstr "Ei"
+
+#: gui/launcher.cpp:837
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "ScummVM ei voi avata kyseistф hakemistoa!"
+
+#: gui/launcher.cpp:849
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr "ScummVM ei lіytфnyt yhtффn peliф kyseisestф hakemistosta!"
+
+#: gui/launcher.cpp:863
+msgid "Pick the game:"
+msgstr "Valitse peli:"
+
+#: gui/launcher.cpp:937
+msgid "Do you really want to remove this game configuration?"
+msgstr "Haluatko varmasti poistaa pelin asetuksineen listalta?"
+
+#: gui/launcher.cpp:1001
+msgid "This game does not support loading games from the launcher."
+msgstr "Tфmф peli ei tue pelitallennuksien lataamista pelin ulkopuolelta."
+
+#: gui/launcher.cpp:1005
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr "ScummVM ei lіytфnyt pelimoottoria joka tukee valittua peliф!"
+
+#: gui/launcher.cpp:1119
+msgctxt "lowres"
+msgid "Mass Add..."
+msgstr "Lisфф monta..."
+
+#: gui/launcher.cpp:1119
+msgid "Mass Add..."
+msgstr "Lisфф monta..."
+
+#: gui/massadd.cpp:78 gui/massadd.cpp:81
+msgid "... progress ..."
+msgstr "... skannaa ..."
+
+#: gui/massadd.cpp:258
+msgid "Scan complete!"
+msgstr "Skannaus on valmis!"
+
+#: gui/massadd.cpp:261
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr ""
+"%d uutta peliф lіytyi, jфtettiin %d peliф huomiotta, koska ne oli jo lisфtty "
+"aiemmin."
+
+#: gui/massadd.cpp:265
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "Skannattiin %d hakemistoa ..."
+
+#: gui/massadd.cpp:268
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr ""
+"%d uutta peliф lіytyi, jфtettiin %d peliф huomiotta, koska ne oli jo lisфtty "
+"aiemmin."
+
+#: gui/options.cpp:78
+msgid "Never"
+msgstr "Ei koskaan"
+
+#: gui/options.cpp:78
+msgid "every 5 mins"
+msgstr "5 minuutin vфlein"
+
+#: gui/options.cpp:78
+msgid "every 10 mins"
+msgstr "10 minuutin vфlein"
+
+#: gui/options.cpp:78
+msgid "every 15 mins"
+msgstr "15 minuutin vфlein"
+
+#: gui/options.cpp:78
+msgid "every 30 mins"
+msgstr "30 minuutin vфlein"
+
+#: gui/options.cpp:80
+msgid "8 kHz"
+msgstr "8 kHz"
+
+#: gui/options.cpp:80
+msgid "11kHz"
+msgstr "11 kHz"
+
+#: gui/options.cpp:80
+msgid "22 kHz"
+msgstr "22 kHz"
+
+#: gui/options.cpp:80
+msgid "44 kHz"
+msgstr "44 kHz"
+
+#: gui/options.cpp:80
+msgid "48 kHz"
+msgstr "48 kHz"
+
+#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
+#: gui/options.cpp:644 gui/options.cpp:852
+msgctxt "soundfont"
+msgid "None"
+msgstr "Ei kфytіssф"
+
+#: gui/options.cpp:382
+msgid "Failed to apply some of the graphic options changes:"
+msgstr "Joitain grafiikka-asetuksia ei saatu asetettua:"
+
+#: gui/options.cpp:394
+msgid "the video mode could not be changed."
+msgstr "videotilaa ei voitu vaihtaa."
+
+#: gui/options.cpp:400
+msgid "the fullscreen setting could not be changed"
+msgstr "kokoruututilaa ei voitu muuttaa"
+
+#: gui/options.cpp:406
+msgid "the aspect ratio setting could not be changed"
+msgstr "kuvasuhdekorjausasetusta ei voitu muuttaa"
+
+#: gui/options.cpp:727
+msgid "Graphics mode:"
+msgstr "Grafiikkatila:"
+
+#: gui/options.cpp:741
+msgid "Render mode:"
+msgstr "Renderіintitila:"
+
+#: gui/options.cpp:741 gui/options.cpp:742
+msgid "Special dithering modes supported by some games"
+msgstr "Erityiset dithering asetukset joita jotkut pelit tukevat"
+
+#: gui/options.cpp:753
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+msgid "Fullscreen mode"
+msgstr "Kokoruututila"
+
+#: gui/options.cpp:756
+msgid "Aspect ratio correction"
+msgstr "Kuvasuhteen korjaus"
+
+#: gui/options.cpp:756
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "Oikea kuvasuhde 320x200 peleille"
+
+#: gui/options.cpp:764
+msgid "Preferred Device:"
+msgstr "Ensisijainen laite:"
+
+#: gui/options.cpp:764
+msgid "Music Device:"
+msgstr "Musiikkilaite:"
+
+#: gui/options.cpp:764 gui/options.cpp:766
+msgid "Specifies preferred sound device or sound card emulator"
+msgstr ""
+"Mффrittфф ффnilaitteen tai ффnikorttiemulaattorin jota ensisijaisesti tulisi "
+"kфyttфф"
+
+#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+msgid "Specifies output sound device or sound card emulator"
+msgstr "Mффrittфф ффnikortin tai ффnikorttia emuloivan ohjelmiston"
+
+#: gui/options.cpp:766
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr "Ensisijainen:"
+
+#: gui/options.cpp:766
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr "Musiikkilaite:"
+
+#: gui/options.cpp:793
+msgid "AdLib emulator:"
+msgstr "AdLib emulaattori:"
+
+#: gui/options.cpp:793 gui/options.cpp:794
+msgid "AdLib is used for music in many games"
+msgstr "AdLibiф kфytetффn monien pelien musiikeissa"
+
+#: gui/options.cpp:804
+msgid "Output rate:"
+msgstr "Taajuus:"
+
+#: gui/options.cpp:804 gui/options.cpp:805
+msgid ""
+"Higher value specifies better sound quality but may be not supported by your "
+"soundcard"
+msgstr ""
+"Isommat taajuudet merkitsevфt parempaa ффnenlaatua, mutta ффnikorttisi ei "
+"ehkф tue niitф."
+
+#: gui/options.cpp:815
+msgid "GM Device:"
+msgstr "GM laite:"
+
+#: gui/options.cpp:815
+msgid "Specifies default sound device for General MIDI output"
+msgstr "Mффrittфф oletuksena kфytettфvфn ффnilaitteen General MIDIlle"
+
+#: gui/options.cpp:826
+msgid "Don't use General MIDI music"
+msgstr "Фlф kфytф General MIDIф musiikissa"
+
+#: gui/options.cpp:837 gui/options.cpp:899
+msgid "Use first available device"
+msgstr "Kфytф ensimmфistф laitetta"
+
+#: gui/options.cpp:849
+msgid "SoundFont:"
+msgstr "Ффnifontti:"
+
+#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgstr ""
+"Jotkut ффnikortit tukevat ффnifonttia (SoundFont), FluidSynth ja Timidity"
+
+#: gui/options.cpp:851
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr "Ффnifontti:"
+
+#: gui/options.cpp:857
+msgid "Mixed AdLib/MIDI mode"
+msgstr "Yhdistetty AdLib/MIDI tila"
+
+#: gui/options.cpp:857
+msgid "Use both MIDI and AdLib sound generation"
+msgstr "Kфytф sekф MIDIф ettф Adlibiф ффnentuotantoon"
+
+#: gui/options.cpp:860
+msgid "MIDI gain:"
+msgstr "MIDIn ффnilisфys:"
+
+#: gui/options.cpp:870
+msgid "MT-32 Device:"
+msgstr "MT-32 laite:"
+
+#: gui/options.cpp:870
+msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
+msgstr "Mффrittфф oletusффnilaitteen Roland MT-32/LAPC1/CM32l/CM64:n kфyttііn"
+
+#: gui/options.cpp:875
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr "Aito Roland MT-32 (ei GM emulointia)"
+
+#: gui/options.cpp:875 gui/options.cpp:877
+msgid ""
+"Check if you want to use your real hardware Roland-compatible sound device "
+"connected to your computer"
+msgstr ""
+"Valitse jos haluat kфyttфф aitoa Roland-yhteensopivaa laittetta joka on "
+"kytketty tietokoneeseesi"
+
+#: gui/options.cpp:877
+msgctxt "lowres"
+msgid "True Roland MT-32 (no GM emulation)"
+msgstr "Aito Roland MT-32 (ei GM emulointia)"
+
+#: gui/options.cpp:880
+msgid "Enable Roland GS Mode"
+msgstr "Kфytф Roland GS moodia"
+
+#: gui/options.cpp:880
+msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
+msgstr "Poistaa General MIDIn peleistф joissa on Roland MT-32 ффniraita"
+
+#: gui/options.cpp:889
+msgid "Don't use Roland MT-32 music"
+msgstr "Фlф kфytф Roland MT-32 musiikkia"
+
+#: gui/options.cpp:916
+msgid "Text and Speech:"
+msgstr "Tekstitys ja puhe:"
+
+#: gui/options.cpp:920 gui/options.cpp:930
+msgid "Speech"
+msgstr "Puhe"
+
+#: gui/options.cpp:921 gui/options.cpp:931
+msgid "Subtitles"
+msgstr "Tekstitys"
+
+#: gui/options.cpp:922
+msgid "Both"
+msgstr "Molemmat"
+
+#: gui/options.cpp:924
+msgid "Subtitle speed:"
+msgstr "Tekstin nopeus:"
+
+#: gui/options.cpp:926
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr "Tekstitys ja puhe:"
+
+#: gui/options.cpp:930
+msgid "Spch"
+msgstr "Puhe"
+
+#: gui/options.cpp:931
+msgid "Subs"
+msgstr "Tekstit"
+
+#: gui/options.cpp:932
+msgctxt "lowres"
+msgid "Both"
+msgstr "Molemmat"
+
+#: gui/options.cpp:932
+msgid "Show subtitles and play speech"
+msgstr "Nфytф tekstitys ja kфytф puhetta"
+
+#: gui/options.cpp:934
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr "Tekstin nopeus:"
+
+#: gui/options.cpp:950
+msgid "Music volume:"
+msgstr "Musiikki:"
+
+#: gui/options.cpp:952
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr "Musiikki:"
+
+#: gui/options.cpp:959
+msgid "Mute All"
+msgstr "Vaimenna"
+
+#: gui/options.cpp:962
+msgid "SFX volume:"
+msgstr "Ффniefektit:"
+
+#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+msgid "Special sound effects volume"
+msgstr "Erikoisefektit"
+
+#: gui/options.cpp:964
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr "Ффniefektit:"
+
+#: gui/options.cpp:972
+msgid "Speech volume:"
+msgstr "Puhe:"
+
+#: gui/options.cpp:974
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr "Puhe:"
+
+#: gui/options.cpp:1131
+msgid "Theme Path:"
+msgstr "Teemojen polku:"
+
+#: gui/options.cpp:1133
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr "Teemojen polku:"
+
+#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+msgid "Specifies path to additional data used by all games or ScummVM"
+msgstr ""
+"Mффrittфф polun, jossa on lisфtiedostoja joita ScummVM tai kaikki pelit "
+"kфyttфvфt"
+
+#: gui/options.cpp:1148
+msgid "Plugins Path:"
+msgstr "Pluginien sijainti:"
+
+#: gui/options.cpp:1150
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr "Pluginien sijainti:"
+
+#: gui/options.cpp:1159
+msgid "Misc"
+msgstr "Muut"
+
+#: gui/options.cpp:1161
+msgctxt "lowres"
+msgid "Misc"
+msgstr "Muut"
+
+#: gui/options.cpp:1163
+msgid "Theme:"
+msgstr "Teema"
+
+#: gui/options.cpp:1167
+msgid "GUI Renderer:"
+msgstr "GUI renderіijф:"
+
+#: gui/options.cpp:1179
+msgid "Autosave:"
+msgstr "Autom. tallennus:"
+
+#: gui/options.cpp:1181
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr "Autom. tallennus:"
+
+#: gui/options.cpp:1189
+msgid "Keys"
+msgstr "Nфppфimet"
+
+#: gui/options.cpp:1196
+msgid "GUI Language:"
+msgstr "ScummVM:n kieli:"
+
+#: gui/options.cpp:1196
+msgid "Language of ScummVM GUI"
+msgstr "ScummVM kфyttіliittymфn kieli"
+
+#: gui/options.cpp:1347
+msgid "You have to restart ScummVM before your changes will take effect."
+msgstr "ScummVM pitфф kфynnistфф uudelleen jotta muutokset tulevat voimaan."
+
+#: gui/options.cpp:1360
+msgid "Select directory for savegames"
+msgstr "Valitse hakemisto pelitallennuksille."
+
+#: gui/options.cpp:1367
+msgid "The chosen directory cannot be written to. Please select another one."
+msgstr "Valittuun hakemistoon ei voi kirjoittaa. Valitse toinen hakemisto."
+
+#: gui/options.cpp:1376
+msgid "Select directory for GUI themes"
+msgstr "Valitse hakemisto kфyttіliittymфn teemoille"
+
+#: gui/options.cpp:1386
+msgid "Select directory for extra files"
+msgstr "Valitse hakemisto lisфtiedostoille"
+
+#: gui/options.cpp:1397
+msgid "Select directory for plugins"
+msgstr "Valitse hakemisto plugineille"
+
+#: gui/options.cpp:1450
+msgid ""
+"The theme you selected does not support your current language. If you want "
+"to use this theme you need to switch to another language first."
+msgstr ""
+"Valitsemasi teema ei tue nykyistф valitsemaasi kieltф. Vaihda kieli ensin, "
+"ja yritф sitten uudelleen."
+
+#: gui/saveload-dialog.cpp:166
+msgid "List view"
+msgstr "Listanфkymф"
+
+#: gui/saveload-dialog.cpp:167
+msgid "Grid view"
+msgstr "Ruudukkonфkymф"
+
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
+msgid "No date saved"
+msgstr "Pфivфystф ei ole tallennettu"
+
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
+msgid "No time saved"
+msgstr "Aikaa ei ole tallennettu"
+
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
+msgid "No playtime saved"
+msgstr "Peliaikaa ei ole tallennettu"
+
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
+msgid "Delete"
+msgstr "Poista"
+
+#: gui/saveload-dialog.cpp:274
+msgid "Do you really want to delete this savegame?"
+msgstr "Haluatko varmasti poistaa tфmфn pelitallennuksen?"
+
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
+msgid "Date: "
+msgstr "Pфivфys: "
+
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
+msgid "Time: "
+msgstr "Aika: "
+
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
+msgid "Playtime: "
+msgstr "Peliaika: "
+
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
+msgid "Untitled savestate"
+msgstr "Nimetіn pelitallennus"
+
+#: gui/saveload-dialog.cpp:546
+msgid "Next"
+msgstr "Seuraava"
+
+#: gui/saveload-dialog.cpp:549
+msgid "Prev"
+msgstr "Edellinen"
+
+#: gui/saveload-dialog.cpp:736
+msgid "New Save"
+msgstr "Uusi pelitallennus"
+
+#: gui/saveload-dialog.cpp:736
+msgid "Create a new save game"
+msgstr "Luo uusi pelitallennus"
+
+#: gui/saveload-dialog.cpp:865
+msgid "Name: "
+msgstr "Nimi: "
+
+#: gui/saveload-dialog.cpp:937
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr "Anna kuvaus tallennukselle numero %d:"
+
+#: gui/themebrowser.cpp:44
+msgid "Select a Theme"
+msgstr "Valitse teema"
+
+#: gui/ThemeEngine.cpp:337
+msgid "Disabled GFX"
+msgstr "Disabloitu GFX"
+
+#: gui/ThemeEngine.cpp:337
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr "Disabloitu GFX"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard Renderer (16bpp)"
+msgstr "Standardirenderіijф (16 bpp)"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard (16bpp)"
+msgstr "Standardi (16 bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased Renderer (16bpp)"
+msgstr "Antialiasoitu renderіijф (16 bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased (16bpp)"
+msgstr "Antialiasoitu (16 bpp)"
+
+#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332
+msgid "Clear value"
+msgstr "Tyhjennф arvo"
+
+#: base/main.cpp:210
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr "Pelimoottori ei tue debug tasoa '%s'"
+
+#: base/main.cpp:288
+msgid "Menu"
+msgstr "Valikko"
+
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
+#: backends/platform/wince/CEActionsPocket.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:46
+msgid "Skip"
+msgstr "Ohita"
+
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr "Tauko"
+
+#: base/main.cpp:297
+msgid "Skip line"
+msgstr "Ohita rivi"
+
+#: base/main.cpp:468
+msgid "Error running game:"
+msgstr "Virhe ajettaessa peliф:"
+
+#: base/main.cpp:492
+msgid "Could not find any engine capable of running the selected game"
+msgstr "Pelimoottoria joka tukisi valittua peliф ei lіytynyt"
+
+#: common/error.cpp:38
+msgid "No error"
+msgstr "Ei virhettф"
+
+#: common/error.cpp:40
+msgid "Game data not found"
+msgstr "Pelin tietoja ei lіytynyt"
+
+#: common/error.cpp:42
+msgid "Game id not supported"
+msgstr "Pelin tunniste ei ole tuettu"
+
+#: common/error.cpp:44
+msgid "Unsupported color mode"
+msgstr "Vфritilaa ei tueta"
+
+#: common/error.cpp:47
+msgid "Read permission denied"
+msgstr "Lukuoikeuksia ei saatu"
+
+#: common/error.cpp:49
+msgid "Write permission denied"
+msgstr "Kirjoitusoikeuksia ei saatu"
+
+#: common/error.cpp:52
+msgid "Path does not exist"
+msgstr "Polkua ei ole olemassa"
+
+#: common/error.cpp:54
+msgid "Path not a directory"
+msgstr "Polku ei ole hakemisto"
+
+#: common/error.cpp:56
+msgid "Path not a file"
+msgstr "Polku ei ole tiedosto"
+
+#: common/error.cpp:59
+msgid "Cannot create file"
+msgstr "Tiedoston luonti ei onnistu"
+
+#: common/error.cpp:61
+msgid "Reading data failed"
+msgstr "Tiedon lukeminen epфonnistui"
+
+#: common/error.cpp:63
+msgid "Writing data failed"
+msgstr "Tiedon kirjoittaminen epфonnistui"
+
+#: common/error.cpp:66
+msgid "Could not find suitable engine plugin"
+msgstr "Sopivaa pelimoottorin pluginia ei lіytynyt"
+
+#: common/error.cpp:68
+msgid "Engine plugin does not support save states"
+msgstr "Pelimoottori ei tue tallennustiloja"
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Kфyttфjф peruutti"
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr "Tuntematon virhe"
+
+#: engines/advancedDetector.cpp:316
+#, c-format
+msgid "The game in '%s' seems to be unknown."
+msgstr "Peli hakemistossa '%s' nфyttфisi olevan tuntematon."
+
+#: engines/advancedDetector.cpp:317
+msgid "Please, report the following data to the ScummVM team along with name"
+msgstr ""
+"Ole hyvф ja ilmoita ScummVM:n kehittфjille seuraavat tiedot, lisфksi kerro"
+
+#: engines/advancedDetector.cpp:319
+msgid "of the game you tried to add and its version/language/etc.:"
+msgstr ""
+"mikф peli oli kyseessф, ja sen versio, kieli, ja muut vastaavat tiedot."
+
+#: engines/dialogs.cpp:84
+msgid "~R~esume"
+msgstr "~J~atka"
+
+#: engines/dialogs.cpp:86
+msgid "~L~oad"
+msgstr "~L~ataa"
+
+#: engines/dialogs.cpp:90
+msgid "~S~ave"
+msgstr "~T~allenna"
+
+#: engines/dialogs.cpp:94
+msgid "~O~ptions"
+msgstr "~A~setukset"
+
+#: engines/dialogs.cpp:99
+msgid "~H~elp"
+msgstr "~O~hje"
+
+#: engines/dialogs.cpp:101
+msgid "~A~bout"
+msgstr "~T~ietoa"
+
+#: engines/dialogs.cpp:104 engines/dialogs.cpp:180
+msgid "~R~eturn to Launcher"
+msgstr "Palaa p~e~livalitsimeen"
+
+#: engines/dialogs.cpp:106 engines/dialogs.cpp:182
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr "Palaa p~e~livalitsimeen"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+msgid "Save game:"
+msgstr "Tallenna peli:"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742
+#: backends/platform/symbian/src/SymbianActions.cpp:44
+#: backends/platform/wince/CEActionsPocket.cpp:43
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Save"
+msgstr "Tallenna"
+
+#: engines/dialogs.cpp:144
+msgid ""
+"Sorry, this engine does not currently provide in-game help. Please consult "
+"the README for basic information, and for instructions on how to obtain "
+"further assistance."
+msgstr ""
+"Tфmф pelimoottori ei toistaiseksi tue pelin sisфistф ohjetta. Avaa LUEMINUT "
+"tiedosto saadaksesi lisфtietoa."
+
+#: engines/dialogs.cpp:228
+#, c-format
+msgid ""
+"Gamestate save failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Pelitilan tallennus epфonnistui (%s)! Avaa LUEMINUT tiedosto saadaksesi "
+"lisфtietoa."
+
+#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
+#: engines/mohawk/dialogs.cpp:174
+msgid "~O~K"
+msgstr "~H~yvфksy"
+
+#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
+#: engines/mohawk/dialogs.cpp:175
+msgid "~C~ancel"
+msgstr "~P~eruuta"
+
+#: engines/dialogs.cpp:305
+msgid "~K~eys"
+msgstr "~N~фppфimet"
+
+#: engines/engine.cpp:235
+msgid "Could not initialize color format."
+msgstr "Vфriformaattia ei voitu alustaa"
+
+#: engines/engine.cpp:243
+msgid "Could not switch to video mode: '"
+msgstr "Videotilan vaihto ei onnistunut:'"
+
+#: engines/engine.cpp:252
+msgid "Could not apply aspect ratio setting."
+msgstr "Kuvasuhdeasetusta ei voitu asettaa."
+
+#: engines/engine.cpp:257
+msgid "Could not apply fullscreen setting."
+msgstr "Kokoruututila-asetusta ei voi asettaa."
+
+#: engines/engine.cpp:357
+msgid ""
+"You appear to be playing this game directly\n"
+"from the CD. This is known to cause problems,\n"
+"and it is therefore recommended that you copy\n"
+"the data files to your hard disk instead.\n"
+"See the README file for details."
+msgstr ""
+"Pelaat suoraan CD-levyltф. Tфmф aiheuttaa\n"
+"ongelmia, joten on suositeltavaa ettф kopioit\n"
+"pelin tiedostot kovalevyllesi. Avaa LUEMINUT\n"
+"tiedosto ohjeita varten."
+
+#: engines/engine.cpp:368
+msgid ""
+"This game has audio tracks in its disk. These\n"
+"tracks need to be ripped from the disk using\n"
+"an appropriate CD audio extracting tool in\n"
+"order to listen to the game's music.\n"
+"See the README file for details."
+msgstr ""
+"Pelin musiikki on CD-levyllф ффniraitoina.\n"
+"Raidat pitфф ripata levyltф sopivaa\n"
+"ohjelmistoa kфyttфen, jotta musiikit\n"
+"kuuluvat. Lue ohjeet LUEMINUT tiedostosta."
+
+#: engines/engine.cpp:426
+#, c-format
+msgid ""
+"Gamestate load failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Pelitilan lataus epфonnistui (%s)! Avaa LUEMINUT tiedosto saadaksesi "
+"lisфtietoa."
+
+#: engines/engine.cpp:439
+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 saves you make might "
+"not work in future versions of ScummVM."
+msgstr ""
+"VAROITUS: ScummVM ei vielф tue tфysin valitsemaasi peliф. Peli saattaa olla "
+"epфvakaa, eivфtkф pelitallennukset vфlttфmфttф toimi tulevissa ScummVM:n "
+"versioissa."
+
+#: engines/engine.cpp:442
+msgid "Start anyway"
+msgstr "Pelaa silti"
+
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
+msgid "Use original save/load screens"
+msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja"
+
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
+msgid "Use the original save/load screens, instead of the ScummVM ones"
+msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja, ScummVM valikoiden sijaan"
+
+#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+msgid "Restore game:"
+msgstr "Lataa pelitallenne:"
+
+#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+msgid "Restore"
+msgstr "Lataa tallenne"
+
+#: engines/dreamweb/detection.cpp:57
+msgid "Use bright palette mode"
+msgstr "Kфytф kirkaspalettitilaa"
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Display graphics using the game's bright palette"
+msgstr "Nфytф grafiikat kфyttфen pelin kirkasta palettia"
+
+#: engines/sci/detection.cpp:373
+msgid "EGA undithering"
+msgstr "EGA unditterіinti"
+
+#: engines/sci/detection.cpp:374
+msgid "Enable undithering in EGA games"
+msgstr "Kфytф unditterіintiф EGA peleissф"
+
+#: engines/sci/detection.cpp:383
+msgid "Prefer digital sound effects"
+msgstr "Kфytф mieluiten digitaalisia ффnitehosteita."
+
+#: engines/sci/detection.cpp:384
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr ""
+"Kфytф mieluiten digitaalisia ффnitehosteita synteettisten tehosteiden sijaan."
+
+#: engines/sci/detection.cpp:403
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr "Kфytф IMF/Yamaha FB-01:stф MIDI-musiikille"
+
+#: engines/sci/detection.cpp:404
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+"Kфytф IBM:n Music Feature korttia, tai Yamaha FB-01 FM moduulia MIDIlle"
+
+#: engines/sci/detection.cpp:414
+msgid "Use CD audio"
+msgstr "Kфytф CD:n ффntф"
+
+#: engines/sci/detection.cpp:415
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr "Kфytф CD:n audiota pelin audion sijaan, jos mahdollista."
+
+#: engines/sci/detection.cpp:425
+msgid "Use Windows cursors"
+msgstr "Kфytф Windowsin kursoreita"
+
+#: engines/sci/detection.cpp:426
+msgid ""
+"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
+msgstr ""
+"Kфytф Windowsin kursoreita (pienempiф ja harmaasфvyisiф) DOS kursorien sijaan"
+
+#: engines/sci/detection.cpp:436
+msgid "Use silver cursors"
+msgstr "Kфytф hopeisia kursoreita"
+
+#: engines/sci/detection.cpp:437
+msgid ""
+"Use the alternate set of silver cursors, instead of the normal golden ones"
+msgstr "Kфytф vaihtoehtoisia hopeisia kursoreita normaalien kultaisten sijaan"
+
+#: engines/scumm/dialogs.cpp:175
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr "Lisфф levyke %c ja paina jotain nappia jatkaaksesi."
+
+#: engines/scumm/dialogs.cpp:176
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr "Tiedosto %s, (%c%d) ei lіydy. Paina nappia."
+
+#: engines/scumm/dialogs.cpp:177
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr "Virhe luettaessa levyф %c, (%c%d) Paina jotain nappia."
+
+#: engines/scumm/dialogs.cpp:178
+msgid "Game Paused. Press SPACE to Continue."
+msgstr "Pause. Paina vфlilyіntiф jatkaaksesi."
+
+#. I18N: You may specify 'Yes' symbol at the end of the line, like this:
+#. "Moechten Sie wirklich neu starten? (J/N)J"
+#. Will react to J as 'Yes'
+#: engines/scumm/dialogs.cpp:182
+msgid "Are you sure you want to restart? (Y/N)"
+msgstr "Haluatko varmasti aloittaa pelin alusta? (K/E)K"
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:184
+msgid "Are you sure you want to quit? (Y/N)"
+msgstr "Haluatko varmati lopettaa?"
+
+#: engines/scumm/dialogs.cpp:189
+msgid "Play"
+msgstr "Pelaa"
+
+#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82
+#: engines/scumm/help.cpp:84
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: backends/events/default/default-events.cpp:213
+msgid "Quit"
+msgstr "Lopeta"
+
+#: engines/scumm/dialogs.cpp:193
+msgid "Insert save/load game disk"
+msgstr "Laita tallennus/lataus levy asemaan"
+
+#: engines/scumm/dialogs.cpp:194
+msgid "You must enter a name"
+msgstr "Nimi on pakko antaa"
+
+#: engines/scumm/dialogs.cpp:195
+msgid "The game was NOT saved (disk full?)"
+msgstr "Peliф EI tallennettu (onko levy tфysi?)"
+
+#: engines/scumm/dialogs.cpp:196
+msgid "The game was NOT loaded"
+msgstr "Peliф EI ladattu"
+
+#: engines/scumm/dialogs.cpp:197
+#, c-format
+msgid "Saving '%s'"
+msgstr "Tallennetaan '%s'"
+
+#: engines/scumm/dialogs.cpp:198
+#, c-format
+msgid "Loading '%s'"
+msgstr "Ladataan '%s'"
+
+#: engines/scumm/dialogs.cpp:199
+msgid "Name your SAVE game"
+msgstr "Nimeф pelitallenteesi"
+
+#: engines/scumm/dialogs.cpp:200
+msgid "Select a game to LOAD"
+msgstr "Valitse ladattava peli"
+
+#: engines/scumm/dialogs.cpp:201
+msgid "Game title)"
+msgstr "Pelin nimi"
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:287
+msgid "~P~revious"
+msgstr "E~d~ellinen"
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:289
+msgid "~N~ext"
+msgstr "Se~u~raava"
+
+#: engines/scumm/dialogs.cpp:290
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+msgid "~C~lose"
+msgstr "~S~ulje"
+
+#: engines/scumm/dialogs.cpp:597
+msgid "Speech Only"
+msgstr "Vain puhe"
+
+#: engines/scumm/dialogs.cpp:598
+msgid "Speech and Subtitles"
+msgstr "Puhe ja Tekstitys"
+
+#: engines/scumm/dialogs.cpp:599
+msgid "Subtitles Only"
+msgstr "Vain tekstitys"
+
+#: engines/scumm/dialogs.cpp:607
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr "Puhe & teksti"
+
+#: engines/scumm/dialogs.cpp:653
+msgid "Select a Proficiency Level."
+msgstr "Valitse taitotasosi."
+
+#: engines/scumm/dialogs.cpp:655
+msgid "Refer to your Loom(TM) manual for help."
+msgstr "Lue Loom(TM) ohjekirjaa saadaksesi ohjeita."
+
+#: engines/scumm/dialogs.cpp:658
+msgid "Standard"
+msgstr "Standardi"
+
+#: engines/scumm/dialogs.cpp:659
+msgid "Practice"
+msgstr "Harjoitus"
+
+#: engines/scumm/dialogs.cpp:660
+msgid "Expert"
+msgstr "Ekspertti"
+
+#: engines/scumm/help.cpp:73
+msgid "Common keyboard commands:"
+msgstr "Yleisiф nфppфimistіkomentoja:"
+
+#: engines/scumm/help.cpp:74
+msgid "Save / Load dialog"
+msgstr "Tallenna / Lataa peli"
+
+#: engines/scumm/help.cpp:76
+msgid "Skip line of text"
+msgstr "Ohita rivi tekstiф"
+
+#: engines/scumm/help.cpp:77
+msgid "Esc"
+msgstr "Esc"
+
+#: engines/scumm/help.cpp:77
+msgid "Skip cutscene"
+msgstr "Ohita video"
+
+#: engines/scumm/help.cpp:78
+msgid "Space"
+msgstr "Vфlilyіnti"
+
+#: engines/scumm/help.cpp:78
+msgid "Pause game"
+msgstr "Pause"
+
+#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96
+#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98
+#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Ctrl"
+msgstr "Ctrl"
+
+#: engines/scumm/help.cpp:79
+msgid "Load game state 1-10"
+msgstr "Lataa pelitila 1-10"
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Alt"
+msgstr "Alt"
+
+#: engines/scumm/help.cpp:80
+msgid "Save game state 1-10"
+msgstr "Tallenna pelitila 1-10"
+
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89
+msgid "Enter"
+msgstr "Enter"
+
+#: engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
+msgstr "Kytke kokoruututila pффlle tai pois"
+
+#: engines/scumm/help.cpp:87
+msgid "Music volume up / down"
+msgstr "Musiikin ффnenvoimakkuus ylіs / alas"
+
+#: engines/scumm/help.cpp:88
+msgid "Text speed slower / faster"
+msgstr "Hidasta/nopeuta tekstiф"
+
+#: engines/scumm/help.cpp:89
+msgid "Simulate left mouse button"
+msgstr "Simuloi hiiren vasenta nфppфintф"
+
+#: engines/scumm/help.cpp:90
+msgid "Tab"
+msgstr "Sarkain"
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate right mouse button"
+msgstr "Simuloi oikeaa hiiren nappia"
+
+#: engines/scumm/help.cpp:93
+msgid "Special keyboard commands:"
+msgstr "Erityiskomennot:"
+
+#: engines/scumm/help.cpp:94
+msgid "Show / Hide console"
+msgstr "Nфytф / piilota konsoli"
+
+#: engines/scumm/help.cpp:95
+msgid "Start the debugger"
+msgstr "Kфynnistф debuggeri"
+
+#: engines/scumm/help.cpp:96
+msgid "Show memory consumption"
+msgstr "Nфytф muistinkulutus"
+
+#: engines/scumm/help.cpp:97
+msgid "Run in fast mode (*)"
+msgstr "Aja nopeassa tilassa (*)"
+
+#: engines/scumm/help.cpp:98
+msgid "Run in really fast mode (*)"
+msgstr "Aja erittфin nopeassa tilassa (*)"
+
+#: engines/scumm/help.cpp:99
+msgid "Toggle mouse capture"
+msgstr "Kytke hiiren kaappaus pффlle tai pois"
+
+#: engines/scumm/help.cpp:100
+msgid "Switch between graphics filters"
+msgstr "Vaihda grafiikkafiltteriф"
+
+#: engines/scumm/help.cpp:101
+msgid "Increase / Decrease scale factor"
+msgstr "Kasvata / vфhennф skaalakerrointa"
+
+#: engines/scumm/help.cpp:102
+msgid "Toggle aspect-ratio correction"
+msgstr "Kytke kuvasuhdekorjaus pффlle tai pois"
+
+#: engines/scumm/help.cpp:107
+msgid "* Note that using ctrl-f and"
+msgstr "* Huomaa ettф ctrl-f ja"
+
+#: engines/scumm/help.cpp:108
+msgid " ctrl-g are not recommended"
+msgstr " ctrl-g ovat epфvakaita eikф"
+
+#: engines/scumm/help.cpp:109
+msgid " since they may cause crashes"
+msgstr " niiden kфyttіф suositella"
+
+#: engines/scumm/help.cpp:110
+msgid " or incorrect game behavior."
+msgstr " mahdollisten virheiden vuoksi."
+
+#: engines/scumm/help.cpp:114
+msgid "Spinning drafts on the keyboard:"
+msgstr ""
+
+#: engines/scumm/help.cpp:116
+msgid "Main game controls:"
+msgstr "Pelin tфrkeimmфt kontrollit:"
+
+#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136
+#: engines/scumm/help.cpp:161
+msgid "Push"
+msgstr "Paina"
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Pull"
+msgstr "Vedф"
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197
+#: engines/scumm/help.cpp:207
+msgid "Give"
+msgstr "Anna"
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190
+#: engines/scumm/help.cpp:208
+msgid "Open"
+msgstr "Avaa"
+
+#: engines/scumm/help.cpp:126
+msgid "Go to"
+msgstr "Mene"
+
+#: engines/scumm/help.cpp:127
+msgid "Get"
+msgstr "Ota"
+
+#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152
+#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224
+#: engines/scumm/help.cpp:250
+msgid "Use"
+msgstr "Kфytф"
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141
+msgid "Read"
+msgstr "Lue"
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147
+msgid "New kid"
+msgstr "Uusi lapsi"
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171
+msgid "Turn on"
+msgstr "Kфynnistф"
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn off"
+msgstr "Sammuta"
+
+#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167
+#: engines/scumm/help.cpp:194
+msgid "Walk to"
+msgstr "Kфvele"
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210
+#: engines/scumm/help.cpp:227
+msgid "Pick up"
+msgstr "Ota"
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+msgid "What is"
+msgstr "Mitф on"
+
+#: engines/scumm/help.cpp:146
+msgid "Unlock"
+msgstr "Avaa lukko"
+
+#: engines/scumm/help.cpp:149
+msgid "Put on"
+msgstr "Pue ylle"
+
+#: engines/scumm/help.cpp:150
+msgid "Take off"
+msgstr "Lфhde matkaan"
+
+#: engines/scumm/help.cpp:156
+msgid "Fix"
+msgstr "Korjaa"
+
+#: engines/scumm/help.cpp:158
+msgid "Switch"
+msgstr "Vaihda"
+
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228
+msgid "Look"
+msgstr "Katso"
+
+#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223
+msgid "Talk"
+msgstr "Puhu"
+
+#: engines/scumm/help.cpp:174
+msgid "Travel"
+msgstr "Matkusta"
+
+#: engines/scumm/help.cpp:175
+msgid "To Henry / To Indy"
+msgstr "Henry / Indy"
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:179
+msgid "play C minor on distaff"
+msgstr "soita C molli"
+
+#: engines/scumm/help.cpp:180
+msgid "play D on distaff"
+msgstr "soita D"
+
+#: engines/scumm/help.cpp:181
+msgid "play E on distaff"
+msgstr "soita E"
+
+#: engines/scumm/help.cpp:182
+msgid "play F on distaff"
+msgstr "soita F"
+
+#: engines/scumm/help.cpp:183
+msgid "play G on distaff"
+msgstr "soita G"
+
+#: engines/scumm/help.cpp:184
+msgid "play A on distaff"
+msgstr "soita A"
+
+#: engines/scumm/help.cpp:185
+msgid "play B on distaff"
+msgstr "soita B"
+
+#: engines/scumm/help.cpp:186
+msgid "play C major on distaff"
+msgstr "soita C duuri"
+
+#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214
+msgid "puSh"
+msgstr "Paina"
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "pull (Yank)"
+msgstr "Vedф"
+
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212
+#: engines/scumm/help.cpp:248
+msgid "Talk to"
+msgstr "Puhu"
+
+#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211
+msgid "Look at"
+msgstr "Katso"
+
+#: engines/scumm/help.cpp:200
+msgid "turn oN"
+msgstr "Kytke pффlle"
+
+#: engines/scumm/help.cpp:201
+msgid "turn oFf"
+msgstr "Kytke pois pффltф"
+
+#: engines/scumm/help.cpp:217
+msgid "KeyUp"
+msgstr "KeyUp"
+
+#: engines/scumm/help.cpp:217
+msgid "Highlight prev dialogue"
+msgstr "Korosta edellistф dialogia"
+
+#: engines/scumm/help.cpp:218
+msgid "KeyDown"
+msgstr "KeyDown"
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight next dialogue"
+msgstr "Korosta seuraavaa dialogia"
+
+#: engines/scumm/help.cpp:222
+msgid "Walk"
+msgstr "Kфvele"
+
+#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234
+#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249
+msgid "Inventory"
+msgstr "Tavarat"
+
+#: engines/scumm/help.cpp:226
+msgid "Object"
+msgstr "Esine"
+
+#: engines/scumm/help.cpp:229
+msgid "Black and White / Color"
+msgstr "Mustavalko / Vфri"
+
+#: engines/scumm/help.cpp:232
+msgid "Eyes"
+msgstr "Silmфt"
+
+#: engines/scumm/help.cpp:233
+msgid "Tongue"
+msgstr "Kieli"
+
+#: engines/scumm/help.cpp:235
+msgid "Punch"
+msgstr "Lyі"
+
+#: engines/scumm/help.cpp:236
+msgid "Kick"
+msgstr "Potkaise"
+
+#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247
+msgid "Examine"
+msgstr "Tutki"
+
+#: engines/scumm/help.cpp:240
+msgid "Regular cursor"
+msgstr "Tavallinen kursori"
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:243
+msgid "Comm"
+msgstr "Kommunikointilaite"
+
+#: engines/scumm/help.cpp:246
+msgid "Save / Load / Options"
+msgstr "Tallenna / Lataa / Asetukset"
+
+#: engines/scumm/help.cpp:255
+msgid "Other game controls:"
+msgstr "Muut pelin ohjaimet:"
+
+#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267
+msgid "Inventory:"
+msgstr "Tavarat:"
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274
+msgid "Scroll list up"
+msgstr "Vieritф listaa ylіs"
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list down"
+msgstr "Vieritф listaa alas"
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268
+msgid "Upper left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270
+msgid "Lower left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Upper right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273
+msgid "Lower right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:269
+msgid "Middle left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:272
+msgid "Middle right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284
+msgid "Switching characters:"
+msgstr "Vaihda hahmoa:"
+
+#: engines/scumm/help.cpp:281
+msgid "Second kid"
+msgstr "Toinen lapsi"
+
+#: engines/scumm/help.cpp:282
+msgid "Third kid"
+msgstr "Kolmas lapsi"
+
+#: engines/scumm/help.cpp:294
+msgid "Fighting controls (numpad):"
+msgstr "Tappeluohjaimet (numpad)"
+
+#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296
+#: engines/scumm/help.cpp:297
+msgid "Step back"
+msgstr "Astu taakse"
+
+#: engines/scumm/help.cpp:298
+msgid "Block high"
+msgstr "Torju korkea"
+
+#: engines/scumm/help.cpp:299
+msgid "Block middle"
+msgstr "Torju keskeltф"
+
+#: engines/scumm/help.cpp:300
+msgid "Block low"
+msgstr "Torju alhaalta"
+
+#: engines/scumm/help.cpp:301
+msgid "Punch high"
+msgstr "Lyі ylіs"
+
+#: engines/scumm/help.cpp:302
+msgid "Punch middle"
+msgstr "Lyі keskelle"
+
+#: engines/scumm/help.cpp:303
+msgid "Punch low"
+msgstr "Lyі alas"
+
+#: engines/scumm/help.cpp:306
+msgid "These are for Indy on left."
+msgstr "Nфmф ovat Indylle vasemmalla."
+
+#: engines/scumm/help.cpp:307
+msgid "When Indy is on the right,"
+msgstr "Kun Indy on oikealla, "
+
+#: engines/scumm/help.cpp:308
+msgid "7, 4, and 1 are switched with"
+msgstr "7, 4 ja 1 vaihdetaan nфppфinten"
+
+#: engines/scumm/help.cpp:309
+msgid "9, 6, and 3, respectively."
+msgstr "9, 6 ja 3 kanssa."
+
+#: engines/scumm/help.cpp:316
+msgid "Biplane controls (numpad):"
+msgstr "Koneen ohjaimet (numpad):"
+
+#: engines/scumm/help.cpp:317
+msgid "Fly to upper left"
+msgstr "Lennф ylіs vasemmalle"
+
+#: engines/scumm/help.cpp:318
+msgid "Fly to left"
+msgstr "Lennф vasemmalle"
+
+#: engines/scumm/help.cpp:319
+msgid "Fly to lower left"
+msgstr "Lennф alas vasemmalle"
+
+#: engines/scumm/help.cpp:320
+msgid "Fly upwards"
+msgstr "Lennф ylіspфin"
+
+#: engines/scumm/help.cpp:321
+msgid "Fly straight"
+msgstr "Lennф suoraan"
+
+#: engines/scumm/help.cpp:322
+msgid "Fly down"
+msgstr "Lennф alas"
+
+#: engines/scumm/help.cpp:323
+msgid "Fly to upper right"
+msgstr "Lennф ylіs oikealle"
+
+#: engines/scumm/help.cpp:324
+msgid "Fly to right"
+msgstr "Lennф oikealle"
+
+#: engines/scumm/help.cpp:325
+msgid "Fly to lower right"
+msgstr "Lennф alas oikealle"
+
+#: engines/scumm/scumm.cpp:1774
+#, c-format
+msgid ""
+"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
+"but %s is missing. Using AdLib instead."
+msgstr ""
+"Suora MIDI tuki vaatii Roland pфivityksen LucasArtsilta, mutta\n"
+"%s puuttuu. Kфytetффn AdLibia sen sijaan."
+
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#, c-format
+msgid ""
+"Failed to save game state to file:\n"
+"\n"
+"%s"
+msgstr ""
+"Pelitilan tallennus ei onnistunut tiedostoon:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#, c-format
+msgid ""
+"Failed to load game state from file:\n"
+"\n"
+"%s"
+msgstr ""
+"Pelitilan lataus ei onnistunut tiedostosta:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#, c-format
+msgid ""
+"Successfully saved game state in file:\n"
+"\n"
+"%s"
+msgstr ""
+"Pelitilan tallennus onnistui tiedostoon:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2529
+msgid ""
+"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
+"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
+"directory inside the Tentacle game directory."
+msgstr ""
+"Maniac Mansionin pitфisi nyt kфynnistyф, mutta ScummVM ei tue sitф vielф. "
+"Pelataksesi Maniac Mansionia, mene ScummVM:n pффvalikkoon ja paina 'Lisфф "
+"peli'. Valitse 'Maniac' hakemisto Tentacle hakemiston sisфltф."
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+msgid "~Z~ip Mode Activated"
+msgstr "~Z~ip moodi valittu"
+
+#: engines/mohawk/dialogs.cpp:93
+msgid "~T~ransitions Enabled"
+msgstr "Siirtymфt pффllф"
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:95
+msgid "~D~rop Page"
+msgstr "Pudota sivu"
+
+#: engines/mohawk/dialogs.cpp:99
+msgid "~S~how Map"
+msgstr "Nфytф kartta"
+
+#: engines/mohawk/dialogs.cpp:105
+msgid "~M~ain Menu"
+msgstr "Pффvalikko"
+
+#: engines/mohawk/dialogs.cpp:172
+msgid "~W~ater Effect Enabled"
+msgstr "Vesiefekti pффllф"
+
+#: engines/agos/animation.cpp:557
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr "Videotiedostoa '%s' ei lіytynyt!"
+
+#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287
+#: engines/tinsel/saveload.cpp:532
+msgid "Failed to load game state from file."
+msgstr "Pelitallenteen lataaminen tiedostosta epфonnistui."
+
+#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545
+msgid "Failed to save game state to file."
+msgstr "Pelin tallentaminen tiedostoon epфonnistui."
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr "Tiedoston tuhoaminen ei onnistunut."
+
+#: engines/groovie/script.cpp:420
+msgid "Failed to save game"
+msgstr "Pelin tallentaminen epфonnistui."
+
+#. I18N: Studio audience adds an applause and cheering sounds whenever
+#. Malcolm makes a joke.
+#: engines/kyra/detection.cpp:62
+msgid "Studio audience"
+msgstr "Studioyleisі"
+
+#: engines/kyra/detection.cpp:63
+msgid "Enable studio audience"
+msgstr "Studioyleisі pффlle"
+
+#. I18N: This option allows the user to skip text and cutscenes.
+#: engines/kyra/detection.cpp:73
+msgid "Skip support"
+msgstr "Ohita tuki"
+
+#: engines/kyra/detection.cpp:74
+msgid "Allow text and cutscenes to be skipped"
+msgstr "Salli tekstin ja videoiden ohittaminen"
+
+#. I18N: Helium mode makes people sound like they've inhaled Helium.
+#: engines/kyra/detection.cpp:84
+msgid "Helium mode"
+msgstr "Helium moodi"
+
+#: engines/kyra/detection.cpp:85
+msgid "Enable helium mode"
+msgstr "Kфytф helium moodia"
+
+#. I18N: When enabled, this option makes scrolling smoother when
+#. changing from one screen to another.
+#: engines/kyra/detection.cpp:99
+msgid "Smooth scrolling"
+msgstr "Pehmeф vieritys"
+
+#: engines/kyra/detection.cpp:100
+msgid "Enable smooth scrolling when walking"
+msgstr "Kфytф pehmeфф vieritystф kфvellessф"
+
+#. I18N: When enabled, this option changes the cursor when it floats to the
+#. edge of the screen to a directional arrow. The player can then click to
+#. walk towards that direction.
+#: engines/kyra/detection.cpp:112
+msgid "Floating cursors"
+msgstr "Leijuva kursori"
+
+#: engines/kyra/detection.cpp:113
+msgid "Enable floating cursors"
+msgstr "Kфytф leijuvia kursoreita"
+
+#. I18N: HP stands for Hit Points
+#: engines/kyra/detection.cpp:127
+msgid "HP bar graphs"
+msgstr "Kestopisteet (HP) graafisina palkkeina"
+
+#: engines/kyra/detection.cpp:128
+msgid "Enable hit point bar graphs"
+msgstr "Kфytф kestopisteissф vфrillisiф grafiikkapalkkeja numeroiden sijaan"
+
+#: engines/kyra/lol.cpp:478
+msgid "Attack 1"
+msgstr "Hyіkkфys 1"
+
+#: engines/kyra/lol.cpp:479
+msgid "Attack 2"
+msgstr "Hyіkkфys 2"
+
+#: engines/kyra/lol.cpp:480
+msgid "Attack 3"
+msgstr "Hyіkkфys 3"
+
+#: engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr "Liiku eteenpфin"
+
+#: engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr "Liiku taaksepфin"
+
+#: engines/kyra/lol.cpp:483
+msgid "Slide Left"
+msgstr "Liiku vasemmalle"
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide Right"
+msgstr "Liiku oikealle"
+
+#: engines/kyra/lol.cpp:485
+msgid "Turn Left"
+msgstr "Kффnny vasemmalle"
+
+#: engines/kyra/lol.cpp:486
+msgid "Turn Right"
+msgstr "Kффnny oikealle"
+
+#: engines/kyra/lol.cpp:487
+msgid "Rest"
+msgstr "Lepфф"
+
+#: engines/kyra/lol.cpp:488
+msgid "Options"
+msgstr "Asetukset"
+
+#: engines/kyra/lol.cpp:489
+msgid "Choose Spell"
+msgstr "Valitse loitsu"
+
+#: engines/kyra/sound_midi.cpp:477
+msgid ""
+"You appear to be using a General MIDI device,\n"
+"but your game only supports Roland MT32 MIDI.\n"
+"We try to map the Roland MT32 instruments to\n"
+"General MIDI ones. It is still possible that\n"
+"some tracks sound incorrect."
+msgstr ""
+"Kфytфt General MIDI-ффnilaitetta, mutta peli\n"
+"tukee vain Roland MT-32:sta. Jotkut ффniraidat\n"
+"eivфt ehkф kuulosta siltф miltф niiden pitфisi."
+
+#: engines/queen/queen.cpp:59
+msgid "Alternative intro"
+msgstr "Vaihtoehtoinen intro"
+
+#: engines/queen/queen.cpp:60
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Kфytф vaihtoehtoista pelin introa (vain CD versiossa)"
+
+#: engines/sky/compact.cpp:130
+msgid ""
+"Unable to find \"sky.cpt\" file!\n"
+"Please download it from www.scummvm.org"
+msgstr ""
+"Tiedostoa \"sky.cpt\" ei lіydy!\n"
+"Hae se ScummVM:n verkkosivulta."
+
+#: engines/sky/compact.cpp:141
+msgid ""
+"The \"sky.cpt\" file has an incorrect size.\n"
+"Please (re)download it from www.scummvm.org"
+msgstr ""
+"Tiedosto \"sky.cpt\" on vффrфn kokoinen.\n"
+"Hae uusi versio ScummVM:n verkkosivuilta."
+
+#: engines/sky/detection.cpp:44
+msgid "Floppy intro"
+msgstr "Levykeversion intro"
+
+#: engines/sky/detection.cpp:45
+msgid "Use the floppy version's intro (CD version only)"
+msgstr "Kфytф levykeversion introa (vain CD versiossa)"
+
+#: engines/sword1/animation.cpp:519
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr "PSX stream videota '%s' ei voi nфyttфф paletisoidussa tilassa"
+
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
+msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgstr ""
+"DXA videotiedostoja lіydettiin mutta ScummVM on kффnnetty ilman zlib-tukea"
+
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
+msgid "MPEG2 cutscenes are no longer supported"
+msgstr "MPEG2 videotiedostoja ei enфф tueta"
+
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr "Videotiedosto '%s' ei lіytynyt"
+
+#: engines/sword1/control.cpp:865
+msgid ""
+"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"Broken Sword 1:n pelitallennukset ovat vanhassa formaatissa. Tallennukset "
+"tulee muuntaa,\n"
+"jotta niitф voi kфyttфф ScummVM:ssф. Paina 'Hyvфksy' muuntaaksesi tiedostot. "
+"Mikфli et halua muuntaa tiedostoja nyt\n"
+"ScummVM kysyy asiaa seuraavan kerran kun kфynnistфt pelin.\n"
+
+#: engines/sword1/control.cpp:1234
+#, c-format
+msgid ""
+"Target new save game already exists!\n"
+"Would you like to keep the old save game (%s) or the new one (%s)?\n"
+msgstr ""
+"Kohdetiedosto on jo olemassa!\n"
+"Sфilytetффnkі vanha pelitallennus (%s), vai uusi pelitallennus (%s)?\n"
+
+#: engines/sword1/control.cpp:1237
+msgid "Keep the old one"
+msgstr "Sфilytф vanha tallennus"
+
+#: engines/sword1/control.cpp:1237
+msgid "Keep the new one"
+msgstr "Sфilytф uusi tallennus"
+
+#: engines/sword1/logic.cpp:1633
+msgid "This is the end of the Broken Sword 1 Demo"
+msgstr "Broken Sword 1:n demo pффttyy tфhфn"
+
+#: engines/sword2/animation.cpp:419
+msgid ""
+"PSX cutscenes found but ScummVM has been built without RGB color support"
+msgstr "PSX videoita lіydetty, mutta ScummVM on kффnnetty ilman RGB tukea"
+
+#: engines/sword2/sword2.cpp:79
+msgid "Show object labels"
+msgstr "Nфytф esineiden tiedot"
+
+#: engines/sword2/sword2.cpp:80
+msgid "Show labels for objects on mouse hover"
+msgstr "Nфytф esineiden kuvaus kohdistaessasi kursorin esineen ylle"
+
+#: engines/teenagent/resources.cpp:94
+msgid ""
+"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+msgstr ""
+"Asennuksestasi puuttuu 'teenagent.dat' tiedosto. Hae se ScummVM:n "
+"nettisivuilta"
+
+#: engines/teenagent/resources.cpp:115
+msgid ""
+"The teenagent.dat file is compressed and zlib hasn't been included in this "
+"executable. Please decompress it"
+msgstr ""
+"Tiedosto teenagent.dat on pakattu, mutta zlib-kirjastoa ei ole kффnnetty "
+"ScummVM:ффn. Pura teenagent.dat."
+
+#: engines/parallaction/saveload.cpp:133
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+"Pelin tallennus kohtaan ei onnistunut kohtaan %i\n"
+"\n"
+
+#: engines/parallaction/saveload.cpp:204
+msgid "Loading game..."
+msgstr "Ladataan peliф..."
+
+#: engines/parallaction/saveload.cpp:219
+msgid "Saving game..."
+msgstr "Tallennetaan peliф..."
+
+#: engines/parallaction/saveload.cpp:272
+msgid ""
+"ScummVM found that you have old savefiles for Nippon Safes that should be "
+"renamed.\n"
+"The old names are no longer supported, so you will not be able to load your "
+"games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked next time.\n"
+msgstr ""
+"Pelin Nippon Safes tallennukset ovat vanhassa muodossa, joita ei enфф tueta. "
+"Tallennukset\n"
+"tulee nimetф uudelleen ennen kuin ScummVM voi kфyttфф niitф. Paina 'Hyvфksy' "
+"muuntaaksesi tallennukset.\n"
+"Jos et tee muunnosta nyt, ScummVM kysyy sinulta uudelleen seuraavalla "
+"kerralla kun kфynnistфt pelin.\n"
+
+#: engines/parallaction/saveload.cpp:319
+msgid "ScummVM successfully converted all your savefiles."
+msgstr "ScummVM muunsi kaikki pelitallenteet onnistuneesti"
+
+#: engines/parallaction/saveload.cpp:321
+msgid ""
+"ScummVM printed some warnings in your console window and can't guarantee all "
+"your files have been converted.\n"
+"\n"
+"Please report to the team."
+msgstr ""
+"Osa tiedostoista ei ehkф muuntunut oikein. Varoitukset tulostettiin konsoli-"
+"ikkunaan. Pyydфmme ettф ilmoittaisit\n"
+"niistф ScummVM:n kehittфjille."
+
+#: audio/fmopl.cpp:49
+msgid "MAME OPL emulator"
+msgstr "MAME OPL emulaattori"
+
+#: audio/fmopl.cpp:51
+msgid "DOSBox OPL emulator"
+msgstr "DOSBox OPL emulaattori"
+
+#: audio/mididrv.cpp:209
+#, c-format
+msgid ""
+"The selected audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Valittua ффnilaitetta '%s' ei lіytynyt. Se saattaa olla kytketty pois pффltф "
+"tai irrotettuna tietokoneesta."
+
+#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257
+#: audio/mididrv.cpp:272
+msgid "Attempting to fall back to the next available device..."
+msgstr "Yritetффn kфyttфф seuraavaa saatavilla olevaa laitetta..."
+
+#: audio/mididrv.cpp:221
+#, c-format
+msgid ""
+"The selected audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Valitsemaasi ффnilaitetta '%s' ei voida kфyttфф. Avaa lokitiedosto "
+"saadaksesi lisфtietoja."
+
+#: audio/mididrv.cpp:257
+#, c-format
+msgid ""
+"The preferred audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Ensisijaista ффnilaitetta '%s' ei lіytynyt. Se saattaa olla kytketty pois "
+"pффltф tai irrotettuna tietokoneesta."
+
+#: audio/mididrv.cpp:272
+#, c-format
+msgid ""
+"The preferred audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Ensisijaista ффnilaitetta '%s' ei voida kфyttфф. Avaa lokitiedosto "
+"saadaksesi lisфtietoja."
+
+#: audio/null.h:43
+msgid "No music"
+msgstr "Ei musiikkia"
+
+#: audio/mods/paula.cpp:189
+msgid "Amiga Audio Emulator"
+msgstr "Amiga Audio emulaattori"
+
+#: audio/softsynth/adlib.cpp:2284
+msgid "AdLib Emulator"
+msgstr "AdLib emulaattori"
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr "Apple II GS emulaattori (EI TOTEUTETTU)"
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr "C64 Audio emulaattori"
+
+#: audio/softsynth/mt32.cpp:293
+msgid "Initializing MT-32 Emulator"
+msgstr "Alustetaan MT-32 emulaattoria"
+
+#: audio/softsynth/mt32.cpp:512
+msgid "MT-32 Emulator"
+msgstr "MT-32 emulaattori"
+
+#: audio/softsynth/pcspk.cpp:139
+msgid "PC Speaker Emulator"
+msgstr "PC kaiuttimen emulaattori"
+
+#: audio/softsynth/pcspk.cpp:158
+msgid "IBM PCjr Emulator"
+msgstr "IBM PCjr emulaattori"
+
+#: backends/keymapper/remap-dialog.cpp:47
+msgid "Keymap:"
+msgstr "Nфppфinkartta:"
+
+#: backends/keymapper/remap-dialog.cpp:66
+msgid " (Effective)"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Active)"
+msgstr " (Aktiivinen)"
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Blocked)"
+msgstr " (Estetty)"
+
+#: backends/keymapper/remap-dialog.cpp:119
+msgid " (Global)"
+msgstr " (Globaali)"
+
+#: backends/keymapper/remap-dialog.cpp:127
+msgid " (Game)"
+msgstr " (Peli)"
+
+#: backends/midi/windows.cpp:164
+msgid "Windows MIDI"
+msgstr "Windows MIDI"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:57
+msgid "ScummVM Main Menu"
+msgstr "ScummVM pффvalikko"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:63
+msgid "~L~eft handed mode"
+msgstr "~V~asenkфtinen tila"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:64
+msgid "~I~ndy fight controls"
+msgstr "~I~ndyn tappelukontrollit"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:65
+msgid "Show mouse cursor"
+msgstr "Nфytф hiiren kursori"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:66
+msgid "Snap to edges"
+msgstr "Tartu reunoihin"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:68
+msgid "Touch X Offset"
+msgstr "Kosketuksen X siirros"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr "Kosketuksen Y siirto"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:87
+msgid "Use laptop trackpad-style cursor control"
+msgstr "Kфytф kannettavan trackpad-tyylistф kursorinhallintaa"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:88
+msgid "Tap for left click, double tap right click"
+msgstr ""
+"Napauta kerran vasen klikkausta varten, napauta kahdesti oikeaa klikkausta "
+"varten"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:90
+msgid "Sensitivity"
+msgstr "Herkkyys"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:99
+msgid "Initial top screen scale:"
+msgstr ""
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:105
+msgid "Main screen scaling:"
+msgstr "Pффruudun skaalaus"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:107
+msgid "Hardware scale (fast, but low quality)"
+msgstr "Laitteistoskaalaus (nopea, mutta huono laatu)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:108
+msgid "Software scale (good quality, but slower)"
+msgstr "Ohjelmistoskaalaus (hyvф laatu, mutta hitaampi)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:109
+msgid "Unscaled (you must scroll left and right)"
+msgstr "Ei skaalattu (vierittф vasemmalle ja oikealle itse)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:111
+msgid "Brightness:"
+msgstr "Kirkkaus:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:121
+msgid "High quality audio (slower) (reboot)"
+msgstr "Korkealuokkainen ффni (hidas) (buuttaus)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:122
+msgid "Disable power off"
+msgstr ""
+
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr "Hiiren vedф-ja-pudota tila kфytіssф."
+
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr "Hiiren vedф-ja-pudota tila pois kфytіstф."
+
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr "Touchad tila pффllф"
+
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr "Touchpad tila pois pффltф"
+
+#: backends/platform/maemo/maemo.cpp:209
+msgid "Click Mode"
+msgstr "Klikkaus moodi"
+
+#: backends/platform/maemo/maemo.cpp:215
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+#: backends/platform/bada/form.cpp:281
+msgid "Left Click"
+msgstr "Vasen klikkaus"
+
+#: backends/platform/maemo/maemo.cpp:218
+msgid "Middle Click"
+msgstr "Keskiklikkaus"
+
+#: backends/platform/maemo/maemo.cpp:221
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+#: backends/platform/bada/form.cpp:273
+msgid "Right Click"
+msgstr "Oikea klikkaus"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
+msgid "Hide ScummVM"
+msgstr "Piilota ScummVM"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
+msgid "Hide Others"
+msgstr "Piilota muut"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
+msgid "Show All"
+msgstr "Nфytф kaikki"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
+msgid "Window"
+msgstr "Ikkuna"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
+msgid "Minimize"
+msgstr "Minimoi"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
+msgid "Normal (no scaling)"
+msgstr "Normaali (ei skaalausta)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr "Normaali (ei skaalausta)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+msgid "Enabled aspect ratio correction"
+msgstr "Kuvasuhteen korjaus pффllф"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+msgid "Disabled aspect ratio correction"
+msgstr "Kuvasuhteen korjaus pois pффltф"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196
+msgid "Active graphics filter:"
+msgstr "Valittu grafiikkafiltteri:"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+msgid "Windowed mode"
+msgstr "Ikkunoitu tila"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:135
+msgid "OpenGL Normal"
+msgstr "OpenGL Normal"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:136
+msgid "OpenGL Conserve"
+msgstr "OpenGL Conserve"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:137
+msgid "OpenGL Original"
+msgstr "OpenGL Original"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:415
+msgid "Current display mode"
+msgstr "Nykyinen nфyttіtila"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:428
+msgid "Current scale"
+msgstr "Nykyinen skaalaus"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+msgid "Active filter mode: Linear"
+msgstr "Valittu filtteritila: Linear"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+msgid "Active filter mode: Nearest"
+msgstr "Valittu filtteritila: Nearest"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:38
+#: backends/platform/wince/CEActionsSmartphone.cpp:39
+msgid "Up"
+msgstr "Ylіs"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:39
+#: backends/platform/wince/CEActionsSmartphone.cpp:40
+msgid "Down"
+msgstr "Alas"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:40
+#: backends/platform/wince/CEActionsSmartphone.cpp:41
+msgid "Left"
+msgstr "Vasen"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:41
+#: backends/platform/wince/CEActionsSmartphone.cpp:42
+msgid "Right"
+msgstr "Oikea"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:46
+#: backends/platform/wince/CEActionsSmartphone.cpp:47
+msgid "Zone"
+msgstr ""
+
+#: backends/platform/symbian/src/SymbianActions.cpp:47
+#: backends/platform/wince/CEActionsPocket.cpp:54
+#: backends/platform/wince/CEActionsSmartphone.cpp:48
+msgid "Multi Function"
+msgstr ""
+
+#: backends/platform/symbian/src/SymbianActions.cpp:48
+msgid "Swap character"
+msgstr "Vaihda hahmoa"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:49
+msgid "Skip text"
+msgstr "Ohita teksti"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:51
+msgid "Fast mode"
+msgstr "Nopea moodi"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:53
+msgid "Debugger"
+msgstr "Debuggeri"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:54
+msgid "Global menu"
+msgstr "Pффvalikko"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:55
+msgid "Virtual keyboard"
+msgstr "Virtuaalinen nфppфimistі"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:56
+msgid "Key mapper"
+msgstr "Nфppфinmффrittelijф"
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+msgid "Do you want to quit ?"
+msgstr "Haluatko lopettaa?"
+
+#: backends/platform/wii/options.cpp:51
+msgid "Video"
+msgstr "Video"
+
+#: backends/platform/wii/options.cpp:54
+msgid "Current video mode:"
+msgstr "Nykyinen videotila:"
+
+#: backends/platform/wii/options.cpp:56
+msgid "Double-strike"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:60
+msgid "Horizontal underscan:"
+msgstr "Horisontaalinenunderscan"
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr "Vertikaalinen underscan"
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr "Syіte"
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr "GC Padin herkkyys"
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr "GC PAdin kiihtyvyys"
+
+#: backends/platform/wii/options.cpp:86
+msgid "DVD"
+msgstr "DVD"
+
+#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101
+msgid "Status:"
+msgstr "Tila:"
+
+#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102
+msgid "Unknown"
+msgstr "Tuntematon"
+
+#: backends/platform/wii/options.cpp:93
+msgid "Mount DVD"
+msgstr "Liitф DVD"
+
+#: backends/platform/wii/options.cpp:94
+msgid "Unmount DVD"
+msgstr "Vapauta DVD"
+
+#: backends/platform/wii/options.cpp:98
+msgid "SMB"
+msgstr "SMB"
+
+#: backends/platform/wii/options.cpp:106
+msgid "Server:"
+msgstr "Palvelin:"
+
+#: backends/platform/wii/options.cpp:110
+msgid "Share:"
+msgstr "Jako:"
+
+#: backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr "Kфyttфjфnimi:"
+
+#: backends/platform/wii/options.cpp:118
+msgid "Password:"
+msgstr "Salasana:"
+
+#: backends/platform/wii/options.cpp:121
+msgid "Init network"
+msgstr "Alusta verkko"
+
+#: backends/platform/wii/options.cpp:123
+msgid "Mount SMB"
+msgstr "Mounttaa SMB"
+
+#: backends/platform/wii/options.cpp:124
+msgid "Unmount SMB"
+msgstr "Vapauta SMB"
+
+#: backends/platform/wii/options.cpp:143
+msgid "DVD Mounted successfully"
+msgstr "DVD mountattu onnistuneesti"
+
+#: backends/platform/wii/options.cpp:146
+msgid "Error while mounting the DVD"
+msgstr "Virhe liitettфessф DVD:tф"
+
+#: backends/platform/wii/options.cpp:148
+msgid "DVD not mounted"
+msgstr "DVD ei ole liitetty"
+
+#: backends/platform/wii/options.cpp:161
+msgid "Network up, share mounted"
+msgstr "Verkko ylhффllф, jako liitetty"
+
+#: backends/platform/wii/options.cpp:163
+msgid "Network up"
+msgstr "Verkko ylhффllф"
+
+#: backends/platform/wii/options.cpp:166
+msgid ", error while mounting the share"
+msgstr ", virhe liitettфessф jakoa"
+
+#: backends/platform/wii/options.cpp:168
+msgid ", share not mounted"
+msgstr ", jakoa ei liitetty"
+
+#: backends/platform/wii/options.cpp:174
+msgid "Network down"
+msgstr "Verkko alhaalla"
+
+#: backends/platform/wii/options.cpp:178
+msgid "Initializing network"
+msgstr "Alustetaan verkkoa"
+
+#: backends/platform/wii/options.cpp:182
+msgid "Timeout while initializing network"
+msgstr "Aikakatkaisu kun verkkoa alustettiin"
+
+#: backends/platform/wii/options.cpp:186
+#, c-format
+msgid "Network not initialized (%d)"
+msgstr "Verkko ei ole alustettu (%d)"
+
+#: backends/platform/wince/CEActionsPocket.cpp:46
+msgid "Hide Toolbar"
+msgstr "Piilota tyіkalupalkki"
+
+#: backends/platform/wince/CEActionsPocket.cpp:47
+msgid "Show Keyboard"
+msgstr "Nфytф nфppфimistі"
+
+#: backends/platform/wince/CEActionsPocket.cpp:48
+msgid "Sound on/off"
+msgstr "Ффnet pффllф/pois"
+
+#: backends/platform/wince/CEActionsPocket.cpp:49
+msgid "Right click"
+msgstr "Oikea klikkaus"
+
+#: backends/platform/wince/CEActionsPocket.cpp:50
+msgid "Show/Hide Cursor"
+msgstr "Nфytф/Piilota kursori"
+
+#: backends/platform/wince/CEActionsPocket.cpp:51
+msgid "Free look"
+msgstr "Vapaa katselu"
+
+#: backends/platform/wince/CEActionsPocket.cpp:52
+msgid "Zoom up"
+msgstr "Zoomaa ylіs"
+
+#: backends/platform/wince/CEActionsPocket.cpp:53
+msgid "Zoom down"
+msgstr "Zoomaa alas"
+
+#: backends/platform/wince/CEActionsPocket.cpp:55
+#: backends/platform/wince/CEActionsSmartphone.cpp:49
+msgid "Bind Keys"
+msgstr "Mффritф nфppфimet"
+
+#: backends/platform/wince/CEActionsPocket.cpp:56
+msgid "Cursor Up"
+msgstr "Nuoli ylіs"
+
+#: backends/platform/wince/CEActionsPocket.cpp:57
+msgid "Cursor Down"
+msgstr "Nuoli alas"
+
+#: backends/platform/wince/CEActionsPocket.cpp:58
+msgid "Cursor Left"
+msgstr "Nuoli vasemmalle"
+
+#: backends/platform/wince/CEActionsPocket.cpp:59
+msgid "Cursor Right"
+msgstr "Nuoli oikealle"
+
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Do you want to load or save the game?"
+msgstr "Haluatko tallentaa vai ladata pelin?"
+
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+msgid " Are you sure you want to quit ? "
+msgstr " Haluatko varmasti lopettaa?"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:50
+msgid "Keyboard"
+msgstr "Nфppфimistі"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:51
+msgid "Rotate"
+msgstr "Kффnnф"
+
+#: backends/platform/wince/CELauncherDialog.cpp:56
+msgid "Using SDL driver "
+msgstr "Kфytetффn SDL:n ajuria"
+
+#: backends/platform/wince/CELauncherDialog.cpp:60
+msgid "Display "
+msgstr "Nфyttі"
+
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Do you want to perform an automatic scan ?"
+msgstr "Haluatko suorittaa automaattisen skannauksen?"
+
+#: backends/platform/wince/wince-sdl.cpp:515
+msgid "Map right click action"
+msgstr "Mффritф oikeaklikkauksen toiminto"
+
+#: backends/platform/wince/wince-sdl.cpp:519
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+"Hiiren oikealle klikkaukselle on mффriteltфvф nфppфin, ennen kuin tфtф peliф "
+"voi pelata"
+
+#: backends/platform/wince/wince-sdl.cpp:528
+msgid "Map hide toolbar action"
+msgstr "Mффritф nфppфin tyіkalupalkin piilottamiselle"
+
+#: backends/platform/wince/wince-sdl.cpp:532
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+"Tyіkalupalkin piilottamiselle on mффriteltфvф nфppфin, ennen kuin tфtф peliф "
+"voi pelata"
+
+#: backends/platform/wince/wince-sdl.cpp:541
+msgid "Map Zoom Up action (optional)"
+msgstr "Zoomaa karttaa ylіs (valinnainen)"
+
+#: backends/platform/wince/wince-sdl.cpp:544
+msgid "Map Zoom Down action (optional)"
+msgstr "Zoomaa karttaa alas (valinnainen)"
+
+#: backends/platform/wince/wince-sdl.cpp:552
+msgid ""
+"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
+msgstr ""
+"Muista mффritellф nфppфin tyіkalupalkin piilottamiselle, jotta voit nфhdф "
+"koko tavaraluettelon"
+
+#: backends/events/default/default-events.cpp:191
+msgid "Do you really want to return to the Launcher?"
+msgstr "Haluatko varmasti palata pelivalitsimeen?"
+
+#: backends/events/default/default-events.cpp:191
+msgid "Launcher"
+msgstr "Pelivalitsin"
+
+#: backends/events/default/default-events.cpp:213
+msgid "Do you really want to quit?"
+msgstr "Haluatko varmasti lopettaa?"
+
+#: backends/events/gph/gph-events.cpp:386
+#: backends/events/gph/gph-events.cpp:429
+#: backends/events/openpandora/op-events.cpp:168
+msgid "Touchscreen 'Tap Mode' - Left Click"
+msgstr "Kosketusnфytіn 'Tap moodi' - vasen klikkaus"
+
+#: backends/events/gph/gph-events.cpp:388
+#: backends/events/gph/gph-events.cpp:431
+#: backends/events/openpandora/op-events.cpp:170
+msgid "Touchscreen 'Tap Mode' - Right Click"
+msgstr "Kosketusnфytіn 'Tap moodi' - oikea klikkaus"
+
+#: backends/events/gph/gph-events.cpp:390
+#: backends/events/gph/gph-events.cpp:433
+#: backends/events/openpandora/op-events.cpp:172
+msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
+msgstr "Kosketusnфytіn 'Tap moodi' - ei klikkausta"
+
+#: backends/events/gph/gph-events.cpp:410
+msgid "Maximum Volume"
+msgstr "Maksimi ффnenvoimakkuus"
+
+#: backends/events/gph/gph-events.cpp:412
+msgid "Increasing Volume"
+msgstr "Nostetaan ффnenvoimakkuutta"
+
+#: backends/events/gph/gph-events.cpp:418
+msgid "Minimal Volume"
+msgstr "Minimi ффnenvoimakkuus"
+
+#: backends/events/gph/gph-events.cpp:420
+msgid "Decreasing Volume"
+msgstr "Lasketaan ффnenvoimakkuutta"
+
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Kosketusnфytіn 'Tap moodi' - ei klikkausta"
+
+#: backends/updates/macosx/macosx-updates.mm:67
+msgid "Check for Updates..."
+msgstr "Tarkista pфivitykset..."
+
+#: backends/platform/bada/form.cpp:269
+msgid "Right Click Once"
+msgstr "Klikkaa oikealla kerran"
+
+#: backends/platform/bada/form.cpp:277
+msgid "Move Only"
+msgstr ""
+
+#: backends/platform/bada/form.cpp:291
+msgid "Escape Key"
+msgstr "Esc nфppфin"
+
+#: backends/platform/bada/form.cpp:296
+msgid "Game Menu"
+msgstr "Pelivalikko"
+
+#: backends/platform/bada/form.cpp:301
+msgid "Show Keypad"
+msgstr "Nфytф keypad"
+
+#: backends/platform/bada/form.cpp:309
+msgid "Control Mouse"
+msgstr "Ohjaa hiirtф"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Enabled"
+msgstr "Klikkaus pффllф"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Disabled"
+msgstr "Klikkaus pois pффltф"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index cd98af1bb7..6e8f350b4e 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-08 12:24+0100\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
"Language-Team: French <scummvm-devel@lists.sf.net>\n"
@@ -45,10 +45,10 @@ msgstr "Remonter"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -70,15 +70,15 @@ msgstr "Fermer"
msgid "Mouse click"
msgstr "Clic de souris"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Afficher le clavier"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Changer l'affectation des touches"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Basculer en plein щcran"
@@ -92,15 +92,15 @@ msgstr "Affecter"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -356,7 +356,7 @@ msgstr "Cet ID est dщjр utilisщ par un autre jeu. Choisissez en un autre svp."
msgid "~Q~uit"
msgstr "~Q~uitter"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Quitter ScummVM"
@@ -364,7 +364,7 @@ msgstr "Quitter ScummVM"
msgid "A~b~out..."
msgstr "Р ~P~ropos..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Р propos de ScummVM"
@@ -931,74 +931,74 @@ msgstr ""
"Le thшme que vous avez sщlectionщ ne support pas la langue franчaise. Si "
"vous voulez l'utiliser vous devez d'abord changer de langue."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Date inconnue"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Heure inconnue"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Durщe de jeu inconnue"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Supprimer"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Voulez-vous vraiment supprimer cette sauvegarde?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Date: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Heure: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Durщe de jeu: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Sauvegarde sans nom"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Sauver"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Щchec de la sauvegarde."
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Nom:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1036,35 +1036,35 @@ msgstr "Anti-crщnelщ (16 bpp)"
msgid "Clear value"
msgstr "Effacer la valeur"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Le niveau de debug '%s' n'est pas supportщ par ce moteur de jeu"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Passer"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Mettre en pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Passer la phrase"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Erreur lors de l'щxщcution du jeu:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Impossible de trouver un moteur pour exщcuter le jeu sщlectionnщ"
@@ -1296,13 +1296,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Jouer quand mъme"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Dialogues sauvegarde/chargement d'origine"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utiliser les dialogues sauvegarde/chargement d'origine plutєt que ceux de "
@@ -1324,27 +1324,27 @@ msgstr "Utiliser le mode palette lumineuse"
msgid "Display graphics using the game's bright palette"
msgstr "Utiliser la palette lumineuse du jeu pour l'affichage"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Dщtramage EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activer le dщtramage dans les jeux EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Prщfщrer les effets sonors digitals"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Prщfщrer les effets sonores digitaux plutєt que ceux synthщtisщs"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Utiliser IMF/Yamaha FB-01 pour la sortie MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1352,32 +1352,32 @@ msgstr ""
"Utiliser une carte IBM Music Feature ou un module Yamaha FB-01 FM pour la "
"sortie MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Utiliser la musique du CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Utiliser la musique du CD quand elle est disponible au lieu de la musique du "
"jeu"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Utiliser les curseurs Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Utiliser les curseurs Windows (plus petits et monochromes) au lieu des "
"curseurs DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Utiliser les curseurs argentщs"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr "Utiliser les curseurs argentщs au lieu des curseurs normaux dorщs"
@@ -2029,7 +2029,7 @@ msgstr "Voler vers la droite"
msgid "Fly to lower right"
msgstr "Voler vers la bas р droite"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2038,7 +2038,7 @@ msgstr ""
"Support MIDI natif requiшre la mise р jour Roland de LucasArt,\n"
"mais %s manque. Utilise AdLib р la place."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2049,7 +2049,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2060,7 +2060,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2071,7 +2071,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2108,7 +2108,7 @@ msgstr "~M~enu Principal"
msgid "~W~ater Effect Enabled"
msgstr "~E~ffets de l'Eau Activщs"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Fichier de sщquence '%s' non trouvщ!"
@@ -2236,7 +2236,7 @@ msgstr "Options"
msgid "Choose Spell"
msgstr "Choisir un Sort"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2283,28 +2283,28 @@ msgstr "Intro disquette"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Utiliser l'intro de la version disquette (version CD uniquement)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"La scшne cinщmatique PSX '%s' ne peut pas ъtre lu avec 256 couleurs ou moins"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Les sщquences DXA sont prщsente mais ScummVM a щtщ compilщ sans le support "
"zlib."
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Les sщquences MPEG2 ne sont plus supportщes"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Sщquence '%s' non trouvщ"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2322,7 +2322,7 @@ msgstr ""
"Appuyer sur OK pour les convertir maintenant, sinon le mъme message "
"s'affichera la prochaine fois que vous dщmarrerez le jeu.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2331,11 +2331,11 @@ msgstr ""
"La sauvegarde cible existe dщjр!\n"
"Voulez-vous conserver l'ancienne sauvegarde (%s) ou la nouvelle (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Garde l'ancienne"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Garder la nouvelle"
@@ -2343,7 +2343,7 @@ msgstr "Garder la nouvelle"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "C'est la fin de la dщmo des Chevaliers de Baphomet"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2358,12 +2358,12 @@ msgstr "Afficher la description des objets"
msgid "Show labels for objects on mouse hover"
msgstr "Afficher la description des objets lors de passage du pointeur"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2474,7 +2474,7 @@ msgstr "Pas de musique"
msgid "Amiga Audio Emulator"
msgstr "Щmulateur Amiga Audio"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Щmulateur AdLib"
@@ -2641,24 +2641,24 @@ msgstr "Clic Milieu"
msgid "Right Click"
msgstr "Clic Droit"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Masquer ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Masquer les autres"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Tout afficher"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Fenъtre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Placer dans le Dock"
@@ -3042,19 +3042,19 @@ msgstr "Voulez-vous vraiment quitter?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Tap Mode' - Clic Gauche"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Tap Mode' - Clic Droit"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Tap Mode' - Dщplacer sans cliquer"
@@ -3074,7 +3074,12 @@ msgstr "Volume Minimum"
msgid "Decreasing Volume"
msgstr "Diminution Volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Mode' - Dщplacer sans cliquer"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Recherche des mises р jour..."
diff --git a/po/gl_ES.po b/po/gl_ES.po
index d08867b717..c18a1935c3 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-08-15 13:33+0100\n"
"Last-Translator: Santiago G. Sanz <s.sanz@uvigo.es>\n"
"Language-Team: \n"
@@ -44,10 +44,10 @@ msgstr "Arriba"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -69,15 +69,15 @@ msgstr "Pechar"
msgid "Mouse click"
msgstr "Premer co rato"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostrar teclado"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Activar/desactivar pantalla completa"
@@ -91,15 +91,15 @@ msgstr "Asignar"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -353,7 +353,7 @@ msgstr "Este ID de xogo xa estс en uso. Selecciona outro."
msgid "~Q~uit"
msgstr "~S~aэr"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Saэr de ScummVM"
@@ -361,7 +361,7 @@ msgstr "Saэr de ScummVM"
msgid "A~b~out..."
msgstr "Ace~r~ca de..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Acerca de ScummVM"
@@ -918,71 +918,71 @@ msgstr ""
"O tema seleccionado non щ compatible co idioma actual. Para empregar o tema, "
"deberсs cambiar antes o idioma da interfaz."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Lista"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Grade"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Non hai data gardada"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Non hai hora gardada"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Non hai tempo de xogo gardado"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Eliminar"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Seguro que queres eliminar esta partida?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tempo de xogo:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Partida sen tэtulo"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Seg."
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Ant."
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Novo ficheiro"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Crea un novo ficheiro de gardado"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Nome:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Introduce unha descriciѓn para o espazo %d:"
@@ -1020,35 +1020,35 @@ msgstr "Antidistorsiѓn (16 bpp)"
msgid "Clear value"
msgstr "Limpar valor"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "O motor non щ compatible co nivel de depuraciѓn %s"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menњ"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Omitir"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Omitir liёa"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Erro de execuciѓn do xogo:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Non se puido atopar un motor para executar o xogo seleccionado"
@@ -1278,13 +1278,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Iniciar de todos os xeitos"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Empregar pantallas orixinais de gardado e carga"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Empregar as pantallas orixinais de gardado e carga, no canto das de ScummVM"
@@ -1305,27 +1305,27 @@ msgstr "Empregar modo de paleta intensa"
msgid "Display graphics using the game's bright palette"
msgstr "Mostrar os grсficos coa paletta intensa do xogo"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Non interpolaciѓn EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activar a non interpolaciѓn nos xogos en EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Preferir efectos de son dixitais"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Dar preferencia aos efectos de son dixitais no canto dos sintщticos"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Empregar IMF/Yamaha FB-01 para a saэda de MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1333,30 +1333,30 @@ msgstr ""
"Empregar unha tarxeta IBM Music Feature ou un mѓdulo de sintetizador Yamaha "
"FB-01 FM para a saэda de MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Empregar son de CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Empregar son de CD no canto do do xogo, de ser o caso"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Empregar cursores de Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Empregar os cursores de Windows (mсis pequenos e monocromos) no canto dos de "
"DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Empregar cursores prateados"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2010,7 +2010,7 @@ msgstr "Voar с dereita"
msgid "Fly to lower right"
msgstr "Voar с dereita abaixo"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2019,7 +2019,7 @@ msgstr ""
"A compatibilidade nativa con MIDI precisa a actualizaciѓn de Roland\n"
"de LucasArts, mais falla %s. Empregarase AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2030,7 +2030,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2041,7 +2041,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2052,7 +2052,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2088,7 +2088,7 @@ msgstr "~M~enњ principal"
msgid "~W~ater Effect Enabled"
msgstr "Efecto de ~a~uga activado"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Non se atopou o ficheiro de secuencia %s!"
@@ -2216,7 +2216,7 @@ msgstr "Opciѓns"
msgid "Choose Spell"
msgstr "Elixir feitizo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2262,27 +2262,27 @@ msgstr "Intro de disquete"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Empregar a introduciѓn da versiѓn en disquete (sѓ versiѓn en CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Non se pode reproducir a secuencia %s de PSX neste modo grсfico"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Atopсronse secuencias de DXA. No entanto, esta versiѓn de ScummVM non щ "
"compatible con zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Xa non hai compatibilidade coas secuencias en MPEG2"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Non se atopou a secuencia %s"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2300,7 +2300,7 @@ msgstr ""
"Preme Aceptar para convertilos. Se non, volverсs ver esta mensaxe a prѓxima "
"vez que inicies o xogo.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2309,11 +2309,11 @@ msgstr ""
"Xa existe unha partida con ese nome!\n"
"Queres conservar a vella (%s) ou a nova (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Conservar a vella"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Conservar a nova"
@@ -2321,7 +2321,7 @@ msgstr "Conservar a nova"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Aquэ remata a demo de Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2336,13 +2336,13 @@ msgstr "Mostrar etiquetas"
msgid "Show labels for objects on mouse hover"
msgstr "Mostrar as etiquetas dos obxectos ao apuntar co rato"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
"Falta o ficheiro teenagent.dat. Descсrgao dende o sitio web de ScummVM."
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2457,7 +2457,7 @@ msgstr "Sen mњsica"
msgid "Amiga Audio Emulator"
msgstr "Emulador de Amiga Audio"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador de AdLib"
@@ -2624,24 +2624,24 @@ msgstr "Botѓn central"
msgid "Right Click"
msgstr "Botѓn secundario"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ocultar ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ocultar outros"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostrar todo"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Ventс"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizar"
@@ -3023,19 +3023,19 @@ msgstr "Seguro que queres saэr?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Modo pantalla tсctil: premer botѓn primario"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Modo pantalla tсctil: premer botѓn secundario"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Modo pantalla tсctil: apuntar co rato"
@@ -3055,7 +3055,12 @@ msgstr "Volume mэnimo"
msgid "Decreasing Volume"
msgstr "Baixando volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Modo pantalla tсctil: apuntar co rato"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Buscar actualizaciѓns..."
diff --git a/po/hu_HU.po b/po/hu_HU.po
index b263d2c539..b3642fd90c 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-08-14 07:29+0100\n"
"Last-Translator: George Kormendi <grubycza@hotmail.com>\n"
"Language-Team: Hungarian\n"
@@ -48,10 +48,10 @@ msgstr "Feljebb"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -73,15 +73,15 @@ msgstr "Bezсr"
msgid "Mouse click"
msgstr "Egщrkattintсs"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Billentyћzet beсllэtсsok"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Billentyћk сtсllэtсsa"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Teljeskщpernyѕ kapcsolѓ"
@@ -95,15 +95,15 @@ msgstr "Kiosztсs"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -357,7 +357,7 @@ msgstr "Ez a jсtщkazonosэtѓ ID mсr foglalt, Vсlassz egy mсsikat."
msgid "~Q~uit"
msgstr "Kilщpщs"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "ScummVM bezсrсsa"
@@ -365,7 +365,7 @@ msgstr "ScummVM bezсrсsa"
msgid "A~b~out..."
msgstr "Nщvjegy"
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "ScummVM nщvjegy"
@@ -919,71 +919,71 @@ msgstr ""
"A kivсlasztott tщma nem tсmogatja a nyelvedet. Ha hasznсlni akarod ezt a "
"tщmсt, elѕszѕr vсlts сt egy mсsik nyelvre."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Lista nщzet"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Rсcs nщzet"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Dсtum nincs mentve"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Idѕ nincs mentve"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Jсtщkidѕ nincs mentve"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Tіrіl"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Biztos hogy tіrіlni akarod ezt a jсtщkсllсst?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dсtum:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Idѕ:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Jсtщkidѕ:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Nщvtelen jсtщkсllсs"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Kіvetkezѕ"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Elѕzѕ"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "кj Mentщs"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "кj jсtщkmentщs kщszэtщse"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Nщv:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Adj meg egy leэrсst a %d slothoz:"
@@ -1021,35 +1021,35 @@ msgstr "Щlsimэtott (16bpp)"
msgid "Clear value"
msgstr "Щrtщk tіrlщse"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "A motor nem tсmogatja a '%s' debug szintet"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menќ"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Tovсbb"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Szќnet"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Sor сtlщpщse"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Hiba a jсtщk futtatсsakor:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Nem talсlhatѓ olyan jсtщkmotor ami a vсlasztott jсtщkot tсmogatja"
@@ -1278,13 +1278,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Indэtсs эgy is"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Eredeti ment/tіlt kщpernyѕk hasznсlata"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Az eredeti mentщs/betіltщs kщpernyѕ hasznсlata a ScummVM kщpek helyett"
@@ -1304,27 +1304,27 @@ msgstr "Fщnyes paletta mѓd hasznсlata"
msgid "Display graphics using the game's bright palette"
msgstr "Grafikus megjelenэtщsre hasznсlja a jсtщk fщnyes palettсjсt"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA szinjavэtсs"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Undithering engedщlyezщse EGA jсtщkokban"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Digitсlis hangeffektusok elѕnyben"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Digitсlis hanghatсsok elѕnyben a szintetizсltakkal szemben"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "IMF/Yamaha FB-01 hasznсlata MIDI kimentre"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1332,28 +1332,28 @@ msgstr ""
"IBM Music Feature kсrtya vagy Yamaha FB-01 FM szintetizсtor modul hasznсlata "
"MIDI kimenetre"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "CD audiѓ hasznсlata"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "CD audiѓ hasznсlata a jсtщkban lщvѕvel szemben, ha elщrhetѕ"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Windows kurzorok hasznсlata"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Windows kurzorok hasznсlata (kisebb щs monokrѓm) a DOS-osok helyett "
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Ezќst kurzor hasznсlata"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr "Alternatэv ezќst kurzorszett hasznсlata, a normсl arany helyett"
@@ -2005,7 +2005,7 @@ msgstr "Jobbra repќlщs"
msgid "Fly to lower right"
msgstr "Jobbra le repќlщs"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2014,7 +2014,7 @@ msgstr ""
"Native MIDI tсmogatсshoz kell a Roland Upgrade a LucasArts-tѓl,\n"
"a %s hiсnyzik. AdLib-ot hasznсlok helyette."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2025,7 +2025,7 @@ msgstr ""
"\n"
"%s fсjlba nem sikerќlt"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2036,7 +2036,7 @@ msgstr ""
"\n"
"%s fсjlbѓl nem sikerќlt"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2047,7 +2047,7 @@ msgstr ""
"\n"
"%s fсjlba elkщszќlt"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2083,7 +2083,7 @@ msgstr "Fѕ~M~enќ"
msgid "~W~ater Effect Enabled"
msgstr "Vэzeffektus engedщlyezve"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "'%s' сtvezetѕ fсjl nem talсlhatѓ"
@@ -2211,7 +2211,7 @@ msgstr "Opciѓk"
msgid "Choose Spell"
msgstr "Vсlassz varсzslatot"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2257,25 +2257,25 @@ msgstr "Floppy intro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "A floppy verziѓ intro hasznсlata (csak CD verziѓnсl)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "'%s' PSX stream сtvezetѕ nem jсtszhatѓ le paletta mѓdban"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr "DXA сtvezetѕ elщrhetѕ, de a ScummVM zlib tсmogatсs nincs lefordэtva"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 сtvezetѕk mсr nem tсmogatottak"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "'%s' сtvezetѕ nem talсlhatѓ"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2293,7 +2293,7 @@ msgstr ""
"Nyomj OK-t az сtalakэtсshoz, vagy rсkщrdezzek ha legkіzelebb elindэtod a "
"jсtщkot.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2302,11 +2302,11 @@ msgstr ""
"A vсlasztott jсtщkmentщs mсr lщtezik!\n"
"Megtartod a rщgi jсtщkmentщst (%s) vagy kicserщled az њjra (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "A rщgit megtartom"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Az њjat megtartom"
@@ -2314,7 +2314,7 @@ msgstr "Az њjat megtartom"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Ez a Broken Sword 1 Demo vщge"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2329,12 +2329,12 @@ msgstr "Tсrgycimke lсthatѓ"
msgid "Show labels for objects on mouse hover"
msgstr "Tсrgycimke lсthatѓ ha az egщr felette van"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr "Hiсnyzik a 'teenagent.dat' fсjl. Szerezd be a ScummVM website-rѓl"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2446,7 +2446,7 @@ msgstr "Nincs zene"
msgid "Amiga Audio Emulator"
msgstr "Amiga Audiѓ Emulсtor"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulсtor"
@@ -2613,24 +2613,24 @@ msgstr "Kіzщpsѕ katt"
msgid "Right Click"
msgstr "Jobb katt"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "ScummVM elrejtщse"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Tіbbi elrejtщse"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mutasd mind"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Ablak"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Kis mщret"
@@ -3010,19 +3010,19 @@ msgstr "Biztos hogy ki akarsz lщpni ?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Щrintѕkщpernyѕ 'Tap Mѓd' - Bal katt"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Щrintѕkщpernyѕ 'Tap Mѓd' - Jobb katt"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Щrintѕkщpernyѕ 'Tap Mѓd' - Lebegѕ (Nincs katt)"
@@ -3042,7 +3042,12 @@ msgstr "Minimum Hangerѕ"
msgid "Decreasing Volume"
msgstr "Hangerѕ csіkkentщse"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Щrintѕkщpernyѕ 'Tap Mѓd' - Lebegѕ (Nincs katt)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Frissэtщsek keresщse..."
diff --git a/po/it_IT.po b/po/it_IT.po
index 7d4c11319d..3ebb5ca090 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-09 09:30+0100\n"
"Last-Translator: Matteo 'Maff' Angelino <matteo.maff at gmail dot com>\n"
"Language-Team: Italian\n"
@@ -44,10 +44,10 @@ msgstr "Su"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -69,15 +69,15 @@ msgstr "Chiudi"
msgid "Mouse click"
msgstr "Clic del mouse"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostra tastiera"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Riprogramma tasti"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Attiva / disattiva schermo intero"
@@ -91,15 +91,15 @@ msgstr "Mappa"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -354,7 +354,7 @@ msgstr "Questo ID di gioco ш giр in uso. Si prega di sceglierne un'altro."
msgid "~Q~uit"
msgstr "C~h~iudi"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Esci da ScummVM"
@@ -362,7 +362,7 @@ msgstr "Esci da ScummVM"
msgid "A~b~out..."
msgstr "~I~nfo..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Informazioni su ScummVM"
@@ -925,74 +925,74 @@ msgstr ""
"Il tema che hai selezionato non supporta la lingua attuale. Se vuoi "
"utilizzare questo tema devi prima cambiare la lingua."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Nessuna data salvata"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Nessun orario salvato"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Nessun tempo salvato"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Elimina"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Sei sicuro di voler eliminare questo salvataggio?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Ora: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tempo di gioco: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Salvataggio senza titolo"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Salva"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Impossibile salvare il gioco"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Nome:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1030,35 +1030,35 @@ msgstr "Con antialiasing (16bpp)"
msgid "Clear value"
msgstr "Cancella"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Il motore non supporta il livello di debug '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Salta"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Salta battuta"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Errore nell'esecuzione del gioco:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr ""
"Impossibile trovare un motore in grado di eseguire il gioco selezionato"
@@ -1291,13 +1291,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Avvia comunque"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Usa schermate di salvataggio originali"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Usa le schermate originali di salvataggio e caricamento, al posto di quelle "
@@ -1319,27 +1319,27 @@ msgstr "Usa modalitр colori brillanti"
msgid "Display graphics using the game's bright palette"
msgstr "Visualizza la grafica con i colori brillanti del gioco"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Undithering EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Attiva undithering nei giochi EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Scegli effetti sonori digitali"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Scegli gli effetti sonori digitali al posto di quelli sintetizzati"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Usa IMF/Yamaha FB-01 per output MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1347,30 +1347,30 @@ msgstr ""
"Usa una scheda IBM Music Feature o un modulo synth Yamaha FB-01 FM per "
"l'output MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Usa audio da CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Usa l'audio da CD al posto di quello incorporato nel gioco, se disponibile"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Usa cursori di Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Usa i cursori di Windows (piљ piccoli e monocromatici) al posto di quelli DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Usa cursori d'argento"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2023,7 +2023,7 @@ msgstr "Vola a destra"
msgid "Fly to lower right"
msgstr "Vola in basso a destra"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2032,7 +2032,7 @@ msgstr ""
"Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n"
"ma %s non ш presente. Verrр usato AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2043,7 +2043,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2054,7 +2054,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2065,7 +2065,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2102,7 +2102,7 @@ msgstr "~M~enu principale"
msgid "~W~ater Effect Enabled"
msgstr "~E~ffetto acqua attivo"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "File della scena di intermezzo '%s' non trovato!"
@@ -2230,7 +2230,7 @@ msgstr "Opzioni"
msgid "Choose Spell"
msgstr "Scegli incantesimo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2277,28 +2277,28 @@ msgstr "Intro floppy"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Usa la versione floppy dell'intro (solo versione CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"La scena PSX di intermezzo '%s' non puђ essere eseguita in modalitр tavolozza"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Sono state trovare scene di intermezzo DXA ma ScummVM ш stato compilato "
"senza il supporto zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Le scene di intermezzo MPEG2 non sono piљ supportate"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Scena di intermezzo '%s' non trovata"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2316,7 +2316,7 @@ msgstr ""
"Premi OK per convertirli adesso, altrimenti ti verrр richiesto al prossimo "
"avvio del gioco.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2325,11 +2325,11 @@ msgstr ""
"La destinazione del nuovo salvataggio giр esiste!\n"
"Vuoi mantenere il vecchio salvataggio (%s) o quello nuovo (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Mantieni quello vecchio"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Mantieni quello nuovo"
@@ -2337,7 +2337,7 @@ msgstr "Mantieni quello nuovo"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Questa ш la fine della demo di Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2352,12 +2352,12 @@ msgstr "Mostra etichette oggetti"
msgid "Show labels for objects on mouse hover"
msgstr "Mostra etichette per gli oggetti al passaggio del mouse"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2470,7 +2470,7 @@ msgstr "Nessuna musica"
msgid "Amiga Audio Emulator"
msgstr "Emulatore audio Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulatore AdLib"
@@ -2637,24 +2637,24 @@ msgstr "Clic centrale"
msgid "Right Click"
msgstr "Clic destro"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Nascondi ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Nascondi altre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostra tutte"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Finestra"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Contrai"
@@ -3036,19 +3036,19 @@ msgstr "Sei sicuro di voler uscire?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Tap Mode' - Clic sinistro"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Tap Mode' - Clic destro"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Tap Mode' - Passaggio del cursore (nessun clic)"
@@ -3068,7 +3068,12 @@ msgstr "Volume minimo"
msgid "Decreasing Volume"
msgstr "Diminuzione volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Mode' - Passaggio del cursore (nessun clic)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Cerca aggiornamenti..."
diff --git a/po/nb_NO.po b/po/nb_NO.po
index b775d11dd2..e28c370f2d 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.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-04 02:19+0100\n"
"Last-Translator: Einar Johan Sјmхen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
@@ -48,10 +48,10 @@ msgstr "Gх tilbake"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -73,15 +73,15 @@ msgstr "Lukk"
msgid "Mouse click"
msgstr "Musklikk"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Vis tastatur"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Omkoble taster"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Veksle fullskjerm"
@@ -95,15 +95,15 @@ msgstr "Koble"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -359,7 +359,7 @@ msgstr "Denne spill-IDen er allerede i bruk. Vennligst velg en annen."
msgid "~Q~uit"
msgstr "~A~vslutt"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Avslutt ScummVM"
@@ -367,7 +367,7 @@ msgstr "Avslutt ScummVM"
msgid "A~b~out..."
msgstr "~O~m..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -923,74 +923,74 @@ msgstr ""
"Temaet du valgte stјtter ikke det aktive sprхket. Hvis du vil bruke dette "
"temaet, mх du bytte til et annet sprхk fјrst."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ingen dato lagret"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Ingen tid lagret"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ingen spilltid lagret"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Slett"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vil du virkelig slette dette lagrede spillet?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dato: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Spilltid: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Ikke navngitt spilltilstand"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Lagre"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Klarte ikke х lagre spill."
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Navn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1028,35 +1028,35 @@ msgstr "Antialiased (16bpp)"
msgid "Clear value"
msgstr "Tјm verdi"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoren stјtter ikke debug-nivх '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Hopp over"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Hopp over linje"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Problem ved kjјring av spill:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikke finne noen motor som kunne kjјre det valgte spillet"
@@ -1280,13 +1280,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Start allikevel"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Bruk originale lagre/laste-skjermer"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene"
@@ -1306,54 +1306,54 @@ msgstr "Bruk lys palettmodus"
msgid "Display graphics using the game's bright palette"
msgstr "Vis grafikk med spillets lyse palett"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA av-dithering"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktiver av-dithering i EGA-spill"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Foretrekk digitale lydeffekter"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Foretrekk digitale lydeffekter fremfor syntetiske"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Bruk IMF/Yamaha-FB-01 for MIDI-output"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Bruk CD-lyd"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Bruk CD-lyd istedenfor spillets lyd, hvis tilgjengelig"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Bruk Windows-muspekere"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Bruk Windows-muspekerene (mindre, og monokrome) isteden"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Bruk sјlvmuspekere"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2006,14 +2006,14 @@ msgstr "Fly til hјyre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјyre"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
msgstr ""
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2024,7 +2024,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2035,7 +2035,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2046,7 +2046,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2082,7 +2082,7 @@ msgstr "Hoved~m~eny"
msgid "~W~ater Effect Enabled"
msgstr "~V~anneffekt aktivert"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr ""
@@ -2211,7 +2211,7 @@ msgstr "Valg"
msgid "Choose Spell"
msgstr "Velg"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
#, fuzzy
msgid ""
"You appear to be using a General MIDI device,\n"
@@ -2257,25 +2257,25 @@ msgstr "Diskett-intro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Bruk diskettversjonens intro (Kun for CD-versjon)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr ""
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr ""
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2293,18 +2293,18 @@ msgstr ""
"Trykk OK for х konvertere dem nх, ellers vil du bli spurt igjen neste gang "
"du starter spillet."
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
"Would you like to keep the old save game (%s) or the new one (%s)?\n"
msgstr ""
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Behold den gamle"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Behold den nye"
@@ -2312,7 +2312,7 @@ msgstr "Behold den nye"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Dette er slutten pх Broken Sword 1-demoen"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2325,12 +2325,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2441,7 +2441,7 @@ msgstr "Ingen musikk"
msgid "Amiga Audio Emulator"
msgstr "Amiga Lydemulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulator"
@@ -2609,24 +2609,24 @@ msgstr "Midtklikk"
msgid "Right Click"
msgstr "Hјyreklikk"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Skjul ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Skjul andre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Vis alle"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Vindu"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimer"
@@ -3010,19 +3010,19 @@ msgstr "Vil du virkelig avslutte?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchskjerm 'Tapmodus' - Venstreklikk"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchskjerm 'Tapmodus' - Hјyreklikk"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchskjerm 'Tapmodus' - Sveve (Ingen Klikk)"
@@ -3042,7 +3042,12 @@ msgstr "Minimalt Volum"
msgid "Decreasing Volume"
msgstr "Senker volum"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchskjerm 'Tapmodus' - Sveve (Ingen Klikk)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Sjekk for oppdateringer..."
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 1b78932a46..77af3801bf 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.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2011-04-25 23:07+0100\n"
"Last-Translator: Einar Johan T. Sјmхen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
@@ -48,10 +48,10 @@ msgstr "Gх tilbake"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -73,15 +73,15 @@ msgstr "Steng"
msgid "Mouse click"
msgstr "Musklikk"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Syn Tastatur"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Omkople tastar"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
#, fuzzy
msgid "Toggle FullScreen"
msgstr "Veksle fullskjerm"
@@ -96,15 +96,15 @@ msgstr "Kople"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -361,7 +361,7 @@ msgstr ""
msgid "~Q~uit"
msgstr "~A~vslutt"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Avslutt ScummVM"
@@ -369,7 +369,7 @@ msgstr "Avslutt ScummVM"
msgid "A~b~out..."
msgstr "~O~m..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -921,74 +921,74 @@ msgstr ""
"Temaet du har valt stјttar ikkje det aktive sprхket. Om du vil nytte dette "
"temaet mх du bytte til eit anna sprхk fјrst."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ingen dato lagra"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Inga tid lagra"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Inga speletid lagra"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Slett"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vil du verkeleg slette det lagra spelet?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dato: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Speletid: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Ikkje navngjeven speltilstand"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Lagre"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Full speltittel:"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Namn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1026,35 +1026,35 @@ msgstr "Antialiased (16bpp)"
msgid "Clear value"
msgstr "Tјm verdi"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoren stјttar ikkje debug-nivх '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Hopp over"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Hopp over linje"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Feil under kјyring av spel:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikkje finne nokon motor som kunne kјyre det velde spelet."
@@ -1269,13 +1269,13 @@ msgstr ""
msgid "Start anyway"
msgstr ""
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -1296,55 +1296,55 @@ msgstr "иvre hјgre gjenstand"
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr ""
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr ""
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr ""
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
#, fuzzy
msgid "Use silver cursors"
msgstr "Vanleg peikar"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2005,14 +2005,14 @@ msgstr "Fly til hјgre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјgre"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
msgstr ""
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2020,7 +2020,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2028,7 +2028,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2036,7 +2036,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2073,7 +2073,7 @@ msgstr "ScummVM Hovudmeny"
msgid "~W~ater Effect Enabled"
msgstr "~V~anneffekt aktivert"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr ""
@@ -2210,7 +2210,7 @@ msgstr "~V~al"
msgid "Choose Spell"
msgstr "Vel"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2247,25 +2247,25 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr ""
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr ""
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2276,18 +2276,18 @@ msgid ""
"time you start the game.\n"
msgstr ""
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
"Would you like to keep the old save game (%s) or the new one (%s)?\n"
msgstr ""
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr ""
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr ""
@@ -2295,7 +2295,7 @@ msgstr ""
msgid "This is the end of the Broken Sword 1 Demo"
msgstr ""
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2308,12 +2308,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2407,7 +2407,7 @@ msgstr "Ingen musikk"
msgid "Amiga Audio Emulator"
msgstr "Amiga Lydemulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulator"
@@ -2577,25 +2577,25 @@ msgstr "Midtre venstre gjenstand"
msgid "Right Click"
msgstr "Hјgreklikk"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
#, fuzzy
msgid "Hide ScummVM"
msgstr "Avslutt ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr ""
@@ -2986,19 +2986,19 @@ msgstr "Vil du avslutte?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr ""
@@ -3020,7 +3020,11 @@ msgstr "Volum"
msgid "Decreasing Volume"
msgstr ""
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr ""
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr ""
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 1bf44d1a66..6e8699113a 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.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-29 15:49+0100\n"
"Last-Translator: MichaГ ZiБbkowski <mziab@o2.pl>\n"
"Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n"
@@ -48,10 +48,10 @@ msgstr "W gѓrъ"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -73,15 +73,15 @@ msgstr "Zamknij"
msgid "Mouse click"
msgstr "Klikniъcie"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "WyЖwietl klawiaturъ"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Dostosuj klawisze"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "WГБcz/wyГБcz peГny ekran"
@@ -95,15 +95,15 @@ msgstr "Przypisz"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -357,7 +357,7 @@ msgstr "Identyfikator jest juП zajъty. Wybierz inny."
msgid "~Q~uit"
msgstr "~Z~akoёcz"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Zakoёcz ScummVM"
@@ -365,7 +365,7 @@ msgstr "Zakoёcz ScummVM"
msgid "A~b~out..."
msgstr "I~n~formacje..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "KsiБПka ScummVM"
@@ -921,74 +921,74 @@ msgstr ""
"Wybrany styl nie obsГuguje obecnego jъzyka. JeЖli chcesz go uПywaц, zmieё "
"najpierw swѓj jъzyk."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Brak daty"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Brak godziny"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Brak czasu gry"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Skasuj"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Na pewno chcesz skasowaц ten zapis?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Czas: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Czas gry: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Zapis bez nazwy"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Zapisz"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Nie udaГo siъ zapisaц stanu gry"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Nazwa:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1026,35 +1026,35 @@ msgstr "WygГadzany (16bpp)"
msgid "Clear value"
msgstr "WyczyЖц"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Silnik nie wspiera poziomu debugowania '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Pomiё"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Wstrzymaj"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Pomiё liniъ"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "BГБd podczas uruchamiania gry:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Nie udaГo siъ znaleМц silnika zdolnego do uruchomienia zaznaczonej gry"
@@ -1280,13 +1280,13 @@ msgstr ""
msgid "Start anyway"
msgstr "WГБcz mimo tego"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu zamiast tych ze ScummVM"
@@ -1306,27 +1306,27 @@ msgstr "UПyj trybu jasnej palety"
msgid "Display graphics using the game's bright palette"
msgstr "WyЖwietlaj grafikъ za pomocБ jasnej palety gry"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Anty-dithering EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "WГБcz anty-dithering we wspieranych grach EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Preferuj cyfrowe efekty dМwiъkowe"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Preferuj cyfrowe efekty dМwiъkowe zamiast syntezowanych"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "UПyj IMF/Yamaha FB-01 dla wyjЖcia MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1334,29 +1334,29 @@ msgstr ""
"UПyj karty IBM Music Feature lub moduГu syntezy FM Yamaha FB-01 dla wyjЖcia "
"MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "UПyj CD audio"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "UПyj CD audio zamiast muzyki w grze, jeЖli jest dostъpne"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "UПyj windowsowych kursorѓw"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"UПyj windowsowych kursorѓw (mniejsze i monochromatyczne) zamiast DOS-owych"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "UПyj srebrnych kursorѓw"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2009,7 +2009,7 @@ msgstr "Leц w prawo"
msgid "Fly to lower right"
msgstr "Leц w dѓГ, w prawo"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2018,7 +2018,7 @@ msgstr ""
"Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n"
"ale brakuje %s. PrzeГБczam na tryb AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2029,7 +2029,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2040,7 +2040,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2051,7 +2051,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2087,7 +2087,7 @@ msgstr "~M~enu gГѓwne"
msgid "~W~ater Effect Enabled"
msgstr "~E~fekty wody wГБczone"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Nie znaleziono pliku przerywnika '%s'!"
@@ -2215,7 +2215,7 @@ msgstr "Opcje"
msgid "Choose Spell"
msgstr "Wybierz zaklъcie"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2261,29 +2261,29 @@ msgstr "Intro z wersji dyskietkowej"
msgid "Use the floppy version's intro (CD version only)"
msgstr "UПyj intra z wersji dyskietkowej (tylko dla wersji CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"Przerywnik w formacie strumieniowym PSX '%s' nie moПe zostaц odtworzony w "
"trybie indeksowanym"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Znaleziono przerywniki w formacie DXA, ale ScummVM jest skompilowany bez "
"obsГugi zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Przerywniki w formacie MPEG2 nie sБ juП obsГugiwane"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Nie znaleziono przerywnika '%s'"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2301,7 +2301,7 @@ msgstr ""
"NaciЖnij OK, Пeby je teraz przekonwertowaц. W przeciwnym wypadku zostaniesz "
"zapytany ponownie przy nastъpnym wГБczeniu gry.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2310,11 +2310,11 @@ msgstr ""
"Docelowy plik nowego zapisu juП istnieje!\n"
"Chcesz zachowaц stary zapis (%s) czy nowy (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Zachowaj stary"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Zachowaj nowy"
@@ -2322,7 +2322,7 @@ msgstr "Zachowaj nowy"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "To koniec dema Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2337,12 +2337,12 @@ msgstr "PokaП etykiety obiektѓw"
msgid "Show labels for objects on mouse hover"
msgstr "PokaП etykiety obiektѓw przy najechaniu myszkБ"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2454,7 +2454,7 @@ msgstr "Brak muzyki"
msgid "Amiga Audio Emulator"
msgstr "Emulator dМwiъku Amigi"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulator AdLib"
@@ -2621,24 +2621,24 @@ msgstr "Іrodkowy przycisk"
msgid "Right Click"
msgstr "Klikniъcie PPM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ukryj ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ukryj pozostaГe"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "PokaП wszystkie"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Okno"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Miniaturka"
@@ -3018,19 +3018,19 @@ msgstr "Na pewno chcesz wyjЖц?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Dotkniъcie ekranu - klikniъcie LPM"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Dotkniъcie ekranu - klikniъcie PPM"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Dotkniъcie ekranu - brak klikniъcia"
@@ -3050,7 +3050,12 @@ msgstr "Minimalna gГoЖnoЖц"
msgid "Decreasing Volume"
msgstr "Zmniejszenie gГoЖnoЖci"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Dotkniъcie ekranu - brak klikniъcia"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "SprawdМ aktualizacjъ..."
diff --git a/po/pt_BR.po b/po/pt_BR.po
index f41aa7d59f..0d80b9d8c9 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.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2011-10-21 21:30-0300\n"
"Last-Translator: Saulo Benigno <saulobenigno@gmail.com>\n"
"Language-Team: ScummBR (www.scummbr.com) <scummbr@yahoo.com.br>\n"
@@ -48,10 +48,10 @@ msgstr "Acima"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -73,15 +73,15 @@ msgstr "Fechar"
msgid "Mouse click"
msgstr "Clique do mouse"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostrar teclado"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Remapear teclas"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
#, fuzzy
msgid "Toggle FullScreen"
msgstr "Habilita Tela Cheia"
@@ -96,15 +96,15 @@ msgstr "Mapear"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -359,7 +359,7 @@ msgstr "Este cѓdigo jс esta sendo utilizado. Por favor, escolha outro."
msgid "~Q~uit"
msgstr "~S~air"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Sair do ScummVM"
@@ -367,7 +367,7 @@ msgstr "Sair do ScummVM"
msgid "A~b~out..."
msgstr "So~b~re..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Sobre o ScumnmVM"
@@ -932,74 +932,74 @@ msgstr ""
"O tema que vocъ selecionou nуo suporta seu idioma atual. Se vocъ quiser usar "
"este tema vocъ precisa mudar para outro idioma."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Sem data salva"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Sem hora salva"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Sem tempo de jogo salvo"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Excluir"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vocъ realmente quer excluir este jogo salvo?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tempo de jogo:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Nуo-titulado arquivo de save"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Salvar"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Falha ao salvar o jogo"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Nome:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1037,35 +1037,35 @@ msgstr "Anti-Serrilhamento (16bpp)"
msgid "Clear value"
msgstr "Limpar valor"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Esse programa nуo suporta o nэvel de debug '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Pular"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausar"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Pula linha"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Erro ao executar o jogo:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr ""
"Nуo foi possэvel encontrar qualquer programa capaz de rodar o jogo "
@@ -1300,13 +1300,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Iniciar de qualquer maneira"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -1327,57 +1327,57 @@ msgstr "Item da direita superior"
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA sem dithering"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
#, fuzzy
msgid "Enable undithering in EGA games"
msgstr "Habilita EGA sem dithering em jogos com suporte"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
#, fuzzy
msgid "Prefer digital sound effects"
msgstr "Volume dos efeitos sonoros especiais"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
#, fuzzy
msgid "Use silver cursors"
msgstr "Cursor normal"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2030,7 +2030,7 @@ msgstr "Voar para direita"
msgid "Fly to lower right"
msgstr "Voar para direita inferior"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2040,7 +2040,7 @@ msgstr ""
"LucasArts,\n"
"mas %s estс faltando. Utilizando AdLib ao invщs."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2051,7 +2051,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2062,7 +2062,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2073,7 +2073,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2110,7 +2110,7 @@ msgstr "~M~enu Principal ScummVM"
msgid "~W~ater Effect Enabled"
msgstr "Modo ~E~feitos de сgua ativado"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Arquivo de vэdeo '%s' nуo encontrado!"
@@ -2252,7 +2252,7 @@ msgstr "~O~pчѕes"
msgid "Choose Spell"
msgstr "Escolher"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
#, fuzzy
msgid ""
"You appear to be using a General MIDI device,\n"
@@ -2299,27 +2299,27 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Vэdeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem "
"suporte a zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Vэdeos em MPEG2 nуo sуo mais suportados"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Vэdeo '%s' nуo encontrado"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2337,7 +2337,7 @@ msgstr ""
"Pressione OK para convertъ-los agora, caso contrсrio vocъ serс solicitado "
"novamente na prѓxima vez que vocъ iniciar o jogo.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2346,11 +2346,11 @@ msgstr ""
"Jс existe um jogo salvo no destino!\n"
"Vocъ gostaria de manter o jogo salvo (%s) ou o novo (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Mantenha o antigo"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Mantenha o novo"
@@ -2358,7 +2358,7 @@ msgstr "Mantenha o novo"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Este щ o fim do demo de Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
#, fuzzy
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
@@ -2374,12 +2374,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2492,7 +2492,7 @@ msgstr "Sem mњsica"
msgid "Amiga Audio Emulator"
msgstr "Emulador Som Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador AdLib"
@@ -2661,24 +2661,24 @@ msgstr "Item do meio na esquerda"
msgid "Right Click"
msgstr "Clique com o botуo direito"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ocultar ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ocultar Outros"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostrar Tudo"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Janela"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizar"
@@ -3061,19 +3061,19 @@ msgstr "Vocъ realmente deseja sair?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Modo Toque' - Clique Esquerdo"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Modo Toque' - Clique Direito"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Modo Toque' - Acima (Sem Clicar)"
@@ -3093,7 +3093,12 @@ msgstr "Volume mэnimo"
msgid "Decreasing Volume"
msgstr "Diminuindo Volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Modo Toque' - Acima (Sem Clicar)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Procurar por Atualizaчѕes..."
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 2774dc8c74..fb078b74d1 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-08 22:00+0200+0200\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Russian\n"
@@ -46,10 +46,10 @@ msgstr "Вверх"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -71,15 +71,15 @@ msgstr "Закрыть"
msgid "Mouse click"
msgstr "Клик мышью"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Показать клавиатуру"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Переназначить клавиши"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Переключение на весь экран"
@@ -93,15 +93,15 @@ msgstr "Назначить"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -356,7 +356,7 @@ msgstr "Этот ID игры уже используется. Пожалуйста, выберите другой."
msgid "~Q~uit"
msgstr "~В~ыход"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Завершить ScummVM"
@@ -364,7 +364,7 @@ msgstr "Завершить ScummVM"
msgid "A~b~out..."
msgstr "О п~р~ограмме..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "О программе ScummVM"
@@ -925,71 +925,71 @@ msgstr ""
"Тема, выбранная вами, не поддерживает текущий язык. Если вы хотите "
"использовать эту тему, вам необходимо сначала переключиться на другой язык."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Вид списка"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Вид сетки"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Дата не записана"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Время не записано"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Время игры не записано"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Удалить"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Вы действительно хотите удалить это сохранение?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Дата: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Время: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Время игры: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Сохранение без имени"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Следующий"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Предыдущий"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Новое сохранение"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Создать новую запись игры"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Название: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Введите описание слота %d:"
@@ -1027,35 +1027,35 @@ msgstr "Растеризатор со сглаживанием (16bpp)"
msgid "Clear value"
msgstr "Очистить значение"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Движок не поддерживает уровень отладки '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Меню"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Пропустить"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Пауза"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Пропустить строку"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Ошибка запуска игры:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Не могу найти движок для запуска выбранной игры"
@@ -1289,13 +1289,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Всё равно запустить"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Использовать оригинальные экраны записи/чтения игры"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Использовать оригинальные экраны записи и сохранения игры вместо сделанных в "
@@ -1317,28 +1317,28 @@ msgstr "Использовать режим яркой палитры"
msgid "Display graphics using the game's bright palette"
msgstr "Рисует графику с использованием яркой палитры игры"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA без растра"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Включает режим без растрирования в EGA играх"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Предпочитать цифровые звуковые эффекты"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
"Отдавать предпочтение цифровым звуковым эффектам вместо синтезированных"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Использовать IMF/Yamaha FB-01 для вывода MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1346,32 +1346,32 @@ msgstr ""
"Использвовать звуковую картку IBM Music Feature или модуль синтеза Yamaha "
"FB-01 FM для MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Использовать CD аудио"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Использовать звуковые дорожки с CD вместо музыки из файлов игры (если "
"доступно)"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Использовать курсоры Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Использовать курсоры Windows (меньшие по размеру и одноцветные) вместо "
"курсоров DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Использовать серебрянные курсоры"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2024,7 +2024,7 @@ msgstr "Лететь вправо"
msgid "Fly to lower right"
msgstr "Лететь вправо-вниз"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2033,7 +2033,7 @@ msgstr ""
"Режим \"родного\" MIDI требует обновление Roland Upgrade от\n"
"LucasArts, но не хватает %s. Переключаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2044,7 +2044,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2055,7 +2055,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2066,7 +2066,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2102,7 +2102,7 @@ msgstr "Главное меню"
msgid "~W~ater Effect Enabled"
msgstr "Эффекты воды включены"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Файл заставки '%s' не найден!"
@@ -2230,7 +2230,7 @@ msgstr "Опции"
msgid "Choose Spell"
msgstr "Выбрать заклинание"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2277,26 +2277,26 @@ msgstr "Вступление с флоппиков"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Использовать вступление с гибких дисков (только для CD версии игры)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Заставка PSX '%s' не может быть проиграна в режиме с палитрой"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Найдены заставки в формате DXA, но ScummVM был собран без поддержки zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Заставки в формате MPEG2 больше не поддерживаются"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Заставка '%s' не найдена"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2313,7 +2313,7 @@ msgstr ""
"Нажмите ОК, чтобы перевести их в новый формат сейчас, в противном случае это "
"сообщение появится снова при следующем запуске игры.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2322,11 +2322,11 @@ msgstr ""
"Сохранение игры с таким именем уже существует!\n"
"Вы хотите оставить старое название (%s) или сделать новое (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Оставить старое"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Сделать новое"
@@ -2334,7 +2334,7 @@ msgstr "Сделать новое"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Это завершение демо Сломанного Меча 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2349,13 +2349,13 @@ msgstr "Показывать названия объектов"
msgid "Show labels for objects on mouse hover"
msgstr "Показывает названия объектов пр инаведении курсора мыши"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
"У вас отсутствует файл 'teenagent.dat'. Скачайте его с веб-сайта ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2469,7 +2469,7 @@ msgstr "Без музыки"
msgid "Amiga Audio Emulator"
msgstr "Эмулятор звука Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Эмулятор AdLib"
@@ -2636,24 +2636,24 @@ msgstr "Средний щелчок"
msgid "Right Click"
msgstr "Правый щелчок"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Скрыть ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Скрыть остальные"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Показать все"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Окно"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Убрать в Dock"
@@ -3033,19 +3033,19 @@ msgstr "Вы действительно хотите выйти?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Режим 'касаний' тачскрина - Левый клик"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Режим 'касаний' тачскрина - Правый клик"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Режим 'касаний' тачскрина - Пролёт (без клика)"
@@ -3065,7 +3065,12 @@ msgstr "Минимальная громкость"
msgid "Decreasing Volume"
msgstr "Уменьшение громкости"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Режим 'касаний' тачскрина - Пролёт (без клика)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Проверяю обновления..."
diff --git a/po/scummvm.pot b/po/scummvm.pot
index de270cef27..fb56e89dce 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\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"
@@ -45,10 +45,10 @@ msgstr ""
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -70,15 +70,15 @@ msgstr ""
msgid "Mouse click"
msgstr ""
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr ""
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr ""
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr ""
@@ -92,15 +92,15 @@ msgstr ""
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -352,7 +352,7 @@ msgstr ""
msgid "~Q~uit"
msgstr ""
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr ""
@@ -360,7 +360,7 @@ msgstr ""
msgid "A~b~out..."
msgstr ""
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr ""
@@ -905,71 +905,71 @@ msgid ""
"to use this theme you need to switch to another language first."
msgstr ""
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr ""
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr ""
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr ""
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr ""
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr ""
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr ""
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr ""
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr ""
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr ""
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr ""
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr ""
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1007,35 +1007,35 @@ msgstr ""
msgid "Clear value"
msgstr ""
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr ""
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr ""
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr ""
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr ""
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr ""
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr ""
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr ""
@@ -1245,13 +1245,13 @@ msgstr ""
msgid "Start anyway"
msgstr ""
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -1271,54 +1271,54 @@ msgstr ""
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr ""
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr ""
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr ""
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr ""
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1970,14 +1970,14 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
msgstr ""
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1985,7 +1985,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1993,7 +1993,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2001,7 +2001,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2034,7 +2034,7 @@ msgstr ""
msgid "~W~ater Effect Enabled"
msgstr ""
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr ""
@@ -2162,7 +2162,7 @@ msgstr ""
msgid "Choose Spell"
msgstr ""
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2199,25 +2199,25 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr ""
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr ""
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2228,18 +2228,18 @@ msgid ""
"time you start the game.\n"
msgstr ""
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
"Would you like to keep the old save game (%s) or the new one (%s)?\n"
msgstr ""
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr ""
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr ""
@@ -2247,7 +2247,7 @@ msgstr ""
msgid "This is the end of the Broken Sword 1 Demo"
msgstr ""
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2260,12 +2260,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2357,7 +2357,7 @@ msgstr ""
msgid "Amiga Audio Emulator"
msgstr ""
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr ""
@@ -2524,24 +2524,24 @@ msgstr ""
msgid "Right Click"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr ""
@@ -2919,19 +2919,19 @@ msgstr ""
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr ""
@@ -2951,7 +2951,11 @@ msgstr ""
msgid "Decreasing Volume"
msgstr ""
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr ""
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr ""
diff --git a/po/se_SE.po b/po/se_SE.po
index 02f2ab44f4..7dbcd432f6 100644
--- a/po/se_SE.po
+++ b/po/se_SE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-07-08 18:03+0100\n"
"Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n"
"Language-Team: \n"
@@ -48,10 +48,10 @@ msgstr "Uppхt"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -73,15 +73,15 @@ msgstr "Stфng"
msgid "Mouse click"
msgstr "Musklick"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Visa tangentbord"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Stфll in tangenter"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Fullskфrmslфge"
@@ -95,15 +95,15 @@ msgstr "Stфll in"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -359,7 +359,7 @@ msgstr "Detta ID-namn фr upptaget. Var god vфlj ett annat."
msgid "~Q~uit"
msgstr "~A~vsluta"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Avsluta ScummVM"
@@ -367,7 +367,7 @@ msgstr "Avsluta ScummVM"
msgid "A~b~out..."
msgstr "O~m~..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -925,74 +925,74 @@ msgstr ""
"Temat du valde stіder inte ditt sprхk. Om du vill anvфnda det hфr temat "
"mхste fіrst byta till ett annat sprхk."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Inget datum sparat"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Ingen tid sparad"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ingen speltid sparad"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Radera"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vill du verkligen radera den hфr spardatan?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Datum:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Speltid:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Namnlіs spardata"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Spara"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Kunde inte spara spelet."
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Namn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1030,35 +1030,35 @@ msgstr "Antialiserad (16 bpp)"
msgid "Clear value"
msgstr "Tіm sіkfфltet"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motorn stіder inte debug-nivх '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Skippa"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Paus"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Skippa rad"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Fel under kіrning av spel:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunde inte hitta en motor kapabel till att kіra det valda spelet"
@@ -1287,13 +1287,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Starta фndх"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Anvфnd originalskфrmar fіr spara/ladda"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Anvфnder originalskфrmarna fіr spara/ladda istфllet fіr ScummVM:s"
@@ -1313,27 +1313,27 @@ msgstr "Anvфnd ljus palett-lфge"
msgid "Display graphics using the game's bright palette"
msgstr "Visa grafik med spelets ljusa palett"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA anti-gitter"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktivera anti-gitter i EGA-spel"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Fіredra digitala ljudeffekter"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Fіredra digitala ljudeffekter istфllet fіr syntetiserade"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Anvфnd IMF/Yamaha FB-01 fіr MIDI-uppspelning"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1341,29 +1341,29 @@ msgstr ""
"Anvфnd ett IMB Music Feature-kort eller en Yamaha FB-01 FM synthmodul fіr "
"MIDI-uppspelning"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Anvфnd CD-ljud"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Anvфnd CD-ljud istфllet fіr spelets ljud, om tillgфngligt"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Anvфnd Windows muspekare"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Anvфnd Windows muspekare (mindre och svartvit) istфllet fіr DOS-pekaren"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Anvфnd silverpekare"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2016,7 +2016,7 @@ msgstr "Flyg хt hіger"
msgid "Fly to lower right"
msgstr "Flyg хt nedre hіger"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2025,7 +2025,7 @@ msgstr ""
"Stіd fіr Native MIDI krфver Roland-uppdateringen frхn LucasArts,\n"
"men %s saknas. Anvфnder AdLib istфllet."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2036,7 +2036,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2047,7 +2047,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2058,7 +2058,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2094,7 +2094,7 @@ msgstr "Huvud~m~eny"
msgid "~W~ater Effect Enabled"
msgstr "~V~atteneffekt aktiverad"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Filmscensfilen '%s' hittades ej!"
@@ -2222,7 +2222,7 @@ msgstr "Instфllningar"
msgid "Choose Spell"
msgstr "Vфlj trollformel"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2269,25 +2269,25 @@ msgstr "Diskettintro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Anvфnd diskettversionens intro (endast CD-version)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX-filmscenen '%s' kan inte visas i palettlфget"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr "DXA filmscener hittades men ScummVM har byggts utan stіd fіr zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 filmscener stіds inte lфngre"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Filmscenen '%s' hittades ej"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2305,7 +2305,7 @@ msgstr ""
"Tryck \"OK\" fіr att konvertera dem nu, annars kommer du tillfrхgas igen "
"nфsta gхng du startar spelet.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2314,11 +2314,11 @@ msgstr ""
"Den valda spardatan existerar redan!\n"
"Vill du behхlla den gamla spardatan (%s) eller den nya (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Behхll den gamla"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Behхll den nya"
@@ -2326,7 +2326,7 @@ msgstr "Behхll den nya"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Hфr slutar Broken Sword 1 demon"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "PSX-filmscener hittades men ScummVM har byggts utan stіd fіr RGB-fфrg"
@@ -2339,12 +2339,12 @@ msgstr "Visa etiketter"
msgid "Show labels for objects on mouse hover"
msgstr "Visar etiketter fіr objekten som musen pekar pх"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2457,7 +2457,7 @@ msgstr "Ingen musik"
msgid "Amiga Audio Emulator"
msgstr "Amiga ljudemulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib-emulator"
@@ -2624,24 +2624,24 @@ msgstr "Mittenklick"
msgid "Right Click"
msgstr "Hіgerklick"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Gіm ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Gіm іvriga"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Visa alla"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Fіnster"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimera"
@@ -3024,19 +3024,19 @@ msgstr "Vill du verkligen avsluta?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen \"Tap-lфge\" - Vфnsterklick"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscren \"Tap-lфge\" - Hіgerklick"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen \"Tap-lфge\" - Hover (utan klick)"
@@ -3056,7 +3056,12 @@ msgstr "Min. volym"
msgid "Decreasing Volume"
msgstr "Sфnka volymen"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen \"Tap-lфge\" - Hover (utan klick)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Sіk efter uppdateringar..."
diff --git a/po/uk_UA.po b/po/uk_UA.po
index ea71a51d52..b6cf7d51fe 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2012-12-01 17:22+0000\n"
"PO-Revision-Date: 2012-06-29 20:19+0200\n"
"Last-Translator: lubomyr <lubomyr31@gmail.com>\n"
"Language-Team: Ukrainian\n"
@@ -46,10 +46,10 @@ msgstr "Вгору"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
@@ -71,15 +71,15 @@ msgstr "Закрити"
msgid "Mouse click"
msgstr "Клік мишкою"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Показати клавіатуру"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Перепризначити клавіші"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Перемкнути повноекранний режим"
@@ -93,15 +93,15 @@ msgstr "Призначити"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
+#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
+#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
+#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
+#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
+#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
+#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
@@ -357,7 +357,7 @@ msgstr "Цей ID гри вже використовується. Будь ласка, виберіть інший."
msgid "~Q~uit"
msgstr "~В~ихід"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Вихід зі ScummVM"
@@ -365,7 +365,7 @@ msgstr "Вихід зі ScummVM"
msgid "A~b~out..."
msgstr "Про п~р~ограму..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Про ScummVM"
@@ -924,71 +924,71 @@ msgstr ""
"Вибрана тема не підтримує поточну мову. Якщо ви хочете використовувати цю "
"тему, потрібно в першу чергу змінити мову."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Вигляд списку"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Вигляд сітки"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Дату не записано"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Час не записано"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Час гри не записано"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Видалити"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Ви дійсно хочете видалити це збереження?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Дата: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Час: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Час гри: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Збереження без імені"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Насутпний"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Попередній"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Нове збереження"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Створити новий запис гри"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Назва: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Введіть опис для слоту %d:"
@@ -1026,35 +1026,35 @@ msgstr "Растеризатор зі згладжуванням (16bpp)"
msgid "Clear value"
msgstr "Очистити значення"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Движок не підтримує рівень відладки '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Меню"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Пропустити"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Пауза"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Пропустити рядок"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Помилка запуску гри:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Не можу знайти движок для запуску вибраної гри"
@@ -1284,13 +1284,13 @@ msgstr ""
msgid "Start anyway"
msgstr "Все одно запустити"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
+#: engines/sci/detection.cpp:393
msgid "Use original save/load screens"
msgstr "Використовувати ориг. збереження/завантаження екрани"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
+#: engines/sci/detection.cpp:394
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Використовувати оригінальні збереження/завантаження екрани, замість ScummVM"
@@ -1311,56 +1311,56 @@ msgstr "Використовувати яскравий режим палітри"
msgid "Display graphics using the game's bright palette"
msgstr "Відображення графіки з використанням яскравої палітри ігр"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA без растрування"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Увімкнути анти-згладжування в EGA іграх"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Надавати перевагу цифровим звуковим ефектам"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Віддавати перевагу цифровим звуковим ефектам, а не синтезованим"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Використовувати IMF/Yahama FB-01 для MIDI виходу"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-"Використовувати дляв виводу MIDI режим карти IBM Feature або FM "
-"сінтез Yamaha FB-01"
+"Використовувати дляв виводу MIDI режим карти IBM Feature або FM сінтез "
+"Yamaha FB-01"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Використовувати CD аудіо"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Використовувати CD аудіо замість у-грі аудіо, якщо такі є"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Використовувати Windows курсори"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Використовувати Windows курсори (менших і монохромних), замість DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Використовувати срібні курсори"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2014,7 +2014,7 @@ msgstr "Летіти направо"
msgid "Fly to lower right"
msgstr "Летіти донизу направо"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1774
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2023,7 +2023,7 @@ msgstr ""
"Режим \"рідного\" MIDI потребує поновлення Roland Upgrade від\n"
"LucasArts, проте %s відсутній. Перемикаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2034,7 +2034,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2045,7 +2045,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2056,7 +2056,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2529
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2092,7 +2092,7 @@ msgstr "Головне меню"
msgid "~W~ater Effect Enabled"
msgstr "Ефекти води увімкнено"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Файл заставки '%s' не знайдено!"
@@ -2220,7 +2220,7 @@ msgstr "Налаштування"
msgid "Choose Spell"
msgstr "Вибрати закляття"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2266,25 +2266,25 @@ msgstr "Дискетне введення"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Використовувати дискетні версії введення (тільки CD версія)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr " ролик PSX потоку '%s' не можуть бути відтворені у режимі палітри"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr "Знайдено заставки DXA, але ScummVM був побудований без підтримки zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Заставки MPEG2 більше не підтримуються"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Заставку '%s' не знайдено"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2301,7 +2301,7 @@ msgstr ""
"Натисніть ОК, щоб перевести їх зараз, інакше уе повідомлення з'явиться при "
"наступному запуску гри.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2310,11 +2310,11 @@ msgstr ""
"Збереження гри з такою назвою вже існує!\n"
"Чи ви хочете лишити старе збереження (%s) або нове (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Лишити старе"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Взяти нове"
@@ -2322,7 +2322,7 @@ msgstr "Взяти нове"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "На цьому закінчується демо Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "Знайдені PSX ролики, але ScummVM був зібраний без підтримки RGB коліру"
@@ -2335,19 +2335,19 @@ msgstr "Показувати мітки об'єктів"
msgid "Show labels for objects on mouse hover"
msgstr "Показувати мітки для об'єктів при наведенні миші"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
"У вас відстуній файл 'teenagent.dat'. Візьміть його на вебсайті ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
-"Файл teenagent.dat запаковано, але zlib не було включено в цю программу."
-"Будь-ласка розпакуйте його"
+"Файл teenagent.dat запаковано, але zlib не було включено в цю программу.Будь-"
+"ласка розпакуйте його"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2455,7 +2455,7 @@ msgstr "Без музики"
msgid "Amiga Audio Emulator"
msgstr "Аміга Аудіо Емулятор"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Емулятор AdLib"
@@ -2622,24 +2622,24 @@ msgstr "Середній клік"
msgid "Right Click"
msgstr "Правий клік"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Сховати ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Сховати Інші"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Показати Все"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Вікно"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Мінімізувати"
@@ -3021,19 +3021,19 @@ msgstr "Ви дійсно хочете вийти?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Режим дотику у тачскріні - Лівий клік"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Режим дотику у тачскріні - Правий клік"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Режим дотику у тачскріні - Проліт (без кліку)"
@@ -3053,7 +3053,12 @@ msgstr "Мінімальна Гучність"
msgid "Decreasing Volume"
msgstr "Пониження гучності"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Режим дотику у тачскріні - Проліт (без кліку)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Перевіряю оновлення..."
diff --git a/ports.mk b/ports.mk
index 4d7d6f6e60..bdedffde52 100644
--- a/ports.mk
+++ b/ports.mk
@@ -2,12 +2,27 @@
# included by the default (main) Makefile.
#
-
#
# POSIX specific
#
install:
$(INSTALL) -d "$(DESTDIR)$(bindir)"
+ $(INSTALL) -c -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
+ $(INSTALL) -d "$(DESTDIR)$(mandir)/man6/"
+ $(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(mandir)/man6/scummvm.6"
+ $(INSTALL) -d "$(DESTDIR)$(datarootdir)/pixmaps/"
+ $(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.xpm" "$(DESTDIR)$(datarootdir)/pixmaps/scummvm.xpm"
+ $(INSTALL) -d "$(DESTDIR)$(docdir)"
+ $(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(docdir)"
+ $(INSTALL) -d "$(DESTDIR)$(datadir)"
+ $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) "$(DESTDIR)$(datadir)/"
+ifdef DYNAMIC_MODULES
+ $(INSTALL) -d "$(DESTDIR)$(libdir)/scummvm/"
+ $(INSTALL) -c -m 644 $(PLUGINS) "$(DESTDIR)$(libdir)/scummvm/"
+endif
+
+install-strip:
+ $(INSTALL) -d "$(DESTDIR)$(bindir)"
$(INSTALL) -c -s -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
$(INSTALL) -d "$(DESTDIR)$(mandir)/man6/"
$(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(mandir)/man6/scummvm.6"
@@ -310,8 +325,10 @@ endif
# Special target to create an AmigaOS snapshot installation
aos4dist: $(EXECUTABLE)
mkdir -p $(AOS4PATH)
+ mkdir -p $(AOS4PATH)/themes
+ mkdir -p $(AOS4PATH)/extras
$(STRIP) $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)
- cp icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE).info
+ cp ${srcdir}/icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE).info
cp $(DIST_FILES_THEMES) $(AOS4PATH)/themes/
ifdef DIST_FILES_ENGINEDATA
cp $(DIST_FILES_ENGINEDATA) $(AOS4PATH)/extras/
diff --git a/video/bink_decoder.h b/video/bink_decoder.h
index 27d3aa3691..08800c2223 100644
--- a/video/bink_decoder.h
+++ b/video/bink_decoder.h
@@ -36,6 +36,8 @@
#include "video/video_decoder.h"
+#include "graphics/surface.h"
+
namespace Audio {
class AudioStream;
class QueuingAudioStream;
diff --git a/video/codecs/cdtoons.h b/video/codecs/cdtoons.h
index 8f6d3acb6e..e6b7aab5f8 100644
--- a/video/codecs/cdtoons.h
+++ b/video/codecs/cdtoons.h
@@ -38,6 +38,12 @@ struct CDToonsBlock {
byte *data;
};
+/**
+ * Broderbund CDToons decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class CDToonsDecoder : public Codec {
public:
CDToonsDecoder(uint16 width, uint16 height);
diff --git a/video/codecs/cinepak.cpp b/video/codecs/cinepak.cpp
index c197e0cc35..bcf0cf1180 100644
--- a/video/codecs/cinepak.cpp
+++ b/video/codecs/cinepak.cpp
@@ -34,16 +34,12 @@
namespace Video {
-// Convert a color from YUV to RGB colorspace, Cinepak style.
-inline static void CPYUV2RGB(byte y, byte u, byte v, byte &r, byte &g, byte &b) {
- r = CLIP<int>(y + 2 * (v - 128), 0, 255);
- g = CLIP<int>(y - (u - 128) / 2 - (v - 128), 0, 255);
- b = CLIP<int>(y + 2 * (u - 128), 0, 255);
-}
-
#define PUT_PIXEL(offset, lum, u, v) \
if (_pixelFormat.bytesPerPixel != 1) { \
- CPYUV2RGB(lum, u, v, r, g, b); \
+ byte r = _clipTable[lum + (v << 1)]; \
+ byte g = _clipTable[lum - (u >> 1) - v]; \
+ byte b = _clipTable[lum + (u << 1)]; \
+ \
if (_pixelFormat.bytesPerPixel == 2) \
*((uint16 *)_curFrame.surface->pixels + offset) = _pixelFormat.RGBToColor(r, g, b); \
else \
@@ -60,6 +56,21 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() {
_pixelFormat = Graphics::PixelFormat::createFormatCLUT8();
else
_pixelFormat = g_system->getScreenFormat();
+
+ // Create a lookup for the clip function
+ // This dramatically improves the performance of the color conversion
+ _clipTableBuf = new byte[1024];
+
+ for (uint i = 0; i < 1024; i++) {
+ if (i <= 512)
+ _clipTableBuf[i] = 0;
+ else if (i >= 768)
+ _clipTableBuf[i] = 255;
+ else
+ _clipTableBuf[i] = i - 512;
+ }
+
+ _clipTable = _clipTableBuf + 512;
}
CinepakDecoder::~CinepakDecoder() {
@@ -69,6 +80,7 @@ CinepakDecoder::~CinepakDecoder() {
}
delete[] _curFrame.strips;
+ delete[] _clipTableBuf;
}
const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
@@ -82,15 +94,14 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream
if (_curFrame.strips == NULL)
_curFrame.strips = new CinepakStrip[_curFrame.stripCount];
- debug (4, "Cinepak Frame: Width = %d, Height = %d, Strip Count = %d", _curFrame.width, _curFrame.height, _curFrame.stripCount);
+ debug(4, "Cinepak Frame: Width = %d, Height = %d, Strip Count = %d", _curFrame.width, _curFrame.height, _curFrame.stripCount);
// Borrowed from FFMPEG. This should cut out the extra data Cinepak for Sega has (which is useless).
// The theory behind this is that this is here to confuse standard Cinepak decoders. But, we won't let that happen! ;)
if (_curFrame.length != (uint32)stream->size()) {
- uint16 temp = stream->readUint16BE();
- if (temp == 0xFE00)
+ if (stream->readUint16BE() == 0xFE00)
stream->readUint32BE();
- else if (temp != _curFrame.width)
+ else if ((stream->size() % _curFrame.length) == 0)
stream->seek(-2, SEEK_CUR);
}
@@ -191,14 +202,14 @@ void CinepakDecoder::loadCodebook(Common::SeekableReadStream *stream, uint16 str
codebook[i].y[j] = stream->readByte();
if (n == 6) {
- codebook[i].u = stream->readByte() + 128;
- codebook[i].v = stream->readByte() + 128;
+ codebook[i].u = stream->readSByte();
+ codebook[i].v = stream->readSByte();
} else {
// This codebook type indicates either greyscale or
// palettized video. For greyscale, default us to
- // 128 for both u and v.
- codebook[i].u = 128;
- codebook[i].v = 128;
+ // 0 for both u and v.
+ codebook[i].u = 0;
+ codebook[i].v = 0;
}
}
}
@@ -208,7 +219,6 @@ void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 st
uint32 flag = 0, mask = 0;
uint32 iy[4];
int32 startPos = stream->pos();
- byte r = 0, g = 0, b = 0;
for (uint16 y = _curFrame.strips[strip].rect.top; y < _curFrame.strips[strip].rect.bottom; y += 4) {
iy[0] = _curFrame.strips[strip].rect.left + y * _curFrame.width;
diff --git a/video/codecs/cinepak.h b/video/codecs/cinepak.h
index ca4552fae6..f4adfd50fe 100644
--- a/video/codecs/cinepak.h
+++ b/video/codecs/cinepak.h
@@ -36,8 +36,9 @@ class SeekableReadStream;
namespace Video {
struct CinepakCodebook {
- byte y[4];
- byte u, v;
+ // These are not in the normal YUV colorspace, but in the Cinepak YUV colorspace instead.
+ byte y[4]; // [0, 255]
+ int8 u, v; // [-128, 127]
};
struct CinepakStrip {
@@ -58,6 +59,13 @@ struct CinepakFrame {
Graphics::Surface *surface;
};
+/**
+ * Cinepak decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ * - QuickTimeDecoder
+ */
class CinepakDecoder : public Codec {
public:
CinepakDecoder(int bitsPerPixel = 24);
@@ -70,6 +78,7 @@ private:
CinepakFrame _curFrame;
int32 _y;
Graphics::PixelFormat _pixelFormat;
+ byte *_clipTable, *_clipTableBuf;
void loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize);
void decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize);
diff --git a/video/codecs/codec.h b/video/codecs/codec.h
index 8e4691ca3c..c1194e461b 100644
--- a/video/codecs/codec.h
+++ b/video/codecs/codec.h
@@ -32,16 +32,48 @@ class SeekableReadStream;
namespace Video {
+/**
+ * An abstract representation of a video codec used for decoding
+ * video frames.
+ *
+ * Used in video:
+ * - AVIDecoder
+ * - QuickTimeDecoder
+ * - VMDDecoder
+ */
class Codec {
public:
Codec() {}
virtual ~Codec() {}
+ /**
+ * Decode the frame for the given data and return a pointer to a surface
+ * containing the decoded frame.
+ *
+ * @return a pointer to the decoded frame
+ * @note stream is not deleted
+ */
virtual const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream) = 0;
+
+ /**
+ * Get the format that the surface returned from decodeImage() will
+ * be in.
+ */
virtual Graphics::PixelFormat getPixelFormat() const = 0;
+ /**
+ * Can this codec's frames contain a palette?
+ */
virtual bool containsPalette() const { return false; }
+
+ /**
+ * Get the palette last decoded from decodeImage
+ */
virtual const byte *getPalette() { return 0; }
+
+ /**
+ * Does the codec have a dirty palette?
+ */
virtual bool hasDirtyPalette() const { return false; }
};
diff --git a/video/codecs/indeo3.h b/video/codecs/indeo3.h
index a07d779dec..880901df13 100644
--- a/video/codecs/indeo3.h
+++ b/video/codecs/indeo3.h
@@ -36,6 +36,13 @@
namespace Video {
+/**
+ * Intel Indeo 3 decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ * - VMDDecoder
+ */
class Indeo3Decoder : public Codec {
public:
Indeo3Decoder(uint16 width, uint16 height);
diff --git a/video/codecs/mjpeg.h b/video/codecs/mjpeg.h
index 0c3b668a74..d71454799c 100644
--- a/video/codecs/mjpeg.h
+++ b/video/codecs/mjpeg.h
@@ -36,10 +36,12 @@ struct Surface;
namespace Video {
-// Motion JPEG Decoder
-// Basically a wrapper around JPEG which converts to RGB and also functions
-// as a Codec.
-
+/**
+ * Motion JPEG decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class JPEGDecoder : public Codec {
public:
JPEGDecoder();
diff --git a/video/codecs/msrle.h b/video/codecs/msrle.h
index 2aea66d113..64ebaaee51 100644
--- a/video/codecs/msrle.h
+++ b/video/codecs/msrle.h
@@ -27,6 +27,12 @@
namespace Video {
+/**
+ * Microsoft Run-Length Encoding decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ */
class MSRLEDecoder : public Codec {
public:
MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
diff --git a/video/codecs/msvideo1.h b/video/codecs/msvideo1.h
index 767eece580..047d542743 100644
--- a/video/codecs/msvideo1.h
+++ b/video/codecs/msvideo1.h
@@ -27,6 +27,12 @@
namespace Video {
+/**
+ * Microsoft Video 1 decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ */
class MSVideo1Decoder : public Codec {
public:
MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);
diff --git a/video/codecs/qtrle.h b/video/codecs/qtrle.h
index d9db58ab23..a1dd9c9188 100644
--- a/video/codecs/qtrle.h
+++ b/video/codecs/qtrle.h
@@ -28,6 +28,12 @@
namespace Video {
+/**
+ * QuickTime Run-Length Encoding decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class QTRLEDecoder : public Codec {
public:
QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
diff --git a/video/codecs/rpza.h b/video/codecs/rpza.h
index f082d25549..67e0699692 100644
--- a/video/codecs/rpza.h
+++ b/video/codecs/rpza.h
@@ -28,6 +28,12 @@
namespace Video {
+/**
+ * Apple RPZA decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class RPZADecoder : public Codec {
public:
RPZADecoder(uint16 width, uint16 height);
diff --git a/video/codecs/smc.h b/video/codecs/smc.h
index f2caca977a..4b9f57410a 100644
--- a/video/codecs/smc.h
+++ b/video/codecs/smc.h
@@ -34,6 +34,12 @@ enum {
COLORS_PER_TABLE = 256
};
+/**
+ * Apple SMC decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class SMCDecoder : public Codec {
public:
SMCDecoder(uint16 width, uint16 height);
diff --git a/video/codecs/svq1.cpp b/video/codecs/svq1.cpp
index 56b376f590..57e84968a3 100644
--- a/video/codecs/svq1.cpp
+++ b/video/codecs/svq1.cpp
@@ -223,9 +223,9 @@ const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *st
// Prediction Motion Vector
Common::Point *pmv = new Common::Point[(width / 8) + 3];
- byte *previous;
+ byte *previous = 0;
if (frameType == 2) { // B Frame
- warning("B Frame not supported currently");
+ error("SVQ1 Video: B Frames not supported");
//previous = _next[i];
} else {
previous = _last[i];
diff --git a/video/codecs/svq1.h b/video/codecs/svq1.h
index e5066abfd4..6667fea344 100644
--- a/video/codecs/svq1.h
+++ b/video/codecs/svq1.h
@@ -33,6 +33,12 @@ struct Point;
namespace Video {
+/**
+ * Sorenson Vector Quantizer 1 decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class SVQ1Decoder : public Codec {
public:
SVQ1Decoder(uint16 width, uint16 height);
diff --git a/video/codecs/truemotion1.h b/video/codecs/truemotion1.h
index 628cfa4584..b2a35cf873 100644
--- a/video/codecs/truemotion1.h
+++ b/video/codecs/truemotion1.h
@@ -32,6 +32,12 @@
namespace Video {
+/**
+ * Duck TrueMotion 1 decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ */
class TrueMotion1Decoder : public Codec {
public:
TrueMotion1Decoder(uint16 width, uint16 height);
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index c5fcab4b49..93e57f96ea 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -110,7 +110,7 @@ const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() {
return frame;
}
-Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format) {
+Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize) {
if (track->codecType == CODEC_TYPE_VIDEO) {
debug(0, "Video Codec FourCC: \'%s\'", tag2str(format));
@@ -205,7 +205,7 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::Qu
}
// Pass it on up
- return Audio::QuickTimeAudioDecoder::readSampleDesc(track, format);
+ return Audio::QuickTimeAudioDecoder::readSampleDesc(track, format, descSize);
}
void QuickTimeDecoder::init() {
diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index 45ab155c2c..135da91f88 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -70,7 +70,7 @@ public:
Audio::Timestamp getDuration() const { return Audio::Timestamp(0, _duration, _timeScale); }
protected:
- Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format);
+ Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize);
private:
void init();
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 110afa7755..ab12cfd971 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -37,7 +37,7 @@ VideoDecoder::VideoDecoder() {
_startTime = 0;
_dirtyPalette = false;
_palette = 0;
- _isPlaying = false;
+ _playbackRate = 0;
_audioVolume = Audio::Mixer::kMaxChannelVolume;
_audioBalance = 0;
_pauseLevel = 0;
@@ -45,6 +45,7 @@ VideoDecoder::VideoDecoder() {
_lastTimeChange = 0;
_endTime = 0;
_endTimeSet = false;
+ _nextVideoTrack = 0;
// Find the best format for output
_defaultHighColorFormat = g_system->getScreenFormat();
@@ -71,6 +72,7 @@ void VideoDecoder::close() {
_lastTimeChange = 0;
_endTime = 0;
_endTimeSet = false;
+ _nextVideoTrack = 0;
}
bool VideoDecoder::loadFile(const Common::String &filename) {
@@ -167,18 +169,22 @@ const Graphics::Surface *VideoDecoder::decodeNextFrame() {
_needsUpdate = false;
readNextPacket();
- VideoTrack *track = findNextVideoTrack();
- if (!track)
+ // If we have no next video track at this point, there shouldn't be
+ // any frame available for us to display.
+ if (!_nextVideoTrack)
return 0;
- const Graphics::Surface *frame = track->decodeNextFrame();
+ const Graphics::Surface *frame = _nextVideoTrack->decodeNextFrame();
- if (track->hasDirtyPalette()) {
- _palette = track->getPalette();
+ if (_nextVideoTrack->hasDirtyPalette()) {
+ _palette = _nextVideoTrack->getPalette();
_dirtyPalette = true;
}
+ // Look for the next video track here for the next decode.
+ findNextVideoTrack();
+
return frame;
}
@@ -212,7 +218,7 @@ uint32 VideoDecoder::getTime() const {
return _lastTimeChange.msecs();
if (isPaused())
- return _pauseStartTime - _startTime;
+ return (_playbackRate * (_pauseStartTime - _startTime)).toInt();
if (useAudioSync()) {
for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) {
@@ -225,20 +231,15 @@ uint32 VideoDecoder::getTime() const {
}
}
- return g_system->getMillis() - _startTime;
+ return (_playbackRate * (g_system->getMillis() - _startTime)).toInt();
}
uint32 VideoDecoder::getTimeToNextFrame() const {
- if (endOfVideo() || _needsUpdate)
- return 0;
-
- const VideoTrack *track = findNextVideoTrack();
-
- if (!track)
+ if (endOfVideo() || _needsUpdate || !_nextVideoTrack)
return 0;
uint32 elapsedTime = getTime();
- uint32 nextFrameStartTime = track->getNextFrameStartTime();
+ uint32 nextFrameStartTime = _nextVideoTrack->getNextFrameStartTime();
if (nextFrameStartTime <= elapsedTime)
return 0;
@@ -284,6 +285,7 @@ bool VideoDecoder::rewind() {
_lastTimeChange = 0;
_startTime = g_system->getMillis();
resetPauseStartTime();
+ findNextVideoTrack();
return true;
}
@@ -316,26 +318,47 @@ bool VideoDecoder::seek(const Audio::Timestamp &time) {
// Also reset our start time
if (isPlaying()) {
startAudio();
- _startTime = g_system->getMillis() - time.msecs();
+ _startTime = g_system->getMillis() - (time.msecs() / _playbackRate).toInt();
}
resetPauseStartTime();
+ findNextVideoTrack();
_needsUpdate = true;
return true;
}
-void VideoDecoder::start() {
- if (isPlaying() || !isVideoLoaded())
- return;
+bool VideoDecoder::seekToFrame(uint frame) {
+ VideoTrack *track = 0;
- _isPlaying = true;
- _startTime = g_system->getMillis();
+ for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) {
+ if (!(*it)->isSeekable())
+ return false;
- // Adjust start time if we've seeked to something besides zero time
- if (_lastTimeChange.totalNumberOfFrames() != 0)
- _startTime -= _lastTimeChange.msecs();
+ if ((*it)->getTrackType() == Track::kTrackTypeVideo) {
+ // We only allow seeking by frame when one video track
+ // is present
+ if (track)
+ return false;
- startAudio();
+ track = (VideoTrack *)*it;
+ }
+ }
+
+ // If we didn't find a video track, we can't seek by frame (of course)
+ if (!track)
+ return false;
+
+ Audio::Timestamp time = track->getFrameTime(frame);
+
+ if (time < 0)
+ return false;
+
+ return seek(time);
+}
+
+void VideoDecoder::start() {
+ if (!isPlaying())
+ setRate(1);
}
void VideoDecoder::stop() {
@@ -346,12 +369,12 @@ void VideoDecoder::stop() {
stopAudio();
// Keep the time marked down in case we start up again
- // We do this before _isPlaying is set so we don't get
+ // We do this before _playbackRate is set so we don't get
// _lastTimeChange returned, but before _pauseLevel is
// reset.
_lastTimeChange = getTime();
- _isPlaying = false;
+ _playbackRate = 0;
_startTime = 0;
_palette = 0;
_dirtyPalette = false;
@@ -365,6 +388,46 @@ void VideoDecoder::stop() {
(*it)->pause(false);
}
+void VideoDecoder::setRate(const Common::Rational &rate) {
+ if (!isVideoLoaded() || _playbackRate == rate)
+ return;
+
+ if (rate == 0) {
+ stop();
+ return;
+ } else if (rate != 1 && hasAudio()) {
+ warning("Cannot set custom rate in videos with audio");
+ return;
+ }
+
+ Common::Rational targetRate = rate;
+
+ if (rate < 0) {
+ // TODO: Implement support for this
+ warning("Cannot set custom rate to backwards");
+ targetRate = 1;
+
+ if (_playbackRate == targetRate)
+ return;
+ }
+
+ if (_playbackRate != 0)
+ _lastTimeChange = getTime();
+
+ _playbackRate = targetRate;
+ _startTime = g_system->getMillis();
+
+ // Adjust start time if we've seeked to something besides zero time
+ if (_lastTimeChange != 0)
+ _startTime -= (_lastTimeChange.msecs() / _playbackRate).toInt();
+
+ startAudio();
+}
+
+bool VideoDecoder::isPlaying() const {
+ return _playbackRate != 0;
+}
+
Audio::Timestamp VideoDecoder::getDuration() const {
Audio::Timestamp maxDuration(0, 1000);
@@ -403,21 +466,45 @@ bool VideoDecoder::VideoTrack::endOfTrack() const {
return getCurFrame() >= (getFrameCount() - 1);
}
+Audio::Timestamp VideoDecoder::VideoTrack::getFrameTime(uint frame) const {
+ // Default implementation: Return an invalid (negative) number
+ return Audio::Timestamp().addFrames(-1);
+}
+
uint32 VideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const {
if (endOfTrack() || getCurFrame() < 0)
return 0;
- Common::Rational time = (getCurFrame() + 1) * 1000;
- time /= getFrameRate();
- return time.toInt();
+ return getFrameTime(getCurFrame() + 1).msecs();
+}
+
+Audio::Timestamp VideoDecoder::FixedRateVideoTrack::getFrameTime(uint frame) const {
+ // Try to get as accurate as possible, considering we have a fractional frame rate
+ // (which Audio::Timestamp doesn't support).
+ Common::Rational frameRate = getFrameRate();
+
+ if (frameRate == frameRate.toInt()) // The nice case (a whole number)
+ return Audio::Timestamp(0, frame, frameRate.toInt());
+
+ // Just convert to milliseconds.
+ Common::Rational time = frame * 1000;
+ time /= frameRate;
+ return Audio::Timestamp(time.toInt(), 1000);
+}
+
+uint VideoDecoder::FixedRateVideoTrack::getFrameAtTime(const Audio::Timestamp &time) const {
+ Common::Rational frameRate = getFrameRate();
+
+ // Easy conversion
+ if (frameRate == time.framerate())
+ return time.totalNumberOfFrames();
+
+ // Default case
+ return (time.totalNumberOfFrames() * frameRate / time.framerate()).toInt();
}
Audio::Timestamp VideoDecoder::FixedRateVideoTrack::getDuration() const {
- // Since Audio::Timestamp doesn't support a fractional frame rate, we're currently
- // just converting to milliseconds.
- Common::Rational time = getFrameCount() * 1000;
- time /= getFrameRate();
- return time.toInt();
+ return getFrameTime(getFrameCount());
}
bool VideoDecoder::AudioTrack::endOfTrack() const {
@@ -527,10 +614,14 @@ bool VideoDecoder::StreamFileAudioTrack::loadFromFile(const Common::String &base
void VideoDecoder::addTrack(Track *track) {
_tracks.push_back(track);
- // Update volume settings if it's an audio track
if (track->getTrackType() == Track::kTrackTypeAudio) {
+ // Update volume settings if it's an audio track
((AudioTrack *)track)->setVolume(_audioVolume);
((AudioTrack *)track)->setBalance(_audioBalance);
+ } else if (track->getTrackType() == Track::kTrackTypeVideo) {
+ // If this track has a better time, update _nextVideoTrack
+ if (!_nextVideoTrack || ((VideoTrack *)track)->getNextFrameStartTime() < _nextVideoTrack->getNextFrameStartTime())
+ _nextVideoTrack = (VideoTrack *)track;
}
// Keep the track paused if we're paused
@@ -603,7 +694,7 @@ bool VideoDecoder::endOfVideoTracks() const {
}
VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() {
- VideoTrack *bestTrack = 0;
+ _nextVideoTrack = 0;
uint32 bestTime = 0xFFFFFFFF;
for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) {
@@ -613,31 +704,12 @@ VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() {
if (time < bestTime) {
bestTime = time;
- bestTrack = track;
+ _nextVideoTrack = track;
}
}
}
- return bestTrack;
-}
-
-const VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() const {
- const VideoTrack *bestTrack = 0;
- uint32 bestTime = 0xFFFFFFFF;
-
- for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) {
- if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack()) {
- const VideoTrack *track = (const VideoTrack *)*it;
- uint32 time = track->getNextFrameStartTime();
-
- if (time < bestTime) {
- bestTime = time;
- bestTrack = track;
- }
- }
- }
-
- return bestTrack;
+ return _nextVideoTrack;
}
void VideoDecoder::startAudio() {
@@ -676,4 +748,12 @@ bool VideoDecoder::hasFramesLeft() const {
return false;
}
+bool VideoDecoder::hasAudio() const {
+ for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++)
+ if ((*it)->getTrackType() == Track::kTrackTypeAudio)
+ return true;
+
+ return false;
+}
+
} // End of namespace Video
diff --git a/video/video_decoder.h b/video/video_decoder.h
index cc7d1df51b..5fec52cf42 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -26,6 +26,7 @@
#include "audio/mixer.h"
#include "audio/timestamp.h" // TODO: Move this to common/ ?
#include "common/array.h"
+#include "common/rational.h"
#include "common/str.h"
#include "graphics/pixelformat.h"
@@ -36,7 +37,6 @@ class SeekableAudioStream;
}
namespace Common {
-class Rational;
class SeekableReadStream;
}
@@ -100,7 +100,7 @@ public:
/////////////////////////////////////////
/**
- * Begin playback of the video.
+ * Begin playback of the video at normal speed.
*
* @note This has no effect if the video is already playing.
*/
@@ -114,6 +114,26 @@ public:
void stop();
/**
+ * Set the rate of playback.
+ *
+ * For instance, a rate of 0 would stop the video, while a rate of 1
+ * would play the video normally. Passing 2 to this function would
+ * play the video at twice the normal speed.
+ *
+ * @note This function does not work for non-0/1 rates on videos that
+ * have audio tracks.
+ *
+ * @todo This currently does not implement backwards playback, but will
+ * be implemented soon.
+ */
+ void setRate(const Common::Rational &rate);
+
+ /**
+ * Returns the rate at which the video is being played.
+ */
+ Common::Rational getRate() const { return _playbackRate; }
+
+ /**
* Returns if the video is currently playing or not.
*
* This is not equivalent to the inverse of endOfVideo(). A video keeps
@@ -121,7 +141,7 @@ public:
* return true after calling start() and will continue to return true
* until stop() (or close()) is called.
*/
- bool isPlaying() const { return _isPlaying; }
+ bool isPlaying() const;
/**
* Returns if a video is rewindable or not. The default implementation
@@ -158,6 +178,14 @@ public:
virtual bool seek(const Audio::Timestamp &time);
/**
+ * Seek to a given frame.
+ *
+ * This only works when one video track is present, and that track
+ * supports getFrameTime(). This calls seek() internally.
+ */
+ bool seekToFrame(uint frame);
+
+ /**
* Pause or resume the video. This should stop/resume any audio playback
* and other stuff. The initial pause time is kept so that any timing
* variables can be updated appropriately.
@@ -367,14 +395,10 @@ public:
*/
bool addStreamFileTrack(const Common::String &baseName);
-
- // Future API
- //void setRate(const Common::Rational &rate);
- //Common::Rational getRate() const;
-
protected:
/**
- * An abstract representation of a track in a movie.
+ * An abstract representation of a track in a movie. Since tracks here are designed
+ * to work independently, they should not reference any other track(s) in the video.
*/
class Track {
public:
@@ -519,6 +543,14 @@ protected:
* Does the palette currently in use by this track need to be updated?
*/
virtual bool hasDirtyPalette() const { return false; }
+
+ /**
+ * Get the time the given frame should be shown.
+ *
+ * By default, this returns a negative (invalid) value. This function
+ * should only be used by VideoDecoder::seekToFrame().
+ */
+ virtual Audio::Timestamp getFrameTime(uint frame) const;
};
/**
@@ -533,12 +565,19 @@ protected:
uint32 getNextFrameStartTime() const;
virtual Audio::Timestamp getDuration() const;
+ Audio::Timestamp getFrameTime(uint frame) const;
protected:
/**
* Get the rate at which this track is played.
*/
virtual Common::Rational getFrameRate() const = 0;
+
+ /**
+ * Get the frame that should be displaying at the given time. This is
+ * helpful for someone implementing seek().
+ */
+ uint getFrameAtTime(const Audio::Timestamp &time) const;
};
/**
@@ -685,9 +724,9 @@ protected:
/**
* Decode enough data for the next frame and enough audio to last that long.
*
- * This function is used by the decodeNextFrame() function. A subclass
+ * This function is used by this class' decodeNextFrame() function. A subclass
* of a Track may decide to just have its decodeNextFrame() function read
- * and decode the frame.
+ * and decode the frame, but only if it is the only track in the video.
*/
virtual void readNextPacket() {}
@@ -733,16 +772,13 @@ protected:
Graphics::PixelFormat getDefaultHighColorFormat() const { return _defaultHighColorFormat; }
/**
- * Find the video track with the lowest start time for the next frame
+ * Set _nextVideoTrack to the video track with the lowest start time for the next frame.
+ *
+ * @return _nextVideoTrack
*/
VideoTrack *findNextVideoTrack();
/**
- * Find the video track with the lowest start time for the next frame
- */
- const VideoTrack *findNextVideoTrack() const;
-
- /**
* Typedef helpers for accessing tracks
*/
typedef Common::Array<Track *> TrackList;
@@ -763,9 +799,11 @@ private:
TrackList _tracks;
// Current playback status
- bool _isPlaying, _needsUpdate;
+ bool _needsUpdate;
Audio::Timestamp _lastTimeChange, _endTime;
bool _endTimeSet;
+ Common::Rational _playbackRate;
+ VideoTrack *_nextVideoTrack;
// Palette settings from individual tracks
mutable bool _dirtyPalette;
@@ -779,6 +817,7 @@ private:
void startAudio();
void startAudioLimit(const Audio::Timestamp &limit);
bool hasFramesLeft() const;
+ bool hasAudio() const;
int32 _startTime;
uint32 _pauseLevel;